Unfocused XWayland applications drop to 1 FPS on SwayWM
- OS: Arch Linux
- Window Manager: Sway
- GPU: RX 5700 XT
- CPU: Ryzen 7 3700X
When I unfocus the the window of an XWayland application, the FPS will drop down to 1. Refocusing the window causes the FPS to climb back up to 60. I've been able to reproduce this issue in both Dark Souls 2 running through Steam Proton, and projects running in Godot engine.
At least with Godot, disabling v-sync seems to eliminate the issue. Also, this problem only seems to happen on SwayWM, because running the Godot game with GNOME didn't reproduce the problem. Here's a video of the problem happening in Godot:
For Dark Souls 2, I realized it was happening because every time I unfocused the game and came back to it there would be a message about my framerate being too low for online play.