[BUG] Quickshell status bar does not reload after resume in hypridle.conf
Describe the bug
When using Quickshell instead of Waybar, the status bar disappears or freezes after the system resumes from sleep/standby. This happens because the status bar is not triggered to reload and bind to the re-enabled monitors on resume.
Steps to reproduce
- Switch the status bar to "Quickshell" in the ML4W settings.
- Put the PC to sleep / standby (suspend).
- Wake up the PC.
- Observe that the Quickshell status bar is missing, frozen, or positioned incorrectly.
Expected behavior
The status bar should automatically reload and appear correctly on the active monitors after waking up from sleep/standby, regardless of whether Waybar or Quickshell is used.
Screenshots
No response
Distribution
Arch Linux
If Other, specify
CachyOS
Additional context
This issue occurs because in hypridle.conf, the after_sleep_cmd only reactivates DPMS:
after_sleep_cmd = hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })'
It does not trigger any reload of the status bar. To make it compatible with all status bars out-of-the-box, it should call the universal reload script:
after_sleep_cmd = hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })' && sleep 2 && ~/.config/ml4w/scripts/ml4w-reload-statusbar
This script automatically reads the active status bar from ~/.config/ml4w/settings/statusbar and sends the correct reload command (e.g., qs ipc call statusbar reload for Quickshell or launch.sh for Waybar).
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Update 2 on the fix details:
To make this reload reliable and prevent the script from getting permanently blocked after the first run, we also need to close the file descriptor 200 of the flock lock before spawning background processes in ml4w-reload-statusbar.
Otherwise, background daemons spawned by the status bars (like swaync-client -swb inside Quickshell) will inherit the file descriptor 200 and keep the lock busy forever, causing all subsequent reload attempts to fail silently.
Here is the proposed fix for ml4w-reload-statusbar:
case "$statusbar" in
quickshell)
if [ "$1" == "restart" ]; then
while qs kill >/dev/null 2>&1; do
sleep 0.1
done
sleep 0.3
exec 200>&- # prevent lock leakage to background processes
qs -n -d >/dev/null 2>&1
else
exec 200>&- # prevent lock leakage
qs ipc call statusbar reload
fi
;;
waybar)
exec 200>&- # prevent lock leakage
"$HOME/.config/waybar/launch.sh"
;;
Any idea when this one will be tackled? Every time I log back into my system, I lose the statusbar and dock.
Hi @Obezyana33,
Until Stephan gets around to integrating this upstream, you can fix this right now on your machine by adding the reload trigger to your hypridle.conf.
Quick Workaround:
Edit your hypridle.conf ( ~/.config/hypr/hypridle.conf or your custom override):
- In the
generalblock, changeafter_sleep_cmd:
general {
...
after_sleep_cmd = hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })' && sleep 2 && ~/.config/ml4w/scripts/ml4w-reload-statusbar
}
- (Optional, if your screen also turns off while idle without a full suspend), also update the DPMS listener:
listener {
timeout = 660
on-timeout = hyprctl dispatch 'hl.dsp.dpms({ action = "disable" })'
on-resume = hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })' && brightnessctl -r && sleep 2 && ~/.config/ml4w/scripts/ml4w-reload-statusbar
}
When waking up from suspend / turning displays back on, Hyprland re-negotiates monitor outputs. If Quickshell is triggered immediately, it can run into a race condition before the displays are ready, causing both the status bar and the Quickshell dock to freeze or not bind to the monitor. The 2-second delay ensures DPMS has finished waking the display before telling the bar/dock to reload.
@mylinuxforwork Just as a small note/idea for the future: adding && sleep 2 && ~/.config/ml4w/scripts/ml4w-reload-statusbar to after_sleep_cmd in hypridle.conf might be a potential way to handle this automatically for Quickshell users.
Hi @tetam01
Thank you so much for taking the time to post a workaround! I implemented your suggested change to ml4w-reload-statusbar, but as I am sure you know, this change on its own does not work. I will make the changes to hypridle.conf as suggested.
Thank you again for your generosity - it is people like you who make the community great!
@mylinuxforwork - Stephan, you are pretty amazing too ;-)