Search This Blog

Sunday, October 25, 2015

How to Install Bumblebee and Latest Nvidia Drivers on Wily Werewolf Ubuntu 15.10


How to Install Bumblebee and Latest Nvidia Drivers on Wily Werewolf Ubuntu 15.10


The procedure for Installing Bumblebee and nvidia drivers on Ubuntu 15.10 is a bit different from what we have been using in the past. Hence the new post.

I have faced issue with using the xorg-edgers ppa and the graphics-drivers ppa together. All works well except after a couple of reboots the Xorg Breaks and I can't recover it no matter what. So I have decided to re-write this post to that my readers are aware of the changes and can enjoy a smooth experiences with Wily Werewolf, Ubuntu 15.10.

I have had my Xorg Crash and become totally not recoverable if I use both the Xorg-Edgers ppa and the Graphics-Drivers ppa.

My recommendation is to use only Graphics-Drivers ppa with Wily Werewolf Ubuntu 15.10

Without further delay, Here it is.

Run the following Commands in Sequence

1) sudo apt-get update && sudo apt-get upgrade

2) sudo apt-get dist-upgrade

3) sudo apt-add-repository ppa:graphics-drivers/ppa

4) sudo apt-get update && sudo apt-get dist-upgrade

5) sudo apt-get install bumblebee bumblebee-nvidia primus nvidia-settings nvidia-355

Once this is Installed, Below files need to be edited as shown.

1) sudo gedit /etc/modules

add

i915
bbswitch

2) sudo gedit /etc/modprobe.d/bumblebee.conf

Check for this

# 355
blacklist nvidia-355
blacklist nvidia-355-updates
blacklist nvidia-experimental-355
# Workaround to make sure nvidia-uvm is removed as well
remove nvidia rmmod nvidia-uvm nvidia

Ensure that this section shown above exists.

3) sudo gedit /etc/bumblebee/bumblebee.conf

replace

nvidia-current
with

nvidia-355 (Or whatever version of Driver is latest as per the Graphics Driver PPA)

Also Change

Driver = nvidia on Line Number 22


7) sudo gpasswd -a $USER bumblebee


8) sudo systemctl enable bumblebeed


9) Reboot

10) Install mesa utils if not already installed

sudo apt-get install mesa-utils

Check using

11) primusrun glxinfo | grep OpenGL

You shoud see a result like this.

primusrun glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 820M/PCIe/SSE2
OpenGL core profile version string: 4.4.0 NVIDIA 355.11
OpenGL core profile shading language version string: 4.40 NVIDIA via Cg compiler
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5.0 NVIDIA 355.11
OpenGL shading language version string: 4.50 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:

This means all is well and  your bumblebee setup is working.

If you would like to see if bumblebee is actually working, try this

lsmod | grep bbswitch

You should see something similar to this

 bbswitch               16384  0
 The number in second column is Random and will vary.

also 

if you run.

cat /proc/acpi/bbswitch


You should see something like this

0000:03:00.0 OFF

This means that your Nvidia Card is OFF by default. Once you run an application using primusrun or optirun commands, while the program you run is running you can see that the OFF change to ON Like below.

primusrun glxgears

this runs the glxgears program using your Nvidia Card via bumblebee.


Open another terminal and run.

cat /proc/acpi/bbswitch

 You should see something like

0000:03:00.0 ON

Now Close the application which you launched via bumblebee earlier, in this Case glxgears.

again run

cat /proc/acpi/bbswitch

You should see something like this.

0000:03:00.0 OFF

If all is going like I have mentioned then you can be sure that bumblebee is configured correctly.

Please leave your feedback in the comments section. 

Thanks for your time!