# [SOLVED] Xorg does not start with nvidia GPU after update.

## Kresp

Recently I did a full system update, including upgrading versions of kernel, nvidia-drivers (for GTX 960) and xorg-server.

After reboot, X would not start anymore.

Log for startx with non-existent xorg.conf: https://pastebin.com/tnZLx8HR

```

[    52.935] (II) NVIDIA dlloader X Driver  415.27  Thu Dec 20 17:12:39 CST 2018

[    50.935] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs

[    52.935] (--) using VT number 8

 

[    52.937] (EE) No devices detected.

[    52.937] (EE)

Fatal server error:

[    52.937] (EE) no screens found(EE) 

```

"No devices detected" is strange, since lspci shows that nvidia driver is loaded for the GPU and lsmod shows nvidia, nvidia_modeset and nvidia_drm.

If I use nvidia-xconfig to create xorg.conf, error is different: https://pastebin.com/guBUZKsb

```

[   231.784] (II) Module "ramdac" already built-in

[   231.784] (EE) Screen 0 deleted because of no matching config section.

[   231.784] (II) UnloadModule: "nvidia"

[   231.784] (II) UnloadSubModule: "wfb"

[   231.784] (II) UnloadSubModule: "fb"

[   231.784] (EE) Device(s) detected, but none match those in the config file.

[   231.784] (EE)

Fatal server error:

[   231.784] (EE) no screens found(EE) 

```

xorg.conf: https://pastebin.com/6UTJk3qf

Something is probably screwed up in my system though - since I've already tried rolling back to older versions - to 4.14 for kernel, to masked 1.19.5-r2 for xorg-server and to 390.87 nvidia drivers. Problem stays the same.

I did a full rebuild of @world too.

Kernel log: https://pastebin.com/r4b0Jc9n

Hardware is fine though - old gentoo liveusb boots and works with nouveau well enough. However, when I build nouveau for my kernel - it locks the screen after nouveau.ko loads if KMS is available, and Xorg would not start if nomodeset is specified.

Also, all the old verions I'm upgrading from are not in portage tree anymore. So, for a time being I'm stuck headless until I figure this one out.

Also, sometimes I see this weird stuff:

```

Jan 23 03:07:44 wagner kernel: <28>[   68.624151] udevd[4327]: worker [4403] /devices/pci0000:00/0000:00:03.1/0000:1d:00.0 is taking a long time

Jan 23 03:07:44 wagner kernel: <28>[   68.624154] udevd[4327]: worker [4408] /module/nvidia is taking a long time

Jan 23 03:09:43 wagner kernel: <27>[  187.467065] udevd[4408]: timeout 'nvidia-udev.sh add'

Jan 23 03:09:43 wagner kernel: <28>[  187.467082] udevd[4408]: slow: 'nvidia-udev.sh add' [4478]

Jan 23 03:09:43 wagner kernel: <27>[  187.513570] udevd[4327]: worker [4403] /devices/pci0000:00/0000:00:03.1/0000:1d:00.0 timeout; kill it

Jan 23 03:09:43 wagner kernel: <27>[  187.513579] udevd[4327]: seq 2166 '/devices/pci0000:00/0000:00:03.1/0000:1d:00.0' killed

Jan 23 03:09:43 wagner kernel: <27>[  187.513581] udevd[4327]: worker [4408] /module/nvidia timeout; kill it

Jan 23 03:09:43 wagner kernel: <27>[  187.513585] udevd[4327]: seq 2597 '/module/nvidia' killed

Jan 23 03:09:43 wagner kernel: <28>[  187.513925] udevd[4327]: worker [4408] terminated by signal 9 (Killed)

Jan 23 03:09:43 wagner kernel: <27>[  187.513927] udevd[4327]: worker [4408] failed while handling '/module/nvidia'

```

inittab:

```

c1:12345:respawn:/sbin/qingy tty1

c2:2345:respawn:/sbin/agetty 38400 tty2 linux

c3:2345:respawn:/sbin/agetty 38400 tty3 linux

c4:2345:respawn:/sbin/agetty 38400 tty4 linux

c5:2345:respawn:/sbin/agetty 38400 tty5 linux

c6:2345:respawn:/sbin/agetty 38400 tty6 linux

c7:2345:respawn:/sbin/agetty 38400 tty7 linux

```

