Quick Guide to running Debian on your laptop with Nvidia Optimus Graphics
THis is what worked for me. I wanted to write this for Debian users on Nvidia Laptops that also wanted to run games or other apps that use the hardware acceleration of the nvidia card. No doubt you already know you have the Intel Graphics HD integrated graphics and that this is the part that is connected to the display output, but we will utilize both the Debian nvidia-driver as well as Bumblebee.
So why do we need Bumblebee? The nvidia drivers alone are not enough, since we have "optimus" we need to copy the nvidia buffer to the intel graphics buffer because that is how we "get" our accelerated graphics. You will notice a significant FPS drop in your games, but they will only drop to the speed of the PCIe bottleneck for copying the buffers, NOT the actual rendering so while your FPS will be lower it will be at a stable lower value.
Why are we not using the Nvidia Drivers provided by Nvidia? Because their package is really meant to be reconsumed by distro experts who repackage it tailor-made for your distro (arch/debian/ubuntu etc)
Add the non-free component in your /etc/apt/sources.list
deb http://mirrors.kernel.org/debian/ stretch main contrib non-free
deb-src http://mirrors.kernel.org/debian/ stretch main
install build headers
apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
install nvidia-driver Provided by Debian
apt-get install nvidia-driver
Then install bumblebee-nvidia
apt-get install bumblebee-nvidia primus
Do not install bumblebee, do not add an xorg.conf file, do not use the nvidia website drivers. Hardware accelerated League of Legends, hearthstone, etc. all worked great through PlayOnLinux
If you want to play 32bit apps (windows games etc / league of legends / steam games)
dpkg --add-architecture i386
apt-get update
apt-get install wine32
apt-get install bumblebee-nvidia primus primus-libs:i386
After you do this,
service bumblebeed start
adduser <yourname> bumblebee (add yourself to the bumblebee group)
Then edit your desktop shortcut so that you add primusrun before playonlinux
[Desktop Entry]
Encoding=UTF-8
Name=League of Legends
Comment=PlayOnLinux
Type=Application
Exec=primusrun /usr/share/playonlinux/playonlinux --run "League of Legends" %F
Icon=/home/rook/.PlayOnLinux//icones/full_size/League of Legends
Name[fr_FR]=League of Legends
StartupWMClass=lol.launcher.admin.exe
Categories=Game;RolePlaying;
this is a working solution in a gnome environment where you can launch .desktop files. If you want to launch playonlinux from within a non-desktop-environment (like a pure window manager like xmonad) on the command line simply call this
primusrun playonlinux &
Posted May 29, 2016, 9:05 PM UTC · edited