-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
Comments
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. |
Then, we wait for mesa 22.3 :).
Thanks.
|
You can try cherry-picking #204125 if you're OK with rebuilding the world. |
Alternatively, you can get #204125 's mesa an stuff its |
You'll still need to compile mesa with LLVM 15 for any RX7000 series cards, though |
I think it should still work with ACO? |
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 |
Does Zink work instead of the old opengl stuff without llvm 15? |
Zink isn't enabled by default and is much less compliant even when it is. |
This comment was marked as duplicate.
This comment was marked as duplicate.
Maybe we should try to land it before the next staging cycle then? So we can get Mesa and Rust on 15. |
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. |
Don't overlay Mesa, just set |
K900 ***@***.***> writes:
Don't overlay Mesa, just set `hardware.opengl.package = stagingNext.mesa.drivers`
That's what I think I am doing. I have
```
let staging = import (builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/staging") { config = config.nixpkgs.config; };
```
(I know I should pin this; just playing around now.)
Then I do
```
hardware.opengl.package = staging.mesa.drivers;
```
I don't use 'staging' for anything else. When I initiate a
nixos-rebuild I am told it has to build 493 derivations, cindlug things
like 'bison', 'bash', 'texinfo', 'gcc', 'llvm', 'ed', etc. This might
be as expected, but I think it will take me all night to see whether it works.
|
Use staging-next, not staging. |
K900 ***@***.***> writes:
Use staging-next, not staging.
Ah, thanks! I did not realise there were two staging branches. Much
more reasonable now.
|
Well, it's partially working now. From what I can see the drivers in
/var/run/opengl now come from mesa 22.3, Wayland still doesn't work - as
expected, it complains that LLVM doesn't support the GPU. The other
posts here suggests I need to use LLVM 15 to get it working. I tried
this:
```
hardware.opengl.package = (staging.mesa.override { llvmPackages = pkgs.llvmPackages_git; }).drivers;
```
(Where pkgs is nixos-unstable.)
But building fails with this error:
```
these 11 derivations will be built:
/nix/store/djg7hqgiwinnk5m7s2ll9zxvgdxnvccj-clang-unstable-2022-26-07.drv
/nix/store/lzn83jsmycjbakly6ndfsgqflga1p2g2-compiler-rt-libc-unstable-2022-26-07.drv
/nix/store/k6gm4ljvgqiffr90phj7drq5lwlk0zr8-clang-wrapper-unstable-2022-26-07.drv
/nix/store/ybqcsb70vzsa0xklw4bjz00q6csxcf7k-rust-bindgen-unwrapped-0.61.0.drv
/nix/store/fhq1ii4qm170pldfgn7garsc5sq3xk7v-rust-bindgen-0.61.0.drv
/nix/store/pwmsh8mljyjzv1ql8zwfpb4qg39lp06w-mesa-22.3.2.drv
/nix/store/21rimxydc53lsfpn7x9pac33cg4rq4hx-opengl-drivers.drv
/nix/store/i8xxc0k75igxwhkbhfzdwfa03bqncnvg-nixos-tmpfiles.d.drv
/nix/store/dxz7pap3w9fblq3hygjd1412dxzr3car-tmpfiles.d.drv
/nix/store/ywzi0jqcvd4gh1mvrqrhcyj61x9102fb-etc.drv
/nix/store/lja802dl57v324cbp4hsycjajcnla1np-nixos-system-uhyret-23.05pre440928.aa1d74709f5.drv
these 3 paths will be fetched (4.23 MiB download, 16.56 MiB unpacked):
/nix/store/6giqp5sv3cd5x7kvn5fbqszzfvx6dd0a-cargo-check-hook.sh
/nix/store/lwk776563z5jn5drkzrksnwnkbckzi68-cargo-1.66.0
/nix/store/nbp4j2ri302pmkijnv9zppkd0db76cdc-cargo-build-hook.sh
building '/nix/store/djg7hqgiwinnk5m7s2ll9zxvgdxnvccj-clang-unstable-2022-26-07.drv'...
building '/nix/store/lzn83jsmycjbakly6ndfsgqflga1p2g2-compiler-rt-libc-unstable-2022-26-07.drv'...
copying path '/nix/store/lwk776563z5jn5drkzrksnwnkbckzi68-cargo-1.66.0' from 'https://cache.nixos.org'...
unpacking sources
unpacking source archive /nix/store/pzkmqhmvdxc21sspyz94fnw6119129k5-clang-src-unstable-2022-26-07
unpacking sources
unpacking source archive /nix/store/7xx9aiq0ykjvdap0hcb9rj142zhfl05g-compiler-rt-src-unstable-2022-26-07
source root is compiler-rt-src-unstable-2022-26-07/compiler-rt
patching sources
applying patch /nix/store/qvyl9jgm1a1mlix44qbsgrd1ipwciamk-X86-support-extension.patch
patching file lib/builtins/CMakeLists.txt
Hunk #2 succeeded at 727 with fuzz 2.
applying patch /nix/store/8z4wq03gvjdyvpldnrl7x1sy14qfk1pk-gnu-install-dirs.patch
patching file cmake/base-config-ix.cmake
applying patch /nix/store/x0137mdpq76zfp2xvn3ncawys2g4c93i-normalize-var.patch
patching file cmake/Modules/CompilerRTUtils.cmake
Hunk #1 succeeded at 392 with fuzz 2 (offset 90 lines).
applying patch /nix/store/dbapbg570sx4xsbp50s52azwh6agj40m-darwin-targetconditionals.patch
patching file lib/sanitizer_common/sanitizer_mac.cpp
Hunk #1 succeeded at 628 (offset 15 lines).
Hunk #2 succeeded at 648 (offset 15 lines).
Hunk #3 succeeded at 702 (offset 15 lines).
Hunk #4 succeeded at 717 (offset 15 lines).
applying patch /nix/store/j9lspxnlbkrcskxpxg7q6nb74wnn6v2b-darwin-plistbuddy-workaround.patch
patching file cmake/builtin-config-ix.cmake
Hunk #1 succeeded at 100 (offset 3 lines).
applying patch /nix/store/jd7mnr62kxgks1rwnrrfg22vwnggkpxf-armv7l.patch
patching file cmake/builtin-config-ix.cmake
Hunk #1 FAILED at 24.
1 out of 1 hunk FAILED -- saving rejects to file cmake/builtin-config-ix.cmake.rej
patching file lib/builtins/CMakeLists.txt
Hunk #1 succeeded at 562 with fuzz 2 (offset 88 lines).
Hunk #2 FAILED at 596.
1 out of 2 hunks FAILED -- saving rejects to file lib/builtins/CMakeLists.txt.rej
error: builder for '/nix/store/lzn83jsmycjbakly6ndfsgqflga1p2g2-compiler-rt-libc-unstable-2022-26-07.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/k6gm4ljvgqiffr90phj7drq5lwlk0zr8-clang-wrapper-unstable-2022-26-07.drv' failed to build
error (ignored): error: cannot unlink '/tmp/nix-build-clang-unstable-2022-26-07.drv-3': Directory not empty
error: 1 dependencies of derivation '/nix/store/pwmsh8mljyjzv1ql8zwfpb4qg39lp06w-mesa-22.3.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/21rimxydc53lsfpn7x9pac33cg4rq4hx-opengl-drivers.drv' failed to build
error: 1 dependencies of derivation '/nix/store/i8xxc0k75igxwhkbhfzdwfa03bqncnvg-nixos-tmpfiles.d.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dxz7pap3w9fblq3hygjd1412dxzr3car-tmpfiles.d.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ywzi0jqcvd4gh1mvrqrhcyj61x9102fb-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/lja802dl57v324cbp4hsycjajcnla1np-nixos-system-uhyret-23.05pre440928.aa1d74709f5.drv' failed to build
```
I will try playing with it a bit more.
|
LLVM 15 is being worked on in #194634 |
You'll need to use #194634 Some of the patches on llvmPackages_git are completely borked |
Some progress. With
```
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
```
hardware.opengl.package = (staging.mesa.override { llvmPackages = llvm15.llvmPackages_15; }).drivers;
```
it compiles the LLVM parts correctly. Mesa itself fails:
```
Dependency LLVMSPIRVLib found: NO found 14.0.0.0 but need: '>= 15.0' ; matched: '>= 8.0.1.3', '< 15.1'
Run-time dependency llvmspirvlib found: NO
meson.build:1895:2: ERROR: Dependency lookup for LLVMSPIRVLib with
method 'pkgconfig' failed: Invalid version, need 'LLVMSPIRVLib' ['>= 15.0'] found '14.0.0.0'.
```
I probably need to override a few more things, but I feel that I am on
the right track.
|
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:
And then I patch in Mesa like this:
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. |
@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. |
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. |
@athas put |
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 |
You don't need to do that, Mesa 22.3 is in the current unstable now. Make sure you're not using the |
Hm, I'm not even getting sddm to show up with nixos-unstable and the llvm15 override shown here. With If I set |
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. |
I don't know about Xorg (I use Wayland), but the console jankyness was fixed by adding this kernel boot parameter: |
@MasterMind2k the invisible cursor issue is fixed in the xorg amdgpu driver repo but they've not cut a release for it. |
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 Just wanted to add my 2-cents in case people are still waiting for further reports to close this ticket. |
Is there a ticket I could track? I would like to test it as soon as it hits nixos-unstable. |
Please just use the |
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. |
That cannot possibly be affected by the DDX, assuming the other settings are unchanged. |
You're not running Plasma Wayland, are you? |
They haven't released for a year: https://github.com/freedesktop/xorg-xf86-video-amdgpu/tags |
I am just reporting what I saw. Granted, it might be something else. But that was the only change :S.
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. |
In that case, should the default order of drivers be changed to reflect that? |
It should probably just default to |
https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/-/issues/61 |
I can confirm the 7900xtx is working fine with linux 6.2 and the modesetting video driver. |
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. |
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: |
As stated multiple times before, please use |
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? |
@edel-km, this comment says so. But I am unable to verify. |
|
Thank you. This makes it crystal clear! |
It's probably also worth explicitly mentioning that using the |
Maybe this is a stupid question, but why would we even want to use amdgpu instead of modesetting then? |
You generally don't want to use it. |
Then we should also go about updating the wiki page where it is explicitly recommended to use |
That is woefully outdated, as you can see by the fact that it refers to NixOS 20.09. |
Well, I suppose we could update it either way: #218433 |
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. |
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 |
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:
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
The text was updated successfully, but these errors were encountered: