惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
人人都是产品经理
人人都是产品经理
腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
小众软件
小众软件
B
Blog
博客园 - 叶小钗
Microsoft Azure Blog
Microsoft Azure Blog
Apple Machine Learning Research
Apple Machine Learning Research
A
About on SuperTechFans
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Recent Announcements
Recent Announcements
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
V
V2EX

Arch Linux Forums

Avidemux crashes without strace / Applications & Desktop Environments how to apply patches with non-linux linends / Newbie Corner Replicating CachyOS on vanilla Arch (or at least getting close) / Arch Discussion What's arch linux GUI package manager ? / Newbie Corner Hibernation failing due to insufficient memory / System Administration profiledef.sh editting question / Installation trying to script kde plasma wallpaper settings / Programming & Scripting Looking for new Audacious package maintainer / Creating & Modifying Packages issues installing arch with LUKS2 encryption / Newbie Corner QEMU PXE booting does not work with OVMF.4m.fd / Applications & Desktop Environments Wired lan regular disconnect / Newbie Corner Need Help setting up ARCH in my G16 G634JZR iwlwifi started failing consistently, trying to determine root cause Windows randomly jumping between monitors after GNOME 50 update No display via DP or HDMI after boot. / Kernel & Hardware how to change acpi platform_profile? / Newbie Corner Linux denied all kernel modules which not loaded right now Use iPhone as Webcam for Arch Linux Video Output Failure on nvidia-580xx-dkms on TTY --> Desktop switch (Page 2) / Kernel & Hardware I was going to rant ..WINE32 Sabotage compliments of Arvind Krishna / Arch Discussion [SOLVED] LUKS drive auto unlocked by TPM when expected not to / Networking, Server, and Protection Hibernate/suspend from X = dark panel; from TTY = works (ASUS G14, hyb (Page 2) / Laptop Issues Headphone jack noise/buzz / Newbie Corner segmentation fault in cc1plus when building CLK / AUR Issues, Discussion & PKGBUILD Requests Console alternative to meld / GNU/Linux Discussion Problem with paru git clone / Newbie Corner XKB questions / Applications & Desktop Environments gnome-keyring-daemon is not working correctly / Applications & Desktop Environments [SOLVED] Steam opens and immediately closes constantly / Newbie Corner Firefox rounded edges on Sway / Applications & Desktop Environments
Sway and xdg-desktop-portal issues / Applications & Deskt...
the_isz · 2026-06-23 · via Arch Linux Forums

#1 Yesterday 13:55:56

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

Sway and xdg-desktop-portal issues

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?

#2 Yesterday 15:33:42

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

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?

#3 Yesterday 16:35:04

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

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?

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?

#4 Yesterday 16:53:59

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

Re: Sway and xdg-desktop-portal issues

Logging in with SDDM disabled provide the outputs of:

$ 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)

#5 Yesterday 21:30:19

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

Re: Sway and xdg-desktop-portal issues

tekstryder wrote:

Logging in with SDDM disabled provide the outputs of:

$ 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!

#6 Yesterday 21:35:29

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

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)

#7 Yesterday 21:45:49

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

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)

#8 Today 10:38:17

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

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!

#9 Today 10:39:29

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

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.

#10 Today 11:50:41

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

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

#11 Today 13:25:58

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

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

#12 Today 13:35:19

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

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).

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)

#13 Today 16:29:44

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

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.

#14 Today 17:50:21

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

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)

#15 Today 20:03:41

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

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

#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

#17 Today 20:59:48

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

Re: Sway and xdg-desktop-portal issues

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