Xwayland: Celeste captured at 10 FPS by OBS on sway
Celeste is an X11 game. On Wayland (with the sway compositor) Open Broadcaster Software (OBS) always captures it at around 10 FPS regardless of the OBS FPS setting. On X11 with the exact same setup it's captured at 60 FPS as it should be.
I initially created this issue on the OBS tracker, and discussed with sway developers (@emersion, @ascent), and the conclusion was that this could be an Xwayland issue.
OBS issue: https://github.com/obsproject/obs-studio/issues/2323
Copying the rest from there.
Steps to Reproduce
- Install sway.
- Launch Celeste.
- Have OBS capture it via Xcomposite.
- Observe the OBS window to see that Celeste updates at 10 FPS, or try capturing to check the output file.
Additional information
No other X11 games or applications I captured thus far had this issue (everything captured at the correct FPS).
I tried running Celeste in a child sway running via the X11 backend (so Celeste was running via Xwayland inside sway, which was an X11 window itself running via Xwayland in the parent sway) and capturing this child sway's X11 window via OBS to observe this odd behavior:
- the issue was still present,
- whenever I was moving the mouse cursor around in the child sway, OBS would capture it at 60 FPS, giving me smooth Celeste capture only while the cursor was moving.
You can see a video recording demonstrating the above here: https://youtu.be/5B4z-YOwp04
This leads me to believe there's some issue with OBS not "seeing" that Celeste has pushed a new frame and thus falling back to some kind of a 10 FPS timer.