Trouble with getting amdgpu drivers working with Vega on Ubuntu 16.04.3

I've been having a difficult time getting the drivers working (so that I can use OpenCL) on my Ubuntu 16.04.3 system with a Vega RX 64. I'm using the 17.40 drivers. For starters:

The drivers do not work with a clean Ubuntu 16.04.3 install. The reason: Ubuntu 16.04.3 does not install with the Hardware Enablement Stack enabled by default. If you want any hope of getting the drivers (even to just run X) working, you must run:

If you don't do this, you'll get warnings about ABI mismatches. And if you disable ABI version checking in your xorg.conf file, you'll just end up crashing X. This should be very clearly documented in the install guide. But better yet, the installer for amdgpu-pro should enforce that the system has HWE. Otherwise, users are going to be pulling their hair out!

Now, after I did the above I was able to get X working, but clinfo simply crashes:

I've finally obtained a CPU and motherboard combo that allows PCIe 3.0 atomics. And frustratingly, I encountered the exact same behavior as I originally posted. That is, except for the KFD error.

After a lot of troubleshooting, I've found the culprit:

For whatever reason, when Linux boots by default I get a screen that is black most of the time, and flickers on to show the contents briefly once every couple of seconds. As a workaround for this, I quickly added a "nomodeset" option into grub. This solved the screen blinking problem.

However, it puts me in the situation where clinfo doesn't detect the GPU!

Given all of the troubleshooting steps, I ended up just installing ROCm on a clean Ubuntu installation, rather than the amdgpu-pro drivers, which come with ROCm. And as long as I don't have "nomodeset" in my grub configuration, opencl works fine. As this is a headless build, all I need is opencl. However, if I needed to see what's on the monitor, I think I'd still need to do more troubleshooting.

Yes, this GPU / Motherboard (with only PCI Express 2.0) combo works just fine with Windows. The app I intend to use with OpenCL (hashcat) works perfectly. However, for the sake of any other poor soul attempting to get the drivers/OpenCL working on Linux, it'd be nice if solutions could be posted here.

Hi, so I am in the same boat as you.. trying to get Vega56 working in Ubuntu.

I followed the install guide to the letter, I did not have to manually install the hardware enablement stack, after following the install script and installing RCOM it booted into X straight away no issues.

clinfo however returns 0 and the env command returns the exact same error that you have supplied.

I've finally obtained a CPU and motherboard combo that allows PCIe 3.0 atomics. And frustratingly, I encountered the exact same behavior as I originally posted. That is, except for the KFD error.

After a lot of troubleshooting, I've found the culprit:

For whatever reason, when Linux boots by default I get a screen that is black most of the time, and flickers on to show the contents briefly once every couple of seconds. As a workaround for this, I quickly added a "nomodeset" option into grub. This solved the screen blinking problem.

However, it puts me in the situation where clinfo doesn't detect the GPU!

Given all of the troubleshooting steps, I ended up just installing ROCm on a clean Ubuntu installation, rather than the amdgpu-pro drivers, which come with ROCm. And as long as I don't have "nomodeset" in my grub configuration, opencl works fine. As this is a headless build, all I need is opencl. However, if I needed to see what's on the monitor, I think I'd still need to do more troubleshooting.