Can't open portal file chooser in some apps

Hello Garuda users.

Please read the following template before requesting assistance:

Please post the terminal/konsole input and output as text (no pictures) from the following command:

Kernel: 6.3.1-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=9ac54386-0d75-44c1-9d0f-002ce605a3a3 rw rootflags=subvol=@
quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
loglevel=3 ibt=off
Desktop: KDE Plasma v: 5.27.5 tk: Qt v: 5.15.9 wm: kwin_x11 vt: 1 dm: SDDM
Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop System: Alienware product: Alienware Aurora R6 v: 1.0.7
serial: <superuser required> Chassis: type: 3 serial: <superuser required>
Mobo: Alienware model: 07HV66 v: A00 serial: <superuser required>
UEFI: Alienware v: 1.0.7 date: 06/05/2017
CPU:
Info: model: Intel Core i7-7700 bits: 64 type: MT MCP arch: Kaby Lake
gen: core 7 level: v3 note: check built: 2018 process: Intel 14nm family: 6
model-id: 0x9E (158) stepping: 9 microcode: 0xF0
Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
L3: 8 MiB desc: 1x8 MiB
Speed (MHz): avg: 4000 min/max: 800/4200 scaling: driver: intel_pstate
governor: powersave cores: 1: 4000 2: 4000 3: 4000 4: 4000 5: 4000 6: 4000
7: 4000 8: 4000 bogomips: 57600
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Graphics:
Device-1: Intel HD Graphics 630 vendor: Dell driver: i915 v: kernel
arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports: active: none
empty: DP-1,HDMI-A-1 bus-ID: 0000:00:02.0 chip-ID: 8086:5912
class-ID: 0380
Device-2: NVIDIA GP104 [GeForce GTX 1070] vendor: Dell driver: nvidia
v: 530.41.03 alternate: nouveau,nvidia_drm non-free: 530.xx+
status: current (as of 2023-05) arch: Pascal code: GP10x
process: TSMC 16nm built: 2016-21 bus-ID: 0000:01:00.0 chip-ID: 10de:1b81
class-ID: 0300
Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.1
compositor: kwin_x11 driver: X: loaded: modesetting,nvidia unloaded: nouveau
alternate: fbdev,intel,nv,vesa dri: iris gpu: i915,nvidia display-ID: :0
screens: 1
Screen-1: 0 s-res: 4480x1440 s-dpi: 108 s-size: 1054x342mm (41.50x13.46")
s-diag: 1108mm (43.63")
Monitor-1: DP-4 pos: primary,left res: 2560x1440 dpi: 109
size: 598x336mm (23.54x13.23") diag: 686mm (27.01") modes: N/A
Monitor-2: HDMI-0 pos: right res: 1920x1080 hz: 60 dpi: 166
size: 294x166mm (11.57x6.54") diag: 338mm (13.29") modes: N/A
API: OpenGL v: 4.6.0 NVIDIA 530.41.03 renderer: NVIDIA GeForce GTX
1070/PCIe/SSE2 direct-render: Yes
Audio:
Device-1: Intel 200 Series PCH HD Audio vendor: Dell driver: snd_hda_intel
v: kernel alternate: snd_soc_avs bus-ID: 0000:00:1f.3 chip-ID: 8086:a2f0
class-ID: 0403
Device-2: NVIDIA GP104 High Definition Audio vendor: Dell
driver: snd_hda_intel v: kernel bus-ID: 0000:01:00.1 chip-ID: 10de:10f0
class-ID: 0403
Device-3: Shure MV7 driver: hid-generic,snd-usb-audio,usbhid type: USB
rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-1:2 chip-ID: 14ed:1012
class-ID: 0300
Device-4: Astro Gaming A50 driver: hid-generic,snd-usb-audio,usbhid
type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-12:11
chip-ID: 9886:002c class-ID: 0300
Device-5: Valve VR Radio driver: cdc_acm,hid-generic,usbhid type: USB
rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-3.3.2:10
chip-ID: 28de:2102 class-ID: 0a00 serial: <filter>
Device-6: Valve VR Radio & HMD Mic
driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 2.0 speed: 12 Mb/s
lanes: 1 mode: 1.1 bus-ID: 1-3.3.3:12 chip-ID: 28de:2102 class-ID: 0102
serial: <filter>
API: ALSA v: k6.3.1-zen1-1-zen status: kernel-api with: aoss
type: oss-emulator tools: alsactl,alsamixer,amixer
Server-1: PipeWire v: 0.3.70 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Intel Wireless 3165 driver: iwlwifi v: kernel bus-ID: 0000:03:00.0
chip-ID: 8086:3165 class-ID: 0280
IF: wlp3s0 state: up mac: <filter>
Device-2: Qualcomm Atheros Killer E2400 Gigabit Ethernet vendor: Dell
driver: alx v: kernel port: d000 bus-ID: 0000:04:00.0 chip-ID: 1969:e0a1
class-ID: 0200
IF: enp4s0 state: down mac: <filter>
Bluetooth:
Device-1: Intel Bluetooth wireless interface driver: btusb v: 0.8 type: USB
rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-8:7 chip-ID: 8087:0a2a
class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 1 state: down
bt-service: enabled,running rfk-block: hardware: no software: yes
address: <filter>
RAID:
Hardware-1: Intel SATA Controller [RAID mode] driver: intel_nvme_remap
v: N/A port: f060 bus-ID: 0000:00:17.0 chip-ID: 8086:2822 rev:
class-ID: 0104
Drives:
Local Storage: total: 4.78 TiB used: 72.76 GiB (1.5%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Toshiba model: THNSN5256GPUK
NVMe 256GB size: 238.47 GiB block-size: physical: 512 B logical: 512 B
tech: SSD serial: <filter> fw-rev: 5KDA4103 temp: 28.9 C scheme: GPT
ID-2: /dev/sda maj-min: 8:0 vendor: HGST (Hitachi) model: HTS721010A9E630
size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
tech: HDD rpm: 7200 serial: <filter> fw-rev: A3W0 scheme: MBR
ID-3: /dev/sdb maj-min: 8:16 vendor: Western Digital
model: WD20SDRW-11VUUS1 size: 1.82 TiB block-size: physical: 512 B
logical: 512 B type: USB rev: 3.1 spd: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1
tech: HDD rpm: 5400 serial: <filter> fw-rev: 1020 scheme: GPT
ID-4: /dev/sdc maj-min: 8:32 vendor: Western Digital
model: WD20SDRW-11VUUS1 size: 1.82 TiB block-size: physical: 512 B
logical: 512 B type: USB rev: 3.1 spd: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1
tech: HDD rpm: 5400 serial: <filter> fw-rev: 1020 scheme: GPT
Partition:
ID-1: / raw-size: 238.17 GiB size: 238.17 GiB (100.00%)
used: 72.76 GiB (30.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 576 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 238.17 GiB size: 238.17 GiB (100.00%)
used: 72.76 GiB (30.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-4: /var/log raw-size: 238.17 GiB size: 238.17 GiB (100.00%)
used: 72.76 GiB (30.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-5: /var/tmp raw-size: 238.17 GiB size: 238.17 GiB (100.00%)
used: 72.76 GiB (30.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.52 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 73.0 C mobo: N/A gpu: nvidia temp: 39 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 27%
Info:
Processes: 296 Uptime: 9m wakeups: 0 Memory: available: 15.52 GiB
used: 3.82 GiB (24.6%) Init: systemd v: 253 default: graphical
tool: systemctl Compilers: gcc: 13.1.1 Packages: 1587 pm: pacman pkgs: 1566
libs: 465 tools: octopi,paru pm: flatpak pkgs: 21 Shell: fish v: 3.6.1
default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.27
Garuda (2.6.16-1):
System install date:     2023-04-13
Last full system update: 2023-05-09
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut nvidia-dkms
Windows dual boot:       Probably (Run as root to verify)
Failed units:

Some apps that have a save feature will not pop up the portal file chooser, and will output the following error.


(zenity:74898): Gtk-WARNING **: 21:25:07.813: Can't open portal file chooser: GDBus.Error:org.freedesktop.por
tal.Error.InvalidArgument: invalid filter: invalid glob pattern

The only semi-working solution is to run it under sudo, but doing that will give me a error with sound and will not provide any audio.


AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': Host is down

I understand if this seems like a dumb issue, and it could just be a user error, but I haven't seen a error like this, and only started getting it once switching to KDE.

If you wouldn't my helping me I would really appreciate that. After all I don't 100% know what I am doing I constantly get these kinds of errors.

Thank you

I’m not sure (I don’t use KDE) and I hope it’s not bad advice:
try installing xdg-desktop-portal-kde.

Some apps

It would help to know which ones.

1 Like

Thanks for the message, but I already have that installed before making this topic. I can try reinstalling it to see if that will solve the solution, but I doubt it.

You're right, my bad.
I wonder if perhaps the -gtk one?

I just tried reinstalling both desktop-portal, and sadly no luck.

I think it may also need a logout/login to take effect, if not a full reboot.
Are all gtk applications having problem with the file chooser or only some of them?

1 Like

I pretty sure its just some. Could certain software effect the portal compare to others?
I have already restarted my PC before making the request, but I can try again with the logout/login.

I guess it depends how they open the file chooser, some use portal and some request a native file chooser (at least this is what I just read online...)
You may try to see if there are known issues with those specific applications when running on KDE.

1 Like

Just restarted and login, and still same results.

I guess that does make sense with the file chooser, but why would it work using "sudo" and not regular? Using "sudo" just breaks the audio.

I can quickly check and see through the source code (If I am smart enough to find it), or try a fork or some kind.

why would it work using “sudo”

somehow my brain did not process that part… then it looks like a problem of communication on dbus, maybe something with the XDG_CURRENT_DESKTOP environment variable?
XDG Desktop Portal - ArchWiki did not enlighten me much, now looking at GitHub - flatpak/xdg-desktop-portal: Desktop integration portal.

1 Like

Just to confirm: you do have xdg-desktop-portal-gtk installed, right?

This person had a similar issue which was resolved by adjusting some permission-related settings using Flatseal: [BUG] Can't open portal file chooser · Issue #966 · bottlesdevs/Bottles · GitHub

Unfortunately they did not provide any information on what settings they changed to fix the issue.

2 Likes

Thanks for the reply. I will take a look at that and see what I can do.

Another thing I missed before: zenity. Is that the only app with the problem? Maybe yad is a viable alternative.

1 Like

Would that require me to uninstall zenity and install yad?

It doesn't look like it conflicts, it's a fork of zenity, has very similar usage.
If trying to install it prompts for removing zenity, you'll know for sure and can cancel the installation.

1 Like

It already says that I yad installed and it will be reinstalled if I continue with the command.
With no conflicts or anything.

In Flatseal would it require to add one of the bus options that make you type or would you expect it to work with just one of the switches.
It the moment none of the "Switch" options works.
Would I have to be under a certain app or would you just do "All Applications"?

To be perfectly honest I have no idea. I do not use Flatpak at all, so no experience whatsoever with Flatseal. The fact that you get a different result with sudo made me think it is possible it is a permission-related issue of some kind.

I would just experiment with the settings as best you can, and see if you can find something that has an appreciable effect on the error message you are getting.

3 Likes

Dropping some (only very distantly relevant) links in the hope there's some troubleshooting hint in there.
Comprehensive list on sandbox permission
Unable to open file select dialog on Linux - Product Feedback / 产品反馈 / フィードバック - Synthesizer V Forum
ubuntu - Replacing of GTK+ file dialogs with KDE's via XDG portals not working (XFCE, Manjaro) - Super User
https://github.com/flatpak/xdg-desktop-portal-gtk/issues/215
Failed to start Portal service · Issue #107 · flatpak/xdg-desktop-portal-gtk · GitHub
(did I think a file chooser was a rather trivial thing before today...)


Does yad --file work?

2 Likes

Sorry for the wait (had to go somewhere), but when running the command, yad --file, it seems to just open some sort of file explorer of some sorts. I am supposed to be doing anything different when in this explorer?