Alexays / Waybar

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

Error calling StartServiceByName for org.freedesktop.portal.Desktop: Timeout was reached #2675

Open mooreye opened 9 months ago

mooreye commented 9 months ago

This sometimes happens when launching Waybar for the first time since boot, subsequent Sway sessions do not then have this problem.

I have xdg-desktop-portal, xdg-desktop-portal-gtk, xdg-desktop-portal-wlr systemd user units, while xdg-desktop-portal-gnome is not installed.

I also have this in Sway config:

exec dbus-update-activation-environment --systemd SWAYSOCK WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE

but it doesn't seem to help.

RobertMueller2 commented 9 months ago

Have you tried this? https://github.com/emersion/xdg-desktop-portal-wlr/wiki/%22It-doesn't-work%22-Troubleshooting-Checklist

mooreye commented 9 months ago

WLR portal works, don't know what else to try really. But I see discussion may be better place for this: https://github.com/Alexays/Waybar/discussions/1828 So maybe this issue can be closed.

hsheikhali1 commented 9 months ago

I'm getting this same error on nixos and hyprland. When I try to start waybar it times out.

mooreye commented 8 months ago

It appears that masking WLR portal systemctl --user mask xdg-desktop-portal-wlr solved the issue, but I'm not 100% sure due to this occurring randomly beforehand. Fortunately I don't need screen sharing, but all in all this is a poor solution

SteelT1 commented 7 months ago

Same thing happens to me sometimes during startup Since it was reported that masking the service for xdpw solved the issue, I'm going to try building xdpw from source and will report back.

As xdpw got a fix merged in it's polling code that would caused xdp to hang sometimes. https://github.com/emersion/xdg-desktop-portal-wlr/commit/b5f387821800e32d4f82001504668d819f02bb4b

Which would track of what I noticed that during the start delay, systemd reported xdp was still in the "activating" state, causing waybar to wait on it.

svyatoclav commented 7 months ago

Artix with runit + Hyprland so no systemd stuff ofc. xdg-desktop-portal and xdg-desktop-portal-hyprland installed. Same issue after pacman -Syu and reboot. I also changed some GTK + QT configs a little but I don't think it is a problem... I also move away my config directory for test but nothing.

[2024-01-16 02:55:08.001] [info] Using configuration file //usr/local/etc/xdg/waybar/config
[2024-01-16 02:55:08.046] [error] Error calling StartServiceByName for org.freedesktop.portal.Desktop: Process org.freedesktop.portal.Desktop received signal 5

My waybar is built from source and was v0.9.22 and meson_options.txt for "Enable Experimental features" and "Disable SystemD" changes when it starts to happened (previously 3 months was OK but also sometimes it fails to launch at startup). Update to last Waybar v0.9.24-102-g07eabc53 (branch 'master') didn't fix. Anyone know what to do so far? Thanks.

UPD

OK it was really stupid. I somehow misconfigured my .profile and forgot about it while trying to configure GTK and QT look or something like that so a got an error like GLib-GIO-ERROR **: No GSettings schemas are installed on the system from my xdg-desktop-portal. Then I reinstalled gsettings-desktop-schemas-git from AUR (I think it wasn't necessary btw) and also found this thread: https://stackoverflow.com/questions/37510261/ubuntu-meld-no-gsettings-schemas-are-installed-on-the-system

Then I checked my ~/.profile and found that I misconfigured export XDG_DATA_DIRS line. Then I changed it to proper look and also added two more for sure:

export XDG_DATA_DIRS="$XDG_DATA_HOME:/usr/local/share/:/usr/share/"
export XDG_DATA_DIR="$XDG_DATA_HOME:/usr/local/share/:/usr/share/"
export GSETTINGS_SCHEMA_DIR="/usr/share/glib-2.0/schemas"

I also deleted my xdg-desktop-portal-gtk and xdg-desktop-portal-kde so only xdg-desktop-portal and xdg-desktop-portal-hyprland left.

Then I rebooted and waybar started to work again! And it also fixed my Dolphin, rofi and some other problems too btw; so guys, watch carefully what you write and REMEMBER IT!

Maybe it will help someone like my who like to configure and forget stuff lol

SteelT1 commented 6 months ago

Same thing happens to me sometimes during startup Since it was reported that masking the service for xdpw solved the issue, I'm going to try building xdpw from source and will report back.

As xdpw got a fix merged in it's polling code that would caused xdp to hang sometimes. emersion/xdg-desktop-portal-wlr@b5f3878

Which would track of what I noticed that during the start delay, systemd reported xdp was still in the "activating" state, causing waybar to wait on it.

Okay it's been awhile, but I really wanted to make sure. And after a month of using this same setup, not once have I experience the start delay. So I'm pretty confident in that the fix to xdg-desktop-portal-wlr completely solved this issue for me.

Archargelod commented 4 months ago

Had the exact same issue with sway on OpenSuse Tumbleweed, solved it by removing the xdg-desktop-portal-gtk package.

ouzbirki commented 3 months ago

I'm having this problem on Arch Linux with Hyprland and none of the above worked.

Waybar logs ``` [2024-05-03 02:54:13.844] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/config [2024-05-03 02:54:13.844] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/config.jsonc [2024-05-03 02:54:13.844] [debug] Found config file: $XDG_CONFIG_HOME/waybar/config.jsonc [2024-05-03 02:54:13.844] [info] Using configuration file /home/ouz/.config/waybar/config.jsonc [2024-05-03 02:54:38.871] [error] Error calling StartServiceByName for org.freedesktop.portal.Desktop: Timeout was reached ```
Package details ``` Hyprland, built from branch main at commit a3ca016d42283ce1d2d5ffca40b93123b4290f4b (cursor-shape: use - instead of _ in shapes). Date: Thu May 2 18:21:33 2024 Tag: v0.39.1-128-ga3ca016d, commits: 4588 ``` `Waybar v0.10.2-13-g0b6476da (branch 'master')` `xdg-desktop-portal-gtk 1.15.2`
squassina commented 1 month ago

I was having this issue (Ubuntu 24.04 LTS aarch64) and what solved for me was to install xdg-desktop-portal-wlr and add this to my sway config (as per the xdg-desktop-portal-wlr README):

exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway

I was able to reboot and keep the bar. Hope this helps others.

Its-Haze commented 2 days ago

Worked for me:

Check if xdg-desktop-portal is running

systemctl --user status xdg-desktop-portal

If the service is not running, start it with:

systemctl --user start xdg-desktop-portal

Then start waybar again