There is a common myth that’s still very present, and it’s about Optimum and Linux.

For those who don’t know what Optimum is, it’s a system (laptop) that has two graphics cards.
The integrated Intel graphics card for every day use, and a Nvidia graphics card for all your gaming needs.

The way that it works is that you would be able to switch between graphics cards almost like a switch, depending on when you need it.

However, there appears to be a belief that the Optimum driver support under Linux is either hit-or-miss or very unstable.
This is truly a myth.
Another myth surrounding it, is that it is difficult to set up and a hassle. Once again, another myth.

I will walk you through the steps of installing the support for Optimum using Bumblebee, and I will also show some extra steps to make the experience as easy as possible and customized in order to provide the best experience possible.

Feel free to skip the steps you do not require.

The steps will be:
1) Add the Bumblebee repository and install the Bumblebee drivers
2) Install the Bumblebee indicator for a simple GUI interface
3) Create a .desktop file for PlayOnLinux to choose your graphics card
4) Edit Steam for Optimum support

1.a. Adding the repositories

This is an easy step, and requires terminal use, but don’t worry, it’s foolproof.Open a terminal and type the following command:

sudo add-apt-repository ppa:bumblebee/stable

Once you hit enter, it will ask you to hit Enter once more, once you do so, a couple of lines appear and the repository has been added.

We will also want to add a repository for the latest Nvidia drivers with the following command:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates

But now you need to update your software database. This is done with the following command:

sudo apt-get update

 

1.b. Installing Bumblebee

First we will need some additional packages, these can be installed with:

sudo apt-get install linux-source linux-headers-generic

To install the drivers, you only require one line in the terminal:

sudo apt-get install bumblebee primus bumblebee-nvidia

This line when entered, most likely want your permission to install, so if it asks, simply hit ‘y’ and it will install.
That’s it!

2. Adding the Bumblebee indicator

At this point you can already use your Nvidia card using either the command ‘optirun <app name>’ or ‘primusrun <app name>’. But, this isn’t the most efficient or user friendly way to use it. So we can use the Bumblebee indicator.
This indicator sits in the notification tray and allows you to add applications, so that you can start applications through it. It will also notify you when the Nvidia graphics card is in use. So it’s a very useful app to have. So enough about what it is and what it does, let’s get installing it.

This step is a little more advanced, but shouldn’t pose any issues if you follow this guide.

The first thing we need is git, this is where the application is hosted.
Open the terminal and type:

sudo apt-get install git

After this is installed we need to make a folder called git and navigate to it.
We do this with the commands:

mkdir git

cd git/

Once you have created this, we need to pull the application ready to be installed, we can do this with the command:

git clone https://github.com/Bumblebee-Project/bumblebee-ui.git

After that we can navigate into the directory with the command:

cd bumblebee-ui

And to install the application simply type:

sudo ./INSTALL

A lot of things may happen, and if you don’t see any errors, then simply log out and back in (or restart) and you will see a little bee icon in your tray, feel free to play around with it. By clicking on it and then ‘Configure Apps’ you can tick the installed applications you want to run through your Nvidia card and then clicking on the icon again and then ‘Preferred Apps’ you can run it.

3. Adding a .desktop file for PlayOnLinux

You might be wondering why I added this additional step.
I use PlayOnLinux, and some of the applications I use are not intensive graphically, whilst others are.
I don’t want to sacrifice power by running an application using Nvidia card when it’s unnecessary and visa versa.
Then there is the additional annoyance that you get when you have to configure every single application to use the Nvidia driver and sometimes it just doesn’t work well. So in an effort to get rid of this annoyance, I came up with a simple solution.

If you use PlayOnLinux, you can just copy the text below and change the reference ‘<USER>’ to your username.

I also created a hidden folder in my home folder called .Games to place an icon of PlayOnLinux in, just to make it more appealing.
You can do the same and look for an icon of PlayOnLinux on Google Images for example and placing that in a similar folder.
If you create a .Games folder and use an image named logo.png in there, then you can use the ‘Icon’ part of the following text and just change <USER> to your username, if you have it in another folder, use another name for the image, or don’t use an icon, then make sure you change that line accordingly.

Firstly, open a text editor such as Gedit and paste the following text in there:

[Desktop Entry]
Name=PlayOnLinux
Comment=Play Windows games on Linux
Exec=playonlinux
Icon=/home/<USER>/.Games/logo.png
Terminal=false
Type=Application
StartupNotify=true
X-Ayatana-Desktop-Shortcuts=IntelRun;NvidiaRun

[IntelRun Shortcut Group]
Name=Run on Intel
Exec=playonlinux
TargetEnvironment=Unity

[NvidiaRun Shortcut Group]
Name=Run on NVidia
Exec=optirun playonlinux
TargetEnvironment=Unity

Then save this textfile as PlayOnLinux.desktop and place it in the .local/share/applications folder in your home directory (note: .local is a hidden folder as the dot indicates, in order to view it press Cntrl+H ).

Once that is done, navigate to .local/share/applications  (in your home folder) with the file browser, and drag and drop PlayOnLinux.desktop to the side panel.
If all went well, you should now see an icon on the panel, and when you right-click on it, you will be presented with the options ‘Run on Intel’ and ‘Run on Nvidia’.
Choosing Intel will run PlayOnLinux through the integrated card, and choosing Nvidia will run PlayOnLinux through Nvidia.
Consequently, the games that you run through PlayOnLinux will also run in the same mode as you started PlayOnLinux in.
For instance, if you selected ‘Run on Nvidia’ and once on PlayOnLinux play Oblivion, then Oblivion will be run with your Nvidia card.
And if you have the Bumblebee indicator installed, it will notify you that it is started with Bumblebee.

4. Running Steam games with Bumblebee

This is really simple to do, but is annoying since you have to configure this for each game, unless you use the same approach as with PlayOnLinux and run Steam with Bumblebee. But assuming you want to only run games through Bumblebee. Let’s see how that is done.

First open Steam and select your Library.
Right-Click on a game you want to use with Nvidia and select ‘Properties’.
Then click on ‘Set Launch Options’ and in the text box paste the following line exactly as it is:

vblank_mode=0 optirun -b primus %command%

That’s it, you can close the windows and when you run the game, it will run with Bumblebee.

I hope that this is has provided you everything to get the most out of, and make it relatively simple to switch between graphic cards.

Advertisements