Disable nouveau driver
Ubuntu system is the integrated graphics driver nouveau, nouveau we need to first uninstall the linux kernel to install NVIDIA official drivers.
Adding to the blacklist nouveau blacklist.conf in (on blacklist see "Disable Linux kernel driver" ), when linux starts, it will not load nouveau.
Because the impact nouveau driver, after installing ubuntu can not sign the desktop, so the ubuntu system after starting the login screen, you need to press ctrl + alt + F1 enters into the text mode tty following operations
Due to the nature blacklist.conf file modifications are not allowed. So we need to modify the file attributes.
View property
ll /etc/modprobe.d/blacklist.conf
- 1
- 1
Modify the properties
sudo chmod 666 /etc/modprobe.d/blacklist.conf
- 1
- 1
Opened with the vi editor
sudo vi /etc/modprobe.d/blacklist.conf
- 1
- 1
In the end of the file add the following lines:
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist rivatv
blacklist nvidiafb
After you modify and save the file, remember to make the file recovery:
sudo chmod 644 /etc/modprobe.d/blacklist.conf
- 1
- 1
And then look at the kernel update
sudo update-initramfs -u
- 1
- 1
About use update-initramfs command, see "initramfs profile, a new initial RAM disks model"
after changes need to reboot the system.
Restart the system to verify nouveau has been masked, using the lsmod command to see:
lsmod | grep nouveau
- 1
- 1
lsmod display command has been loaded into the kernel module status information, see "lsmod command"
Install NVIDIA drivers
Because the systems are not only NVIDIA graphics card as well as an integrated intel graphics normal driving, so after a previous step to disable nouveau driver, reboot again, the system may have to log into the normal desktop.
Use the following command to add Graphic Drivers PPA
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
- 1
- 2
- 1
- 2
Find the right driver version
ubuntu-drivers devices
- 1
- 1
NVIDIA driver installation
as suggested in FIG display GTX965M graphics driver version 378 is
press ctrl + alt + F1 enters text mode tty
off (pattern) desktop display manager LightDM
sudo service lightdm stop
- 1
- 1
Install nvidia driver, if speed is not good, it may take a long time
after the installation is completed reboot
sudo apt-get install nvidia-378
sudo reboot
- 1
- 2
- 1
- 2
After rebooting the system, execute the following command to view the installation status display driver installation was successful
sudo nvidia-smi
sudo nvidia-settings
- 1
- 2
- 1
- 2
After installing the NVIDIA driver, log on the phenomenon of death did not appear, everything is normal.
note
When the BIOS, Secure Boot is set to disable, being installed NVIDIA driver, then if Secure Boot is set to enable, ubuntu restart the NVIDIA driver will not work.
Specific reasons, see the article
"UEFI, BIOS, Secure Boot relationships and knowledge presentation"
If you are installing NVIDIA driver in Safe Boot mode, a little trouble, I did not try, see the article should be helpful:
"Linux secure boot (Secure Boot) Add Nvidia graphics driver when"
Reference article
"Ubuntu16.04 NVIDIA graphics driver installation"
"NVIDIA install Ubuntu 16.04"
thank refer to the article author