steam-egpu: auto-detect mit --sync-only für hyprland autostart

Beim Login wird via exec-once geprüft ob eGPU da ist und die
Launch Options entsprechend gesetzt. Kein manuelles Umschalten mehr.

Hyprland-Config ins Repo aufgenommen.
This commit is contained in:
Kay Türtscher 2026-06-06 19:44:25 +02:00
parent ed130e79bd
commit 97abbcb8da
3 changed files with 154 additions and 10 deletions

137
configs/hyprland.conf Normal file
View file

@ -0,0 +1,137 @@
# Hyprland config for Super X — DMS shell + D-pad friendly binds
# Based on niri config, adapted for Hyprland
# ── Monitors ──────────────────────────────────────────────────
monitor=eDP-1,preferred,auto,auto
# ── Input ─────────────────────────────────────────────────────
input {
kb_layout = de
follow_mouse = 1
left_handed = 1
touchpad {
natural_scroll = true
}
}
# ── General ───────────────────────────────────────────────────
general {
gaps_in = 8
gaps_out = 8
border_size = 1
col.active_border = rgba(33ccffee)
col.inactive_border = rgba(595959aa)
layout = dwindle
}
# ── Decoration ────────────────────────────────────────────────
decoration {
rounding = 8
blur {
enabled = true
size = 3
passes = 1
}
}
# ── Animations ────────────────────────────────────────────────
animations {
enabled = true
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = border, 1, 10, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
# ── Misc ──────────────────────────────────────────────────────
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
}
# ── Keybindings ───────────────────────────────────────────────
$mainMod = SUPER
bind = $mainMod, RETURN, exec, foot
bind = $mainMod, SPACE, exec, dms ipc call spotlight toggle
bind = $mainMod, Q, killactive,
bind = $mainMod SHIFT, Q, exit,
bind = $mainMod, F, fullscreen, 0
# DMS Control Center
bind = $mainMod, C, exec, dms ipc call controlcenter toggle
# DMS Cheatsheet (keybinds overview)
bind = $mainMod SHIFT, Slash, exec, dms keybinds show
# Volume (PipeWire)
bindel = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+
bindel = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-
bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
# Brightness
bindel = , XF86MonBrightnessUp, exec, brightnessctl -d amdgpu_bl1 set +10%
bindel = , XF86MonBrightnessDown, exec, brightnessctl -d amdgpu_bl1 set 10%-
# ── Navigation (D-pad friendly) ───────────────────────────────
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Vim-style
bind = $mainMod, h, movefocus, l
bind = $mainMod, l, movefocus, r
bind = $mainMod, k, movefocus, u
bind = $mainMod, j, movefocus, d
# Move windows
bind = $mainMod CTRL, left, movewindow, l
bind = $mainMod CTRL, right, movewindow, r
bind = $mainMod CTRL, up, movewindow, u
bind = $mainMod CTRL, down, movewindow, d
bind = $mainMod CTRL, h, movewindow, l
bind = $mainMod CTRL, l, movewindow, r
bind = $mainMod CTRL, k, movewindow, u
bind = $mainMod CTRL, j, movewindow, d
# Workspace switching
bind = $mainMod, Page_Down, workspace, +1
bind = $mainMod, Page_Up, workspace, -1
bind = $mainMod, bracketright, workspace, +1
bind = $mainMod, bracketleft, workspace, -1
# Move to workspace
bind = $mainMod SHIFT, Page_Down, movetoworkspace, +1
bind = $mainMod SHIFT, Page_Up, movetoworkspace, -1
bind = $mainMod SHIFT, bracketright, movetoworkspace, +1
bind = $mainMod SHIFT, bracketleft, movetoworkspace, -1
# Monitor switching
bind = $mainMod SHIFT, left, focusmonitor, l
bind = $mainMod SHIFT, right, focusmonitor, r
bind = $mainMod SHIFT, h, focusmonitor, l
bind = $mainMod SHIFT, l, focusmonitor, r
# Scroll workspace
bind = $mainMod, mouse_down, workspace, +1
bind = $mainMod, mouse_up, workspace, -1
# Screenshot
bind = $mainMod SHIFT, S, exec, grim -g "$(slurp)" - | wl-copy
bind = , Print, exec, grim -g "$(slurp)" - | wl-copy
# DMS Lock screen
bind = $mainMod SHIFT, L, exec, dms ipc call lock lock
# ── Window rules ──────────────────────────────────────────────
# Hyprland 0.55 Syntax — windowrule v2 deprecated, V1 format:
# windowrule = RULE, REGEX
# Beispiel: windowrule = float, ^(pavucontrol)$
# (aktuell deaktiviert, da Syntax sich zwischen Versionen geändert hat)
# ── Autostart ─────────────────────────────────────────────────
exec-once = dms run --session
exec-once = [ ! -e /tmp/.steam-egpu-synced ] && /home/nepharius/SuperX-goes-Arch/tools/steam-egpu --sync-only && touch /tmp/.steam-egpu-synced

