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.
Quoting: meggermanRunning AMD CPU/APU's i have always turned of Turbo mode in the BIOS and cool & quiet.
How do you do this? Entering bios with F2 during boot, I see no option to turn Turbo on/off. Perhaps it is not supported by my "AMD A8-6410 with Radeon R5 Graphics (up to 2.4ghz)". However, in bios it says that my computer has only 2000mhz cpu freq, so clearly the CPU is not turboin :P
Quoting: M@GOidFor a more easy way to change the settings, install the package "indicator-cpufreq"("sudo apt install indicator-cpufreq" for those of you in Ubuntu).
It will show a icon in your taskbar were with 2 mouse clicks you can change to the Performance governor and back.
I use it for both AMD and Intel CPUs for years and it works great, for any DE.
Very good tip
^_^
Quoting: buenaventuraHow do you do this? Entering bios with F2 during boot, I see no option to turn Turbo on/off. Perhaps it is not supported by my "AMD A8-6410 with Radeon R5 Graphics (up to 2.4ghz)". However, in bios it says that my computer has only 2000mhz cpu freq, so clearly the CPU is not turboin :P
It might be throttling down some GHz as it doesn't need them in BIOS.
Quoting: M@GOidFor a more easy way to change the settings, install the package "indicator-cpufreq"("sudo apt install indicator-cpufreq" for those of you in Ubuntu). It will show a icon in your taskbar were with 2 mouse clicks you can change to the Performance governor and back. I use it for both AMD and Intel CPUs for years and it works great, for any DE.
Thanks for the tip.
But, anyway, once installed I have to go to the console and type
indicator-cpufreq
and then I see an icon with two options: Performance and Powersave
Previously, in Life is Strange I had almost 100% load on two cores (the other cores are less than 20%), meanwhile in Metro 2033 Redux, as much, I had more or less 60% on every cores..
That means that back in 2015 Metro Redux already did multithreaded rendering ??
Now, it is time to repeat my experiments with this "performance" profile.
Quoting: EikeQuoting: buenaventuraHow do you do this? Entering bios with F2 during boot, I see no option to turn Turbo on/off. Perhaps it is not supported by my "AMD A8-6410 with Radeon R5 Graphics (up to 2.4ghz)". However, in bios it says that my computer has only 2000mhz cpu freq, so clearly the CPU is not turboin :P
It might be throttling down some GHz as it doesn't need them in BIOS.
I just installed indicator-cpufreq, and there I can choose between:
2,00 GHz
<etc etc>
1,00 GHz
--------------------
Conservative
Ondemand
Powersave
Performance
shedutil <--- INTRUIGING, what is this? I google and it seems like some newfangled stuff? I wonder if that will be even better than Performance!
Still, why does it only go up to 2,00ghz? Says right on the sticker on my lappy "up to 2.4 ghz", bullshiet :P
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
this is useful for people using custom kernels such as linux-ck or linux-zen and are unsure what the default governor is set to.
on linux-zen mine was set to powersave
Quoting: HailToTheGrailQuoting: CybolicI wish there was a way to not have to put in my password on every change, maybe someone knows how to work around that?
You could give setuid a try. Make a shell script as root, and then:chmod u+s script.sh
You should be able to run it as a user with it's owner rights, which are root.
No go on my Arch system. I've also tried editing the sudoers config file with visudo and using sudo instead, but that still asks for a password :/
See more from me