I decided to make a second part of my Linux gaming setup post, as I feel that the first one is more like a list of stuff that are on top my desk. Anyway, once you’re done with hardware, let’s get into the software configurations. These steps are done with Ubuntu 14.04 and Ubuntu 14.04-based Evolve OS Alpha 3
1. GPU drivers and bumblebee
If you’re serious about gaming, there are only two viable options of getting a decent graphic card, Nvidia or AMD. Both has released proprietary binary package for their graphic chip, and if you’re using ubuntu, the easiest way to install them is through Ubuntu’s additional drivers app. Find and open the “Additional Driver” app from your dash menu, and let it sit for a while to probe your computer and lists any additional driver you can install to your system.
If it doesn’t see your graphic card, close the “Additional Drivers” window, and do:
sudo apt-get update
sudo apt-get upgrade
And try reopen “Additional Drivers” again. To install Nvidia proprietary driver, select “Nvidia binary driver” and press “Apply Changes”. For AMD, search for fglrx. If you’re prompted to restart your system, do so.
If you’re on a notebook, chances are, it’s equipped with hybrid graphic setup, where an intel or lower tier amd graphic chip is coupled with an Nvidia or higher tier AMD GPU. In Nvidia-speak, they call it Optimus. Native support for Nvidia Optimus arrived a bit late on linux, and the implementation is kind of awkward. Instead of detecting whether an app requires a beefy graphic resource and automatically activate the discrete GPU, linux users must manually switch between GPU, log out and log back into desktop. Bumblebee partially alleviate this problem by allowing users to choose which GPU an app is going to use. I’ve heard that support for AMD fglrx has recently been added to bumblebee, but I haven’t got the chance to test it yet.
On Ubuntu 14.04, the best way to do this is through an additional PPA. Please note that these steps also update your Nvidia binary driver to version 331:
first, remove existing installation of Nvidia binary driver
sudo apt-get purge nvidia*
if you have tried installing bumblebee, you should remove them too
sudo apt-get purge bumblebee*
update your system
sudo apt-get update sudo apt-get dist-upgrade
add the x-swat repo
sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
..update
sudo apt-get update
next, install the softwares:
sudo apt-get install linux-headers-generic
sudo apt-get install nvidia-331 nvidia-settings-331
sudo apt-get install bumblebee bumblebee-nvidia primus virtualgl mesa-utils
Then, edit the bumblebee config file:
sudo nano /etc/bumblebee/bumblebee.conf
Find these lines, and make some change:
Driver=
to
Driver=nvidia
Scroll down until you find [driver-nvidia], and make more changes:
[driver-nvidia] # Module name to load, defaults to Driver if empty or unset KernelDriver=nvidia-331 PMMethod=auto # colon-separated path to the nvidia libraries LibraryPath=/usr/lib/nvidia-331:/usr/lib32/nvidia-331 # comma-separated path of the directory containing nvidia_drv.so and the # default Xorg modules path XorgModulePath=/usr/lib/nvidia-331/xorg,/usr/lib/xorg/modules XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
Save, and then do
sudo apt-get install --reinstall bbswitch-dkms
Finally, restart bumblebee
/etc/init.d/bumblebeed restart
Bumblebee should be ready for you. For example, to use your discrete graphic card with steam, do:
optirun steam
If you’re using Gnome-Shell, the Bumblebee Indicator extension should come in handy. It will add a small bumblebee logo on your top right tray that lights up when your discrete GPU is being used.
To access nvidia settings, do
optirun nvidia-settings -c :8
You can add this manually to your app menu, by installing alacarte.
2. Steam
Installing steam is a straight forward process. It’s available on Ubuntu repository, so you can do:
sudo apt-get install steam
To integrate bumblebee to Steam, right click on the game that you want to run with discrete GPU, and select “Properties”.
On “Properties” window, at the GENERAL tab, press the “SET LAUNCH OPIONS…” button, and put primusrun %command%. Press OK to save the change, and close the window.
3. Steam on Wine
To get games that’s only available on windows, you can install Windows version of steam via wine. There are a couple of ways to do that. If you already have wine installed, you can download and install it right away. Or, you can use PlayOnLinux. There are a couple of advantages of using PlayOnLinux. For exmaple, it creates a separate virtual folder and install its’ own version of wine(s), you can use more than one version of wine, depending on the requirements of your Windows app. So you can have 3 apps installed, each with its’ own virtual folder and a version of wine. This also means, mucking around with windows components on certain virtual folder only affect that specific app, and won’t other apps on your system.
PlayOnLinux is available on Ubuntu’s official repo, so you can install it right away by doing:
sudo apt-get install playonlinux
Once it finished installing, open PlayOnLinux from your app list, and wait until it’s ready
Search for steam, and press the install button
It will install steam, along with the newest steam-compatible version of wine
Make sure to use the default location for steam install, and opt-out when asked to run steam after installation is completed
To make sure that Steam on PlayOnLinux uses bumblebee, open it by doing:
optirun playonlinux
To start steam, select steam from the list, then press “Run”. PlayOnLinux might tell you that it has crashed, but just ignore the notification and press next to close the notification window.
You should now be able to login, download and install your game.
If you have any question, feel free to write it down on the comment section below 🙂
Hello,
I’ve been messing around with hybrid graphics on Linux for a while… and welp, I tried bumblebee which worked perfectly fine but the only problem that I had is that, i’ve never been able to set my HDMI monitor to work with bumblebee, im actually using the nvidia drivers and the “nvidia xserver settings” which sets the nvidia to be running 24/7 and working well with openGL.
I found some problems trying to use Play on linux because when using wine it only detects my INTEL and the only way to detect the nvidia it’s installing bumblebee, so there goes my question, do you have bumblebee installed with a working HDMI monitor?
I did a lot of googling and on the bumblebee wiki you can see that there is no direct HDMI support and if you want to make it work you have to touch xorg or launch a different session on the HDMI monitor.
Thanks for your time!
Hi roberto,
First, a stupid question: have you tried setting up your HDMI screen via Ubuntu/Gnome “Display” application.
It seems that my laptop has the HDMI output wired to the intel graphic chip, per-this article, since I can use HDMI monitor with bumblebee simultaneously.
Can you share what make and model your laptop is? Also I assume when you say “nvidia xserver settings”, it means you are using the performance mode via nvidia-prime?
Also please check whether you can disable the intel chip from your laptop’s BIOS, I think that’s the best solution if it’s available. Also several games on PlayonLinux tells me that it only detect the intel chip but actually is using Nvidia. And last, have you tried pure Wine instead of POL?