Skip to content

Instantly share code, notes, and snippets.

@eyedeekay
Last active April 6, 2016 10:04
Show Gist options
  • Save eyedeekay/510eb4e806cc7d27c484296308575716 to your computer and use it in GitHub Desktop.
Save eyedeekay/510eb4e806cc7d27c484296308575716 to your computer and use it in GitHub Desktop.
.profile modification to configure PRIMUS to save power.
#This will set us up to use the integrated GPU first, and the discrete GPU only when specified
if [ $(xrandr --listproviders | grep nouveau | grep Intel) ]; then
xrandr --setprovideroffloadsink nouveau Intel
elif [ $(xrandr --listproviders | grep radeon | grep Intel) ]; then
xrandr --setprovideroffloadsink nouveau Intel
fi
elif [ $(xrandr --listproviders | grep nouveau | grep amdgpu) ]; then
xrandr --setprovideroffloadsink nouveau Intel
elif [ $(xrandr --listproviders | grep radeon | grep amdgpu) ]; then
xrandr --setprovideroffloadsink nouveau Intel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment