Using Vega on Linux
===================
This is for the serious enthusiast. Proceed at your own risk and do not expect help.
Vega is VERY particular in its requirements under Linux, so you will need to start from scratch and install a new OS on the bare metal. This is inherently risky, so it is best to reboot the computer with a single drive in it that you are happy to have reformatted. Before you begin, you need to work out how to select different UEFI boot table entries from your mother board BIOS, so that you can recover from the changes that installing the new OS will make to the boot table.
You will need at least 25G of unallocated disk space available for the installation.
Download the Ubuntu 16.04.3 installation iso file from:
http://releases.ubuntu.com/16.04/ubuntu-16.04.3-desktop-amd64.iso
Use Ruby to create a UEFI bootable usb stick containing this iso. Boot and install.
The newly installed system will use unaccelerated drivers. You will need to install accelerated drivers before doing anything useful.
You can EITHER install the proprietory (amdgpu-pro) accelerated drivers OR the open source (amdgpu) accelerated drivers. If you wish to switch between them then you must remove the installed drivers completely and reboot before installing the other drivers.
Using the AMD proprietory Vega drivers (amdgpu-pro)
---------------------------------------------------
The official AMD documentation is available at:
http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Install.aspx
Carefully follow their instructions.
Using the open source Vega drivers (amdgpu)
-------------------------------------------
Download an amdgpu compatible ubuntu linux kernel from:
https://github.com/M-Bab/linux-kernel-amdgpu-binaries
(I used a kernel version from his site (4.13.1) that he has since removed on grounds of instability. I have yet to try his latest version, but it should work.)
Download the Vega firmware:
https://github.com/M-Bab/linux-kernel-amdgpu-binaries/blob/master/firmware-radeon-ucode_1.40_all.deb
Install the kernel and firmware by executing this at the command prompt ("terminal" in linux speak):
Code:
sudo dpkg -i linux-image-4.12.12+_17.09.12.AMDGPU.UBUNTU_amd64.deb
sudo dpkg -i firmware-radeon-ucode_1.40_all.deb
Reboot the system.
Install the amdgpu drivers from a stable repository by executing:
Code:
sudo add-apt-repository ppa:paulo-miguel-dias/pkppa
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libegl1-mesa libgbm1 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libwayland-egl1-mesa libxatracker2 libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2
Reboot.
You will get error dialogs ("System Program Problem Detected") flashed up on the screen while using the open source drivers. These do not mean anything serious, but you will have to press cancel on them repeatedly before you can do anything else.
You can remove the amdgpu drivers and compatible kernel by executing:
Code:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:paulo-miguel-dias/pkppa
sudo apt-get update
sudo apt-get upgrade
sudo apt autoremove
Reboot using "Advanced Options for Ubuntu" and then "Ubuntu, with Linux 4.10.0-33-generic" and then execute:
Code:
sudo apt-get remove firmware-radeon-ucode_1.40_all
sudo apt-get remove linux-image-4.12.12+_17.09.12.AMDGPU.UBUNTU_amd64
Any mistake in installing or removing the drivers might make the system unstable. Reboot and select "Advanced Options for Ubuntu" and then "Linux 4.10.0-33-generic (recovery mode)" and then "Repair packages". This usually gets things back into a stable state.
Overclocking, etc.
------------------
I have yet to explore overclocking Vega on linux. Linux does not have Wattman. Some equivalent functionality (like percentage overclocking) is available by writing values to the powerplay entries under the /sys/ directory. Other functionality (like undervolting or relaxing power limits) may require direct patches to the /lib/firmware/amdgpu/vega10_* powerplay files and/or patches to the kernel sources.
In the meantime, here are some Unigine benchmark scores (comparing raw Vega 56 performance on linux against overclocked performance on Windows):
Code:
Score : amdgpu : amdpro : win GL : DX11
------------- -------- -------- -------- --------
Heaven 1440p : 1384 : 1229 : 1561 : 1933
Valley 1440p : 2101 : 2229 : 2547 : 2568
Superpos 4K : 4359 : 2859 : 4247 : 5842
Superpos 8K : 1804 : 1401 : 1871 : 2540
Average FPS : amdgpu : amdpro : win GL : DX11
------------- -------- -------- -------- --------
Heaven 1440p : 54.9 : 48.8 : 62.0 : 76.7
Valley 1440p : 50.2 : 53.3 : 60.9 : 63.5
Superpos 4K : 32.6 : 21.4 : 31.8 : 43.7
Superpos 8K : 13.5 : 10.5 : 14.0 : 19.0
Notably, the open source linux drivers are usually better than the closed source linux drivers and sometimes better than the overclocked OpenGL drivers on Windows. However, the overclocked Windows DX11 drivers always come out best.
These comparisons show how important the drivers are in determining performance and how rapidly the open source drivers are catching up. The testing at Phoronix tells a similar story, but adds some icing on the cake: following optimisation on the open source amdgpu drivers, the stock Vega 56 performs as well as a GTX 1080 Ti on Bioshock Infinite at 4k.