obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

Cursor doesn't properly disappear with Pipewire capture

Open rmnvgr opened this issue 4 years ago • 10 comments

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

  1. Open an application where the cursor disappears (for example OpenTTD or Minecraft)
  2. Add a Pipewire capture (either window or screen)
  3. See that cursor still appears in the output

Anything else we should know?

In OpenTTD (cursor in the bottom right): openttd

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

rmnvgr avatar Jun 13 '21 20:06 rmnvgr

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

Screenshot from 2021-06-13 19-06-42

RytoEX avatar Jun 13 '21 23:06 RytoEX

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.

rmnvgr avatar Jun 14 '21 06:06 rmnvgr

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...

GeorgesStavracas avatar Jun 14 '21 20:06 GeorgesStavracas

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.

RytoEX avatar Jun 14 '21 20:06 RytoEX

@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.

rmnvgr avatar Jun 14 '21 20:06 rmnvgr

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 avatar Jun 14 '21 20:06 GeorgesStavracas

@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!

GeorgesStavracas avatar Jun 14 '21 20:06 GeorgesStavracas

I opened https://gitlab.gnome.org/GNOME/mutter/-/issues/1852

rmnvgr avatar Jun 14 '21 21:06 rmnvgr

Hi, i got the same. i fixed it and maked a video on it, please watch it. https://youtu.be/UDZ6hPgEOwQ

DDE-64-bit avatar Nov 27 '22 21:11 DDE-64-bit

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

image

DanielGaaA avatar Jan 04 '23 22:01 DanielGaaA

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.

kkartaltepe avatar Mar 01 '23 15:03 kkartaltepe

Opened https://github.com/obsproject/obs-studio/pull/8467

rmader avatar Mar 14 '23 12:03 rmader