Nvidia Optimus (Intel + Nvidia) on Linux Mint 17.1 Cinnamon

luisbraganca
  7 years ago
  4

EDIT: LM18.1 fixed this issue, no need to configure a thing, just install the proprietary drivers and the icon on the panel allows you to switch them, works like a charm.

I got really frustrated since I couldn't find any tutorial for nvidia optimus that would work on my machine. I made it once (don't really knew how), so later I needed to reinstall mint and I was condemned with nvidia optimus once again. So here it is, my nvidia optimus tutorial (after I searched loads of them), this is the only one that works on my computer.

For this to work I used a fresh instalation of linux mint 17.1 and then installed all the updates. The driver I'm using (on device manager) is "xserver-xorg-video-nouveau".

First, what you need to understand is that nvidia optimus doesn't have 2 GPUs, only 1 (although it has 2 modes).

One is mainly used for common tasks (like reading email) so it doesn't use too much battery (intel), the other one is used mostly for gaming or other tasks that require more GPU power (nvidia).

This way, we'll install bumblebee which will provide us a command that runs an application using Nvidia.
For example (on terminal):

~ $ firefox In this example, firefox starts running using intel

~ $ optirun firefox Here, firefox runs with nvidia (it won't work on yours since bumblebee is not installed yet).

Please note that it's not common to run firefox using nvidia since a web browser doesn't usually require that GPU power.

First, adding the repository (needed for virtualgl):

~ $ sudo add-apt-repository ppa:bumblebee/stable

Now, installing bumblebee and its components:

~ $ sudo apt-get install --no-install-recommends bumblebee

~ $ sudo apt-get install bumblebee-nvidia

~ $ sudo apt-get install virtualgl

~ $ sudo apt-get install primus

~ $ sudo apt-get install primus-libs-ia32 (It's used to run 32 bit programs, so although you have a 64 bit machine you need to do this to have 32 bit support).

 

You may reboot your PC.

 

Now for testing:

~ $ glxspheres64 (you may replace this with glxgears if it appears "Command not found").

Here you should get around 60 FPS (frames/sec)
 

~ $ optirun glxspheres64 (same here, you replace glxspheres64 with glxgears if not working)

Here you should get a higher value than the other (mine is 100 FPS on glxspheres64 with optirun and 960 on glxgears with optirun as well).

 

Everything's done. When you need to run an application on nvidia mode, just use "optirun APP" (where APP is the application you want to run).

 

I'm not responsible for any kind of damage this may cause to your machine.

Comments
luisbraganca 9 years ago

@phil995511 I don't know how to... I use "optirun AppName" to start a .deb app or "optirun ./RunnableFile" to tart a .tar.gz or tar.bz2 program anytime I want to use nvidia :/


phil995511 9 years ago

@ Chris11

after : sudo add-apt-repository ppa:bumblebee/stable

make : sudo apt-get update


phil995511 9 years ago

Tks for this tuto, is there a solution for automatic switching ?


luisbraganca 9 years ago

I had to add the repository again since "virtualgl" it's not already in the repositories.


luisbraganca 9 years ago

I think it does since you're only able to use nvidia with bumblebee, otherwise the PC will always use intel.
You're right, it already is in the repositories. I'll fix that, thanks for the heads up. :)


MagicMint 9 years ago

Strictly speaking, this has nothing to do with “Nvidia Optimus drivers” (either Nvidia’s own proprietary ones or Xorg’s nouveau that you are using) :-)

As far as bumblebee is concerned, it’s in the repositories already, hence you don’t need the PPA for it — unless the version offered by the Software Manager doesn’t work for you :-(