You are not logged in.

#1 Yesterday 13:55:56

the_isz
Member
Registered: 2009-04-14
Posts: 290

Sway and xdg-desktop-portal issues

tekstryder wrote:

For Sway users, the drop-in workaround is no longer required:

https://gitlab.archlinux.org/archlinux/ … 37ebef70bb

This accomodates the x-d-p change by creating sway-session.target which binds to graphical-session.target.

Hi!

I'm using sway (version 1:1.12-3, logging in via sddm) and I still see the exact issue OP has reported, i.e. `journalctrl --user -u xdg-portal-portal.service` contains:

systemd[606]: Dependency failed for Portal service.
systemd[606]: xdg-desktop-portal.service: Job xdg-desktop-portal.service/start failed with result 'dependency'.

Could I be doing something wrong or does the workaround not (fully) work?

Offline

#2 Yesterday 15:33:42

tekstryder
Member
Registered: 2013-02-14
Posts: 568

Re: Sway and xdg-desktop-portal issues

the_isz wrote:

logging in via sddm

And when you don't?

What is the portal service behavior when you start your Sway session directly from a TTY?

$ sway

Online

#3 Yesterday 16:35:04

the_isz
Member
Registered: 2009-04-14
Posts: 290

Re: Sway and xdg-desktop-portal issues

tekstryder wrote:
the_isz wrote:

logging in via sddm

And when you don't?

What is the portal service behavior when you start your Sway session directly from a TTY?

$ sway

Thanks for your quick response!

When I start sway directly from a TTY, the behavior is exactly the same.

Do you want me to try anything else?

Offline

#4 Yesterday 16:53:59

tekstryder
Member
Registered: 2013-02-14
Posts: 568

Re: Sway and xdg-desktop-portal issues

Logging in with SDDM disabled provide the outputs of:

$ pacman -Qiikk sway
$ pacman -Qs portal
$ systemctl --user status xdg-desktop-portal.service xdg-desktop-portal-gtk.service

EDIT:

-and-

sort <(journalctl -b --user --no-hostname -t xdg-desktop-portal-gtk --no-pager "$@") <(journalctl -b --user --no-hostname -t xdg-document-portal --no-pager "$@") <(journalctl -b --user --no-hostname -t /usr/lib/xdg-desktop-portal --no-pager "$@") <(journalctl -b --user --no-hostname -t systemd --no-pager "$@" | grep -i portal)

Last edited by tekstryder (Yesterday 17:03:38)

Online

#5 Yesterday 21:30:19

the_isz
Member
Registered: 2009-04-14
Posts: 290

Re: Sway and xdg-desktop-portal issues

tekstryder wrote:

Logging in with SDDM disabled provide the outputs of:

$ pacman -Qiikk sway
$ pacman -Qs portal
$ systemctl --user status xdg-desktop-portal.service xdg-desktop-portal-gtk.service

EDIT:

-and-

sort <(journalctl -b --user --no-hostname -t xdg-desktop-portal-gtk --no-pager "$@") <(journalctl -b --user --no-hostname -t xdg-document-portal --no-pager "$@") <(journalctl -b --user --no-hostname -t /usr/lib/xdg-desktop-portal --no-pager "$@") <(journalctl -b --user --no-hostname -t systemd --no-pager "$@" | grep -i portal)
$ pacman -Qiik sway
Name            : sway
Version         : 1:1.12-3
Description     : Tiling Wayland compositor and replacement for the i3 window manager
Architecture    : x86_64
URL             : https://swaywm.org/
Licenses        : MIT
Groups          : None
Provides        : wayland-compositor
Depends On      : cairo  gdk-pixbuf2  libevdev.so=2-64  libinput  libjson-c.so=5-64  libpixman-1.so=0-64  libudev.so=1-64  libwayland-server.so=0-64  libxcb
                  libxkbcommon.so=0-64  pango  pcre2  ttf-font  wlroots0.20  xcb-util-wm
Optional Deps   : brightnessctl: Brightness adjustment tool used in the default configuration
                  foot: Terminal emulator used in the default configuration
                  grim: Screenshot utility used in the default configuration
                  i3status: Status line generation
                  libpulse: Volume adjustment tool (pactl) used in the default configuration [installed]
                  mako: Lightweight notification daemon [installed]
                  playerctl: Media player controller used in the default configuration
                  polkit: System privilege control. Required if not using seatd service [installed]
                  swaybg: Wallpaper tool for sway [installed]
                  sway-contrib: Collection of user-contributed scripts for sway
                  swayidle: Idle management daemon [installed]
                  swaylock: Screen locker [installed]
                  waybar: Highly customizable bar
                  wmenu: Application launcher used in default config
                  xorg-xwayland: X11 support [installed]
                  xdg-desktop-portal-gtk: Default xdg-desktop-portal for file picking [installed]
                  xdg-desktop-portal-wlr: xdg-desktop-portal backend
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 5,64 MiB
Packager        : Brett Cornwall <ainola@archlinux.org>
Build Date      : Sa 13 Jun 2026 21:56:17 CEST
Install Date    : Fr 19 Jun 2026 08:43:36 CEST
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : Signature
Backup Files    : /etc/sway/config [unmodified]
                  /etc/sway/config.d/50-systemd-user.conf [unmodified]
Extended Data   : pkgtype=pkg

sway: 61 total files, 0 missing files
$ pacman -Qs portal
local/xdg-desktop-portal 1.22.1-1
    Desktop integration portals for sandboxed apps
local/xdg-desktop-portal-gtk 1.15.3-1
    A backend implementation for xdg-desktop-portal using GTK
$ systemctl --user status xdg-desktop-portal.service xdg-desktop-portal-gtk.service
○ xdg-desktop-portal.service - Portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: inactive (dead)

Jun 21 23:21:06 hostname systemd[566]: Dependency failed for Portal service.
Jun 21 23:21:06 hostname systemd[566]: xdg-desktop-portal.service: Job xdg-desktop-portal.service/start failed with result 'dependency'.
Jun 21 23:21:29 hostname systemd[566]: Dependency failed for Portal service.
Jun 21 23:21:29 hostname systemd[566]: xdg-desktop-portal.service: Job xdg-desktop-portal.service/start failed with result 'dependency'.
Jun 21 23:23:00 hostname systemd[1715]: Dependency failed for Portal service.
Jun 21 23:23:00 hostname systemd[1715]: xdg-desktop-portal.service: Job xdg-desktop-portal.service/start failed with result 'dependency'.

○ xdg-desktop-portal-gtk.service - Portal service (GTK/GNOME implementation)
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-gtk.service; static)
     Active: inactive (dead)
$ sort <(journalctl -b --user --no-hostname -t xdg-desktop-portal-gtk --no-pager "$@") <(journalctl -b --user --no-hostname -t xdg-document-portal --no-pager "$@") <(journalctl -b --user --no-hostname -t /usr/lib/xdg-desktop-portal --no-pager "$@") <(journalctl -b --user --no-hostname -t systemd --no-pager "$@" | grep -i portal)
Jun 21 23:21:06 systemd[566]: Dependency failed for Portal service.
Jun 21 23:21:06 systemd[566]: xdg-desktop-portal.service: Job xdg-desktop-portal.service/start failed with result 'dependency'.
Jun 21 23:21:29 systemd[566]: Dependency failed for Portal service.
Jun 21 23:21:29 systemd[566]: xdg-desktop-portal.service: Job xdg-desktop-portal.service/start failed with result 'dependency'.
Jun 21 23:23:00 systemd[1715]: Dependency failed for Portal service.
Jun 21 23:23:00 systemd[1715]: xdg-desktop-portal.service: Job xdg-desktop-portal.service/start failed with result 'dependency'.
-- No entries --
-- No entries --
-- No entries --

Hope this helps. Thanks for looking into this!

Offline

#6 Yesterday 21:35:29

tekstryder
Member
Registered: 2013-02-14
Posts: 568

Re: Sway and xdg-desktop-portal issues

@the_isz, see comment #13 and update to the patched pkgrel bump xdg-desktop-portal 1.22.1-2.

Either log out of your session and start afresh or after updating run...

systemctl --user daemon-reload
systemctl --user restart xdg-desktop-portal.service xdg-desktop-portal-gtk.service
systemctl --user status xdg-desktop-portal.service xdg-desktop-portal-gtk.service

Last edited by tekstryder (Yesterday 21:39:33)

Online

#7 Yesterday 21:45:49

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,213

Re: Sway and xdg-desktop-portal issues

About the sway situation, check /etc/sway/config.d/50-systemd-user.conf and find end command that's supposed to start the target

exec systemctl --user set-environment XDG_CURRENT_DESKTOP=sway && \
     systemctl --user import-environment DISPLAY \
                                         SWAYSOCK \
                                         WAYLAND_DISPLAY \
                                         XDG_CURRENT_DESKTOP && touch /tmp/wtf.1.proof \
     systemctl --user start sway-session.target  && touch /tmp/wtf.2.proof 

and see whether either /tmp/wtf.*.proof  is created (this is unrelated to the xdg-desktop-portal update)

Offline

#8 Today 10:38:17

the_isz
Member
Registered: 2009-04-14
Posts: 290

Re: Sway and xdg-desktop-portal issues

tekstryder wrote:

@the_isz, see comment #13 and update to the patched pkgrel bump xdg-desktop-portal 1.22.1-2.

Either log out of your session and start afresh or after updating run...

systemctl --user daemon-reload
systemctl --user restart xdg-desktop-portal.service xdg-desktop-portal-gtk.service
systemctl --user status xdg-desktop-portal.service xdg-desktop-portal-gtk.service

Updating xdg-desktop-portal to 1.22.1-2 now allows me to start xdg-desktop-portal, but xdg-desktop-portal-gtk has troubles as well sad

$ systemctl --user daemon-reload
$ systemctl --user restart xdg-desktop-portal.service xdg-desktop-portal-gtk.service
Job for xdg-desktop-portal-gtk.service failed because the control process exited with error code.
See "systemctl --user status xdg-desktop-portal-gtk.service" and "journalctl --user -xeu xdg-desktop-portal-gtk.service" for details.
$ systemctl --user status xdg-desktop-portal.service xdg-desktop-portal-gtk.service
● xdg-desktop-portal.service - Portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: active (running) since Mon 2026-06-22 12:31:14 CEST; 11s ago
 Invocation: 10f4d778dbc54af6a9b09bae4c9b3774
   Main PID: 5089 (xdg-desktop-por)
      Tasks: 7 (limit: 18785)
     Memory: 3.8M (peak: 4M)
        CPU: 35ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-desktop-portal.service
             └─5089 /usr/lib/xdg-desktop-portal

Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.FileChooser as a last-resort fallback
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.AppChooser as a last-resort fallback
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.Print as a last-resort fallback
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.Notification as a last-resort fallback
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.Inhibit as a last-resort fallback
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.Account as a last-resort fallback
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.Email as a last-resort fallback
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.DynamicLauncher as a last-resort fallback
Jun 22 12:31:14 hostname systemd[568]: Started Portal service.
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Failed to ReadAll() from Settings implementation: GDBus.Error:org.freedesktop.DBus.Error.NameHa>

× xdg-desktop-portal-gtk.service - Portal service (GTK/GNOME implementation)
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-gtk.service; static)
     Active: failed (Result: start-limit-hit) since Mon 2026-06-22 12:31:14 CEST; 11s ago
 Invocation: 0997b5a85cd5443fbd683dd673fd116d
    Process: 5107 ExecStart=/usr/lib/xdg-desktop-portal-gtk (code=exited, status=1/FAILURE)
   Main PID: 5107 (code=exited, status=1/FAILURE)
   Mem peak: 2.3M
        CPU: 21ms

Jun 22 12:31:14 hostname systemd[568]: Failed to start Portal service (GTK/GNOME implementation).
Jun 22 12:31:14 hostname systemd[568]: xdg-desktop-portal-gtk.service: Start request repeated too quickly.
Jun 22 12:31:14 hostname systemd[568]: xdg-desktop-portal-gtk.service: Failed with result 'start-limit-hit'.
Jun 22 12:31:14 hostname systemd[568]: Failed to start Portal service (GTK/GNOME implementation).
Jun 22 12:31:14 hostname systemd[568]: xdg-desktop-portal-gtk.service: Start request repeated too quickly.
Jun 22 12:31:14 hostname systemd[568]: xdg-desktop-portal-gtk.service: Failed with result 'start-limit-hit'.
Jun 22 12:31:14 hostname systemd[568]: Failed to start Portal service (GTK/GNOME implementation).
Jun 22 12:31:14 hostname systemd[568]: xdg-desktop-portal-gtk.service: Start request repeated too quickly.
Jun 22 12:31:14 hostname systemd[568]: xdg-desktop-portal-gtk.service: Failed with result 'start-limit-hit'.
Jun 22 12:31:14 hostname systemd[568]: Failed to start Portal service (GTK/GNOME implementation).
$ pikaur -Qi xdg-desktop-portal-gtk
Name            : xdg-desktop-portal-gtk
Version         : 1.15.3-1
Description     : A backend implementation for xdg-desktop-portal using GTK
Architecture    : x86_64
URL             : https://github.com/flatpak/xdg-desktop-portal-gtk
Licenses        : LGPL-2.0-or-later
Groups          : None
Provides        : xdg-desktop-portal-impl
Depends On      : fontconfig  gcc-libs  gdk-pixbuf2  glib2  glibc  gsettings-desktop-schemas  gtk3  xdg-desktop-portal
Optional Deps   : evince: Print preview
Required By     : gtk4
Optional For    : sway  xdg-desktop-portal
Conflicts With  : None
Replaces        : None
Installed Size  : 427,84 KiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Mo 24 Mär 2025 03:58:22 CET
Install Date    : Di 26 Mai 2026 16:52:33 CEST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

Any chance you have an idea what might be wrong there as well?
Thanks for your support!

Offline

#9 Today 10:39:29

the_isz
Member
Registered: 2009-04-14
Posts: 290

Re: Sway and xdg-desktop-portal issues

seth wrote:

About the sway situation, check /etc/sway/config.d/50-systemd-user.conf and find end command that's supposed to start the target

exec systemctl --user set-environment XDG_CURRENT_DESKTOP=sway && \
     systemctl --user import-environment DISPLAY \
                                         SWAYSOCK \
                                         WAYLAND_DISPLAY \
                                         XDG_CURRENT_DESKTOP && touch /tmp/wtf.1.proof \
     systemctl --user start sway-session.target  && touch /tmp/wtf.2.proof 

and see whether either /tmp/wtf.*.proof  is created (this is unrelated to the xdg-desktop-portal update)

I modified the file (plus another && after touching wtf.1.proof) and can confirm that both files are created on my PC.

Offline

#10 Today 11:50:41

tekstryder
Member
Registered: 2013-02-14
Posts: 568

Re: Sway and xdg-desktop-portal issues

the_isz wrote:
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.FileChooser as a last-resort fallback
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.AppChooser as a last-resort fallback
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.Print as a last-resort fallback
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.Notification as a last-resort fallback
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.Inhibit as a last-resort fallback
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.Account as a last-resort fallback
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.Email as a last-resort fallback
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Choosing gtk.portal for org.freedesktop.impl.portal.DynamicLauncher as a last-resort fallback
Jun 22 12:31:14 hostname systemd[568]: Started Portal service.
Jun 22 12:31:14 hostname /usr/lib/xdg-desktop-portal[5089]: Failed to ReadAll() from Settings implementation: GDBus.Error:org.freedesktop.DBus.Error.NameHa>

So, 3 things:

1) What are the contents of these two directories?

ls -la /usr/share/xdg-desktop-portal/
ls -la /usr/share/xdg-desktop-portal/portals

2) Are you by chance trying to override the impls?

cat ~/.config/xdg-desktop-portal/portals.conf

3) If not, is the gtk default impl corrupted?

pacman -Qikk xdg-desktop-portal-gtk

Online

#11 Today 13:25:58

the_isz
Member
Registered: 2009-04-14
Posts: 290

Re: Sway and xdg-desktop-portal issues

tekstryder wrote:

1) What are the contents of these two directories?

$ ls -la /usr/share/xdg-desktop-portal/
total 8
drwxr-xr-x 1 root root   80 19. Jun 08:43 ./
drwxr-xr-x 1 root root 2580 19. Jun 08:44 ../
-rw-r--r-- 1 root root   24 24. Mär 2025  gtk-portals.conf
drwxr-xr-x 1 root root   20 26. Mai 16:52 portals/
-rw-r--r-- 1 root root  423 13. Jun 21:56 sway-portals.conf
$ ls -la /usr/share/xdg-desktop-portal/portals/
total 4
drwxr-xr-x 1 root root  20 26. Mai 16:52 ./
drwxr-xr-x 1 root root  80 19. Jun 08:43 ../
-rw-r--r-- 1 root root 495 24. Mär 2025  gtk.portal
tekstryder wrote:

