Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
5.81k stars 656 forks source link

Waybar does not start on every launch #3379

Closed gorillamoe closed 5 days ago

gorillamoe commented 1 week ago

IDK if this is a just a problem with my configuration:

or if this an issue in general that can be circumvented somehow.. I tried to search in the already existing issues, but did not find a relevant one..

Like every 2 out of 3 attempts to load waybar (on boot or on reloading with super + shift + c) the waybar will not load at all.. I need to releoad several times to get it up and running..

I freshly migrated to sway and wayland from i3 and went through like a million hoops to get screensharing, screenshotting, filepickers from browsers and keyring unlock on successfull login to work somehow. Maybe I messed someting up on that way.

Any help appreciated.

Why did you move from i3 and xorg?

I think that wayland is the future and I don't want to be late to the party :see_no_evil:

RobertMueller2 commented 1 week ago

I don't think you have to justify moving ;)

I might be wrong, but I also don't really think it's the config as such, due to the intermittent nature of your issue. The first thing I'd probably do is to look into the log output from the session. Are you capturing any log output?

gorillamoe commented 6 days ago

Hey, I started sway with capturing all outputs and got this, when waybar did not show up:

00:00:00.001 [ERROR] [wlr] [libseat] [libseat/backend/seatd.c:82] Could not connect to socket /run/seatd.sock: Permission denied
libinput error: event15 - Hailuck Co.,Ltd PTP TouchPad Touchpad: kernel bug: clickpad advertising right button
2024/06/22 22:40:48 [ERROR] - config: no config file found
Touchégg v2.0.15.
Starting Touchégg in client mode
applying profile '<anonymous at line 1, col 9>'
applying profile output 'eDP-1' on connected head 'eDP-1'
applying profile output 'HDMI-A-2' on connected head 'HDMI-A-2'
(WW) Option "-listen" for file descriptors is deprecated
Please use "-listenfd" instead.
(WW) Option "-listen" for file descriptors is deprecated
Please use "-listenfd" instead.
applying profile '<anonymous at line 1, col 9>'
applying profile output 'eDP-1' on connected head 'eDP-1'
applying profile output 'HDMI-A-2' on connected head 'HDMI-A-2'
running commands for configuration '<anonymous at line 1, col 9>'
configuration for profile '<anonymous at line 1, col 9>' applied
[2024-06-22 22:40:49.077] [info] Using configuration file /home/marco/.config/waybar/config.jsonc
[2024-06-22 22:40:49.077] [info] Using CSS file /home/marco/.config/waybar/style.css
running commands for configuration '<anonymous at line 1, col 9>'
configuration for profile '<anonymous at line 1, col 9>' applied
2024-06-22 22:40:49 - [main.c:299] Found config * for output HDMI-A-2 (Samsung Electric Company C27F390 H4ZM401706)
[2024-06-22 22:40:49.139] [warning] module sway/scratchpad: Unknown module: sway/scratchpad
[2024-06-22 22:40:49.158] [warning] module keyboard-state: Disabling module "keyboard-state", Failed to find keyboard device
[2024-06-22 22:40:49.158] [warning] For a functional tray you must have libappindicator-* installed and export XDG_CURRENT_DESKTOP=Unity

** (waybar:705867): WARNING **: 22:40:49.195: gtk-layer-shell v0.7.0 may not work on GTK v3.24.33. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
terminate called after throwing an instance of 'std::runtime_error'
  what():  Another instance of Touchégg is already running. If you are sure that Touchégg is not already running, delete the lock file with the following command and try again:
$ rm /home/marco/.config/touchegg/.touchegg:0.lock
Xlib:  extension "MIT-SCREEN-SAVER" missing on display ":0".

** (waybar:705867): ERROR **: 22:40:49.300: 
unhandled exception (type std::exception) in signal handler:
what: Type is not convertible to string

The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server

(nm-applet:705910): Gtk-CRITICAL **: 22:40:51.493: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

The touchegg logs are just noise I guess. This must be some kind of race-condtition with my setup I guess, because waybar does show up sometimes and when it does, I get no errors of waybar at all :shrug:

RobertMueller2 commented 6 days ago

OK, so there is some error happening. But ideally, we should see what it is, rather than causing an unhandled exception. This sounds a bit like #1451.

I know that one was a long time ago, but in your log waybar also complains about sway/scratchpad not being found, which was also added quite a while ago.

Which version of waybar are you using?

gorillamoe commented 5 days ago

I'm on v0.9.9 which seems to be like 2y old :see_no_evil:

Pop OS seems to be way behind :-1:

Maybe I should switch to the latest Ubuntu and see if a newer version of waybar fixes it?!

RobertMueller2 commented 5 days ago

It might or not address the underlying issue, but if it does not, at least you should get an actual error message. The PR mentioned above is included in 0.9.10, so that explains why you just get an unhandled exception here.

gorillamoe commented 5 days ago

I did a complete fresh install with my current setup (dotfiles and setup script) and on the current Ubuntu 24.04 waybar always loads. So, my bad, I was simply using outdated software. Sorry for binding your ressources @RobertMueller2 :1st_place_medal:

RobertMueller2 commented 5 days ago

No problem at all, good to hear the issue is solved.