概括
我使用 将运行 Kubuntu 18.04 的 (MSI GP72) 笔记本电脑更新至 18.10 sudo do-release-upgrade
。升级成功完成,系统已重新启动。
现在 GUI 没有显示。
您听到了迎宾员的声音,但登录屏幕从未显示;您只看到黑屏。
我可以使用终端登录并“正常”使用笔记本电脑,无论是本地还是远程(我可以通过 SSH 进入),但从未显示 GUI。
我见过其他具有类似症状的问题,但是它们的问题有清晰可见的错误消息和/或日志条目,有助于识别问题(例如重新安装驱动程序等),但对我没有帮助。
我该如何修复此问题?
一些故障排除
除了下面的注释之外,我没有发现任何(明显的)错误消息;我检查了以下日志文件:
/var/log/syslog
:显示一些nvidia
错误(详细;见下文)/var/log/boot.log
/var/log/kern.log
/var/log/dpkg.log
/var/log/nvidia-installer.log
/var/log/gpu-manager.log
:显示nouveau
驱动程序不是已加载和列入黑名单/var/log/Xorg.0.log
:只有一行对No monitor specified for screen "nvidia".
我来说很突出
检查systemctl status lightdm.service
显示它正在运行。重新启动服务没有任何作用。我删除/清除了plasma-workspace
、plasma-desktop
和nvidia-driver-390
包(然后是sudo apt autoremove -y --purge
未使用的包),重新启动并重新安装它们,但没有任何效果。
几年前,我能够修复16.04 中存在类似问题,但我对这一点却束手无策。
命令结果
ubuntu 驱动程序
$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd0000139Bsv00001462sd0000115Bbc03sc02i00
vendor : NVIDIA Corporation
model : GM107M [GeForce GTX 960M]
driver : nvidia-driver-390 - distro non-free recommended
driver : xserver-xorg-video-nouveau - distro free builtin
陣容
$ dkms status
nvidia, 390.87, 4.15.0-36-generic, x86_64: installed
nvidia, 390.87, 4.18.0-10-generic, x86_64: installed
virtualbox, 5.2.18, 4.15.0-36-generic, x86_64: installed
virtualbox, 5.2.18, 4.18.0-10-generic, x86_64: installed
修改
$ lsmod | grep nvidia
nvidia_uvm 786432 0
nvidia_drm 40960 1
nvidia_modeset 1110016 2 nvidia_drm
nvidia 14368768 61 nvidia_uvm,nvidia_modeset
drm_kms_helper 172032 2 nvidia_drm,i915
drm 458752 5 drm_kms_helper,nvidia_drm,i915
ipmi_msghandler 102400 2 ipmi_devintf,nvidia
systemd
$ systemctl status lightdm.service
● lightdm.service - Light Display Manager
Loaded: loaded (/lib/systemd/system/lightdm.service; indirect; vendor preset: enabled)
Active: active (running) since Sun 2018-10-21 14:39:22 MDT; 4h 15min ago
Docs: man:lightdm(1)
Main PID: 5104 (lightdm)
Tasks: 6 (limit: 4915)
Memory: 20.0M
CGroup: /system.slice/lightdm.service
├─5104 /usr/sbin/lightdm
├─5117 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
└─5437 lightdm --session-child 13 20
Oct 21 14:39:24 red-dragon lightdm[5104]: warning: output not found; ignoring
Oct 21 14:39:24 red-dragon lightdm[5104]: warning: output not found; ignoring
Oct 21 14:39:24 red-dragon lightdm[5214]: pam_kwallet(lightdm-greeter:setcred): (null): pam_sm_setcred
Oct 21 14:39:24 red-dragon lightdm[5214]: pam_kwallet5(lightdm-greeter:setcred): (null): pam_sm_setcred
Oct 21 14:39:24 red-dragon lightdm[5214]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
Oct 21 14:39:24 red-dragon lightdm[5214]: pam_kwallet(lightdm-greeter:session): (null): pam_sm_open_session
Oct 21 14:39:24 red-dragon lightdm[5214]: pam_kwallet(lightdm-greeter:session): pam_kwallet: open_session called without kwallet_key
Oct 21 14:39:24 red-dragon lightdm[5214]: pam_kwallet5(lightdm-greeter:session): (null): pam_sm_open_session
Oct 21 14:39:24 red-dragon lightdm[5214]: pam_kwallet5(lightdm-greeter:session): pam_kwallet5: open_session called without kwallet5_key
Oct 21 14:39:25 red-dragon lightdm[5437]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "game-servers"
grep nvidia /var/log/syslog
在得到 198 行之后,这是对我来说最突出的子集;看起来好像找不到 nvidia 驱动程序文件:
Oct 21 14:36:22 red-dragon [485]: failed to execute '/usr/bin/nvidia-smi' '/usr/bin/nvidia-smi': No such file or directory
Oct 21 14:36:22 red-dragon systemd-udevd[456]: Process '/usr/bin/nvidia-smi' failed with exit code 2.
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/share/lightdm/lightdm.conf.d/90-nvidia.conf: No such file or directory
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/share/X11/xorg.conf.d/10-nvidia.conf: No such file or directory
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/lib/x86_64-linux-gnu/tls/libnvidia-tls.so.390.87: No such file or directory
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.390.87: No such file or directory
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/lib/x86_64-linux-gnu/nvidia/xorg/nvidia_drv.so: No such file or directory
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/lib/x86_64-linux-gnu/nvidia/xorg/libglx.so.390.87: No such file or directory
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/share/nvidia/nvidia-application-profiles-390.87-rc: No such file or directory
Oct 21 14:36:22 red-dragon ureadahead[826]: ureadahead:/usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.390.87: No such file or directory
Oct 21 14:36:22 red-dragon nvidia-persistenced: Verbose syslog connection opened
Oct 21 14:36:22 red-dragon nvidia-persistenced: Now running with user ID 126 and group ID 134
Oct 21 14:36:22 red-dragon nvidia-persistenced: Started (1101)
Oct 21 14:36:22 red-dragon nvidia-persistenced: Failed to open libnvidia-cfg.so.1: libnvidia-cfg.so.1: cannot open shared object file: No such file or directory
虽然可能是在其他地方找到了这些文件(dkms
并lsmod
显示已加载驱动程序),但奇怪的是,它还抱怨无法执行/usr/bin/nvidia-smi
,但该文件存在,我能从 shell 运行它就很好了。