Every article tag can be clicked to get a list of all articles in that category. Every article tag also has an RSS feed! You can customize an RSS feed too!
We do often include affiliate links to earn us some pennies. See more here.

There's an interesting issue with certain Linux CPU governors that will actually bring down performance in Vulkan games. You might not need this, depending on what CPU governor you have installed.

You might end up seeing jerking or micro-stutter, far more than you would in OpenGL games. The issue is that when using OpenGL in games, you're generally taxing a single core of your CPU due to less multi-threading. With Vulkan spreading the load more, your CPU isn't being used so much.

The Linux CPU governor takes that as an opportunity to bring down your CPU performance, as right now it's not the smartest bulb in the tanning bed.

Here's what a Croteam developer said about the issue:

QuotePowersave governor is an awful choice for playing games. It may quite be the case that it's not happening for OpenGL especially because GL runs slower.
When the game is running fast enough that CPU has to wait on the GPU, the governor sees that as an opportunity to downclock the CPU, or put cores to sleep. The jerking is a result of the CPU throttling up and down very quickly.
In general, CPU governors on Linux are much, much dumber than the Windows one. (It seems that Windows overrides the throttling for all 3D apps, or similar.)
That's why we have this warning in the log. Switch over to Performance governor, at least while playing.

So a tip for now when playing Vulkan games on Linux: Set your CPU to high performance mode, you can do it like so in terminal ("performance" is just an example, see more here):
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
A higher performance mode will generally result in higher power consumption too.

Then to set it back to normal. You don't need to use "powersave" see more options here, as it's just an example. According to the Arch Wiki you likely want "ondemand" for AMD:
echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

You can find out what performance mode you're in right now by running this in terminal:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
My default on the Intel i7 5960x is powersave, for example.

Hopefully this issue will be fixed as more games come over to Vulkan. It would be nice if developers didn't need to code around issues like this on Linux.

Article taken from GamingOnLinux.com.
Tags: Editorial, HOWTO
17 Likes
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly checked on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly.
See more from me
The comments on this article are closed.
75 comments
Page: 1/8»
  Go to:

buenaventura Mar 23, 2017
Hmm, does this setting the CPU governor to performance impact games otherwise you think (like, with OpenGL on a weak CPU?).

I have a AMD quadcore A8-6410 ("up to 2.4 ghz) on my laptop, and I struggle to play Shadow Tactics (and other unity games) on lowest settings, sometimes I think my CPU is at fault as much as my GPU. top reports around 250% CPU usage (which means 2.5 cores used I guess) for Shadow Tactics. Is it possible to increase that usage, you think?
Liam Dawe Mar 23, 2017
Quoting: buenaventuraHmm, does this setting the CPU governor to performance impact games otherwise you think (like, with OpenGL on a weak CPU?).
It's not magic, it doesn't suddenly make a weak CPU any better. It's only an issue if when playing games your CPU isn't being set into high performance mode. With OpenGL games it likely always is, since they are generally heavy on the CPU.
Eike Mar 23, 2017
View PC info
  • Supporter Plus
Quoting: buenaventuraHmm, does this setting the CPU governor to performance impact games otherwise you think (like, with OpenGL on a weak CPU?).

I have a AMD quadcore A8-6410 ("up to 2.4 ghz) on my laptop, and I struggle to play Shadow Tactics (and other unity games) on lowest settings, sometimes I think my CPU is at fault as much as my GPU. top reports around 250% CPU usage (which means 2.5 cores used I guess) for Shadow Tactics. Is it possible to increase that usage, you think?

It's worth a try. I had to do it - strange enough - for Limbo to work in the correct speed. :)
Aro Mar 23, 2017
Will try this later today on dota and serious Sam with a strong cpu (6600k) and see how it affects performance.
dubigrasu Mar 23, 2017
I always set the governor in performance mode when I'm playing, this is not the only game with such issues.
While my current Intel CPU is not that affected, the former AMD one FX 8370 was really bad at this, the framerate was all over the place on ondemand mode and stuttering all the time.
poisond Mar 23, 2017
@liamdawe
Uh, powersave isn't the default governor, at least it shouldn't be. powersave will run your CPU at the minimum freq.
You want ondemand.


https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt


Last edited by poisond on 23 March 2017 at 10:32 am UTC
Keyrock Mar 23, 2017
Thanks for the heads up, Liam. I made two files, called gov_perf and gov_psav and copied the short scripts into them, then made them executable and copied them to usr/bin. That way I can issue the commands from any directory with a single word typed. I'm sure I could add gov_perf to launcher scripts of games so that the process is auto-magic. Now to figure out a way to make games trigger gov_psav upon exit...


Last edited by Keyrock on 23 March 2017 at 10:35 am UTC
dubigrasu Mar 23, 2017
Quoting: poisond@liamdawe
Uh, powersave isn't the default governor, at least it shouldn't be. powersave will run your CPU at the minimum freq.
You want ondemand.


https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt
It is for Intel (with intel_pstate), ondemand is the default for AMD.
Keyrock Mar 23, 2017
Quoting: poisond@liamdawe
Uh, powersave isn't the default governor, at least it shouldn't be. powersave will run your CPU at the minimum freq.
You want ondemand.


https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt
Not exactly. AMD chips use ondemand, as well as some really old Intel chips. Newer Intel chips use powersave as the intel_pstate driver takes care of the scaling.

Edit: Ninja'd


Last edited by Keyrock on 23 March 2017 at 10:40 am UTC
Liam Dawe Mar 23, 2017
Quoting: poisond@liamdawe
Uh, powersave isn't the default governor, at least it shouldn't be. powersave will run your CPU at the minimum freq.
You want ondemand.


https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt
Well, to be sure I've updated the text to mention people to use either, thanks for the extra tip.
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!
The comments on this article are closed.