How to get AMD Vega GPUs to work under Ubuntu Linux

If you've got a recent AMD graphics card and are running Linux, there are two options available if you want to make full use of it:

  1. Use the Open Source drivers
  2. Use the proprietary drivers

In most cases there is no reason to go for the proprietary drivers, as the Open Source AMD drivers are better in almost every respect. Unfortunately the Open Source drivers that ship with current Ubuntu releases do not support AMD Vega.

The recently released Linux kernel 4.15 finally added support for these cards, and it looks like Ubuntu 18.04 will target this kernel. If that's the case, then Vega cards should be supported out of the box once Ubuntu 18.04 is out.

If you can't wait that long you're either going to be stuck with the proprietary driver and Ubuntu 16.04, or you can use Ubuntu 17.10 with a mainline 4.15 kernel and Open Source drivers.

Proprietary drivers and Ubuntu 16.04

If you stick with Ubuntu 16.04, then you can get the proprietary drivers here (install instructions here). The installation process is simple enough. Simply download and unpack the driver, then run the amdgpu-pro-install script:

cd ~/
tar tar -Jxvf amdgpu-pro-17.50-511655.tar.xz
cd amdgpu-pro-17.50-511655

And reboot.

Personally I've been using Ubuntu 17.04 since 16.04 is a bit too outdated for me. While 17.04 is not officially supported by the drivers, the kernel that comes with 17.04 is compatible. Unfortunately this is not the case for Ubuntu 17.10, and now Ubuntu 17.04 has been EOLed...

Open Source drivers, Ubuntu 17.10, and Linux Kernel 4.15

Fortunately Linux kernel 4.15 now supports AMD Vega cards out of the box, and as of 2018-02-01 this is available as a mainline .deb package here.

It should be noted that mainline kernels are intended for debugging and testing purposes, and are not officially supported. However, between downgrading to Ubuntu 16.04 and running with an unpatched system for three months I found this to be the better option. Getting this working is relatively simple:

  1. Uninstall any proprietary AMDGPU drivers you may have
  2. Download the appropriate .deb packages from here. Use the "generic" kernels if you aren't sure. For example:
    1. linux-headers-4.15.0-041500_4.15.0-041500.201802011154_all.deb
    2. linux-headers-4.15.0-041500-generic_4.15.0-041500.201802011154_amd64.deb
    3. linux-image-4.15.0-041500-generic_4.15.0-041500.201802011154_amd64.deb
  3. Verify checksums using e.g. sha256sum and the checksum file, available here
    1. You may also verify the CHECKSUMS file itself (instructions here)
  4. Install the .deb packages
  5. Reboot

For example:

cd ~/
mkdir temp
cd temp
sha256sum -c CHECKSUMS 2>&1 | grep 'OK$'
sudo dpkg -i *.deb

If everything went well you can now reboot and enjoy working drivers. If not, please refer to this article.

Finally, it's worth noting that because the mainline kernels are not supported, you'll have to track and install updates as they become available yourself.

Update: You'll want to use Mesa 17.3 for better hardware acceleration. You can install them via The Ubuntu-X team PPA:

sudo add-apt-repository ppa:ubuntu-x-swat/updates
sudo apt-get update
sudo apt-get upgrade

Then reboot.