-
Notifications
You must be signed in to change notification settings - Fork 175
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
lag spikes after 25-40 minutes of playing on linux #11446
Comments
Can confirm the findings of that thread on KDE Tumbleweed Wayland. It started happening around the time "record your game" rolled out for me. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Pulling this from a reddit topic I saw where the user also had the issue, may be relevant: "When I run 'top' in the terminal I see the game running 'engMain', when I have it focused, the %CPU will show somewhere between 300 - 400 when not moving my mouse - the game runs fine. When I touch my mouse the %CPU value plummets to about half of whatever was initially shown and the game stutters. This does not happen when the game is initially started" |
I'm the one who started this recently in the other repo issues and I can confirm that it is still happening. You can get rid of this by using
Exactly. |
Also happens to me on gnome 47, Wayland, fedora 41, Nvidia 560 and 565, started happening when the game recording update came out. |
@kisak-valve I just want to add that this also happens when the overlay is turned off through the Steam UI. (with also both game recording and steam input disabled as well, from the UI of course) |
Having the same problem, started after the Steam Game Recording update as well, enabling the overlay fixed the problem. |
I've had this issue for years ValveSoftware/csgo-osx-linux#2901 but I only play 1-2 games, so after CS:GO moved to CS2, the issue went away. But for years, CS:GO using DXVK native required |
gameoverlayrenderer.so most likely culprit |
It definitely is. |
But many of us have the steam overlay and recording feature turned off in the options. So why would it even load that? |
That's probably part of the bug. /environ shows that the library still loads even though those things are turned off. Hence why |
While it does seem like people have helped corner the source of the issue, I figured a little more information couldn't hurt. Note that using LD_PRELOAD as SheMelody suggests appears to have fixed my issues, will need to test further to confirm but initial tests has been very promising. A huge thank you to them as when I look further at this issue it's clear they put in a lot of legwork on trying to help pinpoint this issue. After the steam update about a week ago, the one that apparently added in additional recording features as well as updated to runtime environments scout, soldier and sniper, both of my linux systems would have issues playing games through proton. I'd notice the odd tiny bit of jitter while playing, but after 20-50 minutes (depending on game and game settings) I'd start getting horrible framerate drops whenever I...
The stuttering would last for about a second after the input stopped, and if the input was just a single key press that was held for a few seconds it would stop. As I had a controller connected I switched to that and the game I was playing (subnautica) ran perfectly smooth, went back to mouse and keyboard? Stuttering. This stuttering also appeared to be framerate only, as on the main menu of one of the games (Again, Subnautica) the mouse cursor would move smoothly, but the background animations would stutter like mad while I was moving the cursor once I had hit this 'time to stutter' threshold. So whatever issue is involved with this overlay issue is also tied with mouse and keyboard input. At least on my end after some testing. What I did not do is continue using the controller for another 50 minutes or so to see if there's some sort of 'input buffer' that fills up with a specific kind of input that would cause the controller input to start lagging. This was also exclusive to steam, as I have games that run natively on linux or I use regular WINE for that do not suffer this stuttering issue. I'll also give additional system information on both of my systems below, the only thing that unifies the two systems is that they are linux, are AMD CPU and graphics and the three games I tested had some sort of internet traffic, though both machines run on completely different internet connections (wired/wi-fi) and ISP's. Desktop (Tested with Subnautica with Archipelago multi-world randomizer):
Laptop (Tested with Helldivers 2 and Mechwarrior Online):
Steam overlay has been entirely disabled through the Steam UI on both PC's as well. |
Yes, LD_PRELOAD="" fixes it for me as well, but do I need to put it in the launch options for every game or can I set it globally? |
Do not set it globally, no. |
I've been having the same symptoms using conty_lite.sh w/ Slackware current from the 8th Nov or so: Subnautica becomes unplayable slideshow after 1/2 hour to an hour (playing with kb/mouse). After the LD_PRELOAD workaround this seems to have gone away. Thanks for that! I still see "ERROR: ld.so: object '/home/pete/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored." with the workaround in place and overlay disabled for the game and then disabled globally. Wonder if it's some byproduct of setenv changes ? |
Disabling steam game recording on a per-game basis through its settings UI seems to solve this issue for me without losing other things. (Game tested: Warframe) |
If you're using gamemode you can just use this hack to temporarily hide gameoverlayrenderer.so from the game without messing with other libs: ~/.config/gamemode.ini
UPD. No, it isn't the best approach because gamemode doesn't wait for script to exit so it's possible it'll launch the game before the lib is hidden. |
Had similar issue with The Witcher 3. After 30-50 min of smooth playing, the game stutters significantly with constant FPS drops. |
TBH: if all you want to add to the bug is "oh yeah i had that issue too and the solution helped me" please just click the thumbsup in the initial post in this thread. those comments do not add any more useful information to the issue. Thank you in advance. |
I want to add that doing |
It took me months to figure out the cause of the issue and even consider it was a Steam issue. I first thought it was a problem with a Dark Souls 3 mod. Then it happened in Talos Principle, but since the game ran awfully anyway, I didn't connect the dots. Then it happend in Ratshaker and I realized it might be a systematic issue, but googling around didn't yield any useful results. I think it happened in Monster Hunter Rise too. Only after it happened in Armored Core VI and I realized it only happened when I moved my mouse, did I eventually stumble across this GitHub issue after multiple search sessions. And I only did because I played Armored Core with KBM instead of controller, since using a controller and not touching the mouse did prevent the lag in my case in that instance. That is to say that people might just be lucky and while their game and system might be succeptible to this issue, they might not be affected by it because of a combination of factors. I am on Nobara Linux 41, and the listed games here are affected on my end. The only games I played since this started happening I do not remember having issues were 2D games like Balatro or Ballionaire. |
The more data we have, the more we and steam devs will be able to reproduce and pinpoint the true root cause. |
I'm going to do tests in more games when I have an opportunity. My distro is CachyOS and my GPU is an RTX 4070 Super. |
ArchLinux, RTX-3050, Steam itself - everything is OFF (including GPU animations) which can be off. Also I tried to kill steam's webhelper, it didn't help. "Fix" just fixes all games at once. I have only mouse & external keyboard connected to the laptop. No more devices. |
Tested using 2 computers with Steam Overlay enabled on Arch Linux |
Thank you for the heads up about steam-native-runtime. I'll give that a try after I test other games to see if it'll solve the issue for me. I still want to provide info to make sure this gets addressed for other users. |
Make sure you've shutdown steam completely ( I haven't ran into this issue in neither Sway nor KDE6 (both uses Wayland). |
This comment has been minimized.
This comment has been minimized.
Makes absolutely no difference aside the overlay displayed or not in-game, it is still loaded for the game executable be it 32bits or 64bits version. Besides, i could reproduce the issue with the overlay disabled, the 32bits library deactivated and only the 64bits one loaded.
With option enabled:
With option disabled:
|
My information was simply incorrect, ignore it.
Update. |
I've left several games running for long lengths of time, and none of them seem to exhibit the issue. My problem might be isolated to the Kingdom Hearts games, which honestly tracks given they just have tons of jutter problems. I know this kind of behavior doesn't happen in Windows, though. To have everything in one place; For reference, here's what I've ran; I'm using Gamescope with the Kingdom Hearts collection as well. I could try playing the KH games run without gamescope. For now I'm going to try playing them with the native runtime version of Steam. |
I have researched/pinned down the more finer details of this issue as far as I could. After enabling logging, I understand that steam uses shared memory IPC to communicate between threads/processes. Its more likely that some sort of producer/consumer code pattern is used such that both parties interacting with the shared memory have to not overstep each other. It seems that somewhere along the lines one is overstepping thus causing a gradual filling of the shared memory buffer causing one side (the producer/writer in this case) to wait, thus the blocking wait introduces delay in the frame until it quickly times-out. This means I think the fault might lay in steam executable (it is not reading as fast as the gameoverlay is writing?) more than in the gameoverlay.so as had previously thought. I mean it is the interaction between the gameoverlay/gameprocess and the steam process contestion of said shared memory resource which is the issue. Code issue could be either side. Of-course as we do not have the source code, my contribution is very little and mostly guessing in the dark, but I share this in hope it speeds up any said effort to get this bug fixed. |
Got the same issue with the native linux builds of tf2 and gmod. Disabling the overlay fixes it for gmod, but that also seems to completely disable the new game-recording feature. |
I'm using Arch with Kernel 6.12 + Gnome/Wayland + AMD Ryzen 7000 and AMD 7900XTX. After playing Is setting |
I did that and don't have the same problem with TESO any more. Stable many hours plays. |
The reason for the issue is explained for the most part in this thread, any fix will need to be done by Valve, since the issue is part of the steam client. I don't know if it's correct to call it an "official" fix, but it works, and I have seen Valve employees point people to this thread. |
The proposed solution seems not to work for me: I've added |
Can you access the in-game overlay when playing the game? If you added |
I've reinstalled my whole OS, twice, in hope to fix this issue, before I found this page. 🤦 After I enabled Steam Overlay the problem is gone. 🥳 |
No, the overlay is not available ( But as I said before, this seems to have no effect on the "game stutters after 30 minutes when moving the mouse"-effect 😉
Wait, what!? ENABLING the overlay was what solved your problem? |
@BorisBrock use |
@BorisBrock yes, enabling steam overlay fixed the issue for me. I had it disabled since... basically forever, because I never used it and it caused some issues few years ago. Then I got Steam update and started to have massive input lags and low FPS when moving mouse after about 30 minutes of play. I thought that there is something wrong with my OS or PC, tried a bunch of nvidia drivers, kernel versions, switched between wayland and X11 and even tried different Linux distros. This issue was grinding my gears for MONTHS. Then I tried what @rafaberaldo wrote here - I've enabled steam overlay (also set game recording to start on Shift+F11) and after that I was able to have a few-hours play session without any issues. It's been few days now since I did this and everything is still running fine. |
Hmm...looks like overflow in consumer/producer pattern than. If overlay is disabled it does not consume, but |
Yes, this has been said already, I stopped having this issue as soon as I reactivated the overlay. |
These are the 2 most common workarounds in this thread, I would avoid replying with "this worked for me" as these are known workarounds that seem to work for most people who have this issue:
There are some other workarounds, if you want to adventure yourself, like chowning and chmodding the 64-bit gameoverlayrenderer.so, like here: #11446 (comment) As pointed out on #11446 (comment), the actual fix probably needs to be done by valve, as the issue is in the steam client libraries. (I'm tired of receiving the notifications of people discovering these workarounds again and again) |
A lot of details are already collected in:
doitsujin/dxvk#4436
it could be related for a LD_PRELOAD added for the "record your game" feature?
the workaround while we wait for the fix
please see this comment for all the details doitsujin/dxvk#4436 (comment)
The text was updated successfully, but these errors were encountered: