Using i3wm with google-chrome and chromium shows quickly-disappearing File Open and Save As dialogs

I’ve switched to using i3wm v4.18.1 under openSUSE LEAP 15.3 that was initially installed with KDE Desktop option. I am encountering a problem that I’m hoping someone else might see and know of a solution.

When I launch google-chrome (and even chromium) under i3wm, the “File Open” dialog (Ctrl-O) will appear briefly and then quickly disappear. No file can be opened in this way.

The same behavior occurs when I right-click a link and select “Save Link As…” to download a file. No download file can ever be created in this way.

Using the i3 floating window for chrome/chromium also does not make any difference.

Is there a setting for chrome/chromium that I need to change to allow the dialogs to display normally until I click OK or Cancel? Even the plain Xwindows dialog would be helpful!

I have also tested this by creating a brand new login user using YAST2, which created a completely new /home/newuser directory. Same behavior after logging out and logging back in as the new user and going through the i3 process of creating a new default i3 config file in /home/newuser/.config/i3/config.

kinfocenter output:

Operating System: openSUSE Leap 15.3
KDE Plasma Version: 5.18.6
KDE Frameworks Version: 5.76.0
Qt Version: 5.12.7
Kernel Version: 5.3.18-59.37-default
OS Type: 64-bit

inxi output:

System:    Kernel: 5.3.18-59.37-default x86_64 bits: 64 compiler: gcc v: 7.5.0 Desktop: i3 4.18.1 dm: SDDM 
           Distro: openSUSE Leap 15.3 

zypper info output:

Information for package google-chrome-stable:
Repository     : google-chrome
Name           : google-chrome-stable
Version        : 96.0.4664.110-1
Arch           : x86_64
Vendor         : Google LLC
Installed Size : 270.2 MiB
Installed      : Yes
Status         : up-to-date
Source package : google-chrome-stable-96.0.4664.110-1.src
Summary        : Google Chrome

Information for package chromium:
Repository     : Update repository of openSUSE Backports
Name           : chromium
Version        : 96.0.4664.110-bp153.2.48.1
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 361.0 MiB
Installed      : Yes
Status         : up-to-date
Source package : chromium-96.0.4664.110-bp153.2.48.1.src
Summary        : Google's open source browser project

Thank you in advance for any insights and approaches!

Some other folk have reported problems with “Save as” using chrome, chromium and other chromium based browsers. So this is likely to be an upstream problem.

I confirm that this system works as expected when I rebooted the same machine into KDE Desktop Plasma (instead of i3). The “File Open” and “Save As” dialogs in both google-chrome-stable and chromium show themselves with no problem.

I’m not observing the issue described in

My versions (querying package names mentioned in the above forum post):

date --utc --iso-8601=minutes ; for N in xorg-x11-server $(rpm -qa --queryformat "%{NAME}
" | grep xdg-desktop); do rpm -q --queryformat "%-50{SOURCERPM} %-30{NAME} %{VENDOR}
" "$N" ; done
xorg-x11-server-1.20.3-           xorg-x11-server                SUSE LLC <>
xdg-desktop-portal-1.8.0-5.3.2.src.rpm             xdg-desktop-portal-lang        SUSE LLC <>
xdg-desktop-portal-gtk-1.8.0-3.6.1.src.rpm         xdg-desktop-portal-gtk-lang    SUSE LLC <>
xdg-desktop-portal-1.8.0-5.3.2.src.rpm             xdg-desktop-portal             SUSE LLC <>
xdg-desktop-portal-kde-5.18.5-bp153.1.27.src.rpm   xdg-desktop-portal-kde         openSUSE
xdg-desktop-portal-kde-5.18.5-bp153.1.27.src.rpm   xdg-desktop-portal-kde-lang    openSUSE
xdg-desktop-portal-gtk-1.8.0-3.6.1.src.rpm         xdg-desktop-portal-gtk         SUSE LLC <>

WORKAROUND: I was mistaken about the other forum post by not applying to my system. The mere presence of the packages, xdg-desktop-portal-gtk and -lang, appeared to cause the issue of file chooser dialogs disappearing under i3wm.

The following removal, which seems safe for my own use (maybe because I do not currently plan to use Gnome Desktop with LEAP 15.3?):

sudo zypper rm xdg-desktop-portal-gtk

allows the File Open and Save As dialogs to be displayed in chrome & chromium again.

I did not have to roll back any other packages to make this work.

Bug 1194102]( filed.
You may add info to it.

For what is worth, simply removing package xdg-desktop-portal-gtk not only does not help with anything in my Leap 15.3 system, but makes things worse !
That is, the dialog box for Save, or for open does not appear ast all, not even for that very short time (< 1 second).

With this one removed from my system, I get this message in the journal:
28/12/2021 12:47 user@1000.service Backend call failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.impl.portal.desktop.gtk was not provided by any .service files
(looks normal, but it’s not clear why is that xdg-desktop-portal-gtk needed in the first place, anyway).

After re-installing it, I’m back to messages like the the following, every time I try a Save action in Chrome (and also in Chromium or in Opera):
Dec 28 12:53:48 cornel dbus-daemon[977]: [system] Successfully activated service ‘org.freedesktop.hostname1’
Dec 28 12:53:47 cornel kwin_x11[30386]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 59116, resource id: 130023427, major code: 18 (Ch>
Dec 28 12:53:47 cornel kwin_x11[30386]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 59111, resource id: 130023427, major code: 15 (Qu>
Dec 28 12:53:47 cornel xdg-desktop-por[3877]: Backend call failed: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from me>
Dec 28 12:53:47 cornel systemd[1628]: xdg-desktop-portal-gtk.service: Succeeded.
Dec 28 12:53:47 cornel systemd[1]: Starting Hostname Service…

Every I try a Save or Open, similar messages are recorded in the system journal.

Chrome & Chromiums uses GTK on Linux (and Firefox too). Something is broken with GTK dialogues.
Opening html files with Vivaldi from Dolphin works OK.
Saving pages as html with Vivaldi always worked creepily - I can save only text, without pictures.

If this helps with anything, I found out that logging in into Gnome, Gnome on Xorg, Enlightnment, IceWM also have the same behaviour when trying to save a web page, or download a file or even upload some file.

It turned out that “Plasma Wayand” and “Plasma Full Wayland” do not have this issue - I’d be happy to figure out why.
I prefer, though, to identify the bug that enables this behaviour, and solve it so that the “simple” Plasma interface would also work OK in this aspect.

for 15,2 the following big has been reported.

downgrading to xdg-desktop-portal-gtk-1.8.0-lp152.2.3.1 works there.

My use of plain Plasma/KDE (non-Wayland) works with chrome and chromium for me. And my journalctl output indicates that it is using xdg-desktop-portal-kde.

2021-12-27T03:26:37+0000 xdg-desktop-portal-kde[2088]: xdp-kde-file-chooser: SaveFile called with parameters:
2021-12-27T03:26:37+0000 xdg-desktop-portal-kde[2088]: xdp-kde-file-chooser:     handle:  "/org/freedesktop/portal/desktop/request/1_80/handle_0"
2021-12-27T03:26:37+0000 xdg-desktop-portal-kde[2088]: xdp-kde-file-chooser:     parent_window:  "x11:0x4e00003"
2021-12-27T03:26:37+0000 xdg-desktop-portal-kde[2088]: xdp-kde-file-chooser:     title:  "All Files"
2021-12-27T03:26:37+0000 xdg-desktop-portal-kde[2088]: xdp-kde-file-chooser:     options:  QMap(("current_filter", QVariant(QDBusArgument, ))("current_folder", QVariant(QByteArray, "/home/ELIDED/Downloads\x00"))("current_name", QVariant(QString, "New Tab.html"))("filters", QVariant(QDBusArgument, )))
2021-12-27T03:26:41+0000 xdg-desktop-portal-kde[2088]: xdp-kde-file-chooser: OpenFile called with parameters:
2021-12-27T03:26:41+0000 xdg-desktop-portal-kde[2088]: xdp-kde-file-chooser:     handle:  "/org/freedesktop/portal/desktop/request/1_80/handle_1"
2021-12-27T03:26:41+0000 xdg-desktop-portal-kde[2088]: xdp-kde-file-chooser:     parent_window:  "x11:0x4e00003"
2021-12-27T03:26:41+0000 xdg-desktop-portal-kde[2088]: xdp-kde-file-chooser:     title:  "Open File"
2021-12-27T03:26:41+0000 xdg-desktop-portal-kde[2088]: xdp-kde-file-chooser:     options:  QMap(("filters", QVariant(QDBusArgument, )))
2021-12-27T03:26:57+0000 xdg-desktop-portal-kde[2088]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 6289, resource id: 14685617, major code: 40 (TranslateCoords), minor code: 0

The bug report you cited appears to have been assigned to the person who did that last commit on xdg-desktop-portal-gtk.

Solution for Leap 15.3: downgrade packages xdg-desktop-portal-gtk and xdg-desktop-portal-gtk-lang from v. 1.8.0-3.6.1 to previous 1.8.0-3.3.1.
Solution for Leap 15.2: downgrade packages xdg-desktop-portal-gtk and xdg-desktop-portal-gtk-lang from v. 1.8.0-lp152.2.6.1 to previous 1.8.0-lp152.2.3.1.
Downgrade and lock until solution will be available.

This patch is causing errors:

+#define IDLE_TIMEOUT_MS 1000


It has started to happen again.

Right Click “Save As…” on any page, and it just disappears.
Same with Print to PDF.

Downgrading the gtk package as noted, and restarting chrome worked like a charm! Adding a lock on this package for now.

Edit: working package is xdg-desktop-portal-gtk-1.8.0-3.3.1.x86_64

This issue has been resolved and is now available on openSUSE Leap 15.3 repos.