You are not logged in.

#1 Yesterday 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 (Yesterday 15:04:47)

Offline

#2 Yesterday 06:21:52

wekauwau
Member
Registered: Yesterday
Posts: 1

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

Maybe it's related to this

Offline

#3 Yesterday 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 (Yesterday 06:47:56)

Offline

#4 Yesterday 13:48:09

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

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.

Offline

Board footer

Powered by FluxBB