Bug 473275 - Desktop sharing makes mouse lag on Wayland
Summary: Desktop sharing makes mouse lag on Wayland
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.7
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2023-08-11 08:50 UTC by james
Modified: 2023-08-11 17:10 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description james 2023-08-11 08:50:51 UTC
SUMMARY

My system has an Nvidia 1080TI connected to two 4K displays. I am using the NVidia proprietary drivers (v. 535.98) and kernel 6.4.9-arch1-1.

When I try to share one of my displays, for example in microsoft teams, or using the test tool here: https://www.webrtc-experiment.com/Pluginfree-Screen-Sharing/#3987330391542372 then my mouse becomes incredibly laggy and makes the system virtually unusable.

Interestingly if I instead share a window, even a maximised window that takes up virtually the whole screen (minus the taskbar) performance seems fine so it doesn't seem to be performance constrained by hardware.

This problem only occurs in Wayland, everything is smooth in X11.

STEPS TO REPRODUCE
1. Go here: https://www.webrtc-experiment.com/Pluginfree-Screen-Sharing/#3987330391542372
2. Click share screen. Choose entire screen and then select one of your displays.
3. Try to move the mouse around and notice it is very laggy.

OBSERVED RESULT
Mouse lags making system unusable until screen sharing is turned off again.

EXPECTED RESULT
Mouse moves freely.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
NVidia proprietary drivers (v. 535.98)
Kernel 6.4.9-arch1-1.

ADDITIONAL INFORMATION
Comment 1 james 2023-08-11 08:59:05 UTC
Oh btw this is using Google Chrome: 114.0.5735.90 (Official Build) (64-bit).

I tried Firefox as well but the screen sharing is totally broken - it just shares a black screen with a cursor moving around but the contents of the desktop are not visible.
Comment 2 Nate Graham 2023-08-11 17:10:00 UTC
This should be fixed in Plasma 6 due to code changes to use a separate thread for input events.