Recover a Hyprland screen that never comes back after DPMS off
Symptom
I bound a key to hyprctl dispatch dpms off and now the display is dead. Keyboard and mouse do nothing to bring it back, and I have to hard-reboot. Or: after hypridle blanks the screen it never turns back on when I move the mouse.
Cause
dpms off used as a direct keybind is explicitly not recommended: nothing is registered to turn it back on, so there is no path back. In an idle daemon the same thing happens if a listener has on-timeout = hyprctl dispatch dpms off without the matching on-resume.
Fix
Never bind dpms off directly. Drive it from hypridle with a paired resume action:
# ~/.config/hypr/hypridle.conf
general {
lock_cmd = pidof hyprlock || hyprlock
before_sleep_cmd = loginctl lock-session
after_sleep_cmd = hyprctl dispatch dpms on
}
listener {
timeout = 300
on-timeout = loginctl lock-session
}
listener {
timeout = 600
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
}
listener {
timeout = 900
on-timeout = systemctl suspend
}
**Recovering a currently-dead screen without rebooting**: switch to a TTY with Ctrl+Alt+F2, log in, and run blind:
export XDG_RUNTIME_DIR=/run/user/$(id -u)
export HYPRLAND_INSTANCE_SIGNATURE=$(ls -t $XDG_RUNTIME_DIR/hypr | head -1)
hyprctl dispatch dpms on
then Ctrl+Alt+F1 back. The same commands work over SSH from another machine.
Verify
After the idle timeout the screen blanks and a keypress brings it straight back. hyprctl monitors | grep -i dpms reports the monitors as on.