2) Are you by chance trying to override the impls?

cat ~/.config/xdg-desktop-portal/portals.conf

Not that I'm aware of...
I don't have a directory ~/.config/xdg-desktop-portal.

tekstryder wrote:

3) If not, is the gtk default impl corrupted?

$ pacman -Qikk xdg-desktop-portal-gtk
Name            : xdg-desktop-portal-gtk
Version         : 1.15.3-1
Description     : A backend implementation for xdg-desktop-portal using GTK
Architecture    : x86_64
URL             : https://github.com/flatpak/xdg-desktop-portal-gtk
Licenses        : LGPL-2.0-or-later
Groups          : None
Provides        : xdg-desktop-portal-impl
Depends On      : fontconfig  gcc-libs  gdk-pixbuf2  glib2  glibc  gsettings-desktop-schemas  gtk3  xdg-desktop-portal
Optional Deps   : evince: Print preview
Required By     : gtk4
Optional For    : sway  xdg-desktop-portal
Conflicts With  : None
Replaces        : None
Installed Size  : 427,84 KiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Mo 24 Mär 2025 03:58:22 CET
Install Date    : Di 26 Mai 2026 16:52:33 CEST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

xdg-desktop-portal-gtk: 119 total files, 0 altered files

Offline

#12 Today 13:35:19

tekstryder
Member
Registered: 2013-02-14
Posts: 568

Re: Sway and xdg-desktop-portal issues

This all looks entirely standard.

Can you grab the relevant journal entries again now after restarting the services?

sort <(journalctl -b --user --no-hostname -t xdg-desktop-portal-gtk --no-pager "$@") <(journalctl -b --user --no-hostname -t xdg-document-portal --no-pager "$@") <(journalctl -b --user --no-hostname -t /usr/lib/xdg-desktop-portal --no-pager "$@") <(journalctl -b --user --no-hostname -t systemd --no-pager "$@" | grep -i portal)

EDIT:

And also the process tree from a newly launched Sway session (from the TTY, no SDDM).

pstree

Dbus shenanigans afoot?


EDIT2:

Is this a regression?

Are you certain the portals were functional prior to the recent upstream release, subsequent Sway patch, and most recent Arch packaging patch?

Last edited by tekstryder (Today 14:39:47)

Online

#13 Today 16:29:44

the_isz
Member
Registered: 2009-04-14
Posts: 290

Re: Sway and xdg-desktop-portal issues

tekstryder wrote:

This all looks entirely standard.

Yes, I don't think I've made any crazy changes to my system.

tekstryder wrote:

Can you grab the relevant journal entries again now after restarting the services?

Sure. This is after a reboot. I then stopped sddm, logged in on TTY and started sway.

$ sort <(journalctl -b --user --no-hostname -t xdg-desktop-portal-gtk --no-pager "$@") <(journalctl -b --user --no-hostname -t xdg-document-portal --no-pager "$@") <(journalctl -b --user --no-hostname -t /usr/lib/xdg-desktop-portal --no-pager "$@") <(journalctl -b --user --no-hostname -t systemd --no-pager "$@" | grep -i portal)
Jun 22 18:16:38 systemd[709]: Starting Portal service (GTK/GNOME implementation)...
Jun 22 18:16:39 systemd[709]: Failed to start Portal service (GTK/GNOME implementation).
Jun 22 18:16:39 systemd[709]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
Jun 22 18:16:39 systemd[709]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Jun 22 18:16:39 xdg-desktop-portal-gtk[2005]: cannot open display:
Jun 22 18:16:48 systemd[709]: Starting Portal service (GTK/GNOME implementation)...
Jun 22 18:16:49 systemd[709]: Failed to start Portal service (GTK/GNOME implementation).
Jun 22 18:16:49 systemd[709]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
Jun 22 18:16:49 systemd[709]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Jun 22 18:16:49 xdg-desktop-portal-gtk[2044]: cannot open display:
Jun 22 18:17:43 systemd[709]: Failed to start Portal service (GTK/GNOME implementation).
Jun 22 18:17:43 systemd[709]: Starting Portal service (GTK/GNOME implementation)...
Jun 22 18:17:43 systemd[709]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
Jun 22 18:17:43 systemd[709]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Jun 22 18:17:43 xdg-desktop-portal-gtk[2259]: cannot open display:
Jun 22 18:18:23 systemd[709]: Failed to start Portal service (GTK/GNOME implementation).
Jun 22 18:18:23 systemd[709]: Starting Portal service (GTK/GNOME implementation)...
Jun 22 18:18:23 systemd[709]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
Jun 22 18:18:23 systemd[709]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Jun 22 18:18:23 /usr/lib/xdg-desktop-portal[1084]: Failed to ReadAll() from Settings implementation: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not activate remote peer 'org.freedesktop.impl.portal.desktop.gtk': startup job failed
Jun 22 18:18:23 xdg-desktop-portal-gtk[2807]: cannot open display:
-- No entries --
tekstryder wrote:

