NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.31k stars 13.54k forks source link

Radeon RX 7900 XTX not supported #207552

Closed MasterMind2k closed 1 year ago

MasterMind2k commented 1 year ago

Describe the bug

Booting into system with Radeon RX 7900 XTX does not show cursor nor has hardware acceleration.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Instal Radeon RX 7900 XTX into system
  2. Boot into graphical environment

Expected behavior

A shown hardware cursor and hardware acceleration.

Screenshots

N/A

Additional context

Issue for tracking addition of new support.

Notify maintainers

@K900 @LunNova (gathered from linux-firmware git blame)

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.0, NixOS, 23.05 (Stoat), 23.05pre436728.652e92b8064`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.12.0`
 - channels(root): `"nixos"`
 - channels(user): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
K900 commented 1 year ago

No idea where you got that from, but it shouldn't be necessary.

athas commented 1 year ago

I used that featuremask to get rid of a latency issue in the system console. I have not tested whether it is still necessary, or whether it was only necessary due to a quirk of my own hardware. It might also be made unnecessary by an update to the kernel driver.

pr0ton11 commented 1 year ago

Doesn't look like it's still necessary, I removed it and there is no latency. I had the latency before though. I think this issue could be closed in general?

K900 commented 1 year ago

I'd prefer to get a couple more user reports.

MasterMind2k commented 1 year ago

Through weekend I'll re-insert my card into machine and verify if it works on nixos-unstable.

If I understand release cycles of NixOS, in april (23.04) this will be on stable channel?

K900 commented 1 year ago

23.05 is the target, so May.

SkyLeite commented 1 year ago

For simplicity, here's all that's needed to get the 7900 XTX working as of now:

  1. Make sure your inputs.nixpkgs.url points to github:NixOS/nixpkgs/nixos-unstable
  2. Set services.xserver.videoDrivers to [ "modesetting" ] (important. if it's set to amdgpu you will get a black screen as soon as X is started. wayland seems to work fine, but I haven't tested it much)

I've been running this on linuxPackages_testing (6.2.0-rc6) for around 12 hours with no issues. If the above doesn't work for you, try also changing your kernel to linuxPackages_testing.

jansol commented 1 year ago

With the current nixos-unstable and linuxPackages_testing it's all peachy, even with amdgpu. With 6.2-rc7 instead of the current linuxPackages_testing which is 6.2-rc6 I get EGL_BAD_ALLOC as soon as I log in to plasma (wayland).

SkyLeite commented 1 year ago

The current version of Mesa in unstable (22.3) still has quite a few bugs with the 7900 XTX, particularly related to crashes. Looking at the Mesa repository it seems like there have been multiple fixes submitted recently, but unfortunately I couldn't get Mesa 23 (which includes these fixes) to work reliably either.

MasterMind2k commented 1 year ago

Running with card. Without setting "modesetting" as video driver for xserver I don't see the cursor. Running xserver on modesetting I do notice HiDPI behaviour is a little bit off.

Other than that, it seems to work. Will write down if I get any crashed during the week.

chadcatlett commented 1 year ago

@MasterMind2k the invisible cursor issue is fixed in the xorg amdgpu driver repo but they've not cut a release for it.

Slabity commented 1 year ago

Just want to report that other than the kernel console and USB-C port oddities, I have had no issues running my 7900 XTX on NixOS now that LLVM15 and the updated Mesa builds are in Nixpkgs. Though I am running Wayland with Sway, so not sure about Xorg.

OpenGL and Vulkan programs both work perfectly, and Blender properly detects it as a HIP device (using blender-hip package). The only problems I'm having appear to be issues upstream (both in mesa and amdvlk). Steam games (both native and Proton) seem to work fine as well.

Just wanted to add my 2-cents in case people are still waiting for further reports to close this ticket.

MasterMind2k commented 1 year ago

@MasterMind2k the invisible cursor issue is fixed in the xorg amdgpu driver repo but they've not cut a release for it.

Is there a ticket I could track? I would like to test it as soon as it hits nixos-unstable.

K900 commented 1 year ago

Please just use the modesetting driver.

MasterMind2k commented 1 year ago

Please just use the modesetting driver.

I am and using the hardware already without bigger problems. But HiDPI setting is a little bit different than on amdgpu and would verify it when the cursor on amdgpu is fixed. Some apps in FHS has small font with modesetting driver, that with amdgpu do not.

From my point of view, this ticket can be closed before amdgpu driver fix is released.

K900 commented 1 year ago

That cannot possibly be affected by the DDX, assuming the other settings are unchanged.

K900 commented 1 year ago

You're not running Plasma Wayland, are you?

vcunat commented 1 year ago

They haven't released for a year: https://github.com/freedesktop/xorg-xf86-video-amdgpu/tags

MasterMind2k commented 1 year ago

That cannot possibly be affected by the DDX, assuming the other settings are unchanged.

I am just reporting what I saw. Granted, it might be something else. But that was the only change :S.

They haven't released for a year: https://github.com/freedesktop/xorg-xf86-video-amdgpu/tags

I understand now :). I assumed they had shorter cycles. As said earlier, I just wish to track to check if HiDPI problem is related to DDX driver at a later date. Not to block this issue to be resolved, from my point of view, problem is resolved.

I had this HiDPI issue since moved to AMD Ryzen 9 7900X and Radon RX 7900 XTX hardware and was curious why using amdgpu xserver driver suddenly fixed it.

jansol commented 1 year ago

Please just use the modesetting driver.

In that case, should the default order of drivers be changed to reflect that?

K900 commented 1 year ago

It should probably just default to [ "modesetting" "fbdev" ] or possibly even [ "modesetting" ] at this point.

chadcatlett commented 1 year ago

Is there a ticket I could track? I would like to test it as soon as it hits nixos-unstable.

https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/-/issues/61

meutraa commented 1 year ago

I can confirm the 7900xtx is working fine with linux 6.2 and the modesetting video driver.

vcunat commented 1 year ago

I think we'd better mark this as fixed. Of course, discussion can continue here and/or new issue can be linked with more up to date description.

Well, on NixOS 22.11 these GPUs probably don't work nice, but that would be expected due to being newer than 22.11.

MasterMind2k commented 1 year ago

xorg-video-amdgpu version 23.0.0 just got released with the mentioned patch.

If I see correctly here, it is still at 21.0.0?

edel-km commented 1 year ago

xorg-video-amdgpu version 23.0.0 just got released with the mentioned patch.

If I see correctly here, it is still at 21.0.0?

Am I right, when i say: When I do an overlay with pulling in xorg-video-amdgpu version 23.0.0 i dont need „modesetting“ anymore ? Or has this nothing to do with it ?

K900 commented 1 year ago

As stated multiple times before, please use modesetting.

MasterMind2k commented 1 year ago

As stated multiple times before, please use modesetting.

Please let us understand why? It seems the xserver amdgpu driver has released a version that fixed the issue with hidden cursor.

Is a policy we should all use modesetting from now on? I am fine if default is set to modesetting and is then my decision to swap to amdgpu xorg driver when it is fixed. Is amdgpu xorg driver going to be removed? If so, why?

MasterMind2k commented 1 year ago

@MasterMind2k the invisible cursor issue is fixed in the xorg amdgpu driver repo but they've not cut a release for it.

@edel-km, this comment says so. But I am unable to verify.

K900 commented 1 year ago

modesetting is a generic driver that uses device independent kernel APIs. It's much more actively maintained, and those APIs are also used by all Wayland compositors, Android and pretty much everyone else. The "X11 driver" model is effectively dead, and all the remaining drivers are on life support.

MasterMind2k commented 1 year ago

modesetting is a generic driver that uses device independent kernel APIs. It's much more actively maintained, and those APIs are also used by all Wayland compositors, Android and pretty much everyone else. The "X11 driver" model is effectively dead, and all the remaining drivers are on life support.

Thank you. This makes it crystal clear!

K900 commented 1 year ago

It's probably also worth explicitly mentioning that using the modesetting driver still provides full hardware acceleration for graphics, video decode and basically everything else.

SeineEloquenz commented 1 year ago

It's probably also worth explicitly mentioning that using the modesetting driver still provides full hardware acceleration for graphics, video decode and basically everything else.

Maybe this is a stupid question, but why would we even want to use amdgpu instead of modesetting then?

K900 commented 1 year ago

You generally don't want to use it.

SeineEloquenz commented 1 year ago

Then we should also go about updating the wiki page where it is explicitly recommended to use amdgpu

K900 commented 1 year ago

That is woefully outdated, as you can see by the fact that it refers to NixOS 20.09.

vcunat commented 1 year ago

Well, I suppose we could update it either way: https://github.com/NixOS/nixpkgs/pull/218433

jansol commented 1 year ago

As seen in the release announcement and specifically pointed out in the related Phoronix article, the new release only has a couple of actually meaningful changes. Certainly looks a lot like a minimal life support release given the long time since the previous one.

nixos-discourse commented 1 year ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/setting-up-wayland-gnome-in-nixos-with-amd-rx-7900-xt/24463/4