Score:0

AMD Radeon Driver Purgatory

sa flag

I am using Ubuntu 21.04 and I wanted to install OpenCL in order to mine. After accidentally installing the AMD pro driver and then uninstalling it, I am now left without any driver, as reported by sudo lshw -c video:

*-display UNCLAIMED
       description: VGA compatible controller
       product: Renoir
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:06:00.0
       version: ce
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix vga_controller bus_master cap_list
       configuration: latency=0
       resources: iomemory:fc0-fbf iomemory:fc0-fbf memory:fce0000000-fcefffffff memory:fcf0000000-fcf01fffff ioport:1000(size=256) memory:d0400000-d047ffff

My question is, there was a driver installed by default, so how do I get that one back? I have tried

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update && sudo apt upgrade

as well as

sudo apt-get remove ubuntu-desktop
sudo apt-get install ubuntu-desktop

followed by rebooting, but nothing has worked.

I've also tried to install amdgpu both through the installer provided by AMD and through apt, but keep getting the error:

dpkg: dependency problems prevent configuration of amdgpu:
  amdgpu depends on amdgpu-dkms (= 1:5.9.20.104-1247438); however:
  Package amdgpu-dkms is not configured yet.

But trying to install amdgpu-dkms gives a similar error.

From what I've read, the official AMD drivers aren't supported with my kernel version, but I should be able to revert to the original default driver, right? I also found someone who had success with 21.04 with just installing OpenCL over the default here.

grep -E 'amdgpu|radeon' /etc/modprobe.d/* gives

/etc/modprobe.d/blacklist-amdgpu.conf:blacklist amdgpu
/etc/modprobe.d/blacklist-framebuffer.conf:blacklist radeonfb
/etc/modprobe.d/blacklist-radeon.conf:blacklist radeon
Pilot6 avatar
cn flag
Probably you have blacklisted the default kernel module. The unclear part is what is the GPU and how did you install the pro driver. Also output of `grep -E 'amdgpu|radeon' /etc/modprobe.d/*` may give some clue.
tmath avatar
sa flag
@Pilot6 Yes, there are 3 entries there: `/etc/modprobe.d/blacklist-amdgpu.conf:blacklist amdgpu /etc/modprobe.d/blacklist-framebuffer.conf:blacklist radeonfb /etc/modprobe.d/blacklist-radeon.conf:blacklist radeon`. The GPU is integrated Radeon graphics with Ryzen 4500U. And I installed the pro driver following this: https://www.amd.com/en/support/kb/faq/amdgpu-installation
Score:1
cn flag

amdgpu module is blacklisted. Remove it by

sudo rm /etc/modprobe.d/blacklist-amdgpu.conf
sudo update-initramfs -u

and reboot.

radeon is also blacklisted, but it doesn't make any difference for your GPU, but you can delete that file too.

tmath avatar
sa flag
It worked! I'm not sure how it got blacklisted.... but thanks!
tmath avatar
sa flag
Hey @Pilot6, I'm having a different problem now. I tried to install OpenCL using `./amdgpu-install --opencl=legacy --headless --no-dkms` and it appears to have worked, but `clinfo` reveals that I have 0 devices available, and it also gives a message saying that `libamdocl64.so` is missing. Do you have any ideas by any chance?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.