And also the process tree from a newly launched Sway session (from the TTY, no SDDM).

$ pstree
systemd─┬─bluetoothd
        ├─connman-vpnd
        ├─connmand
        ├─crashhelper───{crashhelper}
        ├─dbus-broker-lau───dbus-broker
        ├─login───bash
        ├─login───bash───sway─┬─alacritty─┬─fish───tmux: client
        │                     │           └─9*[{alacritty}]
        │                     ├─firefox─┬─forkserver─┬─Isolated Web Co───26*[{Isolated Web Co}]
        │                     │         │            ├─Privileged Cont───26*[{Privileged Cont}]
        │                     │         │            ├─RDD Process───4*[{RDD Process}]
        │                     │         │            ├─Socket Process───6*[{Socket Process}]
        │                     │         │            ├─Utility Process───4*[{Utility Process}]
        │                     │         │            └─WebExtensions───27*[{WebExtensions}]
        │                     │         └─95*[{firefox}]
        │                     ├─mako
        │                     ├─swaybar─┬─python
        │                     │         └─{swaybar}
        │                     ├─swaybg───2*[{swaybg}]
        │                     ├─swayidle
        │                     └─7*[{sway}]
        ├─polkitd───3*[{polkitd}]
        ├─rtkit-daemon───2*[{rtkit-daemon}]
        ├─systemd───(sd-pam)
        ├─systemd─┬─(sd-pam)
        │         ├─at-spi-bus-laun───4*[{at-spi-bus-laun}]
        │         ├─dbus-broker-lau───dbus-broker
        │         ├─mpd───6*[{mpd}]
        │         ├─offlineimap───3*[{offlineimap}]
        │         ├─pipewire───2*[{pipewire}]
        │         ├─pulseaudio─┬─gsettings-helpe───4*[{gsettings-helpe}]
        │         │            └─5*[{pulseaudio}]
        │         ├─ssh-agent
        │         ├─xdg-desktop-por───4*[{xdg-desktop-por}]
        │         ├─xdg-document-po─┬─fusermount3
        │         │                 └─6*[{xdg-document-po}]
        │         └─xdg-permission-───3*[{xdg-permission-}]
        ├─systemd-journal
        ├─systemd-logind
        ├─systemd-timesyn───{systemd-timesyn}
        ├─systemd-udevd
        ├─tmux: server─┬─fish───su
        │              ├─2*[fish]
        │              └─fish───bash───pstree
        └─wpa_supplicant
tekstryder wrote:

Dbus shenanigans afoot?

I don't know how to answer this ;P

tekstryder wrote:

Is this a regression?

Are you certain the portals were functional prior to the recent upstream release, subsequent Sway patch, and most recent Arch packaging patch?

I'm not sure about this.
I only noticed the issue because I couldn't open dialogs (e.g. "Open File...") in firefox anymore.
It took me a while (maybe a 1-3 weeks?) to look into it and find the root cause.
I don't know how long firefox has been using portals for these dialogs. If this is a recent change, it may well never have worked on my system.

Offline

#14 Today 17:50:21

tekstryder
Member
Registered: 2013-02-14
Posts: 568

Re: Sway and xdg-desktop-portal issues

the_isz wrote:
Jun 22 18:16:39 systemd[709]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Jun 22 18:16:39 xdg-desktop-portal-gtk[2005]: cannot open display:

Bingo... finally making progress!

Your environment seem to not be inheriting the variables defined in /etc/sway/config.d/50-systemd-user.conf.

From a Sway session, please show:

printenv | grep -E "WAY|DISP|XDG"
the_isz wrote:
tekstryder wrote:

Dbus shenanigans afoot?

