1

TLDR: Startx command fails with no screen found error when NVIDIA drivers are initialized by xorg.conf.

Hello, I am trying to install a display manager on a virtualized arch linux install with a 2070m being passed though to it. when I startx with no xorg.conf or set xorg.conf to use the modesetting driver, Everything works great but at low performance since modesetting does not utilize my GPU. When I specify the nvidia drivers, Xorg hangs and produces the error log below.

[ 57268.256] (WW) Failed to open protocol names file lib/xorg/protocol.txt
[ 57268.257]
X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
[ 57268.258] Build Operating System: Linux Arch Linux
[ 57268.259] Current Operating System: Linux arch24c 5.8.5-arch1-1 #1 SMP PREEMPT Thu, 27 Aug 2020 18:53:02 +0000 x86_64
[ 57268.259] Kernel command line: initrd=\intel-ucode.img initrd=\initramfs-linux.img root=UUID=920c25ae-966a-43fc-ba98-247321da1401 rw
[ 57268.260] Build Date: 02 September 2020  06:17:44AM
[ 57268.260]
[ 57268.261] Current version of pixman: 0.40.0
[ 57268.261]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[ 57268.262] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 57268.263] (==) Log file: "/home/arch21/.local/share/xorg/Xorg.0.log", Time: Tue Sep  8 18:22:59 2020
[ 57268.264] (==) Using config file: "/etc/X11/xorg.conf"
[ 57268.264] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 57268.264] (==) ServerLayout "Layout0"
[ 57268.264] (**) |-->Screen "Screen0" (0)
[ 57268.264] (**) |   |-->Monitor "Monitor0"
[ 57268.264] (**) |   |-->Device "Device0"
[ 57268.264] (**) |-->Input Device "Keyboard0"
[ 57268.264] (**) |-->Input Device "Mouse0"
[ 57268.264] (==) Automatically adding devices
[ 57268.264] (==) Automatically enabling devices
[ 57268.264] (==) Automatically adding GPU devices
[ 57268.264] (==) Automatically binding GPU devices
[ 57268.264] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 57268.264] (WW) The directory "/usr/share/fonts/misc" does not exist.
[ 57268.264]    Entry deleted from font path.
[ 57268.264] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/TTF".
[ 57268.264]    Entry deleted from font path.
[ 57268.264]    (Run 'mkfontdir' on "/usr/share/fonts/TTF").
[ 57268.264] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[ 57268.264]    Entry deleted from font path.
[ 57268.264] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[ 57268.264]    Entry deleted from font path.
[ 57268.264] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[ 57268.264]    Entry deleted from font path.
[ 57268.264] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[ 57268.264]    Entry deleted from font path.
[ 57268.264] (==) FontPath set to:

[ 57268.264] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 57268.264] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[ 57268.264] (WW) Disabling Keyboard0
[ 57268.265] (WW) Disabling Mouse0
[ 57268.265] (II) Module ABI versions:
[ 57268.265]    X.Org ANSI C Emulation: 0.4
[ 57268.265]    X.Org Video Driver: 24.1
[ 57268.265]    X.Org XInput driver : 24.1
[ 57268.265]    X.Org Server Extension : 10.0
[ 57268.265] (++) using VT number 1

[ 57268.266] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[ 57268.267] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 57268.267] (II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/drm/card0
[ 57268.267] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 10 paused 0
[ 57268.270] (--) PCI:*(0@0:1:0) 1b36:0100:1af4:1100 rev 5, Mem @ 0xc4000000/67108864, 0xc0000000/67108864, 0xca384000/8192, I/O @ 0x00002040/32, BIOS @ 0x????????/131072
[ 57268.270] (--) PCI: (5@0:0:0) 10de:1f10:1a58:2005 rev 161, Mem @ 0xc8000000/16777216, 0x800000000/268435456, 0x810000000/33554432, I/O @ 0x0000c000/128
[ 57268.270] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[ 57268.270] (II) LoadModule: "glx"
[ 57268.270] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 57268.271] (II) Module glx: vendor="X.Org Foundation"
[ 57268.271]    compiled for 1.20.9, module version = 1.0.0
[ 57268.271]    ABI class: X.Org Server Extension, version 10.0
[ 57268.271] (II) LoadModule: "nvidia"
[ 57268.271] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[ 57268.271] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 57268.271]    compiled for 1.6.99.901, module version = 1.0.0
[ 57268.271]    Module class: X.Org Video Driver
[ 57268.271] (II) NVIDIA dlloader X Driver  450.66  Wed Aug 12 19:44:12 UTC 2020
[ 57268.271] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 57268.272] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[ 57268.272] (EE) No devices detected.
[ 57268.272] (EE)
Fatal server error:
[ 57268.272] (EE) no screens found(EE)
[ 57268.272] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[ 57268.272] (EE) Please also check the log file at "/home/arch21/.local/share/xorg/Xorg.0.log" for additional information.
[ 57268.272] (EE)
[ 57268.309] (EE) Server terminated with error (1). Closing log file.

The section of interest produces 2 distinct errors:

[ 57268.272] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)

The first error seems to be a privilage escalation error caused by the xinit binary not having nessesary group privalages. To try and solve this, I tried sudo chmod u+s /usr/bin/xinit to let the binary be executable by any user. This did not fix the error though and I remove the probability of it being a privalage error since the same (operation not permitted error) persisted even when startx'ing as root.

[ 57268.272] (EE) No devices detected.
[ 57268.272] (EE)
Fatal server error:
[ 57268.272] (EE) no screens found(EE)

This error seems to be the main problem. Even when the display variable is set it does not work. I have tried tons of possible solutions but none of them have worked and still produce the same error. Since all other drivers Ive tried testing have worked I think its either an issue with my laptop`s display multiplexing or the nvidia drivers themselves.

My xorg.conf looks like this:

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
EndSection

With my .xinitrc file showing:

xrandr --auto
picom -f &
exec dwm

The pcie devices displayed via lspci show:

07:00:0 VGA compatible controller: NVIDIA Corporation TU106M [GeForce RTX 2070 Mobile] (rev a1)
08:00:0 Audio device: NVIDIA Corporation TU106 High Definition Audio Controller (rev a1)
09:00:0 USB controller: NVIDIA Corporation TU106 USB 3.1 Host Controller (rev a1)
0a:00:0 Serial bus controller [0c80]: NVIDIA Corporation TU106  USB Type-C UCSI Controller (rev a1)

The nvidia and nvidia-utils packages are also installed.

Any and and all ideas regarding the problem are welcome.

6
  • Ask here as well and provide nvidia-bug-report forums.developer.nvidia.com/c/gpu-unix-graphics/linux/148 Aug 22 '20 at 12:09
  • I've filed one, for anyone interested, the link is: forums.developer.nvidia.com/t/…
    – Cryptic
    Aug 25 '20 at 20:30
  • I just tried startx on a secondary vm (without gpu pass through) and I get the same error there as well! Both KVMs were working before so I think it is a issue with QEMU or the redhat paravirtual graphic card. ill look into it...
    – Cryptic
    Aug 26 '20 at 2:57
  • Did you run nvidia-settings ? (Regarding your xorg.conf, I'd say no) And what d'you get in /etc/X11/xorg.conf.d ?
    – MC68020
    Sep 8 '20 at 20:23
  • nvidia-settings returns an error notating that the display is undefined which is expected since NVIDIA settings should be run in a X session which I cannot since it doesn't work. and for /etc/X11/xorg.conf.d, there is nothing at all in that directory.
    – Cryptic
    Sep 8 '20 at 20:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.