Repository navigation
amdgpu-pro: 17.40 -> 21.30 - #151019
amdgpu-pro: 17.40 -> 21.30#151019
Conversation
|
This seems to work with linux-5.10. There are still lots of broken/untested things and cleanup to do. |
There was a problem hiding this comment.
I'm not so sure this is the best way, but using $out for these seemed to pollute the system.
There was a problem hiding this comment.
This is gross, but it depends on libffi.so.7, and we don't seem to have that anywhere else. Maybe there's a better place for it.
There was a problem hiding this comment.
Is it possible to patchelf it to use our libffi or are the ABIs too incompatible?
This got broken by 370d3af. Previously it was setting /run/opengl-driver/lib. `driverLink` is missing the /lib.
|
This should be ready for review. OpenGL and vulkan work in 32 and 64-bit. There's a bunch of other stuff in the upstream package, but I'm not sure how useful any of it is, so I'd like to gather some feedback / test cases. In any case this should be better than what was in there. @vcunat maybe? |
|
If it's very unlikely to make something worse, I can't see why wait. One of my GPUs should be compatible if I look right*, but it's rather inconvenient for me to reboot this particular machine. * release notes: https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-21-30 |
Atemu
left a comment
There was a problem hiding this comment.
Haven't tested it but I have some comment on the code.
There was a problem hiding this comment.
Is it possible to patchelf it to use our libffi or are the ABIs too incompatible?
| preFixup = (if stdenv.is64bit | ||
| # this could also be done with LIBGL_DRIVERS_PATH, but it would need to be | ||
| # set in the user session and for Xorg | ||
| then '' | ||
| expr1='s:/opt/amdgpu/lib/x86_64-linux-gnu/dri\0:/run/opengl-driver/lib/dri\0\0\0\0\0\0\0\0\0\0\0:g' | ||
| expr2='s:/usr/lib/x86_64-linux-gnu/dri[\0\:]:/run/opengl-driver/lib/dri\0\0\0\0:g' | ||
| perl -pi -e "$expr2" $out/lib/xorg/modules/extensions/libglx.so | ||
| '' | ||
| else '' | ||
| expr1='s:/opt/amdgpu/lib/i386-linux-gnu/dri\0:/run/opengl-driver-32/lib/dri\0\0\0\0\0\0:g' | ||
| # we replace a different path on 32-bit because it's the only one long | ||
| # enough to fit the target path :( | ||
| expr2='s:/usr/lib/i386-linux-gnu/dri[\0\:]:/run/opengl-driver-32/dri\0\0\0:g' | ||
| '') + '' | ||
| perl -pi -e "$expr1" \ | ||
| $out/opt/amdgpu/lib/libEGL.so.1.0.0 \ | ||
| $out/opt/amdgpu/lib/libgbm.so.1.0.0 \ | ||
| $out/opt/amdgpu/lib/libGL.so.1.2.0 | ||
|
|
||
| perl -pi -e "$expr2" \ | ||
| $out/opt/amdgpu-pro/lib/libEGL.so.1 \ | ||
| $out/opt/amdgpu-pro/lib/libGL.so.1.2 \ | ||
| $out/opt/amdgpu-pro/lib/libGLX_amd.so.0 | ||
|
|
||
| find $out -type f -exec perl -pi -e 's:/opt/amdgpu-pro/:/run/amdgpu-pro/:g' {} \; | ||
| find $out -type f -exec perl -pi -e 's:/opt/amdgpu/:/run/amdgpu/:g' {} \; |
There was a problem hiding this comment.
Is string substitution with perl really a good solution here?
It was like this before, so I wouldn't see it as blocking but surely there must be a better solution.
| , xorg, patchelf, openssl, libdrm, udev | ||
| , libxcb, libxshmfence, libepoxy, perl, zlib | ||
| , ncurses | ||
| , libsOnly ? false, kernel ? null |
There was a problem hiding this comment.
Is it not possible to use just the libs anymore? Using just the AMF libs for HW accelerated video encoding with an otherwise fully AMDGPU (non-pro) system would be a use-case here for example.
| curlOpts = "--referer http://support.amd.com/en-us/kb-articles/Pages/AMD-Radeon-GPU-PRO-Linux-Beta-Driver%e2%80%93Release-Notes.aspx"; | ||
| url = "https://drivers.amd.com/drivers/linux/amdgpu-pro-${build}-ubuntu-20.04.tar.xz"; | ||
| sha256 = "sha256-WECqxjo2WLP3kMWeVyJgYufkvHTzwGaj57yeMGXiQ4I="; | ||
| curlOpts = "--referer https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-21-30"; |
There was a problem hiding this comment.
IME just support.amd.com also works.
|
|
||
| boot.blacklistedKernelModules = [ "radeon" ]; | ||
| boot.kernelPackages = pkgs.linuxKernel.packagesFor | ||
| (pkgs.linuxKernel.kernels.linux_5_10.override { |
There was a problem hiding this comment.
Is 5.10 the only compatible kernel? If so, please make meta.broken a reflection of that fact.
|
This does not work for me with pantheon desktop. The session always crashes when i try to login. RX 480 |
|
@davidak could you share the output of your Xorg log? e.g. Thanks |
|
I can confirm this works with my setup! I'm using xorg + xmonad. |
|
This PR still sounds like improving the situation, so let's merge already. Feel free to improve in further PRs. |
| "https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-${build}.tar.xz"; | ||
| sha256 = "1c073lp9cq1rc2mddky2r0j2dv9dd167qj02visz37vwaxbm2r5h"; | ||
| curlOpts = "--referer http://support.amd.com/en-us/kb-articles/Pages/AMD-Radeon-GPU-PRO-Linux-Beta-Driver%e2%80%93Release-Notes.aspx"; | ||
| url = "https://drivers.amd.com/drivers/linux/amdgpu-pro-${build}-ubuntu-20.04.tar.xz"; |
There was a problem hiding this comment.
How did you find that link?
There was a problem hiding this comment.
not sure if such a file is still available. they have some installer here https://www.amd.com/de/support/linux-drivers
There was a problem hiding this comment.
Yeah, https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=amdgpu-pro-installer#n30 definitely giving that update a pass.
Motivation for this change
Upgrade to latest amdgpu-pro package.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes