You are not logged in.

#1 2026-06-12 15:20:20

Trit
Member
Registered: 2022-12-29
Posts: 13

[SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

Not related to https://bbs.archlinux.org/viewtopic.php?id=313883, AFAIK.

OS: Arch Linux x86-64
DE: XFCE 4.20
DE themes used: Adwaita (day), Adwaita-Dark (night)

Some problems appeared since update to xdg-desktop-portal 1.22.0. Downgrading to 1.20.4 fixes all of these.

Problem 1

In the Open/Save GTK dialog, pressing the Enter key when the text field has the focus does nothing anymore (it does not act as if I click on “Open“ or “Save”). I have to click on “Save” to confirm.
Plus, when a file already exists with the same name, there is no overwriting confirmation dialog anymore: it saves it immediately.

Problem 2

Open GIMP (set to theme “System” and color scheme “System colors”).

With Adwaita (light), it should open with a light theme, and switch to a dark theme only with Adwaita-Dark.
Instead, it always opens with a dark theme (I have to set it to “Light colors” to force it to switch to the light theme).

Problem 3

Open LibreOffice.
With Adwaita-Dark, even if Tools > Options > Appearance > Use white document background is disabled, it still shows the document backgound in white and not dark.

Last edited by Trit (Yesterday 15:06:45)

Offline

#2 2026-06-12 16:06:16

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

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

Trit wrote:

In the Open/Save GTK dialog, pressing the Enter key when the text field has the focus does nothing anymore

Cannot repro. Hitting Enter WFM.

Trit wrote:

when a file already exists with the same name, there is no overwriting confirmation dialog anymore

Cannot repro. Overwrite confirmation dialog appears.

Trit wrote:

Open GIMP (set to theme “System” and color scheme “System colors”).

Cannot repro. Light color scheme persists app restarts.

Trit wrote:

Open LibreOffice.
With Adwaita-Dark, even if Tools > Options > Appearance > Use white document background is disabled, it still shows the document backgound in white and not dark.

Cannot repro. After prompting for restart of the app, document color is dark.

Are you sure the portals are running?

systemctl --user status xdg-desktop-portal.service xdg-desktop-portal-gtk.service

Offline

#3 2026-06-12 20:50:31

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

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

Do you have screenshots of the dialogs w/ either version?

1a) might just be focus policy (stealing prevention/window parenting) but the rest, notably the overwrite behavior, sounds as if you're using a completely different implementation.

pacman -Qs portal

Offline

#4 2026-06-12 21:22:50

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

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

seth wrote:

1a) might just be focus policy (stealing prevention/window parenting) but the rest...

Nope. Both 1a and 1b are consistent with the default behavior of native fallback dialogs, aka window class "GTK Application".

I suspect OP is aware of the recent breakage, but did not implement a working override for xdg-desktop-portal.service.

Offline

#5 2026-06-12 21:27:21

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

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

I've no portal, if I hit ctrl+s and then enter this webpage gets saved. If I repeat that I get asked about the overwrite.
Also why would the native/fallback dialog ignore the color schemes?

Offline

#6 2026-06-12 21:37:58

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

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

seth wrote:

I've no portal, if I hit ctrl+s and then enter this webpage gets saved. If I repeat that I get asked about the overwrite.

1a) Trigger a download... e.g. download a package tar. Hitting Enter should be ignored with no portal*.

1b) Name the download. Download it a 2nd time with the same modified name. No confirmation, and * (1).* is appended to the filename.

Having just recently lived a year without portals this was the (annoying) behavior I'm familiar with.

* It's also application-dependent. I use Brave/Chromium. I suspect you're using Firefox.

Window class "GTK Application" is the last stop when a GTK app cannot find a portal or app-native file chooser.

seth wrote:

Also why would the native/fallback dialog ignore the color schemes?

This I've no clue how it's even related.

I simply attempted to repro the OP's claims and could not repro #2 or #3.

Offline

#7 2026-06-12 22:02:13

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

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

Vivaldi, and the dialog gets the focus and save is the active button - this might completely hinge on the window managers focus management, though.
1b) actually differs between page saving (collision resolution) and link download "(1)"

Offline

#8 2026-06-12 22:13:00

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

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

seth wrote:

this might completely hinge on the window managers focus management, though.

Possibly. Focus stealing prevention is disabled in my envs... i.e. focus stealing is enabled:

Hypr:

hl.config({
    misc = {
        focus_on_activate = true
    },
})

Sway:

focus_on_window_activation focus

From taming these dialogs with window rules, in order of preferred precedence (portal -> app -> fallback):

