Summary: | Frame swapping in WebRTC screensharing while moving the mouse | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | fililip <team> |
Component: | screencasting | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | aleksander, b2c, linx.system.adm, miranda, phantomshift, s+kde, scooterdelta, sophisticatedbystander, xaver.hugl |
Priority: | NOR | ||
Version: | 6.0.4 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
fililip
2024-04-24 16:45:11 UTC
Can confirm. Operating System: Arch Linux KDE Plasma Version: 6.0.3 KDE Frameworks Version: 6.0.0 Qt Version: 6.7.0 Kernel Version: 6.9.0-rc3-1-mainline (64-bit) Graphics Platform: Wayland Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor Memory: 31,3 GiB of RAM Graphics Processor: AMD Radeon RX 7800 XT I've noticed one more thing. Going to https://mozilla.github.io/webrtc-landing/gum_test.html and setting a high FPS value (like 60 or even 120) results in the "FPS now" metric severely dropping while moving the mouse. *** Bug 486578 has been marked as a duplicate of this bug. *** It appears this issue is specific to WebRTC (or any client checking the size of the buffer instead of the `SPA_CHUNK_FLAG_CORRUPTED` flag), since as of 6.0.3 (in this commit in particular https://invent.kde.org/plasma/kwin/-/commit/6000cca75640595385d4627735669be23119224f) kwin dropped the `spa_buffer->datas[0].chunk->size = 0;` assignment again, while as of writing WebRTC is still checking if the size of the chunk is 0 rather than the `SPA_CHUNK_FLAG_CORRUPTED` flag. https://issues.webrtc.org/issues/338232699 As mentioned in their report, OBS already started taking this into account a year ago (https://github.com/obsproject/obs-studio/pull/8793/commits/949f0b5209d8c4c0f879a9d7df3211eb83c0945e), which explains why OBS continues to work perfectly fine whereas anything using WebRTC is experiencing the bug. Thanks a lot for finding relevant information! I'll try to patch kwin and report back. It looks like https://webrtc-review.googlesource.com/c/src/+/349881 has been merged. Now we need to wait for Firefox and Chromium to make use of this WebRTC fix. This is now fixed in the latest Chromium build, you can check it out yourself by grabbing a build from https://download-chromium.appspot.com The fix is also merged in Firefox, expected to be included in the 128 release https://bugzilla.mozilla.org/show_bug.cgi?id=1896575 *** Bug 489959 has been marked as a duplicate of this bug. *** |