Using amdvlk
as instructed in the Wiki actually gives outdated drivers as Halo Infinite wouldn’t start until it was removed.
What would be the optimal NixOS settings to get the best experience with AMD?
boot.initrd.kernelModules = [ "amdgpu" ];
services.xserver.videoDrivers = [ "amdgpu" ];
hardware.opengl = {
# Mesa
enable = true;
# Vulkan
driSupport = true;
};
Hi,
Your config looks fine.
Using amdvlk as instructed in the Wiki actually gives outdated drivers
It is a different driver, not an outdated driver.
There’s two Vulkan drivers for AMD: The one officially developed by AMD, which is amdvlk; and another one started by people in the open-source community and now backed by Valve, called radv.
Both of them are open-source and updated regularly in nixpkgs.
Radv is part of mesa and installed by default if you have mesa (which you need if you want some gui).
Amdvlk can be installed if wanted and sets itself as the default driver when installed (setting the env variable AMD_VULKAN_ICD=RADV
switches to radv).
Which of these two works better depends on the game. Radv is often a good choice. On some games radv performs better, on other games amdvlk is faster.
2 Likes
This probably shouldn’t be done anymore. At least on nixos-unstable
, modesetting
is the default and it’s preferable: https://github.com/NixOS/nixpkgs/commit/82964d16945b77a3db503ff6db6c693ca6c20476. Note that’s just the videoDrivers
though; the kernel module in use will still be amdgpu
(and that will work regardless of boot.initrd.kernelModules = ["amdgpu"];
).
PS: Let me know if Halo Infinite and system suspend work for you. I’ve been having troubles with both of those with my AMD card.
2 Likes