WORK IN PROGRESS, NOT FULLY TESTED YET
- Install bumblebee
- set
KeepUnusedXServer
totrue
in /etc/bumblebee.conf - Acquire a copy of primus libgl.so either from your package manager or by compiling from source
- Copy the primus libgl.so to a folder a empty folder inside the flatpak
- Acquire a copy of the primusrun script either from your package manager or from https://github.com/amonakov/primus/blob/master/primusrun
- Copy the primusrun script to your home directory inside the flatpak
- In primusrun change
export PRIMUS_libGLa
to find to the folder with the libgl.so library for you GPU (NOT the primus libgl.so) - In primusrun change
export PRIMUS_libGLd
to find to the folder with the libgl.so library for you integrated graphics (NOT the primus libgl.so) - In primusrun change
PRIMUS_libGL
to the path of the primus libgl.so library - compile flatpak 1.2.0 with the below patch
flatpak-bumblebee.path
note: When modifying primusrun the paths has to the paths inside the flatpak
This will inform steam to run your game with the prumisrun wrapper that enable GPU acceleration
- right click the steam game in you library that you wan't to have accelerated
- click set launch options
- paste
/home/jenrik/primusrun %command%
in to the dialog box, and replace jenrik with your linux username
TESTED
- run
primusrun glxgears
to start bumblebee/ the secondary X server - run
flatpak run com.valvesoftware.Steam
and replaceflatpak
with the full path to your patched version of flatpak - run your previously configured game
- ???
- PROFIT!!!
- run
primusrun glxgears
to start bumblebee/ the secondary X server - run
flatpak run --command=bash com.example.Flatpak
and replaceflatpak
with the full path to your patched version of flatpak - inside the flatpak run
/home/$USER/primusrun <command>