Skip to content

Instantly share code, notes, and snippets.

@PtrMan
Created November 16, 2015 14:55
Show Gist options
  • Select an option

  • Save PtrMan/0db9a949e6deb7f6f1c6 to your computer and use it in GitHub Desktop.

Select an option

Save PtrMan/0db9a949e6deb7f6f1c6 to your computer and use it in GitHub Desktop.
Gentoo Nvidida Optimus
#!/bin/sh
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "NoLogo" "on"
Option "RandRRotation" "on"
Option "TripleBuffer" "on"
Option "AddARGBGLXVisuals" "on"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "UseDisplayDevice" "none"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment