AnsweredAssumed Answered

How to successfully install OpenCL on a R9 295X2 (AMD HAWAII) on any recommended Ubuntu X.XX?

Question asked by edendekker on Apr 21, 2017
Latest reply on Apr 27, 2017 by edendekker

Hi,
I recently purchased a second hand R9 295X2, and in the past two weeks i have experimented with installing drivers with different ubuntu releases but am unable to get a successful detection with clinfo. The closest i have to getting OpenCL to work was with the Mesa libraries but they are not fully functional and not compatible with ArrayFire see here Default ArrayFire examples throw "Segmentation fault (core dumped)" on AMD HAWAII  · Issue #1758 · arrayfire/arrayfire ·…

 

I am looking for the recommended way to successfully install OpenCL that works with a R9 295X2 (AMD HAWAII) on any recommended Ubuntu XX.XX distribution.

It would be fantastic if someone with the same GPU has got it to work.

If no one has gotten a R9 295X2 device to work on Ubuntu, i am tempted to join the dark side and test out installation in Windows.


I prefer an official installation to work, but i am open to hear about unofficial exotic installations.


In addition to the below attempts, i have gone through all my options as discussed here drivers - Ubuntu 14.04.5/16.04/16.10 and AMD graphics - Ask Ubuntu  But unfortunately for my specific GPU model, no option is functional and fits my needs for using OpenCL with ArrayFire along with temperature monitoring.

 

Please be aware that i have LVM installed and use snapshots to restore to vanila OS state between each attempt below.

 

Below lists my different attempts -

 

Attempt #1  - Official

Navigate to the AMD drivers site (Linux Download Center), and search for R9 295X2, the recommended OS is 64bit Ubuntu 15.04, with Crimson Proprietary Driver radeon-crimson-15.12-15.302-151217a-297685e.zip

Step 1- install recommended OS and install driver
Step 2- execute sudo clinfo
Outcome, clinfo only shows OpenCL for CPU, no GPU detected.

Step 3- install AMD APP SDK 3.0
Step 4- execute sudo clinfo
Outcome, clinfo only shows OpenCL for CPU, no GPU detected.

Step 5 - reboot server
Outcome, x windows hangs and cant log in.

 

Attempt #2 - Official

Navigate to the AMD drivers site (Linux Download Center), and search for R9 290X, the recommended OS is 64bit Ubuntu 16.04, with AMDGPU-PRO Driver amdgpu-pro-17.10-410326.tar.xz

Step 1- install recommended OS and install driver
Step 2- execute sudo clinfo
Outcome, clinfo only shows OpenCL for CPU, no GPU detected.

Step 3- install AMD APP SDK 3.0
Step 4- execute sudo clinfo
Outcome, clinfo only shows OpenCL for CPU, no GPU detected.

Step 5 - reboot server

Outcome, presented with login screen, but cant log in, i keep getting the same login screen after logging in. I also tried to chroot the OS and run clinfo, but that resulted in only the AMD CPU driver being detected, no GPU devices listed.

 

Attempt #3 - Official

Navigate to the AMD drivers site (Linux Download Center), and search for R9 295X2, the recommended OS is 64bit Ubuntu 14.04.2, with Crimson Proprietary Drivers fglrx_15.302-0ubuntu1_amd64_ub_14.01.deb, fglrx-core_15.302-0ubuntu1_amd64_ub_14.01.deb, fglrx-dev_15.302-0ubuntu1_amd64_ub_14.01.deb, fglrx-amdcccle_15.302-0ubuntu1_amd64_ub_14.01.deb

Step 1- install recommended OS and install drivers
Step 2- execute sudo clinfo
Outcome, clinfo only shows OpenCL for CPU, no GPU detected.

Step 3- install AMD APP SDK 3.0
Step 4- execute sudo clinfo
Outcome, clinfo only shows OpenCL for CPU, no GPU detected.

Step 5 - reboot server
Outcome, x windows hangs and cant log in.

 

Attempt #4 - UnOfficial

Open Source - Successfully install Mesa OpenCL via https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers

e@host:~/Downloads/arrayfire_examples/build/benchmarks$ sudo clinfo
Number of platforms: 1
  Platform Profile: FULL_PROFILE
  Platform Version: OpenCL 1.1 Mesa 17.1.0-devel
  Platform Name: Clover
  Platform Vendor: Mesa

Number of devices: 2
  Device Type: CL_DEVICE_TYPE_GPU
  Name: AMD HAWAII (DRM 2.43.0 / 4.4.0-72-generic, LLVM 4.0.0)
  Device OpenCL C version: OpenCL C 1.1
  Driver version: 17.1.0-devel
  Version: OpenCL 1.1 Mesa 17.1.0-devel

  Device Type: CL_DEVICE_TYPE_GPU
  Name: AMD HAWAII (DRM 2.43.0 / 4.4.0-72-generic, LLVM 4.0.0)
  Device OpenCL C version: OpenCL C 1.1
  Driver version: 17.1.0-devel
  Version: OpenCL 1.1 Mesa 17.1.0-devel

 

Mesa OpenCL library is not full featured and does not work with ArrayFire as discussed here Default ArrayFire examples throw "Segmentation fault (core dumped)" on AMD HAWAII  · Issue #1758 · arrayfire/arrayfire ·…

 

Attempt #5 - UnOfficial

Successfully followed instructions here - Experimental OpenCL driver for Ubuntu 16.04

The unofficial patched fglrx core driver works with clinfo and arrayfire!
However, i am unable to monitor GPU temperature with psensor as GPUs are not detected in there.
I plan to fully utilise my GPUs so temperature monitoring is important to me.
Psensor is able to monitor temperature using Ubuntu's default open source drivers in Ubuntu 16.04,15.04,14.04.

Outcomes