Skip to content

Instantly share code, notes, and snippets.

@akissu
Created April 1, 2019 20:25
Show Gist options
  • Save akissu/5357029f8efaf5cd9fc40de123654083 to your computer and use it in GitHub Desktop.
Save akissu/5357029f8efaf5cd9fc40de123654083 to your computer and use it in GitHub Desktop.
Basic switchable eGPU X11 config that supports hotplugging
#startx
Section "ServerLayout"
Identifier "layout"
Screen 0 "intel"
Inactive "nvidia"
EndSection
#startx -- -layout egpu
Section "ServerLayout"
Identifier "egpu"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia
#Nouveau driver is useful for PRIME offloading, but lacks 3D performance
#Driver "nouveau"
BusID "PCI:6:0:0"
Option "AllowEmptyInitialConfiguration"
Option "AllowExternalGpus"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
EndSection
Section "Device"
Identifier "intel"
Driver "intel"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
@JohannesMerkt
Copy link

Hi,
this looks interessting :)
Does it mean I dont have to eject my eGPU anymore with this config? Where do I have to set these configs?

@rvanlaar
Copy link

Just tried it. It doesn't work for me.

You can search for egpu-switcher on the egpu.io forums for a working setup.
In which working means that it will automatically detect the egpu and use it when it's there.
It doesn't support hotplug support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment