Alexays / Waybar

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

Tray module not visible after some time. No such object path '/StatusNotifierWatcher' #3468

Open HarshNarayanJha opened 1 month ago

HarshNarayanJha commented 1 month ago

After a few hours of logging into hyprland, the Tray Module does now show up after killing and launching waybar.

This does not happen before that point, I can kill waybar and start it again (via a keybind) and the tray and all its icons are still there. But after some time has passed, reloading waybar no longer shows the Tray Module, no matter how many times I reload. But if I log out and login again, it immediately fixes the issue and the tray stays visible until the issue happens again. Note that it never disappears automatically, only if I restart waybar.

Running waybar in terminal reveals the issue

...
[2024-07-23 19:38:36.383] [debug] Creating workspace 1
[2024-07-23 19:38:36.383] [debug] Creating workspace 2
[2024-07-23 19:38:36.496] [error] Host: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: No such object path '/StatusNotifierWatcher'
[2024-07-23 19:38:36.613] [info] Bar configured (width: 1920, height: 40) for output: 
...

EDIT: Following issue #3040, I have downgraded libappindicator-gtk3 to v12.10.0.r296-1 with no success

Full Log ```bash [2024-07-23 19:38:58.575] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/config [2024-07-23 19:38:58.575] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/config.jsonc [2024-07-23 19:38:58.576] [debug] Try expanding: $HOME/.config/waybar/config [2024-07-23 19:38:58.576] [debug] Found config file: $HOME/.config/waybar/config [2024-07-23 19:38:58.576] [info] Using configuration file /home/harshnj/.config/waybar/config [2024-07-23 19:38:58.579] [info] Unable to receive desktop appearance: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop [2024-07-23 19:38:58.579] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/style.css [2024-07-23 19:38:58.579] [debug] Try expanding: $HOME/.config/waybar/style.css [2024-07-23 19:38:58.579] [debug] Found config file: $HOME/.config/waybar/style.css [2024-07-23 19:38:58.579] [info] Using CSS file /home/harshnj/.config/waybar/style.css [2024-07-23 19:38:58.580] [debug] Parsing imports for file: /home/harshnj/.config/waybar/style.css [2024-07-23 19:38:58.580] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/themes/theme.css [2024-07-23 19:38:58.580] [debug] Try expanding: $HOME/.config/waybar/themes/theme.css [2024-07-23 19:38:58.580] [debug] Found config file: $HOME/.config/waybar/themes/theme.css [2024-07-23 19:38:58.580] [debug] Adding file to watch list: Catppuccin-Mocha.css [2024-07-23 19:38:58.580] [debug] Adding file to watch list: /home/harshnj/.config/waybar/style.css [2024-07-23 19:38:58.587] [debug] Output detection done: eDP-1 (AU Optronics 0x229E) [2024-07-23 19:38:58.592] [info] Hyprland IPC starting [2024-07-23 19:38:58.594] [debug] Initializing workspaces [2024-07-23 19:38:58.595] [debug] Initializing persistent workspaces [2024-07-23 19:38:58.595] [info] Loading persistent workspaces from Waybar config [2024-07-23 19:38:58.595] [info] Loading persistent workspaces from Hyprland workspace rules [2024-07-23 19:38:58.596] [info] Registering for Hyprland's 'windowtitle' events because a user-defined window rewrite rule uses the 'title' field. [2024-07-23 19:38:58.616] [debug] network: new default route via 192.168.250.102 on if4 metric 600 [2024-07-23 19:38:58.616] [debug] network: wlan0, new addr 192.168.250.94/24 [2024-07-23 19:38:58.616] [debug] network: wlan0, new addr 192.168.250.94/24 [2024-07-23 19:38:58.641] [debug] Received SIGCHLD in signalThread [2024-07-23 19:38:58.641] [debug] Cmd exited with code 0 [2024-07-23 19:38:58.987] [debug] GTK widget tree: window#waybar.background.top.eDP-1..mode-default.solo.org.kde.konsole:dir(ltr) decoration:dir(ltr) box.horizontal:dir(ltr) box.horizontal.modules-left:dir(ltr) widget:dir(ltr) label#custom-l_end.module:dir(ltr) widget:dir(ltr) box#workspaces.horizontal.module:dir(ltr) widget:dir(ltr) box#window.horizontal.module:dir(ltr) image:dir(ltr) label:dir(ltr) widget:dir(ltr) label#custom-r_end.module:dir(ltr) widget:dir(ltr) label#custom-padd.module:dir(ltr) box.horizontal.modules-center:dir(ltr) widget:dir(ltr) label#custom-padd.module:dir(ltr) widget:dir(ltr) label#custom-l_end.module:dir(ltr) widget:dir(ltr) label#custom-weather.module:dir(ltr) widget:dir(ltr) label#custom-r_end.module:dir(ltr) widget:dir(ltr) label#custom-padd.module:dir(ltr) box.horizontal.modules-right:dir(ltr) widget:dir(ltr) label#custom-padd.module:dir(ltr) widget:dir(ltr) label#custom-l_end.module:dir(ltr) widget:dir(ltr) box#hardware.horizontal:dir(ltr) revealer.drawer:dir(ltr) box.horizontal:dir(ltr) widget.drawer-child:dir(ltr) label#cpu.module:dir(ltr) widget.drawer-child:dir(ltr) label#temperature.module:dir(ltr) widget:dir(ltr) label#memory.module:dir(ltr) widget:dir(ltr) label#custom-r_end.module:dir(ltr) widget:dir(ltr) label#custom-l_end.module:dir(ltr) widget:dir(ltr) label#mpris.module:dir(ltr) widget:dir(ltr) label#backlight.module:dir(ltr) widget:dir(ltr) label#network.module:dir(ltr) widget:dir(ltr) label#pulseaudio.module:dir(ltr) widget:dir(ltr) label#pulseaudio.module.microphone:dir(ltr) widget:dir(ltr) label#custom-r_end.module:dir(ltr) widget:dir(ltr) label#custom-l_end.module:dir(ltr) widget:dir(ltr) box#privacy.horizontal:dir(ltr) revealer:dir(ltr) box#privacy-item.horizontal.screenshare:dir(ltr) image:dir(ltr) revealer:dir(ltr) box#privacy-item.horizontal.audio-out:dir(ltr) image:dir(ltr) revealer:dir(ltr) box#privacy-item.horizontal.audio-in:dir(ltr) image:dir(ltr) widget:dir(ltr) box#gamemode.horizontal:dir(ltr) image:dir(ltr) label:dir(ltr) widget:dir(ltr) box#tray.horizontal.module:dir(ltr) widget:dir(ltr) label#battery.module:dir(ltr) widget:dir(ltr) label#custom-r_end.module:dir(ltr) widget:dir(ltr) label#custom-l_end.module:dir(ltr) widget:dir(ltr) label#custom-notification.module:dir(ltr) widget:dir(ltr) label#idle_inhibitor.module:dir(ltr) widget:dir(ltr) label#clock.module:dir(ltr) widget:dir(ltr) label#custom-r_end.module:dir(ltr) widget:dir(ltr) label#custom-l_end.module:dir(ltr) widget:dir(ltr) box#user.horizontal.module:dir(ltr) image:dir(ltr) label:dir(ltr) widget:dir(ltr) label#custom-power.module:dir(ltr) widget:dir(ltr) label#custom-r_end.module:dir(ltr) [2024-07-23 19:38:58.989] [debug] Creating workspace 1 [2024-07-23 19:38:58.990] [debug] Creating workspace 2 [2024-07-23 19:38:59.103] [error] Host: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: No such object path '/StatusNotifierWatcher' [2024-07-23 19:38:59.196] [info] Bar configured (width: 1920, height: 40) for output: eDP-1 [2024-07-23 19:38:59.221] [debug] hyprland IPC received openlayer>>waybar [2024-07-23 19:38:59.869] [debug] Received SIGCHLD in signalThread [2024-07-23 19:38:59.869] [debug] Cmd exited with code 0 ```
HarshNarayanJha commented 1 month ago

Wait why these tags bot? Beacuse of the log?

ShikharArvind commented 1 month ago

Waybar : v0.10.4 SwayWM on CachyOS (Arch) Kernel : 6.10.1-3-cachyos

HarshNarayanJha commented 1 month ago

RIght, forgot to add. I already saw that issue and downgraded libappindicator-gtk3 to v12.10.0.r296-1, with no success. Tray still disappears with the error if I restart waybar.

image

careb0t commented 1 month ago

Same issue here unfortunately. I seem to get the Host: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: No such object path '/StatusNotifierWatcher' error and thus the tray disappearing whenever my lock screen activates, my computer sleeps, or whenever I reload waybar because I updated a config file or what have you.

Pierceisgone commented 1 month ago

I've been having a similar issue here that's been going on for a month of two now (~Since I started using Hyprland).

I am using Hyprland on Arch. If I suspend/sleep my desktop, and then wake it again later, the tray no longer works. All the icons in it disappear, and programs can no longer run in the tray. E.g. if I play an audio file with VLC, instead of VLC starting in the tray, it'll open as a window. To fix this I have to reboot my PC (Although just restarting Hyprland may fix this but I haven't tested that yet). After the tray breaks, nothing can run trayed. Also, the tray does not break every time I suspend, but it does most of the time.

I am also getting the error] Host: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: No such object path '/StatusNotifierWatcher' error.

Hyprland version: hyprland 0.41.2-3 Waybar Version: waybar 0.10.4-1 Kernel Version: 6.10.0-arch1-2

My Waybar config: https://pastebin.com/srqbPLEq

I also ran Waybar in a terminal a for a while. I suspended my PC for ~5-8 minutes and then the tray broke when I woke it. These are the logs I got after waking the desktop: https://pastebin.com/0U6ZeECT

ShikharArvind commented 1 month ago
  • Similar issue on Sway + Waybar. Resuming after extended suspend makes the tray part of bar disappear. Killing and restarting it does not help.

    • Starting from terminal throws the error Host: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: No such object path '/StatusNotifierWatcher'

    • Restarting Sway itself fixes the issue, and the tray seems to be working fine.

    • Could be due to libappindicator-gtk3 as described in issue Tray vanishing at random instances #3040 . Version is 12.10.0.r298-4 for me. Maybe downgrading to 12.10.0.r296 can help (?).

    • Edit : Tried uninstalling libappindicator-gtk3 completely and still does not seem to resolve the issue.

Waybar : v0.10.4 SwayWM on CachyOS (Arch) Kernel : 6.10.1-3-cachyos

I also have Plasma 6 installed along with Sway. I suspect this has something to do with org.kde.StatusNotifierWatcher (ref : https://www.reddit.com/r/qtile/comments/17nx6qt/unable_to_get_status_notifier_working_on_qtile/k7xzvmc/ )

ShikharArvind commented 1 month ago

I've been trying to debug this issue and I think I have a better idea now. I've Plasma 6 installed along with Sway + Waybar. Here is what I've found so far, maybe this will help others facing similar issue.

EDIT : Disabling org.kde.ActivityManager.service and org.kde.kded6.service definitely breaks Plasma if you ever want to switch from WM to it.

HarshNarayanJha commented 1 month ago

Amazing debugging skills @ShikharArvind 👏🏼👏🏼👏🏼 ! I myself have been trying to debug this for some time, but couldn't figure out for myself how kde6 owns the tray after killing waybar and/or suspending, and how to give ownership back to waybar.

I also have KDE Plasma alongside hyprland, and this must be the issue.

For the solution, is there some mechanism to ask for the ownership of a dbus service? AFAIK, there is not, since all notification daemons ask to kill any running notification daemon. Maybe waybar can check and kill kded6 at launch?

ShikharArvind commented 1 month ago

Thanks! I'm out of my depth when it comes to C++ or just general D-Bus spec, so not sure if there is an elegant/idiomatic way to check for this by waybar itself. This is something for more knowledgeable people to check. In the mean time, I did come up with a quick and dirty workaround for this : https://github.com/ShikharArvind/check_waybar_tray . It seems to work fine for me but I have not tested it all that much.

HarshNarayanJha commented 1 month ago

Seems good! I will check it out later

aziz-204 commented 2 weeks ago

@ShikharArvind thank you so much bro <3