Bug 439577

Summary: kwin_wayland: no mouse cursor is captured in webrtc screen share through pipewire in Firefox or Chrome
Product: [Plasma] kwin Reporter: Chang Liu <goduck777>
Component: platform-wayland-nestedAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: eric1, kde, nate, postix
Priority: NOR Keywords: wayland
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=452960
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Chang Liu 2021-07-07 00:22:43 UTC
SUMMARY

Related: https://bugzilla.mozilla.org/show_bug.cgi?id=1672944#c26

Kwin seems to have a capability to capture mouse cursor when doing screen capture through pipewire (it works well in obs). However, it does not work for webrtc in either Firefox or Chrome. It seems that kwin is not advertising the availability of the embedded cursor mode so webrtc just ignore this functionality.

See the webrtc code: https://webrtc.googlesource.com/src/+/refs/heads/main/modules/desktop_capture/linux/base_capturer_pipewire.cc#1035

STEPS TO REPRODUCE
1. Start KDE Wayland session
2. Start Firefox
3. Start a a webrtc screen capture through pipewire

OBSERVED RESULT

No mouse cursor is captured

EXPECTED RESULT

Mouse cursor should be captured

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.21
Comment 1 postix 2022-04-14 12:37:19 UTC
Can confirm.
Comment 2 postix 2022-04-15 14:51:28 UTC
See also "Better mouse cursor support" [1]

[1] https://jgrulich.cz/2022/02/16/webrtc-journey-to-make-wayland-screen-sharing-enabled-by-default/
Comment 3 Chang Liu 2022-04-15 14:57:45 UTC
I later found that this bug only occurred in Firefox. For Chrome everything works fine.

I opened a bug report at Mozilla to push them to update the webrtc library.

https://bugzilla.mozilla.org/show_bug.cgi?id=1745610
Comment 4 David Edmundson 2023-07-07 12:36:44 UTC
>It seems that kwin is not advertising the availability of the embedded cursor mode so webrtc just ignore this functionality.

Do we have anything to verify that statement? It so far all sounds client side. Things work against our own small test apps
Comment 5 Bug Janitor Service 2023-07-22 03:45:02 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2023-08-06 03:45:07 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!