You can sign up to get a daily email of our articles, see the Mailing List page!
Support us on Patreon to keep GamingOnLinux alive. This ensures we have no timed articles and no paywalls. Just good, fresh content! Alternatively, you can support us on Paypal and Liberapay!
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.
14 Likes, Who?
Comments
Page: 1/8»
  Go to:

buenaventura 23 March 2017 at 10:00 am UTC
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?
liamdawe 23 March 2017 at 10:02 am UTC
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 23 March 2017 at 10:03 am UTC
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 23 March 2017 at 10:09 am UTC
Will try this later today on dota and serious Sam with a strong cpu (6600k) and see how it affects performance.
dubigrasu 23 March 2017 at 10:29 am UTC
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 23 March 2017 at 10:31 am UTC
@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 at 23 March 2017 at 10:32 am UTC
Keyrock 23 March 2017 at 10:31 am UTC
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... image


Last edited by Keyrock at 23 March 2017 at 10:35 am UTC. Edited 2 times.
dubigrasu 23 March 2017 at 10:36 am UTC
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 23 March 2017 at 10:38 am UTC
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 at 23 March 2017 at 10:40 am UTC
liamdawe 23 March 2017 at 10:38 am UTC
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.
  Go to:
While you're here, please consider supporting GamingOnLinux on Patreon or Liberapay. We have no adverts, no paywalls, no timed exclusive articles. Just good, fresh content. Without your continued support, we simply could not continue!

We also accept Paypal donations and subscriptions! If you already are, thank you!

Due to spam you need to Register and Login to comment.


Or login with...

Livestreams & Videos
Community Livestreams
  • RPGoodness: "Dragon Age Origins" (via Wine)
  • Date:
See more!
Popular this week
View by Category
Contact
Latest Forum Posts
Facebook