https://bugs.kde.org/show_bug.cgi?id=522041

            Bug ID: 522041
           Summary: KWin screencast of 4K@240Hz monitor causes severe CPU
                    load and system sluggishness (Plasma 6.7 regression,
                    NVIDIA Wayland)
    Classification: Plasma
           Product: kwin
      Version First 6.7.0
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: screencasting
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY
-------
After upgrading to Plasma 6.7 on Fedora 44, sharing my primary 4K monitor 
through the xdg-desktop-portal-kde screen share picker causes severe 
system-wide sluggishness. Sharing a single application window on the same 
monitor, or sharing either of my two smaller 1080p portrait monitors, does 
not cause the same problem.

Performance profiling shows KWin (kwin_wayland) CPU usage increases 
significantly when capturing the full 4K output vs. a single window, with 
combined KWin + client CPU exceeding 200% during full-monitor capture.

This did not appear to be an issue before upgrading to Plasma 6.7. The portal 
picker UI also changed in 6.7, adding "Share full Workspace", "Share virtual 
screen", and "Share region" options.


STEPS TO REPRODUCE
------------------
1. Boot into KDE Plasma Wayland session
2. Open Discord (or any app requesting screen share via xdg-desktop-portal)
3. Click "Share Screen"
4. In the KDE portal dialog, select "Share 'LG Electronics LG ULTRAGEAR+
(DP-3)'"
5. Start the stream
6. Observe: severe system sluggishness, low desktop FPS, unresponsive UI

For comparison (no sluggishness):
  (a) Select a single application window on DP-3 instead of the full monitor
  (b) Select either 1080p portrait monitor (DP-1 or DP-2)


EXPECTED RESULT
---------------
Sharing a single monitor should not cause severe system-wide performance 
degradation on an RTX 3070 system.


ACTUAL RESULT
-------------
Full DP-3 monitor share causes severe sluggishness. Window share on the same 
monitor and full share of smaller monitors work acceptably.


PERFORMANCE DATA
----------------
Captured via: top -b -n 3 -d 2 | grep -iE 'kwin|pipewire|discord|plasmashell'

A) Full DP-3 monitor share (PROBLEMATIC):
   Discord (PID 36245):      140–149% CPU
   kwin_wayland (PID 11916):  66–71% CPU
   pipewire (PID 1645):       0–1.5% CPU
   Combined:                  ~210%+ CPU

B) Single window share on DP-3 (ACCEPTABLE):
   Discord (PID 36245):      127–129% CPU
   kwin_wayland (PID 11916):  42–54% CPU
   pipewire (PID 1645):       0–1.5% CPU
   Combined:                  ~175% CPU

Delta (full monitor vs window):
   kwin_wayland: +20–25% CPU  (primary KDE-side cost increase)
   Discord:      +15–20% CPU
   pipewire:     no meaningful difference (not the bottleneck)

The KWin screencast overhead for full 4K@240Hz output capture appears to be 
the primary compositor-side regression. PipeWire itself consumes negligible CPU 
in both scenarios.


REGRESSION
----------
Appears introduced with Plasma 6.7 upgrade. Not observed on Plasma 6.6.x.

Packages updated around when issue started:
  plasma-workspace-6.7.0-1.fc44       (2026-06-17)
  kwin-6.7.0-1.fc44                   (2026-06-17)
  xdg-desktop-portal-kde-6.7.0-1.fc44 (2026-06-17)
  xdg-desktop-portal-1.22.1-1.fc44    (2026-06-22)
  pipewire-1.6.7-1.fc44               (2026-06-20)


ENVIRONMENT
-----------
OS:            Fedora 44 (Forty Four)
Kernel:        7.0.12-201.fc44.x86_64
Session:       Wayland
GPU:           NVIDIA GeForce RTX 3070, driver 595.80 (proprietary, akmod)
KWin:          6.7.0
Plasma:        6.7.0
Portal:        xdg-desktop-portal 1.22.1, xdg-desktop-portal-kde 6.7.0
PipeWire:      1.6.7
Discord:       1.0.143 (native RPM)

Display setup (3 monitors):
  DP-3: LG Electronics LG ULTRAGEAR+
        Native 3840x2160 @ 240.08 Hz, logical 2560x1440, scale 1.5, VRR:
Automatic
  DP-1: LG Electronics 27GL650F
        1920x1080 @ 143.98 Hz, portrait, scale 1.0, VRR: Never
  DP-2: LG Electronics 27GL650F
        1920x1080 @ 143.98 Hz, portrait, scale 1.0, VRR: Never


WORKAROUNDS
-----------
- Share individual application windows instead of full monitor
- Share DP-1 or DP-2 portrait monitors (no issue)
- KWIN_DRM_NO_DIRECT_SCANOUT=1 not tested permanently (concern about fullscreen 
  game latency impact)


ADDITIONAL NOTES
----------------
- Issue is reproducible via Discord but likely affects any portal-based 
  full-output screencast
- journalctl shows repeated plasmashell "Failed to connect to PipeWire" errors, 
  though pipewire service is running and shows negligible CPU during capture
- New Plasma 6.7 portal options (Workspace / virtual screen / region) coincide 
  with when issue was first noticed

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to