cancel
Showing results for 
Search instead for 
Did you mean: 

Drivers & Software

baszczer
Adept III

Can't install amdgpu drivers on Ubuntu 20.04.1 (5.4.0-56-generic)

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)

1 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

View solution in original post

200 Replies

To confirm, this is Ubuntu 20.10, and I am running Plasma on it.

Thanks. So far, I did:

 - amdgpu-uninstall

 - Commented out /etc/modprobe.d/blacklist-amdgpu.conf

   (NB. different folder than /etc/blacklist)

At that point, I was able to run "sudo apt autoremove" without it crashing

on amdgpu and dkms.  This did not change anything in /boot, and a reboot at that point showed

same faults (no audio, can't boot except from recovery kernel).  I am now going to try

to do this kernel refresh thing.

 

0 Likes

Bingo! I reran "sudo update-grub", and then rebooted, at which point the system booted normally, with

audio working again.

I think I now have a working system that does NOT support open-cl, so am roughly back at square 0.

In summary, I think what caused the problem was the presence of /etc/modprobe.d/blacklist-amdgpu.conf.

Corrective measures:

  - Comment out or delete /etc/modprobe.d/blacklist-amdgpu.conf

  - sudo apt autoremove

    (That may take a while.)

  - sudo update-grub

  -  Reboot.

Tomorrow, I am going take another crack at installing open-cl. I will try the PRO version first

(I have a 5700 XT) and if that works with amdgpu-pro-install --no-dkms

I am, at least, back on the air now. Thanks!

0 Likes

Good to hear. Sorry about the /etc/blacklist typo, I was going from memory which is never a good idea these days :)

The blacklist file is the result of a failed dkms kernel driver build. The installer blacklists the default driver then builds the new dkms kernel driver with a different name IIRC - and the blacklist makes sure that the new driver is used.

If the dkms build fails then you don't have a new driver, which causes problems.

Note that with starting with the 20.45 release the backend options for OpenCL have changed, so you'll need to use something like --opencl=rocr rather than --opencl=pal. Details are in the installation instructions.

Good luck with the rest of the install.

0 Likes

I've had issues with installing amdgpu 20.45 on Ubuntu 20.45, caused by what looks like a bug in the installation program.

I have a Vega 64, and I only need OpenCL, so I can install 20.40 on Ubuntu 20.10 like so:

amdgpu-install --no-dkms --headless --opencl=pal

According to the instruction I should be able to install 20.45 like so:

amdgpu-install --no-dkms --headless --openl=rocr

I need to use this command, because Ubuntu 20.10 comes with kernel 5.8, and trying to compile kernel module amdgpu will fail. That's where the

--no-dkms

part comes in.

This method is working fine for 20.40. However, when I enter the above on 20.45, the --no-dkms part is ignored, and it will try to compile kernel module amdgpu anyway! Adding insult to injury, when it fails, it will blacklist amdgpu, and the computer will fail to set the correct graphics mode on reboot!

I was able to solve all this by letting DKMS fail, and after failing removing amdgpu-dkms like so:

sudo apt autoremove amdgpu-dkms

and then removing the blacklist of amdgpu. After this the computer will reboot normally, and OpenCL seems to be working.

I'm running Ubuntu 18.04.5 with kernel 5.4.0-65, and installing amdgpu 20.40 for Ubuntu 18.04.5 HWE fails with the same error. Also installing 20.45 failed as the script tried to install amdgpu-hwe but it was not provided in 20.45.

So will a new version for 18.04.5 be released?

0 Likes

@BobHuang0724    amdgpu 20.40 (for 18.04HWE) still expects the missing kernel symbol and will only work with kernels up to 5.4.0-54.  Newer kernels need amdgpu 20.45 and as you know, there isn't a 20.45 version for 18.04 HWE. 

You have several choices.  The easiest might be to upgrade to 20.04.1 and install amdgpu 20.45.  Avoid direct install of 20.04.2 if possible as it installs kernel 5.8.0/HWE and there seems to be a number of issues.  The do-release-upgrade to 20.04.1 has not yet triggered the kernel change to 5.8.0, so your 5.4.0-65 will still be ok.  

If you are adventurous you could try to trick the amdgpu 20.45 installer, leaving your 18.04.5/5.4.0-65 system almost as is.  Run amdgpu uninstall first of course, then edit /etc/os-release, changing 18.04's to 20.04's in 3 places prior to re-trying the install and post-install, restore the contents of /etc/os-release. 

Or you could just wait for a 20.45 version for 18.04HWE and I don't know if this has any chance of happening.

0 Likes

@mountkidd @bridgman 

I'm close to accepting that my gpu is broken given that the solution that has worked for others is not working for me. Are there ways to prove that it is not, and instead not cooperating?

0 Likes

"Are there ways to prove that it is not, and instead not cooperating?"

If you have an extra free drive, install just Ubuntu and the amdgpu drivers on it and you'll see.

0 Likes

Done a clean install of debian, setting up wifi and all. Rebooting just gives me an underscore flashing in the top left after grub selection. Having also attempted Manjaro installation, I think it's safe to say that it just doesn't work. Gonna return it and hope for a calming gpu market to get a new part. To newcomers to this thread, Ubuntu 20.04.2 on linux kernel 5.4.65 should get the 20.45 download of amdgpu to function for a 5500 (xt)

0 Likes

If you have time, maybe try Ubuntu 20.10 just to be sure. Ubuntu 20.04 is just old enough that the in-box drivers might have problems but I would be really surprised to see a problem with 20.10. Don't install any drivers from amd.com, just use the upstream drivers. Installing 20.10 should give you at least a 5.8 kernel.

Your Manjaro install should have had a sufficiently new set of drivers if you installed 20.2 but Manjaro can also install older kernel/drivers under certain conditions.

0 Likes

@bridgman 

> Installing 20.10 should give you at least a 5.8 kernel

A fresh install Ubuntu 20.04.2 comes with the 5.8.0 (& HWE) kernel as well...

0 Likes

In taking out the card to return it, I noticed the top left hole has no wire going into it but for both the gpu and the power supply have metal in. I should have mentioned much earlier that the GPU never showed up on the BIOS in any way. Perhaps it was just lacking sufficient power supply?

https://pasteboard.co/JOw1DDd.jpg

0 Likes

Interesting... I think that is the "Sense B" wire. Not sure how standardized power supply behaviour is but my recollection is that without that wire the P/S will treat the cable as a 6-pin rather than 8-pin and put out less current. Might still be OK for a 5500, not sure - are there other P/S cables you could use which do have all 8 spots populated ?

Can you talk a bit more about "not appearing in the BIOS" ? I had been thinking that part was OK because you were getting a grub display, or was the grub display showing up on a different GPU eg integrated graphics ?

0 Likes

The CPU customisation options were showing, as were the fan speeds and settings for chassis and CPU. There was no option to monitor or adjust GPU fans nor was there settings such as KVM or similar. This is the only 8 pin I have and it would explain a lot.

1. The graphics could only display when plugged into GPU, even though it's not seemingly working

2. The drivers that would utilise the GPU at its normal potential lacked sufficient power to do so --> black screen

3. RGB strip on front face and LED light beside power input both being their pretty selves as that requires next to nothing.

All this time I've been learning Linux shenanigans it may have just been as simple as a faulty cable.

Another image: https://pasteboard.co/JOwbFGH.jpg

I've just checked 4 power supplies here and all 8 pins are present in each of the pcie connectors.

0 Likes

If underpowering the GPU has damaged it, the power supply is new and has a warranty. If it comes down to it, I may not have to pay out of hand for the yet further risen price of the GPU. This alleviates a fair bit of tension for me. Most likely I will only post here again once I have it all working since there's nothing more I can think to ask or say. You've all been very helpful in this process despite linux most likely having nothing to do with the problem so thank you.

Around two weeks ago I did a clean reinstall of Ubuntu 20.04.1, then apt upgrade, got the 5.8.0 kernel and I'm happy to report that both GPU acceleration in games works properly (as in: 50fps in EU4, instead of 3 fps that I had with 20.04.1 and 5.4 kernel back in october) and VA-API video encoding also works. So, no amdgpu drivers needed for these two things!

 

0 Likes

@Tomash   

>Around two weeks ago I did a clean reinstall of Ubuntu 20.04.1, then apt upgrade, got the 5.8.0 kernel and I'm happy to report that both GPU acceleration in games works properly (as in: 50fps in EU4, instead of 3 fps that I had with 20.04.1 and 5.4 kernel back in october) and VA-API video encoding also works. So, no amdgpu drivers needed for these two things!

Clear things up a bit...  You are running 20.04.2 w/kernel 5.8 and no amdgpu driver.  Was the HWE stack installed with 5.8?  What driver are you using?  There has to be something...

