Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
E

egpu-switcher

> 编程语言
Open source

Setup script for eGPUs in Linux (X.Org)

648 stars0 likes0 views
WebsiteGitHub

About

Setup script for eGPUs in Linux (X.Org)

Description

The goal of this CLI is to lower the barrier for Linux users to use their eGPU on the Linux Desktop. With the egpu-switcher config command the user can choose their external GPU. On every bootup the service will check if the eGPU is connected and if so, make X.Org prefer it.

[!NOTE] No hotplugging is possible. Users still need to reboot their computer to connect / disconnect the eGPU.

Requirements

  • Running X.Org
  • Thunderbolt connection to eGPU is authorized
  • Necessary graphics drivers for eGPU are installed

Installation

Ubuntu (apt)

The PPA is no longer maintained for now (see #90)

Arch (aur)

bash
paru -S egpu-switcher

[!TIP] :deciduous_tree::zap: Save time and energy by using the pre-compiled egpu-switcher-bin package

Manual

Installation and setup

Download binary from latest release

Copy binary to /opt, apply proper permissions, and link it in /usr/bin

bash
sudo cp  /opt/egpu-switcher
sudo chmod 755 /opt/egpu-switcher
sudo ln -s /opt/egpu-switcher /usr/bin/egpu-switcher
sudo egpu-switcher enable

Uninstall

bash
sudo egpu-switcher disable --hard
sudo rm /usr/bin/egpu-switcher
sudo rm /opt/egpu-switcher

Build

Prerequisites

Install the go toolchain

Installation and setup

bash
git clone [email protected]:hertg/egpu-switcher.git
cd egpu-switcher
make build -s
sudo make install -s
sudo egpu-switcher enable

Uninstall

bash
sudo egpu-switcher disable --hard
sudo make uninstall -s

Commands

txt
Usage:
  egpu-switcher [command]

Available Commands:
  config      Choose your external GPU
  disable     Disable egpu-switcher from running at startup
  enable      Enable egpu-switcher to run at startup
  help        Help about any command
  switch      Check if eGPU is present and configure X.org accordingly
  version     Print version information

Flags:
  -h, --help      help for egpu-switcher
  -v, --verbose   verbose output

Use "egpu-switcher [command] --help" for more information about a command.

Configuration

The config file is created automatically and can be found at /etc/egpu-switcher/config.yaml. Below you can see an example of a configuration file, annotated with additional information.

…

Custom X11 config

Since version 0.20.0, a custom x11 config template can be configured by creating a file at /usr/share/egpu-switcher/x11-template.conf. The default template is shown below, you can use it as a starting point.

# autogenerated by egpu-switcher
{{if .Modesetting}}
Section "Module"
    Load           "modesetting"
EndSection
{{end}}

Section "Device"
    Identifier     "{{.Id}}"
    Driver         "{{.Driver}}"
    BusID          "{{.Bus}}"
    Option         "AllowEmptyInitialConfiguration"
    Option         "AllowExternalGpus" "True"
EndSection

[!TIP] For safety, and to stop egpu-switcher from printing warnings, the file should be owned by root:root and have a mode of 644.


Troubleshooting

If you run into problems, please have a look at TROUBLESHOOT.md before reporting any issues.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goegpuhacktoberfestlinuxx11

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言