środa, 8 lutego 2017

Linux Mint 18.1 - Nvidia GPU and crashing Cinnamon fix

If you are using Linux Mint 18.1 on a computer with Nvidia GPU (particularly laptop with Intel+Nvidia discrete GPU combo) and update your system regularly you may sometimes end up with broken desktop - "Cinnamon has crashed and you are in fallback mode" or something similar is usually displayed.

This happens (as I have noticed after some time) after installing kernel update whenever you use proprietary drivers that are too old for that kernel hence cause problems.
Often you will be able to just use Nvidia GPU or just integrated Intel GPU without having your desktop crash (you will notice it by changing GPU in Nvidia X Server and logging-out then in again). 

There are few solutions to this problem the first one being the most obvious - reverting to previous kernel (through "Synaptics Package Manager" on Ubuntu and Mint). 
This is not true solution to problem though and can cause problems if for example you already installed updates or software that requires the latest kernel.

There are few tips however that can help you resolve this issue and possibly avoid it in future altogether.

1. Add  Nvidia Xenial PPA (Personal Package Archive) to your system

The first thing you might want to do is to is add Nvidia PPA (Short and well written guide here) by invoking:

"sudo add-apt-repository ppa:graphics-drivers/ppa"

or if you do not like to visit terminal too much you can just open your "Software Manager" (on Mint you can find it under "Administration" or by invoking "mintinstall")  then click "Edit" > "Software Sources" > "Personal Package Archives" > "Add new PPA" then entering the PPA adress which is: "ppa:graphics-drivers/ppa". After adding the PPA it is recommended that you invoke:

"sudo apt-get update"

this will update your system but not install latest Nvidia driver.

2. Choose and install/activate appropriate driver

Now that you have Nvidia drivers PPA in your system you should be able to search through them by invoking: 

"apt search nvidia"

You will see long list of names of various versions of the drivers for Nvidia GPU - you can use these names to install them (like you usually would by invoking "apt-get install x") where "x" is name of the driver.
 
This is not very convenient though so a much better alternative is using the "Additional Drivers" program. 
When it comes to Ubuntu it should be displayed as a tab in your "Software Manager"
On Mint it should be under "Administration", alternatively (on Mint) you can invoke "mintdrivers" to start it.

Note: Additional Drivers program was present in Linux Mint 17.3 but I found it missing in Linux Mint 18.1 and had to install it manually. 
If you cannot find yours, you can simply go to your "Software Manager" just like you did in first step and search for "mintdrivers" then install. 
Alternatively you can invoke:

 "sudo apt-get install mintdrivers"

After "Additional Drivers" opens you will notice radio buttons with various driver versions. 
You should choose the latest version (usually highest number),  hit "Apply", let the drivers install and then restart your computer. 
If you just installed new Kernel which caused desktop to crash and there was new one or several new drivers available then your problems should be now fixed.

Note: The Nvidia drivers PPA is maintained by dedicated team but it is possible for them to fall behind the newest Kernel update. 
So you can receive update notification about latest kernel even though new driver for it has not yet been released in the PPA. In such case installing new kernel will break your desktop and make you wait until PPA is updated.

To avoid this, simply avoid updating kernel right away (remember this is not Windows, nobody is forcing you to install updates!) and first check whether newer Nvidia Driver is available and if it is, then most likely it will work on new kernel. 
It is also good thing to check newest driver number on the Nvidia's website (as these are always the latest) and compare to the latest one available to you - if they are the same then you are guaranteed that driver will work on newest kernel.

Some screenshots:




















































































Tested on Linux Mint 18.1 and Linux Mint 17.3 but should also work on Ubuntu.

Brak komentarzy:

Prześlij komentarz