This is a guide and a testing summary for enabling amdgpu (instead of radeon) on Ubuntu 18.04.1 having a R9 390X installed and trying out various kernels.
After reading this and reading/watching Level1Techs guide and many others I finally managed to get amdgpu loaded instead of radeon. The following steps show how to accomplish that.
Problem
I want to play games on Linux via DXVK using an open source driver (not amdgpu-pro). Since DXVK only works with the amdgpu driver I had to get rid of Ubuntu loading radeon all the time.
My setup
Ubuntu 18.04.1 LTS
i7-5830k
R9 390X (actually 2, but should not matter)
How to
I. Newest drivers
@NOT-TESTED: It should also work with the official drivers delivered with the Ubuntu 18.04.1 installation. If you do not want to run unofficial drivers skip this step.
@NOTE: Download newer unofficial drivers from PPA to get better performance in DXVK. May be unstable.
@ATTENTION: Ensure you do not have another graphics driver PPA like ppa:paulo-miguel-dias/mesa added. You may check his Mesa drivers out: STABLE or UNSTABLE
@ERROR general error due to PPA: Purge graphic driver PPA(s) to fall back to original drivers and clean up:
@DID-NOT-WORK: I made a copy of the 40_custom file in /etc/grub.d/. It did not work when I placed it in 40_amdgpu instead of /etc/default/grub. (see the /etc/grub.d/README for more info)
V. Update GRUB and the initial ramdisk
Let the changes above take affect:
sudo update-grub2 && sudo update-initramfs -u -k all
and
reboot
VI. Verify
To verify that the amdgpu driver has loaded and is in use, execute one or more of the following commands:
4.1. change all numbers from zero to one if you also have integrated graphic.
/sys/class/drm/card1/device/hwmon/hwmon1/
4.2. change the temp/revolutions mapping. The change of fan speed does interfere with the rendering. Therefore the values should be held constant such that no interpolation takes place in between. The last value will be chosen as maximum fan speed for overheating protection.
This is a guide and a testing summary for enabling amdgpu (instead of radeon) on Ubuntu 18.04.1 having a R9 390X installed and trying out various kernels.
After reading this and reading/watching Level1Techs guide and many others I finally managed to get amdgpu loaded instead of radeon. The following steps show how to accomplish that.
Problem
I want to play games on Linux via DXVK using an open source driver (not amdgpu-pro). Since DXVK only works with the amdgpu driver I had to get rid of Ubuntu loading radeon all the time.
My setup
Ubuntu 18.04.1 LTS
i7-5830k
R9 390X (actually 2, but should not matter)
How to
I. Newest drivers
@NOT-TESTED: It should also work with the official drivers delivered with the Ubuntu 18.04.1 installation. If you do not want to run unofficial drivers skip this step.
@NOTE: Download newer unofficial drivers from PPA to get better performance in DXVK. May be unstable.
Install the latest driver from https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers:
@ERROR unmet dependencies: install original drivers first:
@ATTENTION: Ensure you do not have another graphics driver PPA like ppa:paulo-miguel-dias/mesa added. You may check his Mesa drivers out: STABLE or UNSTABLE
@ERROR general error due to PPA: Purge graphic driver PPA(s) to fall back to original drivers and clean up:
You may start over.
II. Xorg configuration
Create a xorg configuration file that will be loaded automatically on boot:
/usr/share/X11/xorg.conf.d/<nr-name>.conf
for example42-amdgpu.conf
@NOT-TESTED: Add this to the already existing
10-amdgpu.conf
file. May gets overwritten by driver installation.@OPTION: You can also add this to
/etc/X11/xorg.conf
or/etc/xorg.conf
.III. Blacklist radeon
Create a blacklist file with the module that shall be blacklisted:
/etc/modprobe.d/<name>.conf
for exampleblacklist-radeon.conf
@OPTION: It is possible to use already existing
blacklist.conf
files by just appendingblacklist radeon
somewhere.IV. GRUB configuration
Add or change these parameters in the grub configuration
/etc/default/grub
:@DID-NOT-WORK: I made a copy of the
40_custom
file in/etc/grub.d/
. It did not work when I placed it in40_amdgpu
instead of/etc/default/grub
. (see the/etc/grub.d/README
for more info)V. Update GRUB and the initial ramdisk
Let the changes above take affect:
and
VI. Verify
To verify that the amdgpu driver has loaded and is in use, execute one or more of the following commands:
Run a Vulkan test application:
and
VII.I Testing with newer kernels (as of 2018-11-19)
I tried to boot various kernels after the steps above.
To install other kernels I used the Ubuntu Kernel Update Utility:
Here is the summary of my testing:
4.15.0
WORKING!
Ubuntu 18.04.1 LTS default kernel4.17.5
WORKING!
kernel used in this video4.18.0
WORKAROUND!
current default kernel of Ubuntu 19.10 Disco (2018-11-19)4.18.15
WORKAROUND!
latest 4.18.x kernel with changes to amdgpu4.18.19
WORKAROUND!
latest 4.18.x kernel4.19
FAILURE!
blackscreen or dmesg:4.19.1
FAILURE!
blackscreen or dmesg:4.19.2
FAILURE!
dmesg:Direct firmware load for amdgpu/hawaii_mc.bin failed with error -2
@NOTE: I did not investigate more on the errors of the
4.19.x
kernels yet.VII.II Workaround
4.18-4.18.19
To get
4.18
kernels working:Backup your current firmware files:
Download the linux-firmware of Ubuntu 19.10 Disco (current Disco version uses kernel 4.18.0 as default) from https://packages.ubuntu.com/en/disco/linux-firmware or:
Extract files:
Go into the new firmware direcotry:
Install the firmware:
Reboot
VII.II Testing with newer kernels (as of 2020-01-01)
Here is a summary of my testing:
4.18.16
WORKING!
Mint 19.1 with all mentioned kernel parameters and Radeon blacklisted4.18.17 - 4.18.20
BLACKSCREEN!
Firmware update did not fix the issue4.18.17 - 4.18.20
NOT TESTED!
omit the dpm kernel parameter4.20.12
WORKING!
dpm kernel parameter omitted5.00.00
WORKING!
dpm kernel parameter omitted5.2.21
RECOMMENDED!
WORKING!
amdgpu.dpm=1 is fixed and worksVIII Write a fan control service to fix stutter issues & for silent gaming
write a service with file name: amdgpu-fancontrol.service
put the service into
take the script from github: link
change the parameters of script if you want to
4.1. change all numbers from zero to one if you also have integrated graphic.
4.2. change the temp/revolutions mapping. The change of fan speed does interfere with the rendering. Therefore the values should be held constant such that no interpolation takes place in between. The last value will be chosen as maximum fan speed for overheating protection.
4.3 check the directory to be sure that it exists
put the script into /usr/bin/amdgpu-fancontrol
activate the service