Funtoo - How to repair XDM and NVIDIA
Goal: After some updates it can happen that by example XDM or Nvidia will not work any more properly. It could be to not more booting properly after an kernel change. With this how to you will be able to repair most of update issues.
XDM
# emerge xdm
Configure
xdm is controlled by /etc/conf.d/xdm.
# vim /etc/conf.d/xdm
DISPLAYMANAGER="lightdm"
NOTE: xdm is in my case configured with a modern display managers. see: Lightdm
Init
# rc-update add xdm # rc
Nvidia
WARNING: If you installed debian-sources with the binary USE flag you will need to blacklist the nouveau module:
# vim /etc/modrpobe.d/nouveau-blacklist.conf blacklist nouveau options nouveau modeset=0 alias nouveau off
Installation
# vim /etc/portage/make.conf VIDEO_CARDS="nvidia"
# emerge x11-drivers/nvidia=drivers
When the installation is complete run modprobe nvidia modules to read the kernel memory.
lsmod | grep nvidia
If an update before remove the old module
# rmod nvidia # modrprobe nvidia
Configuring
vim /etc/conf.d/modules
modules="nvidia"
Integration with X server
# nvidia-xconfig
Enabling NVIDIA support
# vim /etc/portage/make.conf
USE="nvidia"
Enabling Opengl/Opencl
# eselect opengl set nvidia # eselect opencl set nvidia
Troubleshooting
Xorg says it can't find any screens?
# /etc/init.d/xdm stop $ startx
nvidia-xconfig
From here it should work, if still not working try:
# lspci | grep -i nvidia
---
"01:00.0" VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)
---
# vim /etc/X11/xorg.conf
---
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:1:0:0"
EndSection
---
Now you can retry with your user a starx and your xorg should work fine.
Documentation
XDM:
NVIDIA: