If you’d like to know more about this bug, I’ve had it before, here’s another post of mine showing it: https://lemm.ee/post/63660749
If you’d like to know more about this bug, I’ve had it before, here’s another post of mine showing it: https://lemm.ee/post/63660749
Maybe that’s what I’ve been getting when I’m playing Cult Of The Lamb from Steam in Linux, which is a 2D game so hardly taxing my machine.
Didn’t notice anything like that on my GOG games started from Lutris.
This particular bug (from the OP) only affects games that use a lot of rapid mouse and keyboard inputs over the period of an hour or two.
And it only happens (weirdly) when you launch from steam, but have Steam Overlay turned off.
When launching from Steam, there is a layer that captures all keyboard and mouse inputs before they get to the game (for example, for capturing hotkeys to show the steam overlay). A separate layer called vulkan-steam-overlay (that is responsible for rendering the overlay over the game) periodically clears the input buffer so it doesn’t get too big. If steam overlay is disabled in settings, the input-capture layer is still used, but the vulkan-steam-overlay layer is not used. So the input buffer captures all inputs and never gets cleared, it gets so big it needs to start paging to disk. That is what introduces the lag spikes after an hour or two.
Launching from Lutris doesn’t use that input-capture layer, so that’s why it’s not affected.
I play Cult Of The Lamb with mouse and keyboard and the Crusades (basically sequences of fighting arenas) tend to be kinda insane in terms of the intensity with which you have to use them, so it makes total sense.
By the way, thanks for the very complete explanation.
My gut feeling told me it was some kind of memory leak (because those things tend to manifest themselves after some time of using the software, with some randomness on how long it takes for it to happen) but when I looked around I couldn’t find an explanation of its mechanism.
By the way the suggested workaround of adding LD_PRELOAD=“” in the Launch Options for the game seems to work.
Maybe the way those input capture layers work is by putting their input handling methods ahead of the default ones via LD_PRELOAD and forcing LD_PRELOAD to be empty means they’re not in the input processing pathway anymore?! (In all fairness, I can’t be arsed to dive into that codebase ;))
Thanks for mentioning that.
As I consider getting back into Linux desktop despite 30 years of just using Linux via ssh, lutris seems to be part of my plan. It’s just GoG and WoW anyway, and I’m glad to know the perf may not be impacted by this bug. So thanks.
Yeah, I was in a very similar situation as you some months ago (decades of using Linux on an off for fun or at work mainly via command line), did the jump on my gaming PC and because my games are mainly from GoG went down the path of Lutris as a launcher for those games and am very happy with it, especially since it’s both integrated with GoG so can fetch your games from them AND it can handle the offline installers (you just do install from EXE and then chose the GoG script for that game to configure it).
In overall, the rate of failure or even just the rate of hassle (having to go and tweak stuff myself with Winetricks) is very low for GoG games as Lutris already comes with scripts for the vast majority of them that do the necessary Winetricks configurations automatically at the end of install plus in my experience it’s the DRM in games that generally screws Wine compatibility (to the point that at least one of my Steam games won’t work at all in Linux, but the pirated version of the same game works just fine),
There’s also benefits like being able to run the games wrapped in a firejail sandbox that disables networking and disables access to a bunch of other system features for security and privacy that you don’t have either with Steam or in Windows.
No idea how it handles WoW though, it’s been maybe a decade since last I used it.
Lutris and GoG is great.
You can log right into your GoG account via lutris and have immediate, in lutris, access to all the games you own to download/install and play.