apt-get upgrade
在过去的几天中,我遇到了类似的问题(基本上一切都崩溃了)。这是我的经验。我希望他们可以帮助某个人。
我在多台计算机上运行Ubuntu 14.04,一旦找到它,我的解决方案便可以在所有计算机上运行:
首先,如果为运行中的内核构建了图形内核模块,则同时更新图形驱动程序和内核可能会导致问题,因为重新启动后内核会发生变化。
经过几个小时的摆弄,这是我的解决方案(在台式机上,仅使用已安装的Nvidia图形卡,因此无需bumblebee
或primus
)。
症状:每次我重新启动lightdm
(service lightdm restart
)时,驱动程序都会回退到mesa
,因此不使用我已安装/更新的Nvidia驱动程序。输入的消息/var/log/Xorg.0.log
是它无法加载nvidia_drv.so
)检查:
update-alternatives --get-selections # lists all alternatives
update-alternatives --config x86_64-linux-gnu_gl_conf # available options and lets you choose "0" to automatically select the best driver
update-alternatives --config i386-linux-gnu_gl_conf # for multiarch or i386 machines
例:
update-alternatives --config x86_64-linux-gnu_gl_conf
There are 3 choices for the alternative x86_64-linux-gnu_gl_conf (providing /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/nvidia-340/ld.so.conf 8604 auto mode
1 /usr/lib/nvidia-340-prime/ld.so.conf 8603 manual mode
2 /usr/lib/nvidia-340/ld.so.conf 8604 manual mode
3 /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf 500 manual mode
结果:即使在将其明确设置为“自动”之后,一旦启动lightdm
也会将其重置为mesa
驱动程序,如中所示/var/log/alternative.log
。
解决方案:
service lightdm stop
# remove all old stuff
apt-get remove --purge nvidia\*
apt-get remove --purge bumblebee
apt-get remove --purge primus primus-libs
apt-get autoremove --purge
# unload old drivers from kernel
rmmod nvidia
rmmod drm
# now everything is gone. Make sure you are running the latest kernel, then:
apt-get install nvidia-XXX # nvidia-367 for me, nvidia-current fits generally
update-alternatives --auto x86_64-linux-gnu_gl_conf
update-alternatives --auto i386-linux-gnu_gl_conf
service lightdm start
等瞧,/var/log/Xorg.0.log
表明它加载libglx
和nvidia_drv
来自NVIDIA公司。glxinfo
验证这一点。
rm .Xauthority
再次切换到GUI(Alt + F7)并重试吗?