NVidia 黑屏且带有光标

NVidia 黑屏且带有光标

[注:我知道关于 nvidia 和黑屏有很多问题,但到目前为止还没有一个能让我接近解决方案,我尝试了很多次,见下文]

问题:在 Dell XPS 9570(配备 GeForce GTX 1050 Ti 显卡以及内置 Intel 显卡)上运行 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)(多次,中间进行清洗)
  • 尝试过大黄蜂: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

我认为此消息与此问题无关,就我从提到此消息的问题中看到的情况而言,它可能不是一个问题......

答案1

我让 nvidia-driver-390 与以前的内核 4.18.0-12 一起工作(但仍然没有获得多显示器支持)。

然后我决定再次尝试使用 4.18.0-13,但没有nomodeset选项 - 这样就解决了问题!

因此,就我而言,解决方案是: - nvidia-driver 390 驱动程序 -从以开头nomodeset的行中删除。GRUB_CMDLINE_LINUX_DEFAULT/etc/default/grub

启动时偶尔出现空白屏幕的问题仍然会出现。实际上,这种情况似乎变得更加频繁。在这种情况下,一种解决方法是登录 tty1 并执行:sudo systemctl restart lightdm

相关内容