Repository navigation
fix(portal): avoid circular portal wait during FileChooser cold activation - #2024
Merged
l0gicgate merged 4 commits intoNov 2, 2026
Merged
Conversation
…ation When an application requests a file chooser dialog, xdg-desktop-portal calls org.freedesktop.impl.portal.FileChooser.OpenFile on Strata's portal backend. When Strata is activated via D-Bus for this call, GTK's startup initialization synchronously queries xdg-desktop-portal for desktop settings. Because xdg-desktop-portal is blocked waiting on the OpenFile backend response, a circular deadlock occurs until the 25-second D-Bus call times out. Apply the existing GDK_DEBUG=no-portals restart mitigation used by --gapplication-service to LaunchMode::Portal as well, preventing GTK from querying the portal during backend activation. Closes lgse#2023
…d-activation-deadlock
…oss both services Drop the test-only file_manager_debug_environment alias, fold the duplicated --portal debug-flag test into the service activation table, and describe the FileChooser backend alongside FileManager1 in the packaging notes.
Contributor
|
Reviewed, merged What changed beyond the merge (1498a14)
Manual verification of the built binary,
Scoped tests run locally: |
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When third-party applications (such as Telegram, browsers, or other desktop apps) trigger a file or folder picker dialog,
xdg-desktop-portalinvokesorg.freedesktop.impl.portal.FileChooser.OpenFileon Strata's portal backend. If Strata is cold-activated via D-Bus (or after its 120-second idle timeout), GTK's initialization synchronously queriesxdg-desktop-portalfor desktop settings whilexdg-desktop-portalis blocked waiting on Strata'sOpenFileimplementation. This circular dependency causes the portal request to hang until the 25-second D-Bus call timeout expires.This change extends the existing
GDK_DEBUG=no-portalsrestart mitigation used by--gapplication-servicetoLaunchMode::Portal(strata --portal), preventing GTK from attempting circular portal queries during backend activation while preserving child process and user settings behavior.Visual evidence
N/A. This is an internal IPC / startup timing fix for D-Bus portal backend activation; visual UI appearance remains unchanged.
How to test
pkill -f "strata --portal" || trueExpected result:
The Strata file chooser dialog opens immediately without incurring a 25-second D-Bus timeout delay.
Related issue
Closes #2023