Support for AMD Radeon

How well does NixOS work with AMD Radeon hardware? When it comes to video hardware, the manual discusses Intel and NVidia but not AMD; so I’m wondering. Does NixOS use an open source driver for Radeon? If yes, what are its limitations and can it be expected to work for the foreseeable future?

1 Like

Support comes from the kernel so the question is ultimately - does Linux support your card.

3 Likes

works fine for me. I play games like DOOM (2016) and such. amdgpu is the driver I use

1 Like

Well, kernel and also mesa.

In general, support for AMD GPUs is fairly good. I play AAA games on mine. The old wiki used to have a lot of bad advice on AMD GPUs, but we’ve cleaned up the official wiki so it’s clear that most of that advice was for special configurations and the defaults out of the box should be totally fine for most people.

If you mean you set something like services.xserver.videoDrivers = [ "amdgpu" ];, that’s one of those things that nowadays you probably shouldn’t do. Nowadays the modesetting driver is the good one (which uses the identically named amdgpu kernel module), and it’s the default in NixOS. Plus if you’re using wayland I’m 99% sure the services.xserver.videoDrivers option doesn’t do anything anyway.

3 Likes

yes, I use modesetting; but I’m sure one can load it up directly or whatever way that works for them - anyway, it works and works well. I need to fiddle with Vulkan driver settings some more there being a hardware.amdgpu.amdvlk.* NixOS option and all. DOOM looks better using OpenGL for some reason

This is another one of those things where you should probably just use the default. Mesa will use its “radv” vulkan implementation by default and that’s the good one now.

1 Like

anyhow @jeltsch it works well. have fun. use the defaults, I guess.

1 Like

Very interesting. The last things I remember having read about AMD GPUs was that some of them need proprietary drivers and that there can be troubles here and there. So are AMD GPUs for the most part supported by the kernel? Does AMD contribute to open-source driver development, like Intel has been doing for a long time?

It takes both the kernel and mesa (FOSS userspace graphics driver stack), but yes.

I believe there are some workstation or server AMD GPUs where you’ll need some proprietary stuff, but for their consumer stuff they’re generally quite good about contributing FOSS drivers to both the kernel and mesa.

3 Likes

Using

  boot.kernelPackages = pkgs.linuxPackages_latest;

and getting
[nix-shell:~]$ lsmod | grep amdgpu
amdgpu 15462400 26
amdxcp 12288 1 amdgpu
drm_exec 12288 1 amdgpu
gpu_sched 65536 1 amdgpu
drm_buddy 24576 1 amdgpu
drm_suballoc_helper 12288 1 amdgpu
drm_ttm_helper 16384 2 amdgpu
ttm 102400 2 amdgpu,drm_ttm_helper
drm_display_helper 266240 1 amdgpu
i2c_algo_bit 20480 1 amdgpu
video 81920 1 amdgpu
backlight 28672 2 video,amdgpu
crc16 12288 3 bluetooth,amdgpu,ext4

not loading any specific drivers at all. Framework 16 laptop

When it comes to video hardware, the manual discusses Intel and NVidia but not AMD;

There’s not much to say about AMD graphics, they just works very well ouf of the box.

Does NixOS use an open source driver for Radeon?

The driver NixOS uses (and any other distro under the sun) for all AMD GPUs since 2016 or so, is amdgpu, which is part of the mainline Linux kernel, and then there’s the user space part of the driver, Mesa (that provides vulkan, openGL, etc.). Both are officially supported by AMD.

There are some more packages like ROCm for GPUGPU stuff (see hardware.amdgpu.opencl.enable) and AMDVLK, an alternative Vulkan implementation (see hardware.amdgpu.amdvlk.enable).

Again, all open source and officially supported.

In the past there was a proprietary driver “AMDGPU PRO”, but it has been completely abandoned years ago and has always been kind of unnecessary for most users. Basically it was only needed to run some CAD software.

If yes, what are its limitations and can it be expected to work for the foreseeable future?

I’m not sure what you mean with limitations. For the future, consider my GPU is almost 10 years old and is still supported. So, I wouldn’t worry about it.

1 Like

I’m not sure what you mean? Your 780M is using the AMDGPU driver and, unless you configured something different, Mesa’s radeonsi for OpenGL and Mesa’s RADV for Vulkan.

I have the same laptop and that’s how I use it.

This is not entirely correct. RADV is not supported by AMD and actually has no relation to them.

It’s primarily developed by the likes of Collabora and Valve aswell as independent contributors.

radeonsi is maintained by AMD to some degree but I’m not sure it’s officially supported as they have their AMDGPU-PRO OpenGL driver.

AMDVLK gets “official” support from AMD but I’m not sure they recommend it for productive use over their pro driver. It’s very similar to the pro driver though but uses LLVM rather than AMD’s internal compiler.

It was once significantly better at real-time raytracing and trades blows with RADV but you shouldn’t use it because it’s often not compatible with games in subtle ways. Valve tests on RADV, so that’s what you should use for gaming.

AMDGPU-PRO is still here, still supported and still recommended by AMD.

Our package of it has fallen into neglect last time I checked. You also typically don’t need it though unless you have specific workstation needs such as the aforementioned CAD or are on an oldstable distro where the kernel doesn’t support new GPUs (it ships a backwards compatible AMDGPU module with support for newer GPUs).

2 Likes

I guess I should have said I didn’t load any drivers specifically. Just what’s in the latest linux kernel packages line.

Thanks a lot for your elaborate answer.

When talking about limitations I was referring to the possibility of certain features of the GPU not being supported. For example, I once read that, because of the HDMI or USB standard not being open, it was forbidden for AMD to support certain high-resolution multi-screen setups or something like that.

What you mean is probably HDMI2.1 which AMD is not allowed to implement in an open source kernel module.

This is going to be an issue no matter the userspace driver and there only one kernel driver.

The AMDGPU-PRO kernel driver might have some special handling but AFAIK it’s really just the regular upstream AMDGPU kernel module but for LTS.

Ah, yes, but I don’t think that’s specific to AMD: the HDMI forum, being a bunch of clowns, is not allowing open source implementations of their newer HDMI 2.1 specification.

Anyway, this is not a big deal: what you’ll be missing essentially is support for very high resolutions and refresh rates, like > 4K @ 120Hz (I doubt you could run any modern game like this). Moreover you could just buy a display with DisplayPort, which is an open standard and doesn’t have any limitation.

I thought that for Display Port some similar restriction was introduced later, but I don’t remember the details.

The days where you could barely manage 30fps at 4K were a decade ago. You can absolutely run modern games at well over 100 fps at 4K these days on high-end GPUs; not to speak of slightly less modern games.

HDMI 2.1 also introduces official support for VRR which is critical for a smooth gaming experience.

Outside of gaming, it wasn’t even possible to display 10bit content (i.e. HDR) at just 60Hz with full chroma resolution using HDMI2.0. It’s insane how long overdue 2.1 was.

If you must use HDMI (e.g. TV), you should not buy anything that only supports 2.0 these days.

No, Vesa aren’t such clowns.

1 Like