nVidia drivers installation on ElementaryOS - Loki
ElementaryOS - Loki is an amazing ubuntu based distribution, I've just felt in love on it BUT they've removed what's required to install easily the nVidia Proprietary drivers. So here is the reason of this gist, to store the install instructions in one place inside a crystal clear documentation.
Check your device
Open your favorite terminal application then type
sudo ubuntu-drivers devices, you should get something like this:
== /sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0 == modalias : pci:v000010DEd000011C6sv00001043sd0000842Abc03sc00i00 model : GK106 [GeForce GTX 650 Ti] vendor : NVIDIA Corporation driver : nvidia-304 - distro non-free driver : xserver-xorg-video-nouveau - distro free builtin driver : nvidia-340 - distro non-free driver : nvidia-367 - distro non-free recommended == cpu-microcode.py == driver : intel-microcode - distro non-free
In my case, I want to install this one:
driver : nvidia-367 - distro non-free recommended
Install the required dependencies for the GUI
As I said in the introduction, ElementaryOS - Loki is not shipped with the required GUI to install the nVidia Proprietary drivers, so you'll have to install the required dependencies. Just proceed as follow:
sudo apt install software-properties-gtk software-properties-common
Once finished, go to your applications menu then search
additional drivers (add should be enougth to find the application).
Run it and select the version you want.
Instructions and screenshots comes from elementaryOS forums.
If you want things to be done and don't want to know what's going on, simply type:
sudo ubuntu-drivers autoinstall
Use it with caution:
This will install nVidia drivers but also, all others detected proprietary drivers !! If you want a closer control, read the manual install instructions. In my case, I don't wan't to install
intel-microcodedriver as it has screwed up many of my Ubuntu and Ubuntu based distrib like Linux Mint 18 - Sarah - Cinnamon...
So I'll use the manual install.
When done, go to the Avoid Boot Issues section.
Get the package name
Now, what I need to know is the package name of the nVidia driver. To do so, just type:
sudo ubuntu-drivers list
You should get something like this:
nvidia-304 nvidia-340 intel-microcode nvidia-367
Install the package
Once you've decide the package version you want to install, just do it so:
sudo apt install nvidia-367 nvidia-settings
In my case, I wanted to install the version
367of the nVidia driver.
Avoid boot issues...
As read in comments, you should do this only if you have boot issues after the driver installation. don't change anything if the reboot works normally
But if you got boot issues, these instructions might help you:
Once you've finished the installation,
you should apply these changes to your apply this to fix the issues you are encountering:
grub config to avoid graphical issues that comes with the use of nVidia Proprietary Driver
sudo nano /etc/default/grub
Naviguate in the file to find a line starting with
menuentry 'elementary' then below a line like this one:
linux /vmlinuz-4.4.0-62-generic root=/dev/mapper/elementary--vg-root ro quiet splash
Change it to:
linux /vmlinuz-4.4.0-62-generic root=/dev/mapper/elementary--vg-root ro quiet nomodeset
Please, don't copy the line, you may not have the same kernel version on your machine!
Just change the boot flags at the end of the line as explained and that's all ^^
Save your file with
Ctrl+x then update the bootloader:
Don't forget to reboot to complete the installation !
So easy !
Feel free to comment if you want to contribute to this gist.