Hypr (including old hyprlang rules from before my move to portals):

hl.window_rule({ match = { class = "xdg-desktop-portal-gtk", title = ".*wants to.*" }, float = true, center = true, size = "1280 1024" })
windowrule = float on, center on, size 1280 1024, match:class brave, match:title .*wants to.*
windowrule = float on, center on, size 1280 1024, match:class GTK Application, match:title .*wants to.*

Sway:

for_window [app_id="xdg-desktop-portal-gtk"] floating enable, border pixel 2, resize set 1200 960
for_window [app_id="brave" title="wants to"] floating enable, resize set 1200 960
for_window [app_id="GTK Application"] floating enable, resize set set 1200 960
seth wrote:

1b) actually differs between page saving (collision resolution) and link download "(1)"

Yes, that's why I differentiated the two scenarios.

EDIT: Before we confuse anybody, per #2, with functional portals "collision resolution" works as expected in both scenarios.

Last edited by tekstryder (2026-06-13 00:08:09)

Offline

#9 2026-06-13 14:35:44

Trit
Member
Registered: 2022-12-29
Posts: 13

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

I just updated again to 1.22.0 and… it’s fine, now. No errors. Weird, but I won’t complain! ^^

tekstryder wrote:

Are you sure the portals are running?

systemctl --user status xdg-desktop-portal.service xdg-desktop-portal-gtk.service

Both are active and running.

seth wrote:

1a) might just be focus policy (stealing prevention/window parenting) but the rest, notably the overwrite behavior, sounds as if you're using a completely different implementation.

pacman -Qs portal

I always used the official repo packaged versions for xdg-desktop-portal.

Command output:

$ pacman -Qs portal
local/libportal 0.9.1-3
    GIO-style async APIs for most Flatpak portals
local/libportal-gtk3 0.9.1-3
    GIO-style async APIs for most Flatpak portals - GTK 3 backend
local/libportal-gtk4 0.9.1-3
    GIO-style async APIs for most Flatpak portals - GTK 4 backend
local/xdg-desktop-portal 1.22.0-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

I don’t understand what happened for the first update to be broken, but it looks like downgrading and updating again fixed the bug. Solved for me, a priori.

EDIT: I spoke too soon, because I did not have restarted the services yet, and one of them is broken:

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

juin 13 16:41:42 Primula systemd[665]: Dependency failed for Portal service.
juin 13 16:41:42 Primula systemd[665]: xdg-desktop-portal.service: Job xdg-desktop-portal.service/start failed with result 'dependency'.
juin 13 16:43:24 Primula systemd[665]: Dependency failed for Portal service.
juin 13 16:43:24 Primula systemd[665]: xdg-desktop-portal.service: Job xdg-desktop-portal.service/start failed with result 'dependency'.
juin 13 16:43:24 Primula systemd[665]: Dependency failed for Portal service.
juin 13 16:43:24 Primula systemd[665]: xdg-desktop-portal.service: Job xdg-desktop-portal.service/start failed with result 'dependency'.
juin 13 16:43:24 Primula systemd[665]: Dependency failed for Portal service.
juin 13 16:43:24 Primula systemd[665]: xdg-desktop-portal.service: Job xdg-desktop-portal.service/start failed with result 'dependency'.
juin 13 16:44:31 Primula systemd[665]: Dependency failed for Portal service.
juin 13 16:44:31 Primula systemd[665]: 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: active (running) since Sat 2026-06-13 16:41:42 CEST; 6min ago
 Invocation: 69eb0121f84043feaf6448e8dcde7891
   Main PID: 70956 (xdg-desktop-por)
      Tasks: 6 (limit: 4615)
     Memory: 5.4M (peak: 5.7M)
        CPU: 124ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/xdg-desktop-portal-gtk.service
             └─70956 /usr/lib/xdg-desktop-portal-gtk

juin 13 16:41:42 Primula systemd[665]: Starting Portal service (GTK/GNOME implementation)...
juin 13 16:41:42 Primula systemd[665]: Started Portal service (GTK/GNOME implementation).

Went back to 1.20.4, for now, with both services active and running well.

Screencaps can be seen here (1.22.0, broken):

https://rehost.diberie.com/Picture/Get/f/521162
https://rehost.diberie.com/Picture/Get/f/521163

For comparison, what it should have been (1.20.4, OK):

https://rehost.diberie.com/Picture/Get/f/521166
https://rehost.diberie.com/Picture/Get/f/521167

Last edited by Trit (2026-06-13 15:07:42)

Offline

#10 2026-06-13 15:16:42

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

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

tekstryder wrote:

I suspect OP is aware of the recent breakage, but did not implement a working override for xdg-desktop-portal.service.

Trit wrote:

spoke too soon, because I did not have restarted the services yet, and one of them is broken

This is well understood. Downgrading isn't a viable "solution".

I suggest you go back and check the forum thread you linked in the OP:

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

Implement the drop-in service override whilst awaiting a longer-term solution either from upstream (highly unlikely):

https://github.com/flatpak/xdg-desktop- … 4651275776

Or via Arch packaging patch:

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

Offline

#11 2026-06-13 15:35:09

Trit
Member
Registered: 2022-12-29
Posts: 13

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

I’ll try it. I was thinking it was possibly not related because I’m using XFCE and not Sway or Hyprland, but as it seems to be linked anyway…

Just so you know: the Enter key doing nothing in Save dialog seems to only occur in Vivaldi. It still worked in other apps (like Mousepad).

Offline

#12 2026-06-13 15:43:13

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

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

This issue affects any minimal compositor environment that does not reach graphical-session.target.

As for non-functional Enter key...

I was living with that behavior with Brave when I had no portals installed, before they were foisted upon us recently by GTK4.

Last edited by tekstryder (2026-06-13 15:43:50)

Offline

#13 Yesterday 09:09:48

Trit
Member
Registered: 2022-12-29
Posts: 13

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

Brave is a Chromium-based browser, too… And there is the fontconfig’s bug that affects such browsers, too. You talk about a coincidence…

Well, back to this topic, and I have another question: the suggested patch is to edit a xdg-desktop-portal.service file in “~/.config/systemd/user” (it does not exist in this directory on my computers, in 1.20.4 at least), not the one in “/usr/lib/systemd/user”, am I right? Or I can edit that one and it will apply to all users (I have a PC with three user sessions, I’d prefer to edit just one file and it applies to all users, instead of editing one file per user)?

Offline

#14 Yesterday 12:10:07

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

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

https://wiki.archlinux.org/title/Systemd#Drop-in_files - but idk whether this also works w/ /usr/lib/systemd/user/ paths (systemctl edit --user will operate in your $HOME)
Editing the actual unit file will be undone w/ the next update.

Offline

#15 Yesterday 15:02:13

Trit
Member
Registered: 2022-12-29
Posts: 13

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

So, I reinstalled 1.22.0 and added the Tekstryder’s patched service file in my “~/.config/systemd/user/” directory, reloaded the relevant services (no error reported), and both work, now:

● xdg-desktop-portal.service - Portal service
     Loaded: loaded (/home/×××××/.config/systemd/user/xdg-desktop-portal.service; static)
     Active: active (running) since Sun 2026-06-14 16:43:13 CEST; 10min ago
 Invocation: 29fba55aab294b7190cb826af0333e9a
   Main PID: 46919 (xdg-desktop-por)
      Tasks: 6 (limit: 4615)
     Memory: 3.8M (peak: 4.3M)
        CPU: 139ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-desktop-portal.service
             └─46919 /usr/lib/xdg-desktop-portal

juin 14 16:43:13 Primula systemd[691]: Starting Portal service...
juin 14 16:43:13 Primula systemd[691]: Started Portal service.

● xdg-desktop-portal-gtk.service - Portal service (GTK/GNOME implementation)
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-gtk.service; static)
     Active: active (running) since Sun 2026-06-14 16:43:13 CEST; 10min ago
 Invocation: f234c76d123a4a228373c80203a7ac62
   Main PID: 46922 (xdg-desktop-por)
      Tasks: 8 (limit: 4615)
     Memory: 24M (peak: 29.6M)
        CPU: 2.384s
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/xdg-desktop-portal-gtk.service
             └─46922 /usr/lib/xdg-desktop-portal-gtk

juin 14 16:43:13 Primula systemd[691]: Starting Portal service (GTK/GNOME implementation)...
juin 14 16:43:13 Primula systemd[691]: Started Portal service (GTK/GNOME implementation).

Hopefully, it will stay that way until a real patch is released.

Thank you for your suggestions and help!

Offline

#16 Yesterday 22:43:28

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

Re: [SOLVED] Some other regressions with xdg-desktop-portal 1.22.0

Trit wrote:

Hopefully, it will stay that way until a real patch is released.

Don't hold your breath. But, it will "stay that way" until you remove the drop-in file.

Just a reminder to do so it you want to test upstream and/or packaging changes in the future as the drop-in is package-upgrade-resistant.

Offline

Board footer

Powered by FluxBB