Check out our Monthly Survey Page to see what our users are running.
Lag spikes every 10 seconds on every game
Page: 1/2»
  Go to:
linucas Jul 31, 2022
I am having a huge lag spike every 10 seconds on every game
The only thing I found that kinda solved this was using kernel 5.15 LTS, but it started happening there too two days ago.
Mango hud frame time graph goes like this: _______|__
This happens across different distros and desktop environments.
Please let me know if I can share any helpful information!
peta77 Jul 31, 2022
I had such an effect a while ago too. The reason for me was that I had configured to periodically change the desktop background which is then still happening also when some "fullscreen", foreground application is running. Disabling that solved it for me.
Other than that you could look if you have some cronjobs running at that interval or if it matches your email-client's mail-check interval and other applications / services you have running.
You can also try running top in batch mode and then see through the log if you can find some process that pops up in that interval....
Well, that's it with ideas so far... So:
Good Luck.
denyasis Jul 31, 2022
By chance is it proton/wine? I seem to remember someone having a similar issue on the discord within the last week or so. I think it was an issue with the dxvk cache in proton. Deleting the cache file apparently fixed it (minus some stuttering on first run as the cache is rebuilt).

I tried searching for it to find the discord posts, but I'm extremely new to discord(and chatrooms) and very bad at navigating it.
linucas Aug 1, 2022
It happens with both native and proton/wine games
I ran top like peta77 said and systemd-udevd appears at the same time as the spikes happen
Running udevadm monitor I get this:

 
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[598.533351] change   /devices/pci0000:00/0000:00:01.0/0000:04:00.0/drm/card0 (drm)
UDEV  [598.539504] change   /devices/pci0000:00/0000:00:01.0/0000:04:00.0/drm/card0 (drm)
KERNEL[608.769206] change   /devices/pci0000:00/0000:00:01.0/0000:04:00.0/drm/card0 (drm)
UDEV  [608.774424] change   /devices/pci0000:00/0000:00:01.0/0000:04:00.0/drm/card0 (drm)

I don't know where to go from here

Last edited by linucas on 1 August 2022 at 1:32 pm UTC
peta77 Aug 1, 2022
So, next step would be to find out what device that is, simply search for the id-string in the output of lspci. But drm (direct rendering management) suggests it could be your GPU.

If it is your GPU: Did it every work fine or was it bad from the beginning? I.e. did it start happening after an update of kernel / driver? You already tried using a different kernel, did you also try to downgrade your driver or pick one from a different branch (stable, production, beta, features, ... whatever there is...)?
linucas Aug 1, 2022
It is indeed the GPU (Asus R7 240 if it helps)
I noticed the issue just as I installed it earlier this year
I was using kernel 5.4 LTS at the time because my mic works better with it
It also happened with the main kernel and latest LTS (I don't remember the exact version number). The only thing that solved back then was usin the zen kernel.
Then it started happening on zen a few weeks ago and was fine on LTS 5.15.
Now I get this on all of them.
note: I am using amdgpu driver so I get vulkan support, but the spikes happen with the radeon driver too.
Ehvis Aug 1, 2022
Faulty monitor cable?
linucas Aug 2, 2022
Quoting: EhvisFaulty monitor cable?
DUDE! I just plugged it off while running udevadm monitor and it stopped reporting the changes.
Will try a different cable tomorrow
linucas Aug 3, 2022
So I did some more testing and now it is working consistently on kernel 5.15 lts (I don't remember doing anything of much), still bad on 5.18.
It is to the point that I rebooted multiple times just to check.
Could this have anything to do with the act of installing/updating the kernel packages?
Also since it is now working fine again are there any logs I should get to make comparisons?
peta77 Aug 3, 2022
Well there's multiple reasons why an up/down/up/down...grade of packages might fix things... so, yes, that can be a reason why it now works...

To make sure it's not an hardware issue - besides the cable (if you changed that) there still can be thermal or power supply reasons - you could run a stress test... the unigine benchmarks are still quite good for that: superposition, heaven, valley are the ones to try.. and they even aren't that boring to look at... you can get them for free at their homepage: Unigine Benchmarks Page
if they run stable and your GPU doesn't overheat (it will get at maximum levels though!), you shouldn't have any issues anymore
linucas Aug 12, 2022
Sorry for not answering before, the spikes were giving me nightmares so I stepped out a bit
I was wrong, the spikes did not went away, only the udev messages (they still appear on 5.18)
But I brought my GPU and SSD to test on my father's PC just to check if it wasn't any incompatibility with my setup, and the spikes happen there too.
This was until I decided to try using the HDMI port instead of VGA and the spikes stopped and everything was fine.
I still think this is software related because the issue doesn't happen on Windows, but I can't figure out what it is exactly.
I can't simply use the HDMI output because my monitor only has VGA and DVI ports (and DVI cables are a bit expensive)
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.