Skip to content

Instantly share code, notes, and snippets.

@arcaduf
Created March 13, 2017 20:27
Show Gist options
  • Save arcaduf/57e36f4e767c2b643be9ea4cd021614f to your computer and use it in GitHub Desktop.
Save arcaduf/57e36f4e767c2b643be9ea4cd021614f to your computer and use it in GitHub Desktop.
Fixing Ubuntu stall at login after bad CUDA installation
Sometimes installing CUDA on Ubuntu turns out to be a huge broom in the ass.
One of the most common issue is that once you login after rebooting Ubuntu
is stalled.
To fix this problem, it is necessary to go on one TTY (e.g. Ctrl+Alt+F1),
login with username (with administrator rights) and password and try one of
the following procedures.
Trial #2 worked with me, in the sense that I could normally login in Ubuntu,
but I was still at the starting point....no damn CUDA....grrr...
Trial 1:
$ sudo su
$ apt-get update
$ apt-get install --reinstall ubuntu-desktop
$ apt-get install unity
$ reboot
Trial 2:
$ sudo su
$ apt-get update
$ apt-get install --reinstall ubuntu-desktop
$ apt-get install unity
$ apt-get remove --purge nvidia*
$ reboot
Trial 3:
$ sudo apt-get install nvidia-current
$ sudo reboot
Trial 4:
$ sudo apt-get remove --purge nvidia-*
Second, download & Install Nvidia Driver 331.38 (you may want new version)
For 32 bit (x86):
$ cd && wget us.download.nvidia.com/XFree86/Linux-x86/331.38/NVIDIA-Linux-x86-331.38.run
For 64 bit (x86_64):
$ cd && wget us.download.nvidia.com/XFree86/Linux-x86_64/331.38/NVIDIA-Linux-x86_64-331.38.run
And then,
$ chmod +x NVIDIA-Linux-*-331.38.run $ sudo sh NVIDIA-Linux-*-331.38.run $ sudo reboot
These procedures have been described on [Jiakai Zhang's blog](http://jiakaizhang.com/fix-frozen-after-login-in-ubuntu-14-04/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment