Ubuntu 16 + NVIDIA 36x drivers = black screen

Apparently there are some major issues with the NVIDIA 36x drivers for Linux on Ubuntu 16 LTS. The installation of 361.45.11 and 367.18 (beta) are both resulting in a black screen on Ubuntu 16 with Kernel 4.4.0.24-generic and 4.4.0.21-generic (secure boot = disabled).

As anyone experienced similar issues?

I have that issue with 367.18 and the 980m in my laptop, reported here: https://devtalk.nvidia.com/default/topic/937319/linux/367-18-980m-lock-up-at-boot-ubuntu-16-10-/

I’ve not tried 361.45.11. I’m using 364.19 without any issue.

Just curious: Do you also have a 4k screen on your system?

Thanks for the hint, I’ve downloaded 364.19 and tried to install it.

I had to stop lightdm before launching the install script. As soon as I started the script, I got the following message:

The distribution-provided pre-install script failed! Are you sure you want to continue?

I confirmed with Continue installation. However, right after that the next error message appeared:

ERROR: The Nouveau kernel driver is currently in use by your system. This driver is incompatible with the NVIDIA driver, and must be disabled before proceeding. Please consult the NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.

I pressed enter and got the next message:

For some distributions, Nouveau can be disabled by adding a file in the modprob configuration directory. Would you like nvidia-installer to attempt to create this modprobe file for you?

