[Bug Report] 文件选择对话框无法出现或者出现非常缓慢问题!
Tofloor
poster avatar
A0王斌
deepin
2025-12-13 08:54
Author

🐞 Bug Report:Deepin 25 xdg-desktop-portal FileChooser D-Bus Timeout

标题(Title)

Deepin 25: xdg-desktop-portal-dde claims default backend but does not provide FileChooser, causing D-Bus timeout and application freeze

(如果需要中文):

Deepin 25xdg-desktop-portal-dde 占用默认后端但未实现 FileChooser,导致文件对话框 D-Bus 超时与应用卡死

系统信息(System Information)

  • OS:Deepin 25
  • Repository:beige / crimson
  • Desktop Environment:DDE
  • Architecture:amd64
  • Session Type:Wayland / X11(如实填写)

相关软件版本(Package Versions)

xdg-desktop-portal 1.20.3+ds-1 xdg-desktop-portal-dde 1.1.1 xdg-desktop-portal-gtk 1.10.0-3

问题描述(Description)

On Deepin 25, xdg-desktop-portal-dde is selected as the default portal backend by xdg-desktop-portal.
However, the DDE portal backend does not implement the org.freedesktop.impl.portal.FileChooser interface.

As a result:

  • org.freedesktop.impl.portal.FileChooser is never registered on the user D-Bus
  • Any application invoking the FileChooser portal blocks on D-Bus until timeout
  • Affected applications appear frozen when opening file dialogs

This affects GTK, Qt, Electron, Flatpak, and sandboxed applications.


复现步骤(Steps to Reproduce)

  1. Install Deepin 25 with default desktop (DDE)
  2. Ensure the following packages are installed:
sudo apt install xdg-desktop-portal xdg-desktop-portal-dde xdg-desktop-portal-gtk
  1. Log into DDE session
  2. Run:
busctl --user tree org.freedesktop.impl.portal.FileChooser

实际结果(Actual Result)

  • Command blocks and eventually times out:
Failed to introspect object / of service org.freedesktop.impl.portal.FileChooser: Connection timed out
  • Applications freeze when opening file chooser dialogs

期望结果(Expected Result)

  • org.freedesktop.impl.portal.FileChooser should be provided by at least one backend
  • File chooser dialogs should open instantly

日志信息(Logs)

xdg-desktop-portal journal

Choosing gtk.portal for org.freedesktop.impl.portal.Lockdown as a last-resort fallback Choosing gtk.portal for org.freedesktop.impl.portal.AppChooser as a last-resort fallback Choosing gtk.portal for org.freedesktop.impl.portal.Print as a last-resort fallback

Indicates missing backend implementation for FileChooser


根因分析(Root Cause Analysis)

  • xdg-desktop-portal-dde is selected as the default portal backend
  • The DDE backend does not implement FileChooser
  • xdg-desktop-portal does not fall back to xdg-desktop-portal-gtk for FileChooser
  • This results in a deadlock / timeout on D-Bus

临时解决方案(Workaround)

Force GTK portal backend by creating:

~/.config/xdg-desktop-portal/config [preferred] default=gtk

Then restart user services:

systemctl --user restart xdg-desktop-portal xdg-desktop-portal-gtk

After this workaround, org.freedesktop.impl.portal.FileChooser is correctly registered and works as expected.


建议修复方案(Suggested Fix)

One of the following:

  1. Implement FileChooser in xdg-desktop-portal-dde
  2. Do not advertise DDE backend as default unless it provides FileChooser
  3. Automatically fall back to xdg-desktop-portal-gtk for missing interfaces

影响范围(Impact)

  • File dialogs fail or block across many applications
  • Severe usability regression
  • Affects default Deepin 25 installations

附加信息(Additional Information)

This issue is reproducible on a clean Deepin 25 installation and does not require third-party software.

Reply Favorite View the author
All Replies

No replies yet