How to install AMDGPU-PRO 16.40 on Ubuntu 16.10

(Comments)

When AMDGPU-PRO 16.40 was released I had already upgraded to Ubuntu 16.10 which wasn't supported yet. And since you can't downgrade Ubuntu I would have to reinstall. Nah.. let's see if we can make it work on 16.10 anyway.

You need the following downloads:

https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-16.40-348864.tar.xz

https://vulkan.lunarg.com/sdk/download/1.0.11.0/linux/vulkansdk-linux-x86_64-1.0.11.0.run

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6.7/linux-image-4.6.7-040607-lowlatency_4.6.7-040607.201608160432_amd64.deb

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6.7/linux-headers-4.6.7-040607-lowlatency_4.6.7-040607.201608160432_amd64.deb

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6.7/linux-headers-4.6.7-040607_4.6.7-040607.201608160432_all.deb

https://www.sabeltand.net/static/media/amdgpu.patch

So the AMDGPU-PRO kernel module isn't api compatible with Linux 4.8 in Ubuntu 16.10. However I ran into issues when trying to boot 16.10 with a 4.4 kernel from Ubuntu 16.04 so I tried to find the latest kernel that worked: a 4.6 kernel. Install the 4.6 kernel and header packages!

sudo apt install ~/Downloads/*4.6.7*.deb

Next extract amdgpu-pro-16.40-348864.tar.xz . There's a bug in the install script amdgpu-pro-install that I think affect all Ubuntu versions, let's fix that by replacing:

echo ${dir}${etc}${sourceparts}/amdgpu-pro.list

with

echo ${dir}${etc}/${sourceparts}/amdgpu-pro.list

Time to run the installer! Only works if you stand in the directory above the install script, so you run:

sudo ./amdgpu-pro-16.40-348864/amdgpu-pro-install

This will fail. That is because Ubuntu 16.10 has upgraded to a newer GCC which simply has more warnings and -Werror is used. You only need a tiny indentation change, the one I put in a amdgpu.patch above. Patch it (with sudo!):

sudo patch -d /usr/src/amdgpu-pro-16.40-348864/amd/dal/modules/freesync/ < ~/Downloads/amdgpu.patch

Ok let's try to finish the installation:

sudo dpkg-reconfigure amdgpu-pro-dkms

For this to work you need to boot the 4.6.7 kernel every time. That's an older kernel than you already have so it won't be the default.

Setting it as the default is a bit messy, specially since Ubuntu has localization in these config files, but something like this in /etc/default/grub should work:

GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 4.6.7-040607-lowlatency"

Ok time to reboot and you should have a pretty well working system!

Some improvements left though. Install the LunarG Vulkan SDK!

Also, it looks like AMD has messed up the VDPAU install.

sudo ln -s /opt/amdgpu-pro/lib/x86_64-linux-gnu/vdpau/libvdpau_amdgpu.so.1 /usr/lib/x86_64-linux-gnu/vdpau/
sudo ln -s /opt/amdgpu-pro/lib/i386-linux-gnu/vdpau/libvdpau_amdgpu.so.1 /usr/lib/i386-linux-gnu/vdpau/

Check with vdpauinfo that you have working VDPAU now. I can play 4K video in VLC with 10% cpu usage so looks like it's working really well!

Finally add the clinfo tool to your path and check that OpenCL is working also:

sudo ln -s /opt/amdgpu-pro/bin/clinfo /usr/local/bin/

Good luck! :-)

Extra troubleshooting

  1. Check that you have /etc/ld.so.conf.d/x86_64-amdgpu-pro.conf and /etc/ld.so.conf.d/i386-amdgpu-pro.conf . If not, run sudo dpkg-reconfigure libdrm2-amdgpu-pro:amd64 libdrm2-amdgpu-pro:i386
Current rating: 5

Comments

Recent Tweets


Recent Posts

Archive

2018
2016
2015

Categories

Tags

Authors

Feeds

RSS / Atom