The amdgpu-dkms
fails to compile with the (5.2) kernel in Debian testing, but works with the (4.19) kernel in stable. In order to install the AMD pro driver, a kernel downgrade would be necessary.
Downgrade the current kernel to the kernel available in stable
Running sudo apt edit-sources
Add the stable repository:
deb http://http.debian.net/debian/ stable main contrib non-free
Only apt pin the kernel to stable
To prevent other packages downgrading to stable, we will only pin the kernel to the stable branch.
Create a new file /etc/apt/preferences.d/kernel
with:
Package: linux-image-amd64
Pin: release a=stable
Pin-Priority: 950
Package: linux-headers-amd64
Pin: release a=stable
Pin-Priority: 950
and /etc/apt/preferences.d/apt-branches
with:
Package: *
Pin: release a=sid
Pin-Priority: 700
Package: *
Pin: release a=testing
Pin-Priority: 650
Package: *
Pin: release a=stable
Pin-Priority: 600
For Debian to recognize the repositories, we will need to refresh the package list:
sudo apt update
Once this is done, the kernel and headers in stable can be installed:
sudo apt install linux-image-amd64/stable linux-headers-amd64/stable
Installing the AMD-Pro driver
Download the proprietary AMD-Pro driver here.
Unpack the downloaded driver
cd ~/Downloads
tar -Jxvf amdgpu-pro-YY.XX-NNNNNN.tar.xz
cd ~/Downloads/amdgpu-pro-YY.XX-NNNNNN
Install the AMD-Pro driver by running to provided script:
./amdgpu-pro-install -y --opencl=pal,legacy
Note: The command above installs the base kernel and all the Pro Components. See the documentation here for installing only parts of the AMD-Pro driver.
After installing the AMD-Pro driver, restart blender and the option for OpenCL rendering with the GPU should be available in the user preferences.