AMD Radeon Driver Purgatory
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
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.