View file

@ -5,12 +5,9 @@
# Kein Shell-Wrapper für einzelne Spiele (Proton sandboxed Env-Vars),
# sondern direktes Patchen der VDF-Datei.
#
# Installation: tools/install-egpu.sh oder manuell:
# cp tools/steam-egpu ~/.local/bin/steam-egpu
# Hyprland exec-once: ~/.local/bin/steam-egpu (startet Steam mit Sync)
#
# Als Steam-Launcher verwenden (statt /usr/bin/steam):
# cp configs/steam-egpu.desktop ~/.local/share/applications/
# Usage:
# steam-egpu # Sync + Steam starten
# steam-egpu --sync-only # Nur Sync, kein Steam-Start (für Autostart)
VDF="$HOME/.local/share/Steam/userdata/19491507/config/localconfig.vdf"
TOGGLE="$HOME/SuperX-goes-Arch/.venv/bin/python3 $HOME/SuperX-goes-Arch/tools/steam-egpu-toggle.py"
@ -25,8 +22,11 @@ else
echo "[steam-egpu] Keine eGPU → iGPU-Modus" >&2
fi
# Nur patchen wenn nötig (Änderungen werden gezählt)
$TOGGLE "$MODE" 2>&1 | grep -q "Geändert: 0" && echo "[steam-egpu] Bereits aktuell, kein Patch nötig" >&2
# Patchen
$TOGGLE "$MODE" 2>&1
# Steam weitergeben
# Nur Sync? Dann exit
[ "$1" = "--sync-only" ] && exit 0
# Steam starten
exec /usr/bin/steam "$@"

View file

@ -6,13 +6,20 @@
#
# Ohne eGPU läuft das Spiel ganz normal auf der iGPU.
# Mit eGPU (card0 = RX 9060 XT): DRI_PRIME=1 + Vulkan-ICD auf eGPU
# + Workarounds für Proton/DXVK/VKD3D bei neuer GPU
# Prüfe ob die eGPU da ist (card0 = RX 9060 XT)
if [ -e /dev/dri/card0 ] && [ "$(cat /sys/class/drm/card0/device/vendor 2>/dev/null)" = "0x1002" ]; then
# eGPU ist verbunden
export DRI_PRIME=1
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json
echo "[superx-wrapper] eGPU aktiv — DRI_PRIME=1" >&2
# Proton/DXVK/VKD3D — GPU-Erkennung für neue Karten (Navi 44 / RX 9060 XT)
# force_host_gpu: zwingt VKD3D/DXVK die eGPU zu akzeptieren
export VKD3D_CONFIG=force_host_gpu
export DXVK_CONFIG=dxgi.allowUnsupportedDrivers=True
echo "[superx-wrapper] eGPU aktiv (RX 9060 XT) — DRI_PRIME=1 + Proton-Fixes" >&2
else
echo "[superx-wrapper] eGPU nicht gefunden — iGPU wird verwendet" >&2
fi