Hi,
System: Ubuntu 20.04.1, Gpu: Sapphire RX 5700 XT, Drivers tested (20.30, 20.40, 20.45)
When I try to install drivers, I get this:
Building initial module for 5.4.0-56-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/amdgpu-dkms-firmware.0.crash'
Error! Bad return status for module build on kernel: 5.4.0-56-generic (x86_64)
Consult /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/make.log for more information.
dpkg: error processing package amdgpu-dkms (--configure):
installed amdgpu-dkms package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of amdgpu:
amdgpu depends on amdgpu-dkms (= 1:5.6.20.906300-1164792); however:
Package amdgpu-dkms is not configured yet.
dpkg: error processing package amdgpu (--configure):
dependency problems - leaving unconfigured
Setting up xserver-xorg-amdgpu-video-amdgpu (1:19.1.0-1164792) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up mesa-amdgpu-omx-drivers:amd64 (1:20.1.6-1164792) ...
Setting up libegl1-amdgpu-mesa:amd64 (1:20.1.6-1164792) ...
Setting up libegl1-amdgpu-mesa:i386 (1:20.1.6-1164792) ...
Setting up libgl1-amdgpu-mesa-glx:amd64 (1:20.1.6-1164792) ...
Setting up libgl1-amdgpu-mesa-glx:i386 (1:20.1.6-1164792) ...
Setting up amdgpu-pro-core (20.45-1164792) ...
Setting up libgles2-amdgpu-mesa:amd64 (1:20.1.6-1164792) ...
Setting up libgles2-amdgpu-mesa:i386 (1:20.1.6-1164792) ...
Setting up libgl1-amdgpu-mesa-dri:amd64 (1:20.1.6-1164792) ...
Setting up libgl1-amdgpu-mesa-dri:i386 (1:20.1.6-1164792) ...
dpkg: dependency problems prevent configuration of amdgpu-pro-rocr-opencl:
amdgpu-pro-rocr-opencl depends on amdgpu-dkms (= 1:5.6.20.906300-1164792); however:
Package amdgpu-dkms is not configured yet.
dpkg: error processing package amdgpu-pro-rocr-opencl (--configure):
dependency problems - leaving unconfigured
Setting up vulkan-amdgpu-pro:amd64 (20.45-1164792) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up libosmesa6-amdgpu:amd64 (1:20.1.6-1164792) ...
Setting up libosmesa6-amdgpu:i386 (1:20.1.6-1164792) ...
dpkg: dependency problems prevent configuration of amdgpu-pro:
amdgpu-pro depends on amdgpu (= 20.45-1164792); however:
Package amdgpu is not configured yet.
dpkg: error processing package amdgpu-pro (--configure):
dependency problems - leaving unconfigured
Setting up comgr-amdgpu-pro:amd64 (1.7.0-1164792) ...
No apport report written because MaxReports is reached already
Setting up hsa-runtime-rocr-amdgpu:amd64 (1.2.0-1164792) ...
Setting up ocl-icd-libopencl1-amdgpu-pro:amd64 (20.45-1164792) ...
Setting up clinfo-amdgpu-pro (20.45-1164792) ...
Setting up hip-rocr-amdgpu-pro (20.45-1164792) ...
dpkg: dependency problems prevent configuration of amdgpu-pro-lib32:
amdgpu-pro-lib32 depends on amdgpu (= 20.45-1164792) | amdgpu-hwe (= 20.45-1164792); however:
Package amdgpu is not configured yet.
Package amdgpu-hwe is not installed.
amdgpu-pro-lib32 depends on amdgpu-pro (= 20.45-1164792) | amdgpu-pro-hwe (= 20.45-1164792); however:
Package amdgpu-pro is not configured yet.
Package amdgpu-pro-hwe is not installed.
dpkg: error processing package amdgpu-pro-lib32 (--configure):
dependency problems - leaving unconfigured
Setting up libglapi1-amdgpu-pro:amd64 (20.45-1164792) ...
No apport report written because MaxReports is reached already
Setting up libglapi1-amdgpu-pro:i386 (20.45-1164792) ...
Setting up libgl1-amdgpu-pro-dri:amd64 (20.45-1164792) ...
Setting up libgl1-amdgpu-pro-dri:i386 (20.45-1164792) ...
Setting up libgl1-amdgpu-pro-appprofiles (20.45-1164792) ...
Setting up libegl1-amdgpu-pro:amd64 (20.45-1164792) ...
Setting up libegl1-amdgpu-pro:i386 (20.45-1164792) ...
Setting up libegl1-amdgpu-mesa-drivers:amd64 (1:20.1.6-1164792) ...
Setting up libegl1-amdgpu-mesa-drivers:i386 (1:20.1.6-1164792) ...
Setting up libgles2-amdgpu-pro:amd64 (20.45-1164792) ...
Setting up libgles2-amdgpu-pro:i386 (20.45-1164792) ...
Setting up libgl1-amdgpu-pro-glx:amd64 (20.45-1164792) ...
Setting up libgl1-amdgpu-pro-glx:i386 (20.45-1164792) ...
Setting up opencl-rocr-amdgpu-pro:amd64 (20.45-1164792) ...
Setting up libgl1-amdgpu-pro-ext:amd64 (20.45-1164792) ...
Setting up amdgpu-lib (20.45-1164792) ...
Setting up amdgpu-lib32 (20.45-1164792) ...
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
Errors were encountered while processing:
amdgpu-dkms
amdgpu
amdgpu-pro-rocr-opencl
amdgpu-pro
amdgpu-pro-lib32
E: Sub-process /usr/bin/dpkg returned an error code (1)
Solved! Go to Solution.
well, i'm not baszczer, but still.
Thanks to baszczer, I've tryed to use 5.4.0-54 (the previous one) and it just works!
To install 5.4.0-54 do next:
sudo apt install linux-image-5.4.0-54-generic linux-headers-5.4.0-54-generic linux-modules-extra-5.4.0-54-generic
then reboot to 5.4.0-54
then
sudo apt remove linux-image-5.4.0-56-generic linux-image-unsigned-5.4.0-56-generic
(unsigned mentioned here because it tryed to install it for me by some reason.. it just helped)
then do
sudo apt autoremove
then go to /usr/src and remove linux-headers-5.4.0-56-generic and inux-headers-5.4.0-56 (if any of them are there)
now you can do
sudo ./amdgpu-install -y
@mountkiddThank you for your response!
My GPU is R9 390. Honestly saying I don't know much what those parameters in my previous attempt means. I just saw someones comment that it worked with that combo and I tried. Will try your suggestion "/amdgpu-pro-install -y --opencl=legacy,rocr"
@mountkiddMy gpu is r9 390. I tried "./amdgpu-pro-install -y --opencl=legacy,rocr" like you suggested in fresh install, but still have same problem - black screen after restart. Can't enter terminal using alt + f4 in this black screen.
At the end of drivers install I get these warnings:
DKMS: install completed.
update-initramfs: Generating /boot/initrd.img-5.8.0-45-generic
W: Possible missing firmware /lib/firmware/amdgpu/green_sardine_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_ta.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_sos.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_toc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_asd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_ta.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_asd.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_sos.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_vcn.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_vcn.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_vcn.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/arcturus_smc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/dimgrey_cavefish_dmcub.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_dmcub.bin for module amdgpu
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/vgubuntu-swap_1)
I: Set the RESUME variable to override this.
Setting up amdgpu (20.50-1232447) ...
Setting up vdpau-driver-all:i386 (1.3-1ubuntu2) ...
@darius00 Those are just warnings for firmware on newer cards and can be ignored. The R 390 is a legacy card, so the rocr can be left out.
Were there any other msgs after the setting up vdpau...?
You may have to try other alt+Fn keys. alt+F4 works on my systems, other users have had success with something else. After boot, wait for disk light activity to subside, then try alt+F1 give it a few seconds, if nothing then alt+F2..F7 in turn with a few seconds in between each.
I think you are very close to having it running...
@mountkiddtrying multiple install combinations with ./amdgpu-install and ./amdpgu-pro-install and always getting same result - black screen after restart. While in dark screen no combination to open terminal like alt+f1..f12 or ctrl+alt+f1..f12 works. Only ctrl+alt+del to restart works. Drivers installation gives no error. This is entire installation log: https://pastebin.com/m1akZYVk
The install log looks OK - can you pastebin /var/log/kern.log after an unsuccessful boot ?
darius00
I can confirm I too am having the same problem.
Even on a FRESH system (ie: MB, blank SSD, Vega 56 GPU, LTS 20 fresh install from the USB - right "out of the box" so to speak)
https://community.amd.com/t5/drivers-software/amdgpu-pro-20-45-amdgpu-dkms-fails-on-fresh-install-ub...
I have to press "left ALT key + RIGHT arrow key" couple times to enter into GRUB
login and then run "amdgpu-pro-uninstall" in order to get past the black screen.
Here is a solution to consider with clear instructions.
Thanks a lot! Should we waiting drivers for linux-image-5.8.0-55-generic ? What do you think?
Similar problems have resurfaced for me on the new 21.20 release, which 'seems' to install on ubuntu-20.04, but then crashes the system on reboot.
https://community.amd.com/t5/drivers-software/amdgpu-pro-21-20-fails-gt-installs-ubuntu-20-04-but-cr...
[I would like to think its human error on my part here, could be, alas, its a fresh install, which is baffling to me]
I am interested in your comment "linux-image-5.8.0-55-generic" - are you saying that we should wait for AMD to update something, or Ubuntu to update something? I tried linux-image-5.8.0-59-generic and even bumped headers down to linux-image-5.8.0-45-generic with no luck.
PS: any luck installing amdgpu-pro 21.20 ?
bridgman
Did the 3-18 release happen?
I downloaded what I thought was the new version on the 19th (and again today on the 20th) and still ended up with errors (even on a new system build) - Went here:
https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-20-45
got this one: amdgpu-pro-20.45-1188099
=> dpkg: error processing package amdgpu-dkms (--configure):
(and from there, the cascade is dependency errors)
re: did the 3/18 release happen ?
Yes, I tried entering a few different chips in the driver download page (most recent was RX5700) and each time it pointed me to the 20.50 download. Here's the page I ended up on:
re: no-dkms
My recollection was that no-dkms was only an option for the all-open install option and not for --pro. When I was asked I was told that one of the components (probably OpenCL) could not work with an upstream driver. That surprised me... checking to see if it is actually true.
Anyways, if you were trying a --pro install please try without it, and vice versa.
And yes, I will get my butt into the office in the next couple of days and bring home a test system so I can actually try these things out rather than just making suggestions. Having only one Linux box at home is pretty limiting.
@mountkidd The particular command, amdgpu-install --headless --no-dkms --legacy=rocr, serves a specific purpose, but probably shouldn't be used by everyone. By the way, the no-dkms parameter used to work with amdgpu-pro-install, but in 20.40 or so it has been changed, and now only works with amdgpu-install. The end result is the same however. Like I've explained in earlier posts, I use these particular parameters to install only OpenCL, without changing the amdgpu stack, and without building a kernel module.
I want to do this, because I wanted to run Folding@Home, the massively distributed application that can be used to calculate the structure of the covid-19 virus (which has the focus at the moment I believe, but can be used for other medical purposes). For this application, and some others like blender, and darktable, I needed a working OpenCL 2.0 with image support.
I also didn't want to change the amdgpu stack, because that's great for running games and other 'ordinary' applications.
This was complicated by the fact that I was running Ubuntu 1910 that wasn't supported, and failed to install. Later I switched to 2004, that once again wasn't supported, and I'm currently running 2010, that yet again isn't supported. This is because amdgpu-pro-install will try to compile a kernel module, which only works when you're running the right kernel version. So I wanted to run the upstream version.
And last but not least, because the GPU I'm using is a Vega 64, I didn't need, or want to install Orca, only RoCr (used to be PAL).
Fortunately, all this is possible if you use amdgpu-install with parameters opencl=rocr (only install RoCr, don't install Orca), headless (only install OpenCL, use existing amdgpu stack), and no-dkms (don't build the kernel module).
This installation may not be for everybody, however.
But because I install this way, I also noticed a bug that's been introduced in 20.45, and is still present in 20.50. Installing amdgpu-pro this way just ignores the no-dkms parameter. When you're installing 20.45, even though you tell it not to use dkms with --no-dkms, it will try to build the kernel module, fail, and adding insult to injury, will then blacklist amdgpu, so Ubuntu will fail to boot to the normal graphics mode.
Versions of amdgpu-pro 20.45, and 20.50 display a new bug, caused by the use of RoCr, instead of PAL. The current versions of RoC since 3.5.0 render Luxmark 3.1 benchmark images incorrectly using the default compiler options. You have to disable the fast relaxed math option to render correct images. This may well indicate that fast relaxed math is broken in RoC.
amdgpu-pro used to display correct images with fast relaxed math enabled. However, because 20.45, and 2050 are using RoCr now, they now exhibit the same behaviour as RoC. So with these versions if you've enabled fast relaxed math, Luxmark will render incorrectly, and you'll have to disable fast relaxed math to render correct images.
With Debian you're going to need to install the non-free firmware package as well - did you do that before rebooting ?
Hold on - the latest Debian (Buster) appears to be too old (kernel 4.19 for example) for your card. I think Ubuntu 20.10 is probably your best bet.
Yes. I put the additional resources on a separate stick that the installer recognised and utilised. The install completed and the reboot went fine until after grub selection, where nothing happened. Curiously, plugging hdmi into the motherboard does not show anything on the monitor, even the bios. /Something/ was functioning in the driver, but not enough for it to render off its own back since it was still using llvmpipe (nomodeset) in order to work.
@bridgman: you wrote:
We also have an updated version of 20.45 with a workaround going through testing, ...
Now the Release Note say: "Release Date: December 17, 2020" and "Fixed Issues: Ubuntu 20.04 kernel update to 5.4.0-56.62 causes compilation of its amdgpu kernel module to fail."
Downloading this shows: all Files are dated "Oct 28" and it still fails building with new kernel, but works with 5.4.0-54.
Is there still the old link in the new Release Notes?
Can you please check the build number you downloaded - it's part of the download URL.
As far as I know build 1188099 (which is what the download button pointed to when I checked a few minutes ago) was tested with 5.4.0-58 which should mean that the issue introduced in 5.4.0-56 has been worked around.
I'm not sure off the top of my head what actually changed - source/binary files or just packaging scripts - but will find out.
@bridgman wrote:Can you please check the build number you downloaded - it's part of the download URL.
As far as I know build 1188099 (which is what the download button pointed to when I checked a few minutes ago) ...
I'm not sure which "download button" you mean. I've found the "Release Notes" with the following link:
https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-20-45
Inside is a link to download the driver for Ubuntu 20.04.1:
https://drivers.amd.com/drivers/linux/amdgpu-pro-20.45-1164792-ubuntu-20.04.tar.xz
Ahh, OK... I see the problem. If you go to the following page and click on the "+" beside "Ubuntu x64 64-bit" you should see a "Download" button over on the right, and that button uses a newer link:
https://drivers.amd.com/drivers/linux/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz (for reference, do not click)
We'll get the page you used updated as well, but for now please use the page above (first link). If you click on the second link directly you will probably get a "Download Incomplete" error.
Great thanks @bridgman , this compiles with kernel 5.4.0-58.
But the page you gave brings me to a question:
I have the "Radeon Pro WX 2100". If I got to the "AMD Drivers and Support" page and select:
"Radeon Pro" -> "Radeon Pro WX x100 Series" -> "Radeon Pro WX 2100"
... the driver for Ubuntu is only for 18.04.4
Does this mean my card is not really compatible with Ubuntu 20.04? But the "Release Notes" for Radeon 20.45 lists in the "Product Family Compatibility" the "AMD Radeon™ Pro WX-series".
Please help me out of this confusion....
No problem. We periodically release enterprise versions of the drivers with extra fixes and ISV certs, which usually come out a couple of months after the generic releases. All the workstation card download links are pointing to enterprise drivers (eg 20.Q2) which are still only supporting up to 18.04.
I expect that the next enterprise driver release will include 20.04.1 support from 20.45 but in the meantime the 20.45 driver you installed supports "WX series" cards as well as the "RX" (consumer) versions of the WX cards.
The WX 2100 looks like just what I need for a build I'm working on, so I may end up getting one as well.
@bridgman: Thanks for info and help. So I check again in February....
@bridgman can you take a look at https://community.amd.com/t5/drivers-software/unable-to-install-amdgpu-pro-drivers-on-ubuntu-20-04-1...
I can't also install amdgpu-pro driver on my Ubuntu 20.04.
@baszczer I've tried linux kernels 5.4.0-56, 5.4.0-54, 5.4.0-52, but it does not work.
@bitfire777 wrote:@baszczer I've tried linux kernels 5.4.0-56, 5.4.0-54, 5.4.0-52, but it does not work.
Latest drivers (20.45 Release Date:12/17/2020) works fine for me with 5.4.0-58-generic.
I've also tried 5.4.0-58-generic (default for Ubuntu 20.04 LTS) and latest driver 20.45, but I get the same error.
I'm trying to install with this command:
./amdgpu-pro-install --opencl=legacy,rocr --headless -y
./amdgpu-pro-install --opencl=legacy,pal --headless -y
Do you use amdgpu-pro-install command?
@bitfire777 wrote:I've also tried 5.4.0-58-generic (default for Ubuntu 20.04 LTS) and latest driver 20.45, but I get the same error.
I'm trying to install with this command:
./amdgpu-pro-install --opencl=legacy,rocr --headless -y
./amdgpu-pro-install --opencl=legacy,pal --headless -yDo you use amdgpu-pro-install command?
Yes, but without "headless".
I use this command:
./amdgpu-pro-install -y --opencl=rocr
Hi ,
I tried running the command:
./amdgpu-pro-install -y --opencl=rocr
in an attempt to install the AMD pro drivers on Linux Mint 20 which is based on Ubuntu 20.04.1 but I cannot use Kernel (5.4.0-56-generic). When I attempted to install the AMDGPU PRO drivers I got the following error message:
"ERROR: Unable to install pin package. This driver may not support the running operating system."
I was attempting to utilise the latest AMD Driver-amdgpu-pro-20.45-1188099-ubuntu-20.04 but to no avail.
What can I do to install the AMDgpu pro drivers into Linux Mint?
>in an attempt to install the AMD pro drivers on Linux Mint 20 which is based on Ubuntu 20.04.1 but I cannot use Kernel (5.4.0-56-generic).
Which kernel were you using ?
If you get that working let me know 20h2 is hell. I used Slackware back in the day, the switch to Ubuntu.
I don't like Kubuntu.
Thanks Tim and Bascar for trying to help here.
AMD just released 20.50 driver : https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-20-50 that works fine on ubuntu 20.04.2
@mlynch wrote:Hi ,
I tried running the command:
./amdgpu-pro-install -y --opencl=rocr
in an attempt to install the AMD pro drivers on Linux Mint 20 which is based on Ubuntu 20.04.1 but I cannot use Kernel (5.4.0-56-generic). When I attempted to install the AMDGPU PRO drivers I got the following error message:
"ERROR: Unable to install pin package. This driver may not support the running operating system."
I was attempting to utilise the latest AMD Driver-amdgpu-pro-20.45-1188099-ubuntu-20.04 but to no avail.
What can I do to install the AMDgpu pro drivers into Linux Mint?
Be sure that you have amdgpu-pro-20.45-1188099-ubuntu-20.04 drivers.
You could try:
1. If you have leftovers from a previous installation
./amdgpu-pro-install --uninstall (in downloaded amd driver folder)
amdgpu-pro-uninstall -y
and then reboot and install drivers again
2. Be sure that you have earlier version of the kernel installed (52 or 54) and properly remove 56.
Again clean leftovers, reboot, install latest kernel and after that amd drivers.
I'm running into the same problem, have done some digging around in the 5.4.0-56 (and 58) kernel sources.
The pci_platform_rom definition has been removed from linux/pci.h and the implementation from drivers/pci/rom.c. The method is still available in the mainline kernel.
The commit comment states "pci_platform_rom() now has no remaining callers, so remove it." this is the cause of the compile failures.
For those interested the change is in commit 53be88965f9834777f01c2669a862b307be355b4 in the Ubuntu kernel GIT repository see https://wiki.ubuntu.com/Kernel/SourceCode
Am going to see if I can mirror the changes made to the in-kernel Radeon module to get the AMDGPU module compiling.
Update
After patching the AMD GPU driver compiled and loaded successfully with Ubuntu Kernel 4.5.0-48.
The solution is based on the changes made in the Ubuntu kernel, it requires modifying the AMD GPU source.
static bool amdgpu_read_platform_bios(struct amdgpu_device *adev) { phys_addr_t rom = adev->pdev->rom; size_t romlen = adev->pdev->romlen; void __iomem *bios; adev->bios = NULL; if (!rom || romlen == 0) return false; adev->bios = kzalloc(romlen, GFP_KERNEL); if (!adev->bios) return false; bios = ioremap(rom, romlen); if (!bios) goto free_bios; memcpy_fromio(adev->bios, bios, romlen); iounmap(bios); if (!check_atom_bios(adev->bios, romlen)) goto free_bios; adev->bios_size = romlen; return true; free_bios: kfree(adev->bios); return false; }
@tim-savage wrote:I'm running into the same problem, have done some digging around in the 5.4.0-56 (and 58) kernel sources.
The pci_platform_rom definition has been removed from linux/pci.h and the implementation from drivers/pci/rom.c. The method is still available in the mainline kernel.
The commit comment states "pci_platform_rom() now has no remaining callers, so remove it." this is the cause of the compile failures.For those interested the change is in commit 53be88965f9834777f01c2669a862b307be355b4 in the Ubuntu kernel GIT repository see https://wiki.ubuntu.com/Kernel/SourceCode
Am going to see if I can mirror the changes made to the in-kernel Radeon module to get the AMDGPU module compiling.
Update
After patching the AMD GPU driver compiled and loaded successfully with Ubuntu Kernel 4.5.0-48.
The solution is based on the changes made in the Ubuntu kernel, it requires modifying the AMD GPU source.
- Install the AMD GPU 20.45 driver. It will fail during the install, that is expected.
- As root edit /usr/src/amdgpu-5.6.20.906300-1164792/amd/amdgpu/amdgpu_bios.c
- Find the amdgpu_read_platform_bios function and replace it with:
static bool amdgpu_read_platform_bios(struct amdgpu_device *adev) { phys_addr_t rom = adev->pdev->rom; size_t romlen = adev->pdev->romlen; void __iomem *bios; adev->bios = NULL; if (!rom || romlen == 0) return false; adev->bios = kzalloc(romlen, GFP_KERNEL); if (!adev->bios) return false; bios = ioremap(rom, romlen); if (!bios) goto free_bios; memcpy_fromio(adev->bios, bios, romlen); iounmap(bios); if (!check_atom_bios(adev->bios, romlen)) goto free_bios; adev->bios_size = romlen; return true; free_bios: kfree(adev->bios); return false; }- Complete the install with apt install
- Reboot
@tim-savageThis is very useful info as I am having the sames issues (on 2 hosts) with re-installing 20.30 & 20.40 on Kubuntu 18.04 HWE. In Sept 2020, amdgpu 20.30 installed cleanly over kernels 4.15.0-115 & 117. Now the 20.40 install breaks on 4.15.0-130 in amdgpu_bios.c, with the pci_platform_rom def'n missing from pci.h. Attempts to re-install 20.30 now breaks with the same error. The pci_platform_rom def'n is absent in headers for both 4.15.0-129 & 130.
"apt install" in your Point 3. above needs some clarification. What directory should this run from? And is there more to be added to this command string or are there other commands that need to be run prior/after? The amdgpu-dkms build is 90% through the amdgpu-pro-install.
@bridgmanIs there anything you can do here? @nite reported amdgpu install issues related to amdgpu-dkms build in 18.04 HWE as well, a month ago.
Thanks guys!
@bridgmanIs there anything you can do here? @nite reported amdgpu install issues related to amdgpu-dkms build in 18.04 HWE as well, a month ago.
Yeah, the kernel change might have been ported to 18.04 HWE as well, although I really don't like the idea of backporting changes like removed symbols to LTS.
What I really don't understand though is why you are still seeing the problem. In theory at least we posted an updated driver with a fix for this weeks ago.
I confirmed that the download pages are currently pointing to build 1188099, which is supposed to include a fix for this. Can you please confirm that you are downloading from links on the following page ?
https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-20-45
@bridgman I appreciate your response. Your link does indeed point to amdgpu-pro-20.45-1188099-ubuntu-20-04.tar.xz. This package is for Ubuntu 20.04 and may require a minimum of kernel 5.10. I want to stay with Ub 18.04 LTS & kernel 4.15 for a few more months.
I did update to kernel 4.15.0-132 on another of my hosts, and was able to successfully patch amdgpu_bios.c as per @tim-savage 's post for the kernel build. I still do not have a clear procedure to follow now to get this patched code into the amdgpu install stream. An uninstall and re-install will wipe the patch. I'm currently exploring rebuilding the amdgpu-dkms-5.6.14.224-1147287_all.deb (for the 20.40 upgrade) with the patched amdgpu_bios.c code. But there must be a way to restart the amdgpu-pro install at the failed amdgpu-dkms step. @tim-savage alluded to it, but that needs a lot more info to remove the risk.
We don't normally remove support for older kernels when we move to newer drivers; removal of "support" in the release notes usually means "we aren't QA testing on that any more" so there's a good chance that 20.45 should work for you as well.
The 20.45 source theoretically already contains the pci_platform_rom() fix and the source code looks the same as what was recommended above... which presumably means that the recommended change came from upstream.
https://cgit.freedesktop.org/~agd5f/linux/tree/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c?h=amd-20.45
If the pci_platform_rom change has also made its way into 18.04 then we may have to either spin the 20.40 package or test & recommend use of 20.45 instead.
I'm on the fence re: asking you to start a new ticket for 18.04.5 - possibly same root cause, but probably different resolution unless 20.45 works at least as well as 20.40 for you.
@bridgman Thanks for the suggestion. The install of 20.45 over 18.04 LTS breaks on setting up amdgpu-pro-pin - "ERROR: This package can only be installed on Ubuntu 20.04". I was hoping this would work...
So we're back to: 1) replacing the patched amdgpu_bios.c in the amdgpu-dkms...deb or, 2) patching amdgpu_bios.c and running amdgpu-pro-install from the build amdgpu-dkms step and onward or, 3) waiting for AMD to create a 20.45 over 18.04 HWE version package.
@mountkidd wrote:@bridgman Thanks for the suggestion. The install of 20.45 over 18.04 LTS breaks on setting up amdgpu-pro-pin - "ERROR: This package can only be installed on Ubuntu 20.04". I was hoping this would work...
I am getting very tired of that "you can't install this on that" code :)
OK, sounds like we are going to have to do something for 18.04 as well.
Going back to the 20.04 discussion, can anyone comment re: whether 20.45 is working on 20.04.1 for them ? Trying to figure out if we have a problem there as well, since it apparently worked OK on our internal testing.
@bridgman wrote:
@mountkidd wrote:@bridgman Thanks for the suggestion. The install of 20.45 over 18.04 LTS breaks on setting up amdgpu-pro-pin - "ERROR: This package can only be installed on Ubuntu 20.04". I was hoping this would work...
I am getting very tired of that "you can't install this on that" code :)
OK, sounds like we are going to have to do something for 18.04 as well.
Going back to the 20.04 discussion, can anyone comment re: whether 20.45 is working on 20.04.1 for them ? Trying to figure out if we have a problem there as well, since it apparently worked OK on our internal testing.
I checked the 20.45 bundle and yes the amdgpu_bios.c patch is in there.
A service request was submitted earlier today with 3 support files and I do have a log file bundle that couldn't be attached to the request.
I can be a tester for a 20.45 over 18.04 HWE package if required...
Checked out Ub 20.04 usage at Einstein at Home. 7 hosts on the Top50 list are using Ub 20.04 with the 5.4.0 kernel, 2 are -59 and 5 are -62 on AMD gpu's 480/570/580/Vega/VII. Can't be certain, but these hosts are most likely amdgpu 20.45.
Thanks @bridgman