
for Steam OS - eGPUBridge releases v0.2.alfa
Hey everyone,
I've been working on a Decky Loader plugin called eGPUBridge that solves a specific problem: managing external GPU display output on SteamOS handhelds.
The problem: When you connect an eGPU via USB4/Thunderbolt to a handheld running SteamOS (Legion Go, ROG Ally, etc.), switching between the internal
screen and the external display attached to the eGPU is a pain. You end up tinkering with config files, restarting sessions, or rebooting.
What eGPUBridge does:
- Auto-detects eGPU via USB4/Thunderbolt
- One-button switching between internal display and external TV
- Choose which GPU renders for the external display (eGPU vs integrated)
- Optional TV control — Wake-on-LAN, ADB, CEC (turn your TV on/off)
- Emergency hotkey to recover if something goes wrong
- Read-only USB4 dock status
How it works under the hood:
eGPU detection:
- Scans /sys/class/drm/card[0-9] — all DRM cards in the system
- Reads PCI vendor/device IDs from sysfs (/sys/class/drm/cardX/device/vendor, device)
- Built-in GPU is identified by the boot_vga=1 flag — everything else is considered external
- AMD GPUs recognized by vendor ID 0x1002, model name comes from lspci
- Not hardcoded to any specific hardware — works with any eGPU over USB4/Thunderbolt
Display detection:
- EDID of the monitor is read directly from /sys/class/drm/cardX-CONNECTOR/edid (binary data, monitor name parsed from the 0xFC descriptor)
- Connection status: connected / disconnected from sysfs
- Supported resolutions and refresh rates: parsed from modetest -c output (filters modes from 720p 50Hz and up)
- Priority: HDMI first (practical use case), then the rest
Display switching:
- Does NOT patch the system /usr/lib/steamos/gamescope-session file directly
- Uses plugin config files: output_order.conf (output order), prefer_vk_device.conf (GPU selection), gamescope_mode.conf (resolution)
- Gamescope is launched with parameters -O HDMI-A-1 (external) or -O eDP-1 (internal)
- --prefer-vk-device 1002:7550 tells gamescope which GPU to use for rendering
Internal panel shutdown (when running on TV):
- DPMS Off via modetest -w connectorID:DPMS:3 — monitor goes to "no signal" instead of black screen
- Backlight is saved and turned off (/sys/class/backlight/amdgpu_bl0/brightness = 0)
- Framebuffer blank + unbind fbcon — removes boot logo artifacts
TV control:
- Wake-on-LAN: magic packet sent to the TV's MAC address
- ADB: connects over IP, checks screen state (dumpsys display | grep mWakefulness)
- CEC: control via HDMI CEC protocol
- TV network status detected via ping (doesn't flood logs)
- TV config: /home/deck/.config/egpubridge-tv.conf (IP, MAC, ADB — not published)
PCIe link status:
- Speed and link width read from /sys/bus/pci/devices/ADDR/current_link_speed and current_link_width
- Fallback: parsing lspci -vv (LnkSta: line)
- Shows real USB4/TB throughput (e.g. 32GT/s x4)
Safety:
- Atomic config writes (write to .tmp first, then os.replace)
- Automatic backup of original gamescope-session before any changes
- Log rotation (max 2MB, keeps 700KB)
- Plugin does NOT restart SDDM for normal switching
Tested on: Lenovo Legion Go S (SteamOS) + AMD eGPU via ASMedia USB4 bridge. Should work on other handhelds with SteamOS and USB4/Thunderbolt — uses
generic detection via sysfs/DRM.
Open source: https://github.com/WowOne987/eGPUBridge (MIT license)
It's at v0.2.alfa — very early. I'd really appreciate it if anyone with an eGPU setup on SteamOS could try it out and report back. Even if it works —
that's valuable info. If it doesn't — even more valuable, because right now I only have one hardware combo to test on and I can't reproduce errors or edge
cases on other devices. Logs, screenshots, dmesg output — anything helps.
What hardware combos are you running? What features would you want?