0 Likes

I'm trying to install these drivers in a combination with all kernels from 5.4.X to 5.9.12 and drivers 20.40 or 20.45 to support 6800 but without success.

 

The main issue is. If I install with dkms 20.40 or without dkms the clinfo showing 0 devices. 

If I install and compile dkms with any of the kernels with 20.45 - clinfo stacks and doesn't finish at all. Always stacked at this line -  Preferred local atomic alignment: 0

0 Likes

The 20.40 driver will only work with 5.4.0-54 kernel or lower. Anything above that is missing the pci_platform_rom symbol which the driver requires.

The 20.45 driver includes a workaround for the missing symbol and should work with any 5.4.x kernel.

Separately, the 20.45 driver includes support for the RX 6800 while the 20.40 driver does not. You need to install the -pro package with --opencl=rocr rather than the pal or legacy options used for older drivers and older HW.

Another option AFAIK would be to skip installing the dkms package completely and just update to the newest available kernel (5.11 is probably available as a Ubuntu package by now) - nearly all of the OpenCL functionality should be there other than non-upstreamable things like DirectGMA.

Anyways, if you get 20.45 installed with --opencl=rocr and are still having problems it would be best to start a new thread, and maybe attach dmesg output as a start. Trying to keep this thread focused on install problems caused by unexpected kernel updates to 20.04.1 (and 18.04.5 I guess).

0 Likes

Thanks, but I already followed all these instructions:

Topic created - https://community.amd.com/t5/drivers-software/6800-amd-linux-driver-20-45-clinfo-problem-20-04-2-lts...

Let's move to this topic and keep this topic clean.

Edit:

Using --no-dkms always force installing amdgpu-dkms even it's set to not be in use.

amdgpu-core amdgpu-dkms amdgpu-dkms-firmware amdgpu-pro-core amdgpu-pro-rocr-opencl clinfo-amdgpu-pro comgr-amdgpu-pro hip-rocr-amdgpu-pro hsa-runtime-rocr-amdgpu hsakmt-roct-amdgpu libdrm-amdgpu-amdgpu1
libdrm-amdgpu-common libdrm2-amdgpu ocl-icd-libopencl1-amdgpu-pro opencl-rocr-amdgpu-pro

Best 

0 Likes

vtcrno
--no-dkms does not exist in this version of amdgpu-pro

When I enter that command I get an error that says it's not a valid tack on option...

@mountkidd 

$ uname -a
Linux tomek-um425ia 5.8.0-43-generic #49~20.04.1-Ubuntu SMP Fri Feb 5 09:57:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ lsmod | grep amd
edac_mce_amd 32768 0
kvm_amd 98304 0
kvm 712704 1 kvm_amd
ccp 98304 1 kvm_amd
amdgpu 5214208 32
iommu_v2 20480 1 amdgpu
gpu_sched 36864 1 amdgpu
i2c_algo_bit 16384 1 amdgpu
ttm 102400 1 amdgpu
drm_kms_helper 217088 1 amdgpu
drm 552960 13 gpu_sched,drm_kms_helper,amdgpu,ttm

$ apt show linux-image-5.8.0-43-generic
Package: linux-image-5.8.0-43-generic
Version: 5.8.0-43.49~20.04.1
Built-Using: linux-hwe-5.8 (= 5.8.0-43.49~20.04.1)
Priority: optional
Section: kernel
Source: linux-signed-hwe-5.8
Origin: Ubuntu
Maintainer: Canonical Kernel Team <kernel-team@lists.ubuntu.com>

 

0 Likes

hey guys i checked here redit everwhere and still have issue installing amdgpu-pro installation

OS

Ubuntu 20.04.2 LTS

Driver

amdgpu-pro-20.45-1188099-ubuntu-20.04

 

i even tried to install it in recovery mode as root

i keep getting error processing package amdgpu-pro-lib32

amdgpu-dkms
amdgpu
amdgpu-pro
amdgpu-pro-lib32

E: Sub-process /usr/bin/dpkg returned an error code (1)

and if i reboot system after that all i see is black screen unless reboot to recovery and purge the driver all over again!

 

i appreciate if you can help out

tnX in advance

 

 

0 Likes

We should have a 20.50 driver posted on Thursday (3/18) with kernel 5.8 support.

In the short term you probably would have to downgrade from HWE kernel (5.8) to generic kernel (5.4) but I'm not sure it's worth it unless something goes wrong with the 20.50 posting.

