[BUG] Waybar not loading on start
Describe the bug
Waybar does not load on login. User has to press shift+super+b then ctrl+super+b for it to appear. And even then, it only works if you execute those commands after waiting.
Steps to reproduce
restart machine login wait shift+super+b ctrl+super+b
Expected behavior
Waybar should show immediately after login
Screenshots
No response
Distribution
Arch Linux
If Other, specify
No response
Additional context
This does not seem to happen with the new quickshell. I would move to the new quickshell but I think there should be icons and keybinds for deactivating screenlock and hypersunset.
Also... I had a lot of junk in my ml4w config through all the developments. I did a sort of fresh install by running most of the uninstall steps expect for removing each individual symlinks other than hypr. It did not help, but I felt good about cleaning things up. One potential issue is that, while you can preserve settings in the update process, it seems old files and folders collect as junk. I dont know if there is a potential cause for problems there if files are not cleaned up in that they might intefere. So I am wondering if there actually could be a problem because I did not clean all symlinks before reinstalling.
Thanks in advance!!!!
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
I can confirm this issue even with a completely clean OS install; simply logging out and logging back in will have the same issue, requiring the steps above to resolve it.
I ran into the same issue on login and found the root cause.
What happens
On startup, autostart.lua launches Waybar, and immediately after, ml4w-autostart triggers ml4w-wallpaper in the background.
ml4w-wallpaper then checks if Waybar is running and sends pkill -SIGUSR2 waybar to update the styling (Matugen). Because Waybar is still initializing at this very millisecond, receiving SIGUSR2 mid-init causes a segfault (or SIGABRT) and Waybar crashes silently.
Fix
I made a reload_waybar() function in ~/.config/ml4w/scripts/ml4w-wallpaper safer by checking if Waybar survived the reload signal, and restarting it if it died.
Here is the updated function:
reload_waybar() {
if pgrep -x waybar >/dev/null; then
pkill -SIGUSR2 waybar
sleep 1
if ! pgrep -x waybar >/dev/null; then
# Waybar crashed (common during fast startup/reload sequence)
nohup bash -c "$HOME/.config/waybar/launch.sh" >/dev/null 2>&1 &
disown
fi
else
nohup bash -c "$HOME/.config/waybar/launch.sh" >/dev/null 2>&1 &
disown
fi
}
@tetam01 just about to test this. Have you opened a PR with this fix ?
Hi. Thanks for testing and your proposal to fix it. I have the same issue on my system. Restarting solved it. I will test your snipped.
I have already tested and it seems to solve the issue.
Same issue on an updated Arch Linux, Hyprland. qs --version Quickshell 0.3.0 . Happens with quickshell as well, if you ctrl + super + L to lock the screen and then come back neither Waybar or Quickshell will show up. You have to manually shift+super+b for it to show back up.
Same issue on an updated Arch Linux, Hyprland.
qs --versionQuickshell 0.3.0. Happens with quickshell as well, if you ctrl + super + L to lock the screen and then come back neither Waybar or Quickshell will show up. You have to manuallyshift+super+bfor it to show back up.
In stead of shift+super+b you mean --> CTRL+SUPER+B???