```

[I] x11-base/xorg-server

     Available versions:  {M}1.19.5-r2(0/1.19.5) 1.20.3(0/1.20.3) **9999(0/9999) {debug dmx doc +glamor ipv6 kdrive libressl minimal selinux static-libs +suid systemd tslib +udev unwind wayland xcsecurity xephyr xnest xorg xvfb}

     Installed versions:  1.20.3(0/1.20.3)(10:57:40 PM 01/23/2019)(glamor ipv6 suid udev xorg -debug -dmx -doc -kdrive -libressl -minimal -selinux -static-libs -systemd -unwind -wayland -xcsecurity -xephyr -xnest -xvfb)

     Homepage:            https://www.x.org/wiki/ https://cgit.freedesktop.org/

     Description:         X.Org X servers

[I] x11-drivers/nvidia-drivers

     Available versions:  340.107(0/340)^md 390.87(0/390)^md 410.93(0/410)^md 415.25(0/415)^md (~)415.27(0/415)^md {+X acpi compat +driver gtk3 +kms multilib static-libs +tools uvm wayland ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" KERNEL="FreeBSD linux"}

     Installed versions:  415.27(0/415)^md(11:41:17 PM 01/23/2019)(X driver kms multilib tools -acpi -compat -gtk3 -static-libs -uvm -wayland ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32" KERNEL="linux -FreeBSD")

     Homepage:            http://www.nvidia.com/

     Description:         NVIDIA Accelerated Graphics Driver

[I] x11-libs/libdrm

     Available versions:  2.4.96^t **9999^t {libkms valgrind ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" VIDEO_CARDS="amdgpu exynos freedreno intel nouveau omap radeon tegra vc4 vivante vmware"}

     Installed versions:  2.4.96^t(11:41:32 PM 01/23/2019)(-libkms -valgrind ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32" VIDEO_CARDS="-amdgpu -exynos -freedreno -intel -nouveau -omap -radeon -tegra -vc4 -vivante -vmware")

     Homepage:            https://dri.freedesktop.org/

     Description:         X.Org libdrm library

[I] media-libs/mesa

     Available versions:  18.2.7^t 18.2.8^t ~18.3.0^t ~18.3.1^t ~18.3.2_pre^t[1] **9999^t {+classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau vulkan wayland xa xvmc ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" VIDEO_CARDS="freedreno i915 i965 imx intel nouveau r100 r200 r300 r600 radeon radeonsi vc4 virgl vivante vmware"}

     Installed versions:  18.2.8^t(11:43:29 PM 01/23/2019)(classic dri3 egl gallium gbm gles2 llvm lm_sensors vdpau -d3d9 -debug -gles1 -opencl -osmesa -pax_kernel -pic -selinux -test -unwind -vaapi -valgrind -vulkan -wayland -xa -xvmc ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32" VIDEO_CARDS="-freedreno -i915 -i965 -imx -intel -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi -vc4 -virgl -vivante -vmware")

     Homepage:            https://www.mesa3d.org/ https://mesa.freedesktop.org/

     Description:         OpenGL-like graphic library for Linux

```

Last edited by Kresp on Thu Jan 24, 2019 1:06 am; edited 1 time in total

----------

## hhfeuer

'No devices detected' in most circumstances means no monitors found so the driver is stopping. You can use in xorg.conf device section

```
    Option         "AllowEmptyInitialConfiguration" "true"
```

to let the driver continue headless but this doesn't explain why the monitor is missing. What connection/monitor are you using?

----------

## Kresp

 *hhfeuer wrote:*   

> 'No devices detected' in most circumstances means no monitors found so the driver is stopping. You can use in xorg.conf device section
> 
> ```
>     Option         "AllowEmptyInitialConfiguration" "true"
> ```
> ...

 

Tried it. Same thing.

Monitor is DVI-D. It's plugged in proper, rechecked it and tried second DVI port.

----------

## hhfeuer

Ok, new approach:

The xorg.log without xorg.conf is telling

```
[    52.921] (==) Using config directory: "/etc/X11/xorg.conf.d"

[    52.921] (==) Using system config directory "/usr/share/X11/xorg.conf.d"

[    52.921] (==) ServerLayout "X.org Configured"

[    52.921] (**) |-->Screen "Screen0" (0)

[    52.921] (**) |   |-->Monitor "Monitor0"

[    52.922] (**) |   |-->Device "Card0"

[    52.922] (**) |-->Input Device "Mouse0"

[    52.922] (**) |-->Input Device "Keyboard0"

```

which points to an old config file available in either

/etc/X11/xorg.conf.d

/usr/share/X11/xorg.conf.d

Please check and post.

----------

## tryn

Are you sure that your computer supports the version that you just installed. It could be that you need a different version of x11-drivers/nvidia-drivers. You might try one of the lower numbers. 

 The version that you have installed is an unstable number and that could also be the issue.

----------

## Kresp

 *tryn wrote:*   

> Are you sure that your computer supports the version that you just installed. It could be that you need a different version of x11-drivers/nvidia-drivers. You might try one of the lower numbers. 
> 
>  The version that you have installed is an unstable number and that could also be the issue.

 

Only 340.107 does not support my Maxwell GPU. The rest of them should.

 *hhfeuer wrote:*   

> /X11/xorg.conf.d
> 
> /usr/share/X11/xorg.conf.d
> 
> Please check and post.

 

That was exactly it.

/etc/X11/xorg.conf.d/ had a file from 2017 that I had completely forgotten about, which explicitly names different busid from when I was testing something. It was not affecting anything until yesterday for some reason.

Got rid of it, it's all good now.

Thanks a lot.

----------

