-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting booted from Dark Souls Remastered when window is invisible because "framerate is too low for online play" #6263
Comments
I think it's because invisible windows don't get rendered => they don't receive frame done events => the game thinks its FPS is 0. (Not sure if it applies to X11 windows at all, though.) |
The game likely blocks on eglSwapBuffers due to not receiving frame events. If it is timing rendering operations, it will seem like fps dropped to zero. |
Yeah. I just installed i3 to check and it was fine after leaving it for over a minute. |
Heh. That's actually me that filed that issue. They said it wasn't an XWayland bug, so I'm guessing it's a Sway issue? |
It's not ours either. |
Who's do you think it is then? |
It seems like the game's. It shouldn't really care about client frame rate when it comes to having a server connection. |
It's by design in wayland that hidden windows "stop" rendering, and it does make quite a few things break and/or bug out, particularly games (I also often have video meetings in chrome break if the window gets completely hidden). It happens in all wayland compositors and is not particular for sway. See also libsdl-org/SDL#4335 . |
We don't stop windows from rendering - a client is always free to render and submit frames which may or may not be shown. We do not send the optional frame events to hidden windows, as these events mean that it's a good time to start rendering your next frame for us. This is a feature, as it automatically save resources from useless rendering when windows are hidden anyway. Xwayland is in some regards just a Wayland client, and ends up inheriting some Wayland behavior. While refresh rate has always been variable, X applications might get slightly confused by the rate dropping all the way to You should be able to work around it by either disabling vsync in the game, or doing |
Note, Xwayland will fallback to a 1s timer when the compositor stops sending frame events. |
Turning off v-sync seems to fix the issue. Setting |
Another option may be to run the game in a nested gamescope Or sway would need a window config setting to generate frame events when they are hidden similar to the idle inhibition. |
I have a similar problem with AnyDesk. When I place it in a different workspace it stops receiving events, so when I switch back to it I see everything sped-up until it catches up. The same issue happens on GNOME as well, so if it's not XWayland I really wonder where the problem is |
It looks like there is an extension in the works to fix this: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/99 There is already a pull request by emersion: #6336 |
That protocol PR was closed, but it looks like this one is a continuation: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/276 |
A different version of surface suspension was merged through a new "suspended" xdg_toplevel state. See https://wayland.app/protocols/xdg-shell#xdg_toplevel:enum:state:entry:suspended |
@kennylevinsen Ah, great. So will this particular problem be fixed soon, or does that protocol not fix the issue? |
The refresh cycle protocol you link is more flexible, but it still requires clients themselves to run their own timers. If you want a solution now, I imagine setting up gamescope should sort it out. |
So is this something that should be fixed in the Wayland version of Wine? |
Sway Version:
1.6
Debug Log:
https://gist.github.com/PopeRigby/2f047584dec4988b460a2aab7559d2e1
Configuration File:
I was able to reproduce with the default configuration file
/etc/sway/config
Description:
To be clear, this only happens when the game window is invisible. It never happens when I'm playing the game.
The text was updated successfully, but these errors were encountered: