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

推荐订阅源

WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
Jina AI
Jina AI
博客园 - Franky
U
Unit 42
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
宝玉的分享
宝玉的分享
B
Blog RSS Feed
雷峰网
雷峰网
D
DataBreaches.Net
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
I
InfoQ
美团技术团队
云风的 BLOG
云风的 BLOG
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
大猫的无限游戏
大猫的无限游戏
G
Google Developers Blog
T
Tailwind CSS Blog
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
月光博客
月光博客
Engineering at Meta
Engineering at Meta

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
[SOLVED] xdg-desktop-portal.service not working after upd...
tekstryder · 2026-06-14 · via Arch Linux Forums

#1 2026-06-11 05:08:48

ldierk
Member
Registered: 2025-11-29
Posts: 2

[SOLVED] xdg-desktop-portal.service not working after update

[ALPM] upgraded xdg-desktop-portal (1.20.4-1 -> 1.22.0-1)

After doing this upgrade I noticed that dark mode in my cinnamon Desktop stopped working. Looking at the logs revealed that my xdg-desktop-portal.service is failing with the following message:

Jun 10 22:44:54 archlinux systemd[1185]: Dependency failed for Portal service.
Jun 10 22:44:54 archlinux systemd[1185]: xdg-desktop-portal.service: Job xdg-desktop-portal.service/start failed with result 'dependency'.

$ systemctl --user start xdg-desktop-portal.service
A dependency job for xdg-desktop-portal.service failed. See 'journalctl -xe' for details.

$journalctl -xe
Jun 11 07:02:50 archlinux systemd[1185]: Current graphical user session is inactive.
Jun 11 07:02:50 archlinux systemd[1185]: Dependency failed for Portal service.

Starting $ /usr/lib/xdg-desktop-portal from the shell brings back dark mode as a workaround.

[edit]
For now the workaround mentioned in the github issue linked by wekauwau works for me:

$ systemctl --user edit xdg-desktop-portal.service --drop-in=override
$ cat /home/ldierk/.config/systemd/user/xdg-desktop-portal.service.d/override.conf
[Unit]
Requisite=
Requires=graphical-session.target

[edit2]
The solution posted by tekstryder also works for me, so I mark this solved.

$ systemctl --user edit --full xdg-desktop-portal.service

$ systemctl --user cat xdg-desktop-portal.service
# /home/ldierk/.config/systemd/user/xdg-desktop-portal.service
[Unit]
Description=Portal service
PartOf=graphical-session.target
#Requisite=graphical-session.target   # removed = workaround
Requires=dbus.service
After=dbus.service graphical-session-pre.target

[Service]
Type=dbus
BusName=org.freedesktop.portal.Desktop
ExecStart=/usr/lib/xdg-desktop-portal
Slice=session.slice

Last edited by ldierk (2026-06-11 15:04:47)

#2 2026-06-11 06:21:52

wekauwau
Member
Registered: 2026-06-11
Posts: 1

Re: [SOLVED] xdg-desktop-portal.service not working after update

Maybe it's related to this

#3 2026-06-11 06:38:56

ldierk
Member
Registered: 2025-11-29
Posts: 2

Re: [SOLVED] xdg-desktop-portal.service not working after update

I have to admit that I don't fully understand the issue you linked, but my environment probably fits the description.

graphical-session.target and xdg-desktop-portal.service reside in /usr/lib/systemd/user/.
xdg-desktop-portal.service has a requisite of graphical-session.target.
There is no systemd service for cinnamon. I assume lightdm is starting it.

root      115907     754  0 Jun10 ?        00:00:00 lightdm --session-child 12 20
ldierk    116029  115907  0 Jun10 ?        00:00:00 /usr/lib/cinnamon-session/cinnamon-session-binary --session cinnamon

$ cat /usr/lib/systemd/user/xdg-desktop-portal.service
[Unit]
Description=Portal service
PartOf=graphical-session.target
Requisite=graphical-session.target
After=graphical-session.target

[Service]
Type=dbus
BusName=org.freedesktop.portal.Desktop
ExecStart=/usr/lib/xdg-desktop-portal
Slice=session.slice

$ cat /usr/lib/systemd/system/lightdm.service
[Unit]
Description=Light Display Manager
Documentation=man:lightdm(1)
Conflicts=getty@tty1.service
After=getty@tty1.service systemd-user-sessions.service plymouth-quit.service acpid.service

[Service]
ExecStart=/usr/bin/lightdm
Restart=always
IgnoreSIGPIPE=no
BusName=org.freedesktop.DisplayManager

[Install]
Alias=display-manager.service

Last edited by ldierk (2026-06-11 06:47:56)

#4 2026-06-11 13:48:09

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

Re: [SOLVED] xdg-desktop-portal.service not working after update

I filed an Arch issue yesterday to see if the maintainer will consider patching out the Requisite=graphical-session.target:

https://gitlab.archlinux.org/archlinux/ … rk_items/4

It hasn't been rejected outright at least.

And yes as @wekauwau found, the relevant upstream issue is:

https://github.com/flatpak/xdg-desktop- … ssues/1983

Caused by this MR:

https://github.com/flatpak/xdg-desktop-portal/pull/1830

For now you can just use a drop-in. I stole the Ubuntu patch method:

~ ❯ systemctl --user cat xdg-desktop-portal.service                                                 
# /home/tekstryder/.config/systemd/user/xdg-desktop-portal.service
[Unit]
Description=Portal service
PartOf=graphical-session.target
#Requisite=graphical-session.target   # removed = workaround
Requires=dbus.service
After=dbus.service graphical-session-pre.target

[Service]
Type=dbus
BusName=org.freedesktop.portal.Desktop
ExecStart=/usr/lib/xdg-desktop-portal
Slice=session.slice

Just remember to zap that file away if we get a distro-patched pkgrel bump.

#5 Today 18:43:20

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

Re: [SOLVED] xdg-desktop-portal.service not working after update

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.