Skip to content

[BUG] Session logout/re-login freezes system due to leftover background daemons #1748

Description

@Gaurav5189

Describe the bug

Hey everyone,

I ran into a persistent issue where trying to log out and then log back into my Hyprland session completely freezes the system. After a bit of testing, it looks like the terminate_clients() function in power.sh successfully handles foreground client windows, but misses crucial background components like waybar, quickshell widgets, and notification daemons (swaync).

Because they aren't fully killed, these daemons stick around as zombie processes. When a fresh login session tries to spin them up again, they conflict over sockets/buses, deadlocking the window manager and graphics server on the login screen.

Also, there is a minor typo in your power.sh script: it uses $home, which bash does not recognize, instead of the system variable $HOME

I’ve already patched this locally on my machine by forcing a pkill -9 on the system daemons (waybar, quickshell, swaync, hypridle) right inside the exit, reboot, and shutdown blocks. It completely solves the re-login freeze and leaves the display manager with a totally clean slate.

If you're open to it, give me the go-ahead and I'd be happy to open a quick PR with the fix!

Steps to reproduce

  1. First logging to hyprland.
  2. logout
  3. enter password
  4. system freezes
  5. have to manually restart

Expected behavior

The re-logging in to the hyprland should have worked without any crash.

Screenshots

No response

Distribution

EndeavourOS

If Other, specify

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions