[注意:我知道有很多关于nvidia和黑屏的问题,但到目前为止还没有一个让我更接近解决方案,我已经尝试了很多,见下文]
问题:在戴尔 XPS 9570(具有 GeForce GTX 1050 Ti 卡,以及内置英特尔显卡)上运行 Xubuntu 18.10,nvidia 410 和 415 驱动程序停止工作。在滚动引导消息后启动 Linux 时,我得到的只是一个黑屏,左上角有(不闪烁)白色光标。nouveau 驱动程序工作正常,但它们只允许我使用内置的笔记本电脑屏幕,而不是通过 HDMI 连接到笔记本电脑的屏幕。
它曾经可以工作(如果你可以这样称呼它,当它引导到工作桌面环境时,它 3 次中有 2 次启动到工作桌面环境,否则保持黑色)直到今天早上(当我做了一个apt upgrade
,它安装了 linux-image-4.18.0- 13.
到目前为止,我为解决此问题所做的尝试:
- 尝试启动 linux-image-4.18.0-12,同样的问题
- 按照这里的建议,我添加
nomodeset
了要通过 grub 设置的内核选项(我之前已经设置了这个,这是让它首先工作所必需的) - 正如大部分时间在与 nvidia 相关的空白屏幕问题上所建议的那样,我尝试清除所有与 nvidia 相关的内容(由 列出的所有内容
dpkg --list | grep nvidia
),并重新安装 410 驱动程序 - 我还添加了图形驱动程序 ppa 并从那里安装了 415 个驱动程序(https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa)(中间有几次清除)
- 尝试过 Bumblebee:https ://wiki.ubuntu.com/Bumblebee (那里的指南似乎没有激活 nvidia 驱动程序,对吗?至少对我来说没有,仍然使用 nouveau)
- 至于上面提到的问题,当 GUI 只能每 3 次加载 2 次时,我尝试了 xdm、gdm、lddm - 但是使用它们时,我一直黑屏;只有 lightdm(我记得不久前有一个问题导致了我看到的症状)似乎与 nvidia 驱动程序一起工作......
至于日志中的错误,我看到一些关于 nvidia-persistenced 和一些 bumblebee 参考(当然,后者仅在安装 bumblebee 之后)。现在似乎没有任何真正的与 nvidia 相关的错误(以前在屏幕保持空白的情况下也没有):
$ journalctl --since today | grep -i nvidia | grep -i "\(err\|fail\)"
Dez 21 07:04:45 nertha kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module 415.23 Thu Dec 6 21:34:12 CST 2018 (using threaded interrupts)
Dez 21 13:44:00 nertha kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module 415.23 Thu Dec 6 21:34:12 CST 2018 (using threaded interrupts)
Dez 21 13:44:00 nertha nvidia-persistenced[743]: nvidia-persistenced failed to initialize. Check syslog for more details.
Dez 21 13:44:00 nertha nvidia-persistenced[749]: Failed to query NVIDIA devices. Please ensure that the NVIDIA device files (/dev/nvidia*) exist, and that user 121 has read and write permissions for those files.
Dez 21 13:44:00 nertha systemd[1]: nvidia-persistenced.service: Failed with result 'exit-code'.
Dez 21 13:44:00 nertha systemd[1]: Failed to start NVIDIA Persistence Daemon.
Dez 21 13:47:49 nertha kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module 415.23 Thu Dec 6 21:34:12 CST 2018 (using threaded interrupts)
Dez 21 13:47:49 nertha nvidia-persistenced[772]: nvidia-persistenced failed to initialize. Check syslog for more details.
Dez 21 13:47:49 nertha nvidia-persistenced[780]: Failed to query NVIDIA devices. Please ensure that the NVIDIA device files (/dev/nvidia*) exist, and that user 121 has read and write permissions for those files.
Dez 21 13:47:49 nertha systemd[1]: nvidia-persistenced.service: Failed with result 'exit-code'.
Dez 21 13:47:49 nertha systemd[1]: Failed to start NVIDIA Persistence Daemon.
Dez 21 13:47:50 nertha nvidia-persistenced[875]: Failed to unlink PID file: No such file or directory
Dez 21 13:47:50 nertha nvidia-persistenced[912]: Failed to unlink PID file: No such file or directory
Dez 21 13:47:50 nertha nvidia-persistenced[951]: Failed to unlink PID file: No such file or directory
Dez 21 13:47:50 nertha nvidia-persistenced[971]: Failed to unlink PID file: No such file or directory
Dez 21 13:47:50 nertha systemd[1]: nvidia-persistenced.service: Failed with result 'start-limit-hit'.
Dez 21 13:47:50 nertha systemd[1]: Failed to start NVIDIA Persistence Daemon.
Dez 21 13:47:50 nertha systemd[1]: nvidia-persistenced.service: Failed with result 'start-limit-hit'.
Dez 21 13:47:50 nertha systemd[1]: Failed to start NVIDIA Persistence Daemon.
Dez 21 13:58:06 nertha kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module 415.23 Thu Dec 6 21:34:12 CST 2018 (using threaded interrupts)
Dez 21 14:09:52 nertha kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module 415.25 Wed Dec 12 10:22:08 CST 2018 (using threaded interrupts)
Dez 21 14:09:52 nertha nvidia-persistenced[754]: nvidia-persistenced failed to initialize. Check syslog for more details.
Dez 21 14:09:52 nertha nvidia-persistenced[759]: Failed to query NVIDIA devices. Please ensure that the NVIDIA device files (/dev/nvidia*) exist, and that user 121 has read and write permissions for those files.
Dez 21 14:09:53 nertha systemd[1]: nvidia-persistenced.service: Failed with result 'exit-code'.
Dez 21 14:09:53 nertha systemd[1]: Failed to start NVIDIA Persistence Daemon.
Dez 21 14:10:53 nertha kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module 415.25 Wed Dec 12 10:22:08 CST 2018 (using threaded interrupts)
Dez 21 14:10:53 nertha nvidia-persistenced[809]: nvidia-persistenced failed to initialize. Check syslog for more details.
Dez 21 14:10:53 nertha nvidia-persistenced[811]: Failed to query NVIDIA devices. Please ensure that the NVIDIA device files (/dev/nvidia*) exist, and that user 121 has read and write permissions for those files.
Dez 21 14:10:53 nertha systemd[1]: nvidia-persistenced.service: Failed with result 'exit-code'.
Dez 21 14:10:53 nertha systemd[1]: Failed to start NVIDIA Persistence Daemon.
Dez 21 14:10:54 nertha nvidia-persistenced[912]: Failed to unlink PID file: No such file or directory
Dez 21 14:10:54 nertha nvidia-persistenced[920]: Failed to unlink PID file: No such file or directory
Dez 21 14:10:54 nertha nvidia-persistenced[926]: Failed to unlink PID file: No such file or directory
Dez 21 14:10:54 nertha nvidia-persistenced[956]: Failed to unlink PID file: No such file or directory
Dez 21 14:10:54 nertha nvidia-persistenced[975]: Failed to unlink PID file: No such file or directory
Dez 21 14:10:54 nertha nvidia-persistenced[988]: Failed to unlink PID file: No such file or directory
Dez 21 14:10:54 nertha nvidia-persistenced[1016]: Failed to unlink PID file: No such file or directory
Dez 21 14:10:54 nertha nvidia-persistenced[1058]: Failed to unlink PID file: No such file or directory
Dez 21 14:10:54 nertha nvidia-persistenced[1068]: Failed to unlink PID file: No such file or directory
Dez 21 14:10:54 nertha nvidia-persistenced[1089]: Failed to unlink PID file: No such file or directory
Dez 21 14:10:54 nertha nvidia-persistenced[1105]: Failed to unlink PID file: No such file or directory
Dez 21 14:10:54 nertha nvidia-persistenced[1113]: Failed to unlink PID file: No such file or directory
Dez 21 14:10:54 nertha nvidia-persistenced[1121]: Failed to unlink PID file: No such file or directory
Dez 21 14:10:54 nertha nvidia-persistenced[1131]: Failed to unlink PID file: No such file or directory
Dez 21 14:10:54 nertha nvidia-persistenced[1142]: Failed to unlink PID file: No such file or directory
Dez 21 14:31:05 nertha kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module 415.25 Wed Dec 12 10:22:08 CST 2018 (using threaded interrupts)
Dez 21 14:31:05 nertha nvidia-persistenced[756]: nvidia-persistenced failed to initialize. Check syslog for more details.
Dez 21 14:31:05 nertha nvidia-persistenced[759]: Failed to query NVIDIA devices. Please ensure that the NVIDIA device files (/dev/nvidia*) exist, and that user 121 has read and write permissions for those files.
Dez 21 14:31:05 nertha systemd[1]: nvidia-persistenced.service: Failed with result 'exit-code'.
Dez 21 14:31:05 nertha systemd[1]: Failed to start NVIDIA Persistence Daemon.
Dez 21 14:31:06 nertha systemd-udevd[403]: Process '/bin/mknod -m 666 /dev/nvidiactl c 195 255' failed with exit code 1.
Dez 21 14:31:06 nertha systemd-udevd[403]: Process '/bin/mknod -m 666 /dev/nvidia0 c 195 0' failed with exit code 1.
Dez 21 14:31:06 nertha bumblebeed[783]: [ 5.548701] [ERROR]Failed to unload module 'nvidia_drm' (ref count: 2).
Dez 21 14:31:06 nertha bumblebeed[783]: [ 5.548716] [ERROR]Failed to unload module 'nvidia_modeset' (ref count: 2).
Dez 21 14:31:06 nertha bumblebeed[783]: [ 5.548724] [ERROR]Failed to unload module 'nvidia' (ref count: 77).
Dez 21 14:48:44 nertha kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module 410.78 Sat Nov 10 22:09:04 CST 2018 (using threaded interrupts)
Dez 21 14:48:45 nertha systemd-udevd[427]: Process '/bin/mknod -m 666 /dev/nvidiactl c 195 255' failed with exit code 1.
Dez 21 14:48:45 nertha systemd-udevd[427]: Process '/bin/mknod -m 666 /dev/nvidia0 c 195 0' failed with exit code 1.
Dez 21 14:48:45 nertha bumblebeed[804]: [ 5.564388] [ERROR]Failed to unload module 'nvidia_drm' (ref count: 2).
Dez 21 14:48:45 nertha bumblebeed[804]: [ 5.564420] [ERROR]Failed to unload module 'nvidia_modeset' (ref count: 2).
Dez 21 14:48:45 nertha bumblebeed[804]: [ 5.564428] [ERROR]Failed to unload module 'nvidia' (ref count: 77).
我真的很想再次使用 nvidia 驱动程序,与 nouveau 一样,似乎无法识别外部屏幕。我还能尝试什么?如果您需要更多信息,请告诉我!
部分原因似乎是 lightdm 问题。正如下面的答案所述,由于某种原因,lightdm 第一次似乎没有正确启动。与 lightdm 相关的唯一问题出现在期刊 ( journalctl -b
) 中是:
PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
PAM adding faulty module: pam_kwallet.so
我想此消息与此问题无关,据我从提及此消息的问题中看到,这可能不是问题...
我让 nvidia-driver-390 与以前的内核 4.18.0-12 一起工作(但仍然没有运行多显示器支持)。
然后我决定用 4.18.0-13 再试一次,但没有
nomodeset
选项 - 并且修复了它!所以我的解决方案是: - nvidia-driver 390 drivers -从以in
nomodeset
开头的行中删除。GRUB_CMDLINE_LINUX_DEFAULT
/etc/default/grub
启动时偶尔出现空白屏幕的问题仍然存在。实际上,它似乎变得更加频繁。在这种情况下,一种解决方法是登录 tty1 并执行:
sudo systemctl restart lightdm
。