Ubuntu – NVidia Optimus problems on Ubuntu 15.10

bumblebeedriversgraphicsnvidianvidia-optimus

I've used Ubuntu on my Lenovo Y510p for nearly six months with no issues, and I fell in love with it. I recently bought a MSi GS60 (Skylake), and I've had a major problem with running Ubuntu.

I can install it without a problem, but when I boot into Ubuntu, my screen freezes at the login page. Now, with my MSi laptop, I can see when the dedicated nVidia GPU and the integrated one are being used and the freeze occurs when it switches from the integrated GPU to the nVidia one.

I can boot into Safe Mode and install drivers and whatnot without an issue, and it uses the nVidia GPU for this.

I've read up on all the issues nVidia Optimus has with Linux and I've tried several solutions elsewhere on this site.

I tried installing Bumblebee. It didn't fix my problem, and instead I booted into Emergency mode with no GUI. This happened as well when I tried to boot into Recovery mode. So I uninstalled Bumblebee and everything with it.

I tried installing nVidia Prime. The login screen didn't freeze, but whenever I tried to login the desktop would not appear and instead I would get another login screen.

I would like to be able to run Ubuntu, preferably behaving as Windows does and dynamically switching between GPUs to optimize performance. But honestly, I would be happy with just using the integrated GPU when running Ubuntu. Could I get some suggestions as to what to try next?

Best Answer

Normally you should use the NVIDIA drivers from the official Ubuntu repositories.
But because you are having quite new hardware - the 358 drivers might be better.

First remove installed NVIDIA drivers and bumblebee.

Highlight the Ubuntu menu entry and press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press F10 to boot the Ubuntu operating system.

When the login screen appears press Ctrl+Alt+F1.
Enter your user name and the password and execute :

sudo apt-get purge nvidia* bumblebee  
sudo reboot  

Now install the latest official stable NVIDIA drivers.

Highlight the Ubuntu menu entry and press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press F10 to boot the Ubuntu operating system.

When the login screen appears press Ctrl+Alt+F1.
Enter your user name and the password and execute :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-358 nvidia-prime
sudo reboot  

Open NVIDIA X Server Settings - select PRIME Profiles tab.
Switch to the graphics you want to use, logout and back in.
Dynamic switching is not supported under Linux as of now.