Micro stutters on laptop with NVidia graphics

SUPPORT

I have been experiencing some extremally annoying stuttering every few seconds in some games (war thunder, and kerbal space program). The overall performance should be good, as with disabled vsync I can get way over 100fps, but it still stutters, making gameplay difficult.

As for my setup: It is a laptop with intel i7 processor with NVidia 1050M graphics. I use prime-run to enable discrete graphics.

I have tried the following so far:

  • Changing graphics settings in games
  • Using different desktop environments (Gnome, xfce with compositing on/off)
  • Downgrading kernel from 5.9 to 5.8 and nvidia drivers from 455 to 450 with all combinations
  • Moving games from HDD to SSD

I also tried to add some xorg options, but they seems to be not taken into account (probably due to switching graphics).

Nothing helps - the stuttering is still present. I thought it is war thunder specific, as they moved to vulkan recently, but the stutter also appears in KSP, so it seems to be my setup related.

I honestly run out of ideas, and there seems to be no solution to my issue on the arch wiki.

​

What should be the next steps? What else can I try?

Posted Dec 15, 2020, 10:19 PM UTC

49
el_derrotado•

I had a very similar issue 2 years ago, except instead of micro stutters it wouod full blown lock up for 5 or 10 seconds before resuming 60+ fps fluid gameplay for another few seconds. I couldn't do shit because of it. I eventually found a guide that showed me how to enable PRIME full-time and it fixed everything. Since I never use the battery I have no need for lower power gpu so there are no downsides for me.

2
devastator_pcOP•

I tinkered a bit with switching graphics some time before, and now I use solution that does does not turn discrete card off. Still - I have that stutter. And ~60fps.

1
V1delSupport Staff•

Did you enable prime sync via the nvidia-drm.modeset=1 kernel parameter?

Other than that I've often had that issue with the default CFS scheduler.

Try a more responsiveness/desktop focused kernel like linux-zen or -tkg or -ck zen is in the repos the other ones are in the AUR and/or other repos.

For any of those you will need to use the linux-headers package corresponding to the kernel (i.e. linux-zen-headers) and the nvidia-dkms package to have the driver built for the respective kernel

2
devastator_pcOP•

I will need to check that modeset parameter.

As for different kernels - good idea. If all else fails, I'll go check them.

One more question - I have seen in some places adding parameters in xorg config, in Screen section, like this one:
Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"

Now, that I have by default enabled the intel GPU (so the config points to intel "device"), and the NVidia is enabled on demand via prime-run - how can I pass that parameter there? Or will it work regardless, and I just don't understand how it works? :)

1
V1delSupport Staff•

Not gonna work with this particular example and comparatively useless in this usecase, regardless of what you are doing, the intel gpu is the final passthrough and is the one that's responsible for rendering/applying a potential compositing effect to the final image.

You can technically set them and they will be logically set in the background but I doubt the composition pipeline is something you want here. The nvidia card does not have knowledge of a screen to synchronize on

2
devastator_pcOP•

I have tried the linux-zen (with linux-zen-headers) - no change unfortunatelly.

As for this particular parameter - I only used it as an example. I am just trying to find some parameters that I can set somewhere, so perhaps one of them will fix that stutter.

Also - in case of Gnome-shell - it uses Wayland instead of xorg. Maybe I can change some settings there?

1
Xerendity•

It might just be Nvidia. I'm on Windows 10 and I have the same issue. My friends have similar issues as well with stutters. There's games such as Apex Legends rn that are documented to have bugs with Nvidia Reflex, especially on certain maps. There's also lots of negative feedback in Nvidia's latest driver update regarding it causing more stutter problems than the previous. I also saw a quote from a dev saying that they haven't found the root of the issue so there won't be a fix this month. But if anyone finds a fix, pls lmk as well, ty.

2
dually•

Try moving your browser caches and configs to tmpfs.

Or use profile-sync-daemon.

1
nihalani•

I hade a similar problem unfortunately I never got it fixed. Nvidia uses proprietary drivers and unfortunately is not super well supported

1