The new way of doing this does not involve blacklisting any modules. You only have to send two parameters to the kernel:
For Caribbean Islands GPUs
radeon.cik_support=0 amdgpu.cik_support=1
For Sea Islands GPUs
radeon.si_support=0 amdgpu.si_support=1
I personally like to add it as default, so I edit /etc/default/grub, and then I add the kernel parameters to GRUB_CMDLINE_LINUX_DEFAULT, like this:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="radeon.cik_support=0 amdgpu.cik_support=1 radeon.si_support=0 amdgpu.si_support=1"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
Remember to run update-grub and reboot the system so the changes take effect.
I can confirm this works for a 390x running Ubuntu since 17.10. Also tried 18.04, 18.10, 19.04, 19.10, 20.04 since I keep using it as they get released. (I believe you can also do the same on 17.04)
Alternatively, if you want to enable the new Dynamic Power Management and Display Code experimental support, you need to also add the following lines
amdgpu.dc=1
amdgpu.dpm=1
For more information regarding DC code check this link:
https://wiki.archlinux.org/index.php/AMDGPU#AMD_DC
From my personal experience with a 390x card, DC code was unstable and I had to disable it to get an stable kernel. I haven't retried to enable it in the last couple of months so I don't know if this bug in DC was fixed.
Best Answer
I just spent the whole day on this too - I couldn't find any working instructions so here's what I came up with for AMD Radeon RX 580 on Ubuntu 16.04 system with no graphical desktop, installed over SSH:
Assume a fresh Ubuntu install system
Get the AMD APP SDK from here - Download, Unpack and then use
sudo
to run the install script.Download the most recent linux driver (17.50 at time of writing this answer) from here, extract the
.xz
file usingtar Jxvf <filename>
andcd
into the directory created after extracting the.xz
file.Now run the installer with
sudo
:Reboot
Run
clinfo
again and you should see that you now have OpenCL 1.2 support:The reason for this is that specifying
--legacy
pulls inopencl-amdgpu-pro-icd
which is not normally installed.I think this is because the latest drivers want to do things with ROCm: https://rocm.github.io/ROCmInstall.html
On my own rig, ROCm is unusable because I've got PCI-e 1x slots with risers and a basic Pentium CPU instead of an i7. You check that ROCm was disabled like this:
So I guess this is why I had to do legacy to get OpenCL working at all.
I'm not sure what the pros/cons are of OpenCL 1.2 vs OpenCL 2.0 vs ROCm, or even if the ROCm driver presents as OpenCL 2.0 externally - would be great if someone with more insight could comment.