I don't know how to answer this ;P

How is your user login session (multi-user, before any graphical environment) instantiated? Logind? Agetty?

the_isz wrote:

If this is a recent change, it may well never have worked on my system.


Likely. And, yes, all three of those changes listed are very recent. Given your setup, ya prolly never had working portals.

Really this all belongs in a separate thread.

Maybe an ambitious mod will split out your posts and our replies?

Last edited by tekstryder (Today 18:45:33)

Online

#15 Today 20:03:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,213

Re: Sway and xdg-desktop-portal issues

Add

printenv | grep -iE "gtk|gdk|gsk"

The message suggest gtk tries to use X11, might be a red herring though

Offline

#16 Today 20:35:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,246

Re: Sway and xdg-desktop-portal issues

Splitting into distinct thread as the original issue has already been solved and this was ultimately a hijack with a different issue, thanks for the heads-up @tekstryder

Split from: https://bbs.archlinux.org/viewtopic.php?id=313883

Online

#17 Today 20:59:48

the_isz
Member
Registered: 2009-04-14
Posts: 290

Re: Sway and xdg-desktop-portal issues

V1del wrote:

Splitting into distinct thread as the original issue has already been solved and this was ultimately a hijack with a different issue, thanks for the heads-up @tekstryder

Split from: https://bbs.archlinux.org/viewtopic.php?id=313883

Thank you for splitting into another thread - I'll answer there now.

Just to note: I think the correct URL is this one: https://bbs.archlinux.org/viewtopic.php?id=314043

Offline

#18 Today 21:07:16

the_isz
Member
Registered: 2009-04-14
Posts: 290

Re: Sway and xdg-desktop-portal issues

tekstryder wrote:

Your environment seem to not be inheriting the variables defined in /etc/sway/config.d/50-systemd-user.conf.

From a session where I logged in via sddm:

printenv | grep -E "WAY|DISP|XDG"
XDG_VTNR=1
XDG_RUNTIME_DIR=/run/user/1000
XDG_SESSION_TYPE=wayland
XDG_SESSION_ID=2
XDG_CURRENT_DESKTOP=sway:wlroots
XDG_SESSION_CLASS=user
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
MOZ_ENABLE_WAYLAND=1
XDG_SEAT=seat0
SWAYSOCK=/run/user/1000/sway-ipc.1000.715.sock
XDG_SESSION_DESKTOP=sway:wlroots
WAYLAND_DISPLAY=wayland-1
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
DISPLAY=:1
tekstryder wrote:

How is your user login session (multi-user, before any graphical environment) instantiated? Logind? Agetty?

Uhm... I must admit I don't recall setting any of this up.
I can see that systemd-logind is running. Does that answer your question?
Sorry I require so much hand-holding D:

Offline

#19 Today 21:08:16

the_isz
Member
Registered: 2009-04-14
Posts: 290

Re: Sway and xdg-desktop-portal issues

seth wrote:

Add

printenv | grep -iE "gtk|gdk|gsk"

The message suggest gtk tries to use X11, might be a red herring though

This command doesn't produce any output sad

Offline

#20 Today 21:15:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,213

Re: Sway and xdg-desktop-portal issues

DISPLAY=:1

Chances are the variable is set only after /etc/sway/config.d/50-systemd-user.conf  imports it into the session?

exec systemctl --user set-environment XDG_CURRENT_DESKTOP=sway && bash -c 'printenv > /tmp/ihatesystemd' && \
…

Offline

#21 Today 22:17:22

tekstryder
Member
Registered: 2013-02-14
Posts: 568

Re: Sway and xdg-desktop-portal issues

the_isz wrote:

I don't recall setting any of this up.
I can see that systemd-logind is running.

I was likely on the wrong tangent there, as my Hyprland pstree was fresh on my mind. So fresh, so clean.

Try forcing the env per @seth's suggestion.

For reference, envs on my functional Sway session:

~ ❯ printenv | grep -E "WAY|DISP|XDG"
SWAYSOCK=/run/user/1000/sway-ipc.1000.772468.sock
WAYLAND_DISPLAY=wayland-1
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SESSION_CLASS=user
XDG_SESSION_ID=15
XDG_SESSION_TYPE=wayland
XDG_VTNR=1

Last edited by tekstryder (Today 22:19:31)

Online

Board footer

Powered by FluxBB