I confirmed with yes and rebooted the system. Afterwards I’ve tried to start the installation script again, which finally told me that the Nouveau kernel is still present and hence the installation failed :-(

Do you have any other suggestions for me?

I can’t say I’ve run into that. It should be impossible for the nouveau driver to be loaded if the nvidia installer properly blacklisted it. If you run ‘cat /etc/modprobe.d/nvidia-graphics-drivers.conf’, do you see a blacklist that contains nouveau and nouveau-lbm?

Here’s what I would do: After stopping lightdm, you can try unloading nouveau yourself (‘sudo rmmod nouveau’) and then restarting the installer. If it successfully unloads, or tells you it’s not loaded, then we’ll know the message from the installer is spurious.

I don’t have that file (nvidia-graphic-drivers.conf) in /etc/modprob.d/. What I do have is nvidia-installer-disable-nouveau.conf which looks like this:

# generated by nvidia-installer
blacklist nouveau
options nouveau modset=0

I’ve also tried to stop lightdm (sudo service lightdm stop) and tried to remove nouveau (sudo rmmod nouveau) which failed with the following error message:

rmod: ERROR: Module nouveau is in use

BTW, forgot to say: I’ve two 4k monitors (I’ve already tried to do a fresh ubuntu installation with only one monitor → same result)

Ah, I think I know why it’s in use:

See the “Deactivating KMS and unloading Nouveau” section here: https://nouveau.freedesktop.org/wiki/KernelModeSetting/

It looks like you may be able to unload it if you do the following as root (‘sudo -i’ to get an elevated command prompt):

echo 0 > /sys/class/vtconsole/vtcon1/bind
rmmod nouveau
/etc/init.d/console-setup restart
rmmod ttm
rmmod drm_kms_helper
rmmod drm

I changed the third command to use console-setup. I’m guessing consolefont was an older version of the console-setup package that changes the console font.

When I enter echo 0 > /sys/class/vtconsole/vtcon1/bind the computer hangs up immediately.

Have you tried disabling nouveau by adding ‘nouveau.modeset=0’ to the end of the boot parameters from the grub menu?

If you reboot and choose to edit (‘e’) in the grub menu, you should be able to add the above (with no quotes) after the ‘quiet’ option. That should prevent nouveau from loading at startup.

I’ve just tried that (edited grub with e and booted with nouveau.modeset=0, but the installer still complaints that the “nouveau kernel driver is currently in use”.

I’m lost… :(

- Open below file using vim editor(if vim editor is not present, Please install using command #apt-get install vim)
- vim /etc/modprobe.d/disable-nouveau.conf
- Add below lines in file

     blacklist nouveau
     options nouveau modeset=0

- Save file and exit


- Now blacklist opensource nouveau driver for nvidia gpu.
- Open grub.conf file using vim editor - vim /boot/grub/grub.cfg
- Go to line stating with `linux` word. Its may looks like below:

     linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=11bb801a-2f0e-4846-b730-a24435bc4439 ro quiet splash $vt_handoff

- now add string "rdblacklist=nouveau nouveau.modeset=0 vga=0" end of line.
- save file and exit

- reboot the system once.  
- Stop X using commands `service lightdm stop` and `pkill X` and `pkill lightdm`. 
- Now copy NV driver ***.run file to any folder and execute with command `sh NVIDIA-Linux-x86_64-***.run` and follow steps.

Thanks for your input Sandip. I’ve just tried what you have recommended, but the problem remains the same.

Kernel version: 4.4.0-24 / 4.4.0-21
NVIDIA driver: NVIDIA-Linux-x86_64-367.27.run

What is interesting is the fact that sometimes I’m able to boot up 4.4.0-21. I then get to the login prompt, but when I enter username + password I fall back to the log in screen immediately.

Googling around reveals that others apparently have the same problem:
[url]https://devtalk.nvidia.com/default/topic/937319/367-xx-980m-w-4k-screen-lock-up-at-boot-ubuntu-16-10-/#4909197[/url]

I had the same problem. I reinstalled my laptop (Ubuntu 16.04) and found out you can install Nvidia driver (nvidia-367) from synaptic (maybe in your computer there isn’t synaptic, then open a terminal:

sudo apt-get install synaptic

Have fun. :) It works fine.

I have spent hours now trying to get my GTX 970 working in Mint and/or Ubuntu Mate, whenever I install the driver I get a black screen then no input signal on my monitor, and the only way to get back into a graphical interface is to sudo apt-get purge nvidia. I have tried various driver versions (all in the 36x range), from the distros driver setting and via command line, they install fine request a reboot and then its a no input screen. I’ve tried all my ports (including my Haswell integrated graphics) to no avail. I’ve reinstalled distros a few times, and am pretty much out of ideas. What is the recommended steps to troubleshoot this? Should I try a 35x driver, I’m almost thinking my problem is unrelated and the driver is installing fine.

For Mint 17.3, add nomodeset to grub. Use phoronix’s drivers. ppa:graphics-drivers/ppa.
For Mint 18, it should just work.
For Ubuntu 16, it won’t work because it’s a broke dick OS.

I have just tried what you have suggested, but the problem remains the same. Any other ideas? I’m really getting frustrated…

You reinstalled your system? It worked after reinstall?

I did a full OS reinstall yes. The system boots up fine as long as I don’t install the NVIDIA driver. As soon as I do so (doesn’t matter which driver version), the system no longer boots (black screen).

Yes, but as soon as I install any Nvidia driver I will not be able to boot the OS up any more.

Safest way to install nvidia drivers:

sudo apt-add-repository ppa:graphics-drivers/ppa
sudo apt-get update

Go to Dash and search for additional drivers. There, you would have got the option of several versions of Nvidia drivers. Select any version, click apply and wait for it to download and install it. Then reboot. You must have your drivers up and running.

Do not install the drivers using the .run file. Didn’t work on ubuntu or fedora for me. The above mentioned method worked for me.

If you encounter blackscreen(Or if you are experiencing it now)

ctrl+alt+f1 #Login
sudo apt-get --purge nvidia*
sudo apt-get --purge autoremove
sudo apt-get install nvidia-361
reboot

That was one of the first things I’ve tried, unfortunately it doesn’t solve my issue.

It doesn’t matter where I install the Nvidia drivers from (synaptic, nvidia.com driver download, ubuntu “additional drivers”) or which driver version I try, it always ends up in a black screen.