3853
Comment:
|
3865
|
Deletions are marked like this. | Additions are marked like this. |
Line 7: | Line 7: |
However it is possible to make that system boot with the '''AMDGPU driver (v19.10)''' provided by AMD on a '''linux kernel 4.19''' (which is currently backported on Stretch and also the linux kernel version of Buster). | However it is possible to make that system boot with the '''AMDGPU driver (v19.10)''' provided by AMD on a '''linux kernel 4.19''' (which is currently backported on '''Stretch''' and also the linux kernel version of '''Buster'''). |
How to install official AMDGPU linux driver with kernel 4.19.x on Stretch and Buster
My system is made of an AMD Athlon 200GE CPU/APU with Vega3 graphics on a B450M motherboard (Asus PRIME B450M-A). This APU uses the amdgpu driver provided by the linux kernel.
Although I upgraded to linux 4.19 on stretch, the system freezes during boot-up and until now the only way to make it boot was either to use kernel >= 4.20 or use the "nomodeset" kernel parameter.
However it is possible to make that system boot with the AMDGPU driver (v19.10) provided by AMD on a linux kernel 4.19 (which is currently backported on Stretch and also the linux kernel version of Buster).
I guess that could help also those having a Ryzen 2200G if they face a similar issue.
Steps in brief
- Get the linux driver from amd's website
Install amdgpu-dkms & amdgpu-core packages
- Slight modification of linux-headers' Makefile (to allow compiliation of amdgpu-dkms)
- Apply a patch to the amdgpu-dkms source so that is does compile with linux 4.19
- reconfigure amdgpu-dkms
- You're done
Notes:
- From what I observed, DKMS compiles for the running kernel and for the highest kernel version installed. It is unlikely compilation will work with my patch applied on something else than v4.19, so you should remove the linux-headers-* packages of the other versions installed
In case your system freezes at boot with 4.19, add the "nomodeset" kernel parameter at boottime into grub (or by amending /etc/default/grub" ). Once in 4.19 you can proceed with DKMS compilation with the steps bellow
What you need/Prerequistes
- AMD's linux driver (take the package for Ubunto 18.04.2)
- A debian system running stretch or buster with kernel 4.19.x
linux-headers-<version>-amd64 package has to be installed so that you can compile the admgpu driver
apt-get install linux-headers-<version>-amd64
- my patch to AMD's amdgpu-dkms source code so that it can compile on 4.19.x
Procedure
Extract the archive downloaded from AMD
~$ tar -xvJf amdgpu-pro-19.10-785425-ubuntu-18.04.tar.xz
Install only these 2 packages : amdgpu-dkms & amdgpu-core. This will fail at the end because it cannot compile on 4.19 without applying my patch.
~# dpkg -i amdgpu-dkms_19.10-785425_all.deb amdgpu-core_19.10-785425_all.deb
Modify the following file /usr/src/linux-headers-<version>-amd64/Makefile and change the value of the 2 first lines to the version of the kernel (4 and 19 for kernel 4.19 in this case)
~# editor /usr/src/linux-headers-<version>-amd64/Makefile
VERSION = 4
PATCHLEVEL = 19
- Apply the patch to the amdgpu source code
~# patch -p1 < 01-amdgpu_19.10_for_linux_4.19.patch
- Reconfigure the amdgpu-dkms package so that it does compile against 4.19
~# dpkg-reconfigure amdgpu-dkms
Normally, building & installation should have succeeded
- Reboot
Additional notes
If you are on stretch I strongly suggest you upgrade to the latest mesa, libdrm, libglvnd, wayland packages from stretch-backports. I'm not sure this is actually mandatory, but on my system the packages from these source are in their stretch-backports versions:
- mesa 18.2.8
- libdrm 2.4.95
- libglvnd 1.1.0
- wayland 1.16.0
- All this has been done on:
Stretch 9.9 with kernel 4.19 & packages described above
- Buster 10.0 as of 2019-Jun-11