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.
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?
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.
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. :)
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.
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
Last edited by Keyrock on 23 March 2017 at 10:35 am UTC
Quoting: poisond@liamdaweIt is for Intel (with intel_pstate), ondemand is the default for AMD.
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
Quoting: poisond@liamdaweNot 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.
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
Edit: Ninja'd
Last edited by Keyrock on 23 March 2017 at 10:40 am UTC
Quoting: poisond@liamdaweWell, to be sure I've updated the text to mention people to use either, thanks for the extra tip.
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
See more from me