added dms greeter auto session switch

This commit is contained in:
2026-07-11 17:48:08 -04:00
parent 835a939a81
commit 4b7725849f
3 changed files with 761 additions and 71 deletions
+25 -13
View File
@@ -4,12 +4,18 @@
Lineage: forked from [Super-Shift-S-Omarchy-Deck-Mode](https://git.no-signal.uk/nosignal/Super-Shift-S-Omarchy-Deck-Mode), briefly renamed Omarchy Deck, then renamed DeckShift.
> **Target:** [Omarchy](https://omarchy.com) — Arch + Hyprland + SDDM + Walker. DeckShift depends on Omarchy-specific helpers (`omarchy-pkg-add`, `omarchy-restart-walker`, etc.) and is not intended to be cross-distro.
> **Target:** [Omarchy](https://omarchy.com) — Arch + Hyprland + SDDM + Walker. Experimental DMS/greetd manual session switching is available through `DECKSHIFT_SESSION_BACKEND=dms-greeter-manual`. DeckShift still depends on Omarchy-specific helpers (`omarchy-pkg-add`, `omarchy-restart-walker`, etc.) and is not intended to be cross-distro.
[![DeckShift demo](https://img.youtube.com/vi/nj4pLh3spCs/maxresdefault.jpg)](https://youtu.be/nj4pLh3spCs)
## What's New
### Unreleased — Session backend abstraction
- DeckShift now writes `/etc/deckshift/session-backend.conf` and routes mode selection through `/usr/local/bin/deckshift-session-switch` plus `/usr/local/bin/deckshift-session-transition`.
- `sddm` preserves the existing behavior: update `/etc/sddm.conf.d/zz-gaming-session.conf`, then restart SDDM.
- `dms-greeter-manual` is experimental: it writes DMS greeter memory to select the target session, then terminates the current login session so the user authenticates through DMS. It does not implement one-shot auto-login yet.
### v0.1.13 — Pacman hook keeps gamescope's cap_sys_nice across upgrades
- Linux file capabilities live as an xattr (`security.capability`) on the inode, so every time pacman replaces `/usr/bin/gamescope` during an upgrade the previously-granted `cap_sys_nice=eip` is silently lost. Performance mode keeps "working" but the compositor thread loses its priority boost — worse frame pacing and input latency, with no error surfaced anywhere.
@@ -117,11 +123,11 @@ This installer transforms your desktop into a dual-mode system:
- **Desktop Mode** — your normal Hyprland session.
- **Gaming Mode** — full-screen Steam Big Picture running inside Gamescope (the same compositor used by the Steam Deck), with automatic performance tuning, controller support, and external drive mounting.
Switching between modes is seamless — SDDM handles session transitions, and your network, audio, and peripherals carry over automatically.
Switching between modes is handled by a session backend. SDDM remains the default and preserves the seamless auto-login flow. The experimental DMS greeter backend preselects the next session and returns to the greeter for manual authentication.
## Requirements
- **OS**: [Omarchy](https://omarchy.com) (Arch Linux + Hyprland + SDDM)
- **OS**: [Omarchy](https://omarchy.com) (Arch Linux + Hyprland + SDDM), or an experimental DMS/greetd setup for manual session switching
- **GPU**: AMD (discrete or APU), NVIDIA (discrete), or Intel (Arc / Iris Xe), or any hybrid combo of the above
- Intel Arc (Alchemist, Battlemage): well-supported
- Tiger Lake / Alder Lake Iris Xe: playable for indies / older AAA
@@ -129,7 +135,7 @@ Switching between modes is seamless — SDDM handles session transitions, and yo
- Hybrid laptops (NVIDIA + iGPU, AMD dGPU + iGPU): use the corresponding `[hybrid-*]` GPU mode in the Settings TUI
- **AUR Helper**: yay or paru (for ChimeraOS session packages)
> **Note**: This script targets Omarchy and its stack (Hyprland, SDDM, iwd, UWSM, PipeWire). It works on other Arch + Hyprland setups with light tweaks, but isn't tested there.
> **Note**: This script targets Omarchy and its stack (Hyprland, SDDM, iwd, UWSM, PipeWire). The DMS/greetd backend is experimental and currently manual-only.
## Quick Start
@@ -234,9 +240,11 @@ Package installs use Omarchy's `omarchy-pkg-add` (idempotent, double-checks pacm
| Path | Purpose |
|---|---|
| `/usr/local/bin/switch-to-gaming` | Hyprland → Gaming Mode |
| `/usr/local/bin/switch-to-desktop` | Gaming Mode → Hyprland (synchronous power-state restore + atomic SDDM restart) |
| `/usr/local/bin/switch-to-desktop` | Gaming Mode → Hyprland (synchronous power-state restore + backend transition) |
| `/usr/local/bin/gamescope-session-nm-wrapper` | Main session wrapper (performance mode, NM, drive mounting, saves pre-Gaming-Mode state) |
| `/usr/local/bin/gaming-session-switch` | Helper that toggles SDDM autologin between Hyprland and Gamescope |
| `/usr/local/bin/deckshift-session-switch` | Backend-neutral helper that selects desktop or gaming session |
| `/usr/local/bin/deckshift-session-transition` | Backend-neutral helper that restarts SDDM or exits to DMS greeter |
| `/usr/local/bin/gaming-session-switch` | Compatibility wrapper for `deckshift-session-switch` |
| `/usr/local/bin/gaming-keybind-monitor` | Python evdev daemon catching `Super+Shift+R` inside Gamescope |
| `/usr/lib/os-session-select` | Handler for Steam's "Exit to Desktop" button |
| `/usr/local/lib/gamescope-nvidia/gamescope` | NVIDIA wrapper that adds `--force-composition` |
@@ -257,8 +265,10 @@ Package installs use Omarchy's `omarchy-pkg-add` (idempotent, double-checks pacm
#### Session & Display Manager
| Path | Purpose |
|---|---|
| `/usr/share/wayland-sessions/gamescope-session-steam-nm.desktop` | SDDM session entry for Gaming Mode |
| `/etc/sddm.conf.d/zz-gaming-session.conf` | SDDM autologin session switching config |
| `/usr/share/wayland-sessions/gamescope-session-steam-nm.desktop` | Wayland session entry for Gaming Mode |
| `/etc/deckshift/session-backend.conf` | Active session backend and session IDs |
| `/etc/sddm.conf.d/zz-gaming-session.conf` | SDDM autologin session switching config when using the SDDM backend |
| `/var/cache/dms-greeter/.local/state/memory.json` | DMS greeter memory updated when using the DMS manual backend |
#### Permissions & Security
| Path | Purpose |
@@ -300,8 +310,8 @@ Desktop Mode (Hyprland)
├─ Super+Shift+S pressed
│ └─ switch-to-gaming runs:
│ ├─ Masks suspend targets (prevents sleep during switch)
│ ├─ Updates SDDM config to gaming session
│ └─ Restarts SDDM → boots into Gaming Mode
│ ├─ Selects the gaming session through deckshift-session-switch
│ └─ Runs deckshift-session-transition
Gaming Mode (Gamescope + Steam Big Picture)
@@ -320,8 +330,8 @@ Gaming Mode (Gamescope + Steam Big Picture)
│ ├─ Restores Bluetooth
│ ├─ Shuts down Steam gracefully
│ ├─ Kills gamescope
│ ├─ Updates SDDM config to Hyprland session
│ └─ Atomic systemctl restart sddm → boots into Desktop Mode
│ ├─ Selects the desktop session through deckshift-session-switch
│ └─ Runs deckshift-session-transition
└─ On session cleanup (trap handler — backup path):
├─ Kills steam-library-mount and keybind-monitor
@@ -553,7 +563,8 @@ sudo pkill -f steam-library-mount
# Remove scripts
sudo rm -f /usr/local/bin/{switch-to-gaming,switch-to-desktop,gamescope-session-nm-wrapper,\
gaming-session-switch,gaming-keybind-monitor,gamescope-nm-start,gamescope-nm-stop,\
deckshift-session-switch,deckshift-session-transition,gaming-session-switch,\
gaming-keybind-monitor,gamescope-nm-start,gamescope-nm-stop,\
steam-library-mount,deckshift-settings}
sudo rm -f /usr/lib/os-session-select
sudo rm -rf /usr/local/lib/gamescope-nvidia
@@ -572,6 +583,7 @@ sudo rm -f /etc/udev/rules.d/99-gaming-performance.rules
sudo rm -f /etc/security/limits.d/99-gaming-memlock.conf
# Remove configs
sudo rm -rf /etc/deckshift
sudo rm -f /etc/sddm.conf.d/zz-gaming-session.conf
sudo rm -f /etc/environment.d/99-shader-cache.conf
sudo rm -f /etc/environment.d/90-nvidia-gamescope.conf