obs-studio
obs-studio copied to clipboard
Cursor doesn't properly disappear with Pipewire capture
Operating System Info
Other
Other OS
Fedora 34
OBS Studio Version
27.0.1
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/AUrBGETVVGn7lrbQ
OBS Studio Crash Log URL
No response
Expected Behavior
When the cursor disappears in the captured window/screen, it also disappears in the output.
Current Behavior
The cursor is still visible in the output.
Steps to Reproduce
- Open an application where the cursor disappears (for example OpenTTD or Minecraft)
- Add a Pipewire capture (either window or screen)
- See that cursor still appears in the output
Anything else we should know?
In OpenTTD (cursor in the bottom right):

In Minecraft (cursor at the top left of the pointer):

Just to confirm, did you uncheck "Show Cursor" on the source properties in OBS?

No, I did not uncheck "Show Cursor". That would do for OpenTTD, which provides its own cursor, but not for Minecraft, which has to display the cursor in menus/inventory.
I've been trying to track this down for months now. It is almost certainly a Mutter issue. For some reason, it keeps sending cursor data even when the cursor should be invisible. It seems not even https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1417 helped this case...
Is Minecraft perhaps switching from a custom cursor to the system cursor for things like the menus and inventory screen? If so, I'm not sure how that would be handled, at least on our end.
Edit: On Windows, Game Capture and Window Capture do capture the in-game cursor and the system (hardware?) cursor just fine as needed. I don't know the Linux specifics though.
@GeorgesStavracas Is there a Mutter issue I can subscribe to already? Or do you want me to open one?
Is Minecraft perhaps switching from a custom cursor to the system cursor for things like the menus and inventory screen? If so, I'm not sure how that would be handled, at least on our end.
Minecraft hides the cursor in-game and shows the system cursor in menus and inventory. OpenRCT2 and Julius use custom cursors, and the system cursor doesn't appear in the output.
PipeWire captures ask the desktop portal / compositor for metadata cursors. Compositors then send the monitor / window contents as the actual data of the stream, and the cursor is sent as metadata (position + size + texture) of each buffer of the stream. Games usually hide the cursor by setting an empty texture, and draw their custom cursors as part of the game itself.
In this case, what's happening is that the compositor keeps sending metadata cursors to OBS Studio, even when the game hides the cursor.
@GeorgesStavracas Is there a Mutter issue I can subscribe to already? Or do you want me to open one?
I suspect there already is one, but I couldn't find it. It would be fantastic if you could either report it at https://gitlab.gnome.org/GNOME/mutter/-/issues - thanks!
I opened https://gitlab.gnome.org/GNOME/mutter/-/issues/1852
Hi, i got the same. i fixed it and maked a video on it, please watch it. https://youtu.be/UDZ6hPgEOwQ
Is this really compositor issue? I am on KDE 5.26.4 and I am having same issue with OBS. When screen recording with OBS I can see SW or HW cursor when hidden. When i was testing screen sharing with firefox(https://mozilla.github.io/webrtc-landing/gum_test.html) I didn't see the red SW cursor

When screen recording with OBS I can see SW or HW cursor when hidden.
Chrome(and firefox?) hides cursors even when they are visible on screen. I can only presume they just hide the cursor after it hasnt moved for so many seconds. This is just wrong in a different way.
Opened https://github.com/obsproject/obs-studio/pull/8467