obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
58.85k stars 7.83k forks source link

Mouse/Display lag after making a captured Mac app fullscreen can be fixed by changing the display's Color Profile. #7651

Closed attaboyBrad closed 1 year ago

attaboyBrad commented 1 year ago

Operating System Info

Other

Other OS

MacOS 13 [Ventura]

OBS Studio Version

28.1.0-rc1

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/qLu3FoRf7IuStVTy

OBS Studio Crash Log URL

No response

Expected Behavior

Consistent performance in OBS

Current Behavior

After making an app fullscreen and returning to windowed mode, the mouse and every app on that display lags horribly and OBS drops to single digit FPS.

Steps to Reproduce

The issue:

  1. Launch OBS with a ScreenCaptureKit source.
  2. Make the SCK captured app (or any app on the same display) full screen and then return it to windowed mode.
  3. Observe the terrible screen lag, mouse lag, and OBS performance that will remain as long as OBS is running even if you quit and restart OBS. I'm not even certain rebooting the Mac fixes it, but I didn't check.

The Remedy:

  1. Under 'Display Settings', change the Color Profile on the affected display to anything else (and probably change it back, but that's not part of remedying the above issue).
  2. Observe that optimal screen/pointer/OBS performance has resumed.

Anything else we should know?

I think it might have something to do with the way Spaces work with the ScreenCaptureKit API. Don't take my smooth-brained word for it though.

Here's a quick video where I reproduce the issue and the fix: https://youtu.be/J0stHr4EfR0

attaboyBrad commented 1 year ago
attaboyBrad commented 1 year ago

This issue may have something to do with a known WindowServer bug where mouse polling rates over 125hz produce inordinate CPU usage by WindowServer and input lag.

gxalpha commented 1 year ago

Please confirm that this is still an issue on the current version of macOS (13.2.1 at the time of writing). 13.0 has been known to have quite a few issues regarding ScreenCaptureKit.

attaboyBrad commented 1 year ago

I'm afraid I've moved and my setup has changed substantially since I filed the report, so I can't reproduce the conditions exactly, but I don't seem to be able to reproduce the issue now on 13.2.1 so I'll close the report. Please let me know if closing was not the appropriate action to take.

Thanks for your attention on this issue and for all your work on OBS!