waybar hypridle toggle can leave the display permanently off

Open Beginner friendly
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
bash
Domain
desktop

Research direction

Start by locating and reading hypridle.sh, especially its toggle branch, then compare its behavior with the DPMS listeners in hypridle.conf. Verify the toggle path leaves DPMS enabled before the daemon exits; the issue provides the hyprctl command for manual validation. The autostart discussion in conf/autostart.lua is related but separate.

Written by the indexing model from the issue text.

Description

Observed

The waybar hypridle module's left-click runs hypridle.sh toggle, which kills the daemon outright:

toggle)
    if pgrep -x "$SERVICE" >/dev/null ; then
        killall "$SERVICE"

hypridle owns both halves of the DPMS pair in hypridle.conf:

listener {
    timeout = 660
    on-timeout = hyprctl dispatch 'hl.dsp.dpms({ action = "disable" })'
    on-resume  = hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })' && brightnessctl -r
}

If the toggle is clicked while the screen is already blanked, the process holding on-resume dies with the display off. Nothing is left to re-enable DPMS, and because keybinds are suppressed while a session lock is active, there is no in-session way back — recovery means a VT switch or blind-typing the password.

Why this is worth guarding

Hit today, though not via this path: the display was found blanked with dpmsStatus: 0 and on-resume never having run. Recovery was:

$ hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })'
ok

The daemon was healthy at the time (alive since session start, live Wayland sockets, holding a sleep inhibitor), so the toggle was not the cause on this occasion. But it is a one-click route to exactly the same dead end, and it is on the bar.

Suggested fix

Re-enable DPMS before killing the daemon, so the toggle cannot strand the session:

toggle)
    if pgrep -x "$SERVICE" >/dev/null ; then
        hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })'
        killall "$SERVICE"

Related

Worth considering separately: hypridle is started with hl.exec_cmd("hypridle") in conf/autostart.lua, so it has no journal and does not restart on failure. That is why the incident above could not be traced to a cause. Arch ships /usr/lib/systemd/user/hypridle.service with Restart=on-failure, which would give both.

Environment

  • Hyprland 0.56.2, hypridle 0.1.8, hyprlock 0.9.6
  • Desktop falcon: AMD RX 6900 XT (amdgpu), Gigabyte M28U over DisplayPort
Dominant language
QML
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sleeyax/dotfiles

All issues in sleeyax/dotfiles

Similar issues

More Desktop Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.