It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
I'm running West of Loathing on Ubuntu 16.04.3, 64-bit. The "Lock framerate to 30" option in Video Options does not work; if I try to enable it, it will be unchecked next time I open the Video Options menu.

The reason I want to lock the framerate is because the game is causing heavy UI lag when I alt-tab away from the game, which makes it near impossible to multitask while playing. I suspect this is happening because the framerate is ungoverened. The main evidence I have of this is the game uses *more* CPU when it's minimized than when it's visible.

With the main menu open and game in *foreground*, vmstat output:

$ vmstat -w 2
procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 0 0 5535400 872664 6751404 0 0 77 76 170 30 23 7 70 0 0
1 0 0 5535276 872664 6751404 0 0 0 0 1626 13791 12 17 70 0 0
1 0 0 5534904 872664 6751404 0 0 0 6 1552 12917 12 18 70 0 0
1 0 0 5534860 872664 6751404 0 0 0 0 1597 13084 12 18 70 0 0
1 0 0 5534872 872664 6751404 0 0 0 0 1563 13233 12 17 71 0 0

Same situation but with the game *minimized*:

procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------
r b swpd free buff cache si so bi bo in cs us sy id wa st
2 0 0 5519364 872676 6754744 0 0 76 76 172 61 23 7 70 0 0
5 0 0 5518408 872676 6754744 0 0 0 0 5134 105641 38 7 55 0 0
1 0 0 5518048 872676 6754744 0 0 0 0 5331 108265 38 6 56 0 0
3 0 0 5518048 872676 6754744 0 0 0 8 5872 113969 38 7 55 0 0
2 0 0 5517892 872676 6754744 0 0 0 0 5535 112499 38 6 56 0 0

The "user" CPU time goes up from 12% to 38%, an increase of 25 percentage points. This is on a CPU with 4 hyperthread cores, so that 25 point increase is equivalent to 1 whole busy core. Notice also the massive increase in context switches (from ~13000 to ~110000) and interrupts (~1600 to ~5500).
Post edited November 20, 2017 by Voltara
This question / problem has been solved by victorcaimage
Heya. I've forwarded this info to the Unity programmer, we'll see if we can figure out what's happening.

Sorry about the issues. Thanks a lot for the details! Linux folks always give the best bug reports. :)
Hello,

I've reproduced the behavior you describe, fixed the Lock framerate to 30 option, and now the behavior can be almost completely removed by turning the option on. We'll be posting a patch to fix this, I hope within a day or two.

More information:

Most of my testing was with the game running in full-screen mode, which I believe that you are doing as well. I did try running in a window, and that caused the vmstat output to remain high even when the game had focus. Again, with the patch the behavior was much better.

The option is mis-named right now. What it really will try to do is lock the framerate by allowing the game to render only every other refresh - 30 FPS on a 60hz monitor. When the option is not active, the game is still only asking to render once per refresh.

Unfortunately, this is not a feature that can be demanded by the game engine, only requested. The window manager will sometimes disable it. I don't know the details of why that is, but I have read that it is related to the WM composing the desktop and applying window effects. Whatever the reason is, the effect is that the game's rendering loop is not always limited the way we would like. Instead, the game ends up drawing whenever it can, mostly at the whim of the WM.

- Victor
Thanks for looking into this. I'm looking forward to trying out the changes!