Screen sharing silently broken on KDE Wayland — root cause found, upstream bug filed, workaround documented

,

upstream bug filed, workaround documented

POST TO

https://universal-blue.discourse.group (Bazzite/Universal Blue forums)

and/or Bazzite Discord #bug-reports


TL;DR: Screen sharing and OBS PipeWire capture are silently broken on
Bazzite KDE due to a bug in xdg-desktop-portal 1.20.3. KWin’s screencast
plugin never initialises because the portal fails to open a /proc path
using invalid syscall flags. Bug filed upstream. Temporary workaround below.


What’s broken

On Bazzite 43.20260406 (KDE Plasma 6.6.3, xdg-desktop-portal 1.20.3), screen
sharing fails silently:

  • OBS PipeWire screen capture: chooser never appears
  • Browser WebRTC screen share: nothing happens
  • Discord/Electron screen share: black frames or no dialog

No error is shown to the user. The failure is only visible in journalctl.

Root cause

wayland-info | grep zkde_screencast returns nothing — the
zkde_screencast_unstable_v1 Wayland protocol that enables screencasting is
never registered by KWin. This happens because:

  1. KWin’s screencast plugin registers with xdg-desktop-portal at startup
  2. The portal tries to open /proc/<kwin-pid>/root using
    O_RDONLY | O_NOFOLLOW
  3. /proc/<pid>/root is a kernel symlink; O_NOFOLLOW always returns ELOOP
  4. Portal reports “Unable to open /proc//root” and rejects registration
  5. KWin never creates the Wayland screencasting global
  6. All screen sharing silently fails

This is a bug in xdg-desktop-portal 1.20.3 (filed upstream). It affects all
unsandboxed processes on composefs/immutable systems. Bazzite is particularly
affected because the composefs root filesystem layout is what triggers the
portal’s crash-and-restart cycle at session start, which is when KWin fires
its registration attempt.

How to confirm you’re affected

# Should return a line with zkde_screencast_unstable_v1 if working
wayland-info | grep zkde_screencast

# If blank, check KWin journal for the error
journalctl --user -u plasma-kwin_wayland --boot --no-pager \
    | grep "register\|portal\|screencast"
# Look for: "Unable to open /proc/<pid>/root"

Workaround (until xdg-desktop-portal is patched)

No clean session-safe workaround exists. The only fix that works is to ensure
the portal is fully stable before KWin fires its registration attempt —
currently they start almost simultaneously (within 16ms of each other).

A sleep drop-in on the portal causes other Plasma services to time out.
A sleep drop-in on KWin restarts the compositor (logs you out).

The permanent fix requires a patch in either:

  • xdg-desktop-portal: use O_PATH | O_NOFOLLOW instead of
    O_RDONLY | O_NOFOLLOW (primary fix, filed upstream)
  • KWin: create zkde_screencast_unstable_v1 regardless of portal
    registration success (defensive fix, filed at bugs.kde.org)

Upstream reports

  • freedesktop/xdg-desktop-portal: #XXXX (primary — wrong syscall flags)
  • KDE Bugzilla: #XXXXX (secondary — KWin should not hard-depend on
    portal registration)

Useful diagnostic tool

If you want to check your own system’s full portal stack status:

# Checks all seven known screensharing failure modes, outputs JSON
bash wayland-screenshare-diag.sh

Script available at: [link to repo when published]


Tested on: Bazzite 43.20260406, KDE Plasma 6.6.3, NVIDIA RTX 5090,
driver 595.58.03 open modules, kernel 6.17.7-ba29.fc43.x86_64

Diagnostic update: Built a Rust/Tauri tool (wayland-spectre) that checks all 8 layers automatically. On Bazzite 43.20260406 + NVIDIA 595.58.03 + KWin 6.6.3 the finding is: screencast plugin loads fine but never registers zkde_screencast_unstable_v1 or ext_image_capture_source_v1 as Wayland globals. Tiled display (Dell UP3214Q, DP-4 + DP-5) is the correlating factor. NVIDIA forum thread: https://forums.developer.nvidia.com/t/331077