I haven’t played games in a few years, and today I thought opening The Forest would be fun. Unfortunately, NixOS had other plans…
Problem:
I’m running Sway on a Ryzen 9 5950X with an RX 6700 XT. During game startup, GPU usage spikes to ~70%, which seems fine, but once the game launches I get ~20 FPS on low settings, GPU usage drops to 25–30%, and CPU usage skyrockets to ~1500% (I have 16 cores, 32 threads)
What I tried:
I’ve followed suggestions from the NixOS wiki, Reddit threads, tried Flatpak Steam, running game natively and with proton and experimented with various configurations.
Ummm… Guess what! I tried running it with Proton GE and it works great, high settings on 55-60fps (probably with vsync)
On unrelated note, i don’t think i wanna play it anymore. Imma go on the couch and open Netflix
Also if anyone knows the one true correct config - please share it, i feel like i should have been able to get similar fps with standard proton/native. I am not sure whats so special about proton GE, maybe ill poke around its derivation, thats probably where magic is.Nope, not there. It has no fancy wrappers
Maybe I am misunderstanding the problem but the way i see it is that native games and standard proton does not detect my GPU, or detects it but for some reason prefers to use llvmpipe.
While what you shared might be the answer, few bullet ponts might be related but I wish I knew exact reason why/how
I think a lot of the code you’ve shown there should be removed.
This one is probably fine but also probably not helping for gaming.
This one should be removed unless you need kexec and / or hibernation (as opposed to suspend) to work. It basically makes your initrd about 30MiB larger, which is quite costly on your /boot file system, and the only benefit is that the GPU driver gets to load earlier during the boot process than it would normally, which can make kexec and resuming from hibernation more reliable.
I think these can all be removed. IIUC, vaapi is generally considered better than vdpau, and should be supported out of the box with just the default mesa packages. Plus vdpau has nothing to do with games working. The vulkan-* things are not driver packages; adding them here does nothing.
IIRC this is just redundant and doing what vulkan / mesa would do out of the box. Also calling it amdvlk-run is misleading because amdvlk is a different vulkan driver for AMDGPU that is probably worse and probably not what you want to use The default radv driver is the good one these days.
Yep, after last post i’ve looked into all this and already removed all that. At that point i was just copying configs from various places trying to figure this out.
Between last post and now I’ve discovered that my initial assumption of games running with llvmpipe was wrong so none of this thread is really relevant
My current theory is that XWayland is slowing things down and proton-ge has some optimizations for it. I still need to prove it tho
As @ElvishJerricco is saying, you probably don’t want to use vdpau.
I’m fairly certain your entire hardware.graphics config can also be removed without impacting any of your use cases - even hardware.graphics.enable itself is almost definitely set by your DE/WM.
You probably also don’t want to manually set that kernel module, it’s the same initrd thing @ElvishJerricco mentions except you did it manually instead of with the option.