How to install AMDGPU-PRO 16.40 on Ubuntu 16.10

(23 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

Tim Writer (AMD) 7 months ago

Thanks for your write up. Any reason you are using AMDGPU-PRO on Ubuntu 16.10, rather than the "in box" driver? Is it for Vulkan?

By the way, we did not "mess up the VDPAU install". We packaged all components of AMDGPU-PRO to be installed in /opt/amdgpu to avoid conflicts with distribution provided packages and to conform with packaging guidelines for third party packages. Rather than creating symlinks, we recommend you set VDPAU_DRIVER_PATH:

VDPAU_DRIVER_PATH=/opt/amdgpu-pro/lib/x86_64-linux-gnu/vdpau

Similarly, for clinfo, you can just add /opt/amdgpu/bin to your PATH.

Link | Reply
Current rating: 4

Ernst Sjöstrand 7 months ago

Hi Tim!
It's for both Vulkan and OpenCL. And I had never been able to get the driver to work properly before and wanted to test it. Some games work much better with it, like Shadow of Mordor.

Re. "mess up", well you install the driver and it's not working. And there's no hint in the install instructions page, and the install script doesn't set anything up etc... Mesa produces libvdpau_radeonsi right so there's no name conflict really?
A good clean solution could be to drop something in /etc/profile.d/.

Thanks for the feedback! :-)

Link | Reply
Current rating: 5

kris 6 months, 4 weeks ago

I still get this error:

istaan@kristaan-Flaming-Blade:~/Downloads$ sudo ./amdgpu-pro-16.40-348864/amdgpu-pro-install
./amdgpu-pro-16.40-348864/amdgpu-pro-install: 1: ./amdgpu-pro-16.40-348864/amdgpu-pro-install: ?#!/bin/bash: not found
./amdgpu-pro-16.40-348864/amdgpu-pro-install: 40: ./amdgpu-pro-16.40-348864/amdgpu-pro-install: Syntax error: "(" unexpected

Link | Reply
Currently unrated

Test 6 months, 3 weeks ago

I know that error... did you download the file on Windows? Try running dos2unix on the install script. It's probably related to Windows line endings..

Link | Reply
Currently unrated

Rafa G. 5 months, 1 week ago

Thanks for you step-by-step guide :)

I tried to install AMDGPU-PRO 16.50.x yesterday following your guide but I had problems compiling DKMS module ("too many arguments to function" in several files). I tried to fix it to generate a patch but I couldn't.

Then I tried another approach. Given that drivers are developed for kernel 4.4[1], why not install this kernel and avoid the need of patching anything?

I downloaded linux image and headers for kernel 4.4[2] and followed your guide (w/o patching). Now I've installed it :)

Thanks!

PD: Your link to download linux-headers*_all.deb is not working (href is missing in a tag)

[1] https://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-PRO-Linux-4.8-DKMS
[2] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.41/

Link | Reply
Currently unrated

Ernst 5 months, 1 week ago

Thanks for note about the link, fixed!

I actually had some problems with 4.4, not sure what but I got a lot of errors and didn't get any mouse cursor... :-)

Haven't tried 16.50 yet, hoping this guide will be obsolete soon...

Link | Reply
Currently unrated

valorcurse 5 months ago

Can't find the 16.40 drivers anywhere anymore and the dpkg-reconfigure step fails. Have you tried the 16.50 drivers by any chance?

Link | Reply
Currently unrated

Rafa G. 4 months, 4 weeks ago

Yes, I have.

As I said I installed 16.50 drivers with kernel 4.4.41 and tonight I'm going to upgrade to 4.4.44.

Regards

Link | Reply
Currently unrated

Rafa G. 4 months, 4 weeks ago

I just updated Ubuntu Gnome to kernel 4.4.44-*-lowlatency and AMDGPU-PRO drivers 16.50 are working (darktable-cltest run right).

Good night

Link | Reply
Currently unrated

Cyprien Delaporte 5 months, 1 week ago

Hello,
First thank you for this post.
I'm kinda new to linux. I'm stuck with the "sudo patch -d /usr/src/amdgpu-pro-16.40-348864/amd/dal/modules/freesync/ < ~/Downloads/amdgpu.patch" step.
I probably do something wrong : the console answered that : " patch: **** Can't change to directory /usr/src/amdgpu-pro-16.40-348864/amd/dal/modules/freesync/ : No such file or directory"

Thanks

Link | Reply
Current rating: 5

Ernst 5 months, 1 week ago

Hi!

If you're installing 16.50 your path will be slightly different and you'll have to adapt.

Otherwise... did you get an error in a previous step perhaps?

Link | Reply
Current rating: 1

Nikos 5 months ago

What about 16.50 and 4.9.x kernels for ubuntu 16.10 ?

Link | Reply
Currently unrated

Rafa G. 4 months, 4 weeks ago

Right now I'm using AMD 16.50 drivers, with kernel 4.4.41 on Ubuntu 16.10.

Link | Reply
Currently unrated

Ernst 4 months, 4 weeks ago

The issue is that 4.9 isn't supported, you need an older kernel.

Link | Reply
Currently unrated

Nester 4 months, 3 weeks ago

Maybe you can help me: I'm trying to install AMD 16.50 on Ubuntu Server 16.04. The install crashes with a message saying that "amdgpu-pro-lib32 has unmet dependencies", then lists a bunch of other amdgpu files. I've never worked with Debian packages, so I'm not sure what to do; also, I have a 64-bit system: do I even need this file? Help!

Link | Reply
Currently unrated

Ernst Sjöstrand 4 months, 3 weeks ago

Which step is that? Post your console output with commands and all on pastebin or something like that.

Link | Reply
Currently unrated

Nester 4 months, 3 weeks ago

Here is the output; any help is much appreciated!

http://pastebin.com/pPTPgN0c

Nester

Link | Reply
Currently unrated

Ernst 4 months, 3 weeks ago

16.04 is the supported version so it should just work there, no need for my blog post...
Not sure what's going on, are you missing 32-bit support somehow? https://blog.teststation.org/ubuntu/2016/05/12/installing-32-bit-software-on-ubuntu-16.04/

Link | Reply
Currently unrated

Nester 4 months, 3 weeks ago

I removed the 32-bit architecture, since I have a 64-bit system (this was based on advice from a friend of mine). Do I need to add it back in?

Link | Reply
Currently unrated

Nester 4 months, 2 weeks ago

Wanted to reply in case anyone else is in this situation: I edited the install script to remove the 32-bit components, and then it installed without issue.

Link | Reply
Current rating: 4

Osman 3 months, 3 weeks ago

Hi man. i installed AMDGPU-PRO without any error on ubuntu 16.10 but it crashes with unity and all applications. you got any idea? Kernel : 4.8

Link | Reply
Currently unrated

Meow 3 months ago

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

Link | Reply
Currently unrated

Ernst Sjöstrand 3 months ago

16.40 is obsolete now, you'll need to adapt to the latest release which I guess is 16.60:

http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx

Link | Reply
Current rating: 5

New Comment

required

required (not published)

optional

Recent Tweets


Recent Posts

Archive

2016
2015

Categories

Tags

Authors

Feeds

RSS / Atom