Hey fellow Linux gamers! 👾
I’ve been facing some weird performance issues with ‘Need for Speed Heat’ on Steam, and I’m hoping the community can help me troubleshoot. Here’s the lowdown:
Issue: Experiencing severe stutters and bad frametimes on default kernels (zen, standard, LTS) when running ‘Need for Speed Heat’ at the lowest settings (720p). Strangely, switching to the linux-amd kernel resolves the problem, giving me smooth gameplay at 90FPS+ on ultra settings in 1440p.
Observations:
- In mangoHud, noticed that vulkan_driver shows up as ‘mesa’ in linux-amd kernel, while in other kernels, it’s ‘LLPC.’
- No issues with other games in Lutris and SteamPlay across all kernels.
Investigation Steps Taken:
- Compared ‘lsmod’ output.
- Checked config files of different kernels.
- Compared vulkaninfo of both kernels.
Findings:
- AMD kernel seems to disable most things for Intel CPU and keeps settings for AMD.
- Vulkaninfo difference mainly in GPU VkPhysicalDeviceMemoryProperties.
Specs:
CPU: 13th Gen Intel(R) Core(TM) i5-13500
GPU: AMD AMD Radeon RX 6700 XT (navi22, LLVM 16.0.6, DRM 3.54, 6.6.1-zen1-1-zen)
RAM: 16GB
Game Drive: gen4 NVME
Kernel: 6.6.1-zen1-1-zen / 6.6.1-AMD
Session: KWin (Wayland)
DE: KDE 5.27.9
Display: 3440 x 1440
Question: How do I investigate further to understand why mesa is not used in the rest of the kernels? Any suggestions on how to set it to mesa?
Your expertise is much appreciated! 🚗💨
Run “
vulkaninfo --summary
”. (vulkan-tools package is needed for this command to run)That will print the list of video adapter/devices at the bottom.You will see something like
GPU0
,GPU1
and so on. (It is assumed you have installed all Mesa drivers packages properly).Now you have to look at the “
driverName
” property of that device. Each AMD graphics device installed on your system that uses Mesa drivers should show two drivers. “llvmpipe
” and “radv
”. llvmpipe is software pipeline. We don’t need that. The radv one is what we need. radv is Vulkan driver that uses hardware of modern AMD GPUs.Now come to Steam launch options/command line.There is an environment variable called
DRI_PRIME=
.So, if we want games to use radv driver we put
DRI_PRIME=0 %command%
inside the Steam launch options text box. The0
is taken from GPU0. If radv is under GPU1 or GPU2 or whatever it shows on you system, use the number part from the GPU0 string as the value for DRI_PRIME.Thanks! setting
gamemoderun mangohud DRI_PRIME=0 %command%
shows mesa-* as driver in mangoHud, but the stuttering still exists which i was hopping this would have fixed.The frametime graph
I suspect this is due to my CPU, I see such graph if I keep some CPU intensive workload (Like video encoding) on in background during gaming in Lutris.
During ‘Need for speed heat’ launch from Steam I see same kind of frametime graph (More extreme) even though my CPU was free before launching this game.
I think that amd-kernel is turning something ON or keeping it OFF for intel CPU…
Only thing that bugs me is it works smooth in that linux-amd kernel and in any other kernel (I could have used AMD kernel but since I have intel GPU its missing kernel modules like coretemp whichout which i can’t monitor my CPU temps).
If it did not work in any kernel, I could have said game it and left it at that.
I have the kernel config, lsmod and vulkaninfo logs of zen vs amd kernel here
Git
Also tried with
DXVK_HUD=full DRI_PRIME=0 %command%
DXVK_HUD
Same frametime issue causing lag