Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radeon RX 7900 XTX not supported #207552

Closed
MasterMind2k opened this issue Dec 24, 2022 · 89 comments
Closed

Radeon RX 7900 XTX not supported #207552

MasterMind2k opened this issue Dec 24, 2022 · 89 comments
Labels
0.kind: bug Something is broken

Comments

@MasterMind2k
Copy link

MasterMind2k commented Dec 24, 2022

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`
@MasterMind2k MasterMind2k added the 0.kind: bug Something is broken label Dec 24, 2022
@K900
Copy link
Contributor

K900 commented Dec 24, 2022

We have the firmware bits, but we also need newer Mesa. 22.3 is in staging now which should be usable with RDNA3, but I wouldn't expect a good experience until 23.x early next year.

@MasterMind2k
Copy link
Author

MasterMind2k commented Dec 24, 2022 via email

@K900
Copy link
Contributor

K900 commented Dec 24, 2022

You can try cherry-picking #204125 if you're OK with rebuilding the world.

@Atemu
Copy link
Member

Atemu commented Dec 24, 2022

Alternatively, you can get #204125 's mesa an stuff its drivers output into hardware.opengl.package That works just fine for me and doesn't require any builds other than mesa.

@cidkidnix
Copy link
Contributor

You'll still need to compile mesa with LLVM 15 for any RX7000 series cards, though llvmPackages_git will suffice. (or alternatively you could use #194634)

@K900
Copy link
Contributor

K900 commented Dec 25, 2022

I think it should still work with ACO?

@cidkidnix
Copy link
Contributor

cidkidnix commented Dec 25, 2022

On llvm14, the Vulkan side it's 100% fine, on the opengl/egl side not so much, OpenGL doesn't have ACO yet, so it uses llvm for the backend, so the newer GPUs require llvm15 for OpenGL support

@LunNova
Copy link
Member

LunNova commented Dec 25, 2022

Does Zink work instead of the old opengl stuff without llvm 15?

@K900
Copy link
Contributor

K900 commented Dec 25, 2022

Zink isn't enabled by default and is much less compliant even when it is.

@LunNova

This comment was marked as duplicate.

@K900
Copy link
Contributor

K900 commented Dec 25, 2022

Maybe we should try to land it before the next staging cycle then? So we can get Mesa and Rust on 15.

@athas
Copy link
Contributor

athas commented Jan 10, 2023

Alternatively, you can get #204125 's mesa an stuff its drivers output into hardware.opengl.package That works just fine for me and doesn't require any builds other than mesa.

How do I do this without recompiling the world? By importing the staging branch tarball and picking out it's Mesa derivation, I have to compile everything, starting from perl and bison.

@K900
Copy link
Contributor

K900 commented Jan 10, 2023

Don't overlay Mesa, just set hardware.opengl.package = stagingNext.mesa.drivers

@athas
Copy link
Contributor

athas commented Jan 10, 2023 via email

@K900
Copy link
Contributor

K900 commented Jan 10, 2023

Use staging-next, not staging.

@athas
Copy link
Contributor

athas commented Jan 10, 2023 via email

@athas
Copy link
Contributor

athas commented Jan 10, 2023 via email

@K900
Copy link
Contributor

K900 commented Jan 10, 2023

LLVM 15 is being worked on in #194634

@cidkidnix
Copy link
Contributor

You'll need to use #194634

Some of the patches on llvmPackages_git are completely borked

@athas
Copy link
Contributor

athas commented Jan 10, 2023 via email

@athas
Copy link
Contributor

athas commented Jan 10, 2023

That error is related to the OpenCL support, which I don't need for now. Oh, and now that I can use a browser instead of a terminal email client, I can provide my final notes on what worked for me, in a properly formatted way. I use this at the beginning of my config to get Nixpkgs variants from branches I need:

let
    staging = import (builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/staging-next") { config = config.nixpkgs.config; };
    llvm15 = import (builtins.fetchTarball "https://github.com/rrbutani/nixpkgs/tarball/feature/llvm-15") { config = config.nixpkgs.config; };
in
  ...

And then I patch in Mesa like this:

  hardware.opengl.package = (staging.mesa.override { llvmPackages = llvm15.llvmPackages_15; enableOpenCL = false; }).drivers;

You'll end up compiling LLVM, clang, and mesa, which takes a little while, but it's not too bad.

All this information is already elsewhere in the thread, but summarising it in this post might help some people. Hopefully this will all be obsolete information before too long.

@Atemu
Copy link
Member

Atemu commented Jan 11, 2023

@athas perhaps you could also try using Zink via Vulkan without LLVM_15; would love to know whether that's an option that works for RX 7000.

@athas
Copy link
Contributor

athas commented Jan 12, 2023

How would I do that? I don't have that much experience with tweaking Mesa.

Also, it should be noted that despite the above functionally working (even for GPGPU, to my great surprise), it's a little unstable for games, with a crash maybe every hour. That is par for the course for new AMD GPUs and will probably resolve itself when the components become more well supported.

@Atemu
Copy link
Member

Atemu commented Jan 12, 2023

@athas put "zink" in our mesa's galliumDrivers and set MESA_LOADER_DRIVER_OVERRIDE=zink globally.

@mustafasegf
Copy link
Contributor

I'm sorry if it's the wrong place to ask. but i have 7900 xtx and able to compile mesa from next staging. But my cursor suddenly gone from x11 server. Do i need to specify some xorg config? thanks

@K900
Copy link
Contributor

K900 commented Jan 17, 2023

You don't need to do that, Mesa 22.3 is in the current unstable now. Make sure you're not using the amdgpu driver and using the modesetting one.

@jansol
Copy link
Contributor

jansol commented Jan 22, 2023

Hm, I'm not even getting sddm to show up with nixos-unstable and the llvm15 override shown here. With amdgpu in services.xserver.videoDrivers I get a frozen black screen with a non-blinking console cursor in the top left corner. With modesetting I don't even get that. Also switching to a different vt does not seem to work...

If I set services.xserver.enabled = false I get a usable console and mpv with --vo=gpu-next --gpu-context=drm does work fine, though.

@jansol
Copy link
Contributor

jansol commented Jan 22, 2023

FWIW dmesg logs a couple of errors during boot and when trying to start Xorg.

Also the console is weirdly janky, like it completely stops rendering for a bit every few seconds.

@athas
Copy link
Contributor

athas commented Jan 22, 2023

I don't know about Xorg (I use Wayland), but the console jankyness was fixed by adding this kernel boot parameter: amdgpu.ppfeaturemask=0xfffd3fff.

@chadcatlett
Copy link
Contributor

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

@Slabity
Copy link
Contributor

Slabity commented Feb 20, 2023

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
Copy link
Author

@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
Copy link
Contributor

K900 commented Feb 20, 2023

Please just use the modesetting driver.

@MasterMind2k
Copy link
Author

MasterMind2k commented Feb 20, 2023

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
Copy link
Contributor

K900 commented Feb 20, 2023

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

@K900
Copy link
Contributor

K900 commented Feb 20, 2023

You're not running Plasma Wayland, are you?

@vcunat
Copy link
Member

vcunat commented Feb 20, 2023

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

@MasterMind2k
Copy link
Author

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
Copy link
Contributor

jansol commented Feb 20, 2023

Please just use the modesetting driver.

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

@K900
Copy link
Contributor

K900 commented Feb 20, 2023

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

@chadcatlett
Copy link
Contributor

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
Copy link
Contributor

meutraa commented Feb 21, 2023

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

@vcunat
Copy link
Member

vcunat commented Feb 22, 2023

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.

@vcunat vcunat closed this as completed Feb 22, 2023
@MasterMind2k
Copy link
Author

MasterMind2k commented Feb 26, 2023

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?

@mnlnms
Copy link

mnlnms commented Feb 26, 2023

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
Copy link
Contributor

K900 commented Feb 26, 2023

As stated multiple times before, please use modesetting.

@MasterMind2k
Copy link
Author

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
Copy link
Author

@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
Copy link
Contributor

K900 commented Feb 26, 2023

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
Copy link
Author

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
Copy link
Contributor

K900 commented Feb 26, 2023

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
Copy link
Member

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
Copy link
Contributor

K900 commented Feb 26, 2023

You generally don't want to use it.

@SeineEloquenz
Copy link
Member

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

@K900
Copy link
Contributor

K900 commented Feb 26, 2023

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

@vcunat
Copy link
Member

vcunat commented Feb 26, 2023

Well, I suppose we could update it either way: #218433

@jansol
Copy link
Contributor

jansol commented Feb 26, 2023

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests