Differences between revisions 2 and 3
Revision 2 as of 2019-06-11 13:38:42
Size: 1792
Editor: ?Bastif
Comment:
Revision 3 as of 2019-06-11 14:12:51
Size: 3853
Editor: ?Bastif
Comment:
Deletions are marked like this. Additions are marked like this.
Line 19: Line 19:

'''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
Line 20: Line 25:
 * AMD's linux driver  * AMD's linux driver (take the package for Ubunto 18.04.2)
Line 27: Line 32:

'''Procedure'''
 1. Extract the archive downloaded from AMD<<BR>>
  `~$ tar -xvJf amdgpu-pro-19.10-785425-ubuntu-18.04.tar.xz`
 1. 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`
 1. 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`
{{{#!highlight makefile numbers=disable
VERSION = 4
PATCHLEVEL = 19
}}}
 1.#4 Apply the patch to the amdgpu source code
   `~# patch -p1 < 01-amdgpu_19.10_for_linux_4.19.patch`
 1. Reconfigure the amdgpu-dkms package so that it does compile against 4.19
   `~# dpkg-reconfigure amdgpu-dkms`
 1. Normally, building & installation should have succeeded
 1. 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

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

  1. Get the linux driver from amd's website
  2. Install amdgpu-dkms & amdgpu-core packages

  3. Slight modification of linux-headers' Makefile (to allow compiliation of amdgpu-dkms)
  4. Apply a patch to the amdgpu-dkms source so that is does compile with linux 4.19
  5. reconfigure amdgpu-dkms
  6. 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

Procedure

  1. Extract the archive downloaded from AMD

    • ~$ tar -xvJf amdgpu-pro-19.10-785425-ubuntu-18.04.tar.xz

  2. 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

  3. 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
  1. Apply the patch to the amdgpu source code
    • ~# patch -p1 < 01-amdgpu_19.10_for_linux_4.19.patch

  2. Reconfigure the amdgpu-dkms package so that it does compile against 4.19
    • ~# dpkg-reconfigure amdgpu-dkms

  3. Normally, building & installation should have succeeded

  4. 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