dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

[BUG] Waybar not loading on start

Open mwinter80 opened this issue 4 months ago • 7 comments

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

mwinter80 avatar Jul 12 '26 09:07 mwinter80

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.

solidus1983 avatar Jul 12 '26 20:07 solidus1983

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 avatar Jul 12 '26 21:07 tetam01

@tetam01 just about to test this. Have you opened a PR with this fix ?

solidus1983 avatar Jul 12 '26 21:07 solidus1983

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.

mylinuxforwork avatar Jul 13 '26 18:07 mylinuxforwork

I have already tested and it seems to solve the issue.

solidus1983 avatar Jul 13 '26 19:07 solidus1983

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.

Juraci avatar Jul 20 '26 12:07 Juraci

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.

In stead of shift+super+b you mean --> CTRL+SUPER+B???

eljejer avatar Jul 23 '26 16:07 eljejer