Skip to content
hyprshutdown

hyprshutdown

hyprshutdown is a graceful shutdown utility. It opens a GUI and gracefully asks apps to exit, then quits Hyprland. It’s the recommended way to exit hyprland, as otherwise (e.g. dispatch exit) apps will die instead of exiting.

Command-Line Options

OptionDescription
--vt NSwitch to VT N after exit (fixes NVIDIA+SDDM black screen)
--dry-runShow UI without actually closing apps or exiting
--no-exitClose apps but don’t exit Hyprland
--top-label, -tCustom text for the shutdown dialog
--post-cmd, -pCommand to run after Hyprland exits
--no-forkRun in foreground (don’t daemonize)
--verboseEnable debug logging
--help, -hShow help

Tips and tricks

If you want to shut the system down, or reboot, instead of logging out, you can do things like this:

hyprshutdown -t 'Shutting down...' --post-cmd 'shutdown -P 0'

hyprshutdown -t 'Restarting...' --post-cmd 'reboot'

Troubleshooting

NVIDIA + SDDM Users

If you experience a black screen / hang when logging out with NVIDIA GPU and SDDM display manager, use the --vt flag:

hyprshutdown --vt 2

Why this is needed: On NVIDIA systems with SDDM, the display doesn’t automatically switch back to SDDM’s virtual terminal (typically VT2) when Hyprland exits. The --vt flag forces a VT switch after logout.

Setup: The VT switch requires passwordless sudo for chvt:

echo "$USER ALL=(ALL) NOPASSWD: /usr/bin/chvt" | sudo tee /etc/sudoers.d/chvt
sudo chmod 440 /etc/sudoers.d/chvt

This is safe because chvt only switches virtual terminals and cannot be exploited for privilege escalation.

Last updated on