登录循环 - ubuntu 16.04 - nvidia

登录循环 - ubuntu 16.04 - nvidia

我尝试了几个与“登录循环”有关的问题中推荐的方法,但都不起作用。顺便说一句,我有一块 nvidia GPU:GTX 1080。

具体来说,我尝试过但没有结果:

  • 复制 .Xauthority 和 .ICEauthority,或将所有权更改为用户。
  • 删除并重新安装 lightdm
  • 清除 nvidia 驱动程序: sudo apt-get remove --purge nvidia-*,,sudo ubuntu-drivers autoinstall然后 sudo service lightdm restart重启

按照此问题建议我包括.xsession-errors 的输出。

$ cat ~/.xsession-errors
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".
openConnection: connect: No such file or directory
cannot connect to brltty at :0
upstart: gnome-session (Unity) main process (3270) terminated with status 1
upstart: unity-settings-daemon main process (3262) killed by TERM signal
upstart: logrotate main process (3118) killed by TERM signal
upstart: bamfdaemon main process (3181) killed by TERM signal
upstart: indicator-bluetooth main process (3320) killed by TERM signal
upstart: indicator-printers main process (3333) killed by TERM signal
upstart: indicator-session main process (3334) killed by TERM signal
upstart: indicator-power main process (3321) killed by TERM signal
upstart: indicator-application main process (3359) killed by TERM signal
upstart: indicator-datetime main process (3325) killed by TERM signal
upstart: unity7 pre-start process (3263) terminated with status 143
upstart: Disconnected from notified D-Bus bus
upstart: indicator-keyboard main process (3328) killed by TERM signal
upstart: unity-panel-service main process (3281) killed by TERM signal
upstart: indicator-sound main process (3332) killed by TERM signal

答案1

问题基本上是 nvidia 驱动程序严重破坏了系统,以致 nvidia 重新安装无法按预期工作。

他们说诊断方法是在终端中运行:nvidia-smi返回。NVIDIA-SMI 失败,因为它无法与 NVIDIA 驱动程序通信

解决方案基本上是完全重新安装操作系统。因此,在 USB 驱动器中下载 ubuntu 16.04,然后重新安装 ubuntu。

然后:

$ sudo apt-get install linux-headers-$(uname -r)
$ sudo apt-get --purge remove nvidia-*
$ sudo apt autoremove

这是 GTX 1080 的驱动程序:https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=debnetwork

$ sudo dpkg -i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
$ sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
$ sudo apt-get update
$ sudo apt-get install cuda

然后重启,现在一切正常。感谢 nvidia 提供的垃圾软件!

以下是关于这个话题的讨论nvidia 论坛还有一些额外的细节。

答案2

由于您使用的是 nVidia GTX 卡,请尝试按 Crtl + Alt + F2,登录,然后运行

sudo apt-get purge nvidia。*

然后重新启动。

如果你使用 Bumblebee 在 GPU 卡之间切换,命令应该是

sudo apt-get purge nvidia.* 大黄蜂

编辑:我确实让 nVidia 在 16.04 上使用 nVidia 驱动程序工作。我设法让其工作的唯一驱动程序是 nvidia-364,来自 ubuntu graphics ppa。以下是我所做的:

首先清除所有现有的 nVidia 驱动程序

sudo apt-get purge nvidia*

并重新启动系统。

然后从存储库 ubuntu graphics ppa 安装 nvidia-364

sudo 添加 apt 存储库 ppa:图形驱动程序/ppa

sudo apt-get 更新

sudo apt-get 安装 nvidia-364

然后重新启动。

如果这不起作用我也会尝试清除 Cuda。

相关内容