Hyprland crashes on charger unplug — hybrid GPU (Intel iGPU + NVIDIA dGPU) power switch not handled
System Details
- OS: Omarchy 3.8.0
- Kernel: Linux 7.0.3-arch1-2
- WM: Hyprland 0.54.3 (Wayland)
- Terminal: alacritty 0.17.0
- Theme: Tokyo Night
- Font: JetBrainsMono Nerd Font 9pt
- Machine: Lenovo LOQ 15IAX9 (83GS)
- CPU: Intel Core i5-12450HX (8+4 cores)
- dGPU: NVIDIA GeForce RTX 2050 [Discrete]
- iGPU: Intel UHD Graphics @ 1.30 GHz [Integrated]
- Display: 1920x1080 @ 1.5x scaling, 15", 144Hz (Built-in)
- RAM: 11.39 GiB total, 1.90 GiB used
- Disk: btrfs, 474.92 GiB total
What's Wrong?
When the laptop is plugged into the charger, Hyprland runs correctly — the system appears to use the discrete NVIDIA GPU. When the charger is unplugged, Hyprland/Wayland crashes immediately and the session dies. A force restart is required. After reboot, the system runs on the integrated Intel GPU (presumably because the power state no longer triggers the dGPU).
This suggests that the GPU hot-switch triggered by the power state change (AC → battery) is not being handled gracefully by Hyprland or the underlying Omarchy configuration.
Steps to Reproduce
- Boot with charger plugged in — Hyprland starts, runs on dGPU
- Unplug charger
- Hyprland session crashes immediately; force restart required
- On reboot without charger, system runs on iGPU — stable
Expected Behavior
Either:
- Hyprland gracefully transitions between GPUs on power state change, OR
- Hyprland consistently uses one GPU (preferably iGPU for battery) regardless of power state
Closing as resolved.
After further testing on Omarchy 3.8.0 / Hyprland 0.54.3 / Linux 7.0.3-arch1-2, unplugging the charger no longer crashes the session. The NVIDIA dGPU still fully disappears from /sys on unplug (/sys/class/drm/card1/device/power/runtime_status returns "No such file or directory"), but Hyprland handles it gracefully now.
This appears to have been fixed upstream in Hyprland 0.47 via PR #8980 (GPU hotplug support), backed by aquamarine PR #130. The compositor now properly lifecycle-manages GPU device nodes disappearing at the event loop level.
For anyone still hitting this on older versions, the workaround is to pin Hyprland to the iGPU explicitly in hyprland.conf:
env = AQ_DRM_DEVICES,/dev/dri/card2
where card2 is your Intel iGPU (verify with cat /sys/class/drm/card*/device/vendor — 0x8086 = Intel).