Nvidia proprietary driver hangs/freezes/blank screen at login in 13.10 [closed]

I am running a fresh copy of Ubuntu 13.10 with a Nvidia GTS 450. With the open source nouveau driver, everything works fine albeit not as fast as the proprietary driver. When I install the proprietary Nvidia driver, the screen hangs/freezes just before login. The computer boots up and just before login the monitor enters power savings mode. At this point, I can still ssh into the computer but the screen and keyboard attached the machine are frozen. I have to do a hard shutdown. I have tried the following drivers but each of them suffers the same problem. 304 (Ubuntu Software Center) 304-updates (Ubuntu Software Center) 319 (Ubuntu Software Center) 319-updates (Ubuntu Software Center) 331 (xorg edgers ppa) 331 (Nvidia's website) Here's a video which demonstrates the problem The Problem. This started happening only in 13.10 for me. 13.04 was fine.

Strangely enough, I can sometimes get in using the recovery mode. I select recovery mode, go to fail-safe mode, press Ctrl+Alt+F1 to fall back to command prompt when reconfigure graphics dialog is displayed. Then I press Ctrl+C to kill the current process and after that it boots straight to the login screen using the proprietary driver. Here's a video of the Workaround. Any thoughts?

Update Feb.18: This problem has been repeated on one of my other machines running an Nvidia card. The machine was running 13.04 with proprietary drivers and was upgraded to 13.10. After the upgrade, the same black screen issue occured. SShing into the machine and reverting to the open source drivers fixed the problem.


Solution 1:

Have you tried downloading other drivers from the NVIDIA website? I never use driver packages they provide with ubuntu os because they suck big time for most nvidia cards except a few. Instead I go to NVIDIA and choose one or more linux drivers for my nvidia video card and install the one which works best as shown in many tutorials present on askubuntu.com.

By the way, you can find a wider selection of drivers for your card if you use the "Beta and Older Drivers" link which is located at the middle of the NVIDIA Driver Downloads page . Choose your video card ( GeForce - GeForce 400 series - GeForce GTS 450 ) from the list and also choose the "certified/recommended drivers", and not the "all" drivers section. I personally recommend the "331.38" version for your GTS 450 video card, and you can find it here.

Have your already tried the Linux 331.49 version, this one should work like a charm but you're saying that it does not. Maybe you should install LXDE environment, all packages, and also LXDM as default display manager because from my own experience NVIDIA cards work best in a lxde environment.

There are specific Linux video drivers for your Nvidia GTS 450, for Linux 32bits and for Linux 64bits, depending on your computer architecture, I am not certain about that, I mean I have no idea about your PC configuration.

You can install your driver after removing all nvidia drivers from your ubuntu system. Code:

sudo apt-get remove nvidia*

After that, without rebooting, you have to also completely remove NOUVEAU driver using Synaptic, and then blacklist the NOUVEAU driver, and the proprietary driver(s) that you used by editing this file:

gksu leafpad etc/modprobe.d/nvidia-graphics-drivers.conf

Make sure first that you have installed GKSU and LEAFPAD.

sudo apt-get install gksu leafpad

You should add in your 'nvidia-graphics-drivers.conf' file these lines:

blacklist vga16fb
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
blacklist nouveau
blacklist lbm-nouveau
blacklist nvidia-319

After editing and saving 'nvidia-graphics-drivers.conf' file you can reboot and after reboot exit to console at login prompt ( CTRL+ALT+F1 ) and login as 'user' which is your username for ubuntu/linux.

N.B. It is my experience that most of the times, especially after a fresh install of Ubuntu, there is no 'nvidia-graphics-drivers.conf' file to be found in etc/modprobe.d , and if that is the case then you need to create a new file in a text editor, add the lines to blacklist nouveau driver and the other drivers, and save this new file as 'nvidia-graphics-drivers.conf' without the quotes in etc/modprobe.d . You can use PCMANFM file manager to open etc/modprobe.d as 'root' so you can easily create and save this new 'nvidia-graphics-drivers.conf'.

Next type this code in the console to stop the display manager (DM) interfering with video driver update:

sudo stop kdm

or

sudo stop lightdm

or

sudo stop lxdm

Choose your default display manager for this one. Gnome uses lightdm, KDE uses kdm and LXDE used lxdm.

After getting the message "display manager stopped/waiting" you are sure that you actually stopped the display manager to interfere with your video driver update. By the way, you should first check which display manager you're using right from the start, before removing nvidia drivers. Just press CTRL+ALT+F1 and login as 'user' and type in the console the code shown above:

sudo stop lightdm 

( kdm, lxdm whatever is present on your system ).

To install your new video driver that you got from the NVIDIA website you first have to cd (point) to the directory where you saved it. Once you're there, you can install it by typing in the console this command:

sudo sh NVIDIA-Linux......run

Use the exact name for your video driver, capital letters included. The command 'dir' can help you see the driver and type its name correctly to be able to install it. Then you'll be guided step by step how to install your video driver, and at the end you'll be asked whether you want nvidia manager to save your new configuration for you ... press YES. Reboot and after login save your new X server configuration using this command:

 sudo nvidia-xconfig

If, by any chance, new driver doesn't work as expected after reboot, you'll have to try installing another one from the NVIDIA list provided in the "Beta and Older Drivers" section specifically for your GeForce GTS 450. Make sure you first download 3 or even more of those drivers in the list, and test them one by one. The worst scenario is when you need to reinstall the nouveau driver if nothing else works, but first you'll have to edit the 'nvidia-graphics-drivers.conf' and remove the 2 lines which blacklisted the nouveau driver before.

Hope this helps. If it doesn't you should ask the ubuntu team to provide you with a list of graphic cards that work best in UBUNTU 13.10, and also in Ubuntu LTS 12.04 (ask them for a complete list including both NVIDIA and ATI video cards tested in their ubuntu labs with proprietary drivers), and replace your card with another one that won't give you so many headaches.

I am sure you've kept some older video cards in your drawer just in case you'll be needing them in the future. Use your GeForce GTS 450, which by the way is an awesome video card, in a windows environment only. Speaking of Windows, do you experience the same issues with screen hangs/freezes in there too?