thanks thou i already did that too and still have same issue

amin@amin-Desktop:~$ uname -r
5.4.0-54-generic

 

Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Errors were encountered while processing:
amdgpu-dkms
amdgpu
amdgpu-pro
amdgpu-pro-lib32
E: Sub-process /usr/bin/dpkg returned an error code (1)

Not 100% sure, but that might just be leftover lock files from previous install attempts.

I think running uninstall gets rid of them - were you doing that between install attempts ?

0 Likes


i thought that might be the case or even corrupted package re download it

then went in recovery root mode

did

sudo apt clean

sudo apt-get autoremove

and tried again same result

0 Likes

I don't think the steps you listed would necessarily accomplish the same as running the amdgpu uninstall (pro or non-pro depending on what you installed).

0 Likes

well i tried them anyway
beside if i dont use usr/bin/amdgpu-pro-uninstall.... after every fail attempts 

it dont even boot

all i see is black screen

0 Likes

@aminlv   When you booted to a black screen, did you try alt+F4 to get a login prompt?  Doing this might have allowed a login followed by startx to get the gui back.

0 Likes

screen with alt+f4 flickering unable to type...

with alt+f2 manage to login to console but sudo startx refused to run...

in the end u reinstall whole OS and retried with

sudo apt-get install -y linux-image-generic

sudo apt-get purge ......

after that i didnt get error code 1

however i get this warning 

WARNING: nomodeset detected in kernel parameters, amdgpu requires KMS

i still see black screen but in console i confirmed gpu seems installed

wondering how to fix this part now..

its like solving 5000 pieces puzzle =_=

0 Likes

>WARNING: nomodeset detected in kernel parameters, amdgpu requires KMS

Guessing you have this in your grub settings ? Nothing is going to work while nomodeset is there.

>sudo apt-get install -y linux-image-generic

If you use the newly posted 20.50 driver you won't need to go back to the generic kernel - a stock 20.04.2 install should work.

0 Likes

After restarting the computer, I couldn't start Ubuntu normally, I only had a low res image. This occurred after 20.45 failed to install. Not only had it ignored the --no-dkms parameter, it had blacklisted amdgpu as well! I had to remove the blacklist before I could boot normally.

0 Likes

@aminlv   Which video card are you installing?  Show your amdgpu install command line string...  Need to see which options you have selected.

0 Likes

rx 580 4gb

0 Likes

@bridgman 

>>> We should have a 20.50 driver posted on Thursday (3/18) with kernel 5.8 support. <<<

Success - 3x! 

Installed amdgpu 20.50 on 20.04.2 w/5.8.0-45 kernel.  Clean install w/ amdgpu-install -y  --opencl=legacy,rocr --no-dkms --headless.  Video on this host is fglrx vintage, Thames 7500M, so main driver is MESA/Clover

Installed amdgpu 20.50 on 2 other hosts w/ RX480 20.04.2 & 5.4.0-67 kernel.  Clean installs w/ amdgpu-pro-install -y  --opencl=legacy,rocr.

 

0 Likes

That's great. Apologies for the delay but glad to hear it's working now.

0 Likes

GPU: R9 390
Installed fresh ubuntu 20.04.2.  Kernel 5.8.0-45. Original drivers are "radeon". Everything would be good, but always after ~10minutes of usage screen goes dark.

trying install AMDGPU drivers  20.50, but after install just by .amdgpu-install or with parameters - .amdgpu-install -y --opencl=legacy,rocr --no-dkms --headless   after restart ubuntu can't boot anymore. Always black screen.

Black screen doesn't add any records to syslog or xorg logs.

Any idea? I really want to use ubuntu, but it's unusable.

 

0 Likes

@darius00   You haven't said which card you are installing and knowing that and what video drivers you intend to be using would help a lot.

Your "amdgpu-install -y --opencl=legacy,rocr --no-dkms --headless" install string raises some questions.  no-dkms says skip building custom modules for your system, use only canned libs.  headless says install opencl only, nothing else.  Video drivers would default to whatever comes with the kernel.  Is that really what you want?  Why?

Using ./amdgpu-pro-install -y --opencl=legacy,rocr should work right out of the box for your 20.04.2/5.8.0-45 and give you the full AMD video driver stack tailored to your system.  Of course after running ./amdgpu-install --uninstall to remove everything from your previous attempts.