TLDR:当 NVIDIA 驱动程序由 xorg.conf 初始化时,Startx 命令失败,并出现未找到屏幕错误。
您好,我正在尝试在虚拟化 arch Linux 安装上安装显示管理器,并传递给它 2070m。当我在没有 xorg.conf 的情况下启动 x 或将 xorg.conf 设置为使用模式设置驱动程序时,一切都很好,但性能较低,因为模式设置不使用我的 GPU。当我指定 nvidia 驱动程序时,Xorg 挂起并生成下面的错误日志。
[ 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.
感兴趣的部分会产生 2 个不同的错误:
[ 57268.272] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
第一个错误似乎是由于 xinit 二进制文件没有必要的组权限而导致的权限升级错误。为了尝试解决这个问题,我尝试了sudo chmod u+s /usr/bin/xinit让任何用户都可以执行该二进制文件。但这并没有修复错误,并且我消除了它是私有错误的可能性,因为即使以 root 身份启动,相同的(不允许操作的错误)仍然存在。
[ 57268.272] (EE) No devices detected.
[ 57268.272] (EE)
Fatal server error:
[ 57268.272] (EE) no screens found(EE)
这个错误似乎是主要问题。即使设置了显示变量,它也不起作用。我已经尝试了很多可能的解决方案,但没有一个有效并且仍然产生相同的错误。由于我尝试测试的所有其他驱动程序都有效,我认为这要么是我的笔记本电脑的显示多路复用问题,要么是 nvidia 驱动程序本身的问题。
我的xorg.conf看起来像这样:
Section "Device"
Identifier "nvidia"
Driver "nvidia"
EndSection
和我的.xinitrc文件显示:
xrandr --auto
picom -f &
exec dwm
这PCIE设备显示通过lspci展示:
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)
这英伟达和Nvidia-utils软件包也已安装。
欢迎有关该问题的任何和所有想法。