The problem is that most recent hardware doesn't get timely support with Linux kernels even with latest versions of Ubuntu. Here is the step-by-step workaround that made a trick for me at Lenovo X13 which has Ryzen 7 Pro 4750U with Radeon graphics codename 'Renoir' on Ubuntu 18.04. Should be the same for any other codemane correspondingly:
- Check the folder /lib/firmware/amdgpu of your installation. Most expectedly it hasn't any files with *.bin extension and 'Renoir' tag in the name.
- If folder 'amdgpu' is missing in your /lib/firmware path, create this folder by yourself using sudo. You gonna need one for the next steps.
- Go to bash and install Ubuntu Kernel Mainline Utility (UKMU) with following:
$ sudo add-apt-repository ppa:cappelikan/ppa
$ sudo apt update
$ sudo apt install mainline
UKMU is needed to get most recent kernels. DO NOT install any new kernels at this step!
- Install one of two ppa for mesa (in 2020 oibaf is lagging behind due to delayed updates, so kisak is more up to date):
$ sudo add-apt-repository ppa:oibaf/graphics-drivers
$ sudo add-apt-repository ppa:kisak/kisak-mesa
- complete installation of mesa drivers by:
$ sudo apt update
$ sudo apt dist-upgrade
$ sudo apt install mesa
- Go to https://packages.debian.org/sid/all/firmware-amd-graphics/download and find ftp server which is closest to you, i.e. http://ftp.de.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-amd-graphics_20210208-3_all.deb
It has direct link for the debian installation package of AMD drivers, which is of Feb 08th, 2021 to the date of this post
Click selected link and download the file
DO NOT install the deb by itself! Instead open it with archive viewer and find a folder 'amdgpu' inside the archived file data.tar.gz
Once located extract 'amdgpu' to your drive. With Renoir in particular you don't need other folders like 'r128' or 'radeon' for Renoir (owners of older graphics may find their hardware exactly in those two folders).
Copy or move the contents of extracted 'amdgpu' to /lib/firmware/amdgpu (or to r128 or to radeon correspondingly).
Check the contents of of /lib/firmware/amdgpu. Now it should have several *.bin files with 'Renoir' tag in the name i.e. 'renoir_me.bin' on so on.
now tell the kernel it has some new drivers for installed hardware:
$ sudo update-initramfs -u
If at step 11 you made sure files for renoir are in /lib/firmware/amdgpu folder, do not worry if you will see something like:
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8125b-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8125a-3.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168fp-3.fw for module r8169
W: Possible missing firmware /lib/firmware/amdgpu/navi12_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/raven_ta.bin for module amdgpu
Now go to UKMU and install one of most recent kernels. IMPORTANT: install the kernel 5.4.x or above as lower kernels may lack support for WiFi on most recent machines. You don't want to lose your connection to the internet while solving the issue with AMD graphics.
Once installation of selected kernel is completed, reboot the PC.
Upon the reboot your new kernel should find proper driver for your hardware so it must work normally already. If not repeat step 12 and reboot to newly installed kernel once more.
Use below to make sure your graphics card now 'CLAIMED' by the system:
$ sudo lshw -C display
In case the output shows:
and has no UNCLAIMED than everything is fine now.
- if earlier you have tried various options in grub, prior you send the PC to reboot/shut down make sure you made below changes to the file
or you may find unexpected difficulties while shut down.