Screen sharing inconsistencies with different portal backends on niri
Summary
I've been experiencing inconsistent screen sharing behavior on niri with different applications. After systematic testing of both xdg-desktop-portal-wlr and xdg-desktop-portal-gnome, I found that different portal backends have opposite failure modes with the same applications, particularly affecting Google Meet and other WebRTC-based apps.
This appears related to issue #2254, but I've collected comprehensive test data that might help narrow down the root cause.
Environment
- OS: NixOS
- niri version: 25.08
- Display resolution: 3840x2160@60Hz (scaled to 1.60)
- PipeWire version: 1.4.9
- WirePlumber: Active
- xdg-desktop-portal: 1.20.3
- Tested portal backends:
- xdg-desktop-portal-wlr 0.8.0
- xdg-desktop-portal-gnome 49.0
What I Tested
I created a systematic testing protocol and tested 5 different screen sharing applications with both portal backends:
- OBS Studio
- Vesktop (Discord client)
- Google Meet (Zen browser)
- teams-for-linux
Each test included monitoring 3 log streams: xdg-desktop-portal, portal backend (-wlr or -gnome), and pipewire.
Key Findings
🔥 Critical: Google Meet has opposite behavior between portals
With xdg-desktop-portal-gnome:
- ❌ Completely broken
- PipeWire format negotiation fails
- Error:
pw.link: negotiating -> error (no more input formats)
- Portal picker appears but sharing never starts
With xdg-desktop-portal-wlr:
- ✅ Works perfectly... but ONLY ONCE
- ❌ Subsequent attempts fail with session state bug
- Portal picker doesn't appear after first use
- Workaround:
systemctl --user restart xdg-desktop-portal-wlr
- Error:
Failed to close session implementation: Unknown object '/org/freedesktop/portal/desktop/session/...'
Application Compatibility Summary
| Application |
wlr Portal |
gnome Portal |
| OBS Studio |
✅ Works (with errors) |
✅ Works perfectly |
| Vesktop |
✅ Works (no errors!) |
✅ Works (minor warnings) |
| Google Meet |
⚠️ Works once (session bug) |
❌ Broken (PipeWire error) |
| teams-for-linux |
❌ App bug |
❌ App bug |
Error Patterns
xdg-desktop-portal-wlr specific:
Realtime error: Could not get pidns for pid XXXXX: pidns required but no pidfd provided
A backend call failed: No such device or address
Failed to close session implementation: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject
xdg-desktop-portal-gnome specific:
Failed to associate portal window with parent window (cosmetic - doesn't break functionality)
pw.context: params Spa:Enum:ParamId:EnumFormat: Invalid argument (no more input formats)
pw.link: negotiating -> error (no more input formats)
Documentation
I've created comprehensive test documentation that I can provide:
-
Testing Protocol screenshare-testing-protocol.md screenshare-testing-checklist.md
- Step-by-step testing procedure
- Exact commands used
- Log collection methodology
-
Scenario A Results test-results-scenario-a-wlr.md
- Complete results with xdg-desktop-portal-wlr
- All errors and logs captured
-
Scenario B Results test-results-scenario-b-gnome.md
- Complete results with xdg-desktop-portal-gnome
- All errors and logs captured
-
Comparison Report screenshare-comparison-report.md
- Side-by-side comparison
- Error pattern analysis
- Recommendations
Questions
-
Is the Google Meet PipeWire format negotiation issue a known problem with gnome portal + niri? The error suggests the portal and PipeWire can't agree on a compatible format.
-
Should wlr portal work with niri, or is gnome the only officially supported backend? The niri wiki suggests gnome, but wlr actually solves the Google Meet PipeWire issue (despite introducing the session bug).
-
Are there any PipeWire configuration options that might help with format negotiation for the gnome portal case?
Reproducibility
For Google Meet + gnome portal PipeWire error:
- Configure niri with xdg-desktop-portal-gnome
- Open Google Meet in any browser
- Try to share screen
- Portal picker appears and allows selection
- "Starting presentation..." hangs forever
- Check logs:
journalctl --user -u pipewire -f shows format negotiation errors
For Google Meet + wlr portal session bug:
- Configure niri with xdg-desktop-portal-wlr
- Open Google Meet in browser
- Share screen - works perfectly
- Close browser
- Open browser again and try to share
- Portal picker never appears, share button stuck in "waiting" state
- Restart portal:
systemctl --user restart xdg-desktop-portal-wlr
- Works again (once)
Willing to Help
I'm happy to:
- Provide any additional logs or debugging information
- Test patches or configuration changes
- Help develop a fix (though I'd need some guidance as I'm not deeply familiar with portal/PipeWire internals)
- Run git bisect if there's a suspected regression
This is affecting my daily workflow, so I'm very motivated to help resolve it! Let me know what additional information would be useful.
Related Issues
Screen sharing inconsistencies with different portal backends on niri
Summary
I've been experiencing inconsistent screen sharing behavior on niri with different applications. After systematic testing of both
xdg-desktop-portal-wlrandxdg-desktop-portal-gnome, I found that different portal backends have opposite failure modes with the same applications, particularly affecting Google Meet and other WebRTC-based apps.This appears related to issue #2254, but I've collected comprehensive test data that might help narrow down the root cause.
Environment
What I Tested
I created a systematic testing protocol and tested 5 different screen sharing applications with both portal backends:
Each test included monitoring 3 log streams:
xdg-desktop-portal, portal backend (-wlror-gnome), andpipewire.Key Findings
🔥 Critical: Google Meet has opposite behavior between portals
With xdg-desktop-portal-gnome:
pw.link: negotiating -> error (no more input formats)With xdg-desktop-portal-wlr:
systemctl --user restart xdg-desktop-portal-wlrFailed to close session implementation: Unknown object '/org/freedesktop/portal/desktop/session/...'Application Compatibility Summary
Error Patterns
xdg-desktop-portal-wlr specific:
xdg-desktop-portal-gnome specific:
Documentation
I've created comprehensive test documentation that I can provide:
Testing Protocol screenshare-testing-protocol.md screenshare-testing-checklist.md
Scenario A Results test-results-scenario-a-wlr.md
Scenario B Results test-results-scenario-b-gnome.md
Comparison Report screenshare-comparison-report.md
Questions
Is the Google Meet PipeWire format negotiation issue a known problem with gnome portal + niri? The error suggests the portal and PipeWire can't agree on a compatible format.
Should wlr portal work with niri, or is gnome the only officially supported backend? The niri wiki suggests gnome, but wlr actually solves the Google Meet PipeWire issue (despite introducing the session bug).
Are there any PipeWire configuration options that might help with format negotiation for the gnome portal case?
Reproducibility
For Google Meet + gnome portal PipeWire error:
journalctl --user -u pipewire -fshows format negotiation errorsFor Google Meet + wlr portal session bug:
systemctl --user restart xdg-desktop-portal-wlrWilling to Help
I'm happy to:
This is affecting my daily workflow, so I'm very motivated to help resolve it! Let me know what additional information would be useful.
Related Issues