Skip to content

Instantly share code, notes, and snippets.

@najashark
Last active November 12, 2017 09:55
Show Gist options
  • Save najashark/864931436dbcfe35053003f6f8e92115 to your computer and use it in GitHub Desktop.
Save najashark/864931436dbcfe35053003f6f8e92115 to your computer and use it in GitHub Desktop.
Bumblebee on a Lenovo Y480 [Nvidia GT 650M] with XUbuntu/Ubuntu 16.04.3 LTS

1. Start with fresh install of xubuntu 16.04.3

2. off secure boot in BIOS

Install Nvidia Prime and set it to "intel"

sudo apt install nvidia-prime
sudo prime-select intel

3. Add this repo

we use testing PPA because it has latest patch for lenovo laptop

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo add-apt-repository ppa:bumblebee/testing

4. do update and upgrade

sudo apt update
sudo apt upgrade

5. remove nouveau just to be sure

sudo apt-get remove xserver-xorg-video-nouveau

6. install bumblebee and nvidia driver

sudo apt-get install bumblebee bumblebee-nvidia nvidia-384

7. Blacklist NVidia Drivers

sudo mousepad /etc/modprobe.d/bumblebee.conf

add this line if not there

blacklist nvidia-384
blacklist nvidia-384-updates
blacklist nvidia-experimental-384

8. Update bumblebee Config to Point to 384.x Drivers

sudo mousepad /etc/bumblebee/bumblebee.conf

edit to looks like this

...
[bumblebeed]
...
# The Driver used by Bumblebee server. If this value is not set (or empty),
# auto-detection is performed. The available drivers are nvidia and nouveau
# (See also the driver-specific sections below)
Driver=nvidia
...

## Section with nvidia driver specific options, only parsed if Driver=nvidia
[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia-384
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-384:/usr/lib32/nvidia-384  
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-384/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

...

9. Select Mesa as your GL Provider

sudo update-alternatives --config i386-linux-gnu_gl_conf
sudo update-alternatives --config x86_64-linux-gnu_egl_conf
sudo update-alternatives --config x86_64-linux-gnu_gl_conf

10. reboot

sudo reboot

11. Disable gpu-manager

sudo nano /etc/default/grub 

find GRUB_CMDLINE_LINUX="" and add GRUB_CMDLINE_LINUX="nogpumanager" it willl looks like this

RUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="nogpumanager"

12. update grub

sudo update-grub

13.Re-build the bbswitch and nvidia modules

sudo dpkg-reconfigure bbswitch-dkms
sudo dpkg-reconfigure nvidia-384 

14. reboot

sudo reboot

15. test your gpu, with optirun should get higher fps than normal glxgears

optirun glxgears
glxgears

16. Intall Nvidia Power indicator

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt update
sudo apt install nvidia-power-indicator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment