Activate opencl for AMD Radeon RX 550 Series


#1

Hi,

I’m using a Radeon RX 550 on Manjaro 17.1.2 KDE with Kernel x86_64 Linux 4.14.
The GPU driver I have installed is video-amdgpu (2017.03.24).

How can I activate opencl?

Probably I have to install the nonfree driver.

How can I install the nonfree driver, if necesarry?
Is the nonfree driver available for my GPU?

I am glad for your help!


#2

just looking at the package names, i presume that β€œopencl-mesa” should activate it.
but this might not be the opencl you want or does not give you the performance you want. i really have no idea and i have not tested it.


#3

Activate AUR and install opencl-amd


#4

The installation of opencl-mesa activates opencl, the clinfo output confirms this. The installation of opencl-amd didn’t succeeded.


#5

but mesa-opencl is not from use on AMD :joy:
The AUR pkg wont install or the installed pkg wont work?


#6

IΒ΄m not a expert, but on Arch Wiki the opencl-mesa is also specified for AMD. look here:

https://wiki.archlinux.org/index.php/GPGPU#AMD.2FATI


#7

Good question @Tids:
Why opencl-amd from aur instead of opencl-mesa from official repos?


#8

Look at the answer from AMD β€œbridgmanAMD”


#9

In the meantime, I’m not sure if opencl-mesa is working properly for me.

clinfo show me following output:

Number of platforms                               1
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 17.3.2
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   Clover
Number of devices                                 1
  Device Name                                     Radeon RX 550 Series (POLARIS12 / DRM 3.19.0 / 4.14.14-1-MANJARO, LLVM 5.0.1)
  Device Vendor                                   AMD
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.1 Mesa 17.3.2
  Driver Version                                  17.3.2
  Device OpenCL C Version                         OpenCL C 1.1 
  Device Type                                     GPU
  Device Available                                Yes
  Device Profile                                  FULL_PROFILE
  Max compute units                               8
  Max clock frequency                             1206MHz
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
  Compiler Available                              Yes
  Preferred work group size multiple              64
  Preferred / native vector sizes                 
    char                                                16 / 16      
    short                                                8 / 8       
    int                                                  4 / 4       
    long                                                 2 / 2       
    half                                                 8 / 8        (cl_khr_fp16)
    float                                                4 / 4       
    double                                               2 / 2        (cl_khr_fp64)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No                                                                                                                                                                                                        
    IEEE754-2008 fused multiply-add               No                                                                                                                                                                                                        
    Support is emulated in software               No                                                                                                                                                                                                        
  Single-precision Floating-point support         (core)                                                                                                                                                                                                    
    Denormals                                     No                                                                                                                                                                                                        
    Infinity and NANs                             Yes                                                                                                                                                                                                       
    Round to nearest                              Yes                                                                                                                                                                                                       
    Round to zero                                 No                                                                                                                                                                                                        
    Round to infinity                             No                                                                                                                                                                                                        
    IEEE754-2008 fused multiply-add               No                                                                                                                                                                                                        
    Support is emulated in software               No                                                                                                                                                                                                        
    Correctly-rounded divide and sqrt operations  No                                                                                                                                                                                                        
  Double-precision Floating-point support         (cl_khr_fp64)                                                                                                                                                                                             
    Denormals                                     Yes                                                                                                                                                                                                       
    Infinity and NANs                             Yes                                                                                                                                                                                                       
    Round to nearest                              Yes                                                                                                                                                                                                       
    Round to zero                                 Yes                                                                                                                                                                                                       
    Round to infinity                             Yes                                                                                                                                                                                                       
    IEEE754-2008 fused multiply-add               Yes                                                                                                                                                                                                       
    Support is emulated in software               No                                                                                                                                                                                                        
  Address bits                                    64, Little-Endian                                                                                                                                                                                         
  Global memory size                              4292034560 (3.997GiB)                                                                                                                                                                                     
  Error Correction support                        No                                                                                                                                                                                                        
  Max memory allocation                           3004424192 (2.798GiB)
  Unified memory for Host and Device              No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       32768 bits (4096 bytes)
  Global Memory cache type                        None
  Image support                                   No
  Local memory type                               Local
  Local memory size                               32768 (32KiB)
  Max constant buffer size                        2147483647 (2GiB)
  Max number of constant args                     16
  Max size of kernel argument                     1024
  Queue properties                                
    Out-of-order execution                        No
    Profiling                                     Yes
  Profiling timer resolution                      0ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
  Device Extensions                               cl_khr_byte_addressable_store cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64 cl_khr_fp16

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Clover
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [MESA]
  clCreateContext(NULL, ...) [default]            Success [MESA]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 Clover
    Device Name                                   Radeon RX 550 Series (POLARIS12 / DRM 3.19.0 / 4.14.14-1-MANJARO, LLVM 5.0.1)
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 Clover
    Device Name                                   Radeon RX 550 Series (POLARIS12 / DRM 3.19.0 / 4.14.14-1-MANJARO, LLVM 5.0.1)
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 Clover
    Device Name                                   Radeon RX 550 Series (POLARIS12 / DRM 3.19.0 / 4.14.14-1-MANJARO, LLVM 5.0.1)

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.12
  ICD loader Profile                              OpenCL 2.2

but darktable would’t work with opencl!

darktable-cltest show me following:

[opencl_init] opencl related configuration options:
[opencl_init] 
[opencl_init] opencl: 1
[opencl_init] opencl_library: ''
[opencl_init] opencl_memory_requirement: 768
[opencl_init] opencl_memory_headroom: 300
[opencl_init] opencl_device_priority: '*/!0,*/*/*'
[opencl_init] opencl_mandatory_timeout: 200
[opencl_init] opencl_size_roundup: 16
[opencl_init] opencl_async_pixelpipe: 0
[opencl_init] opencl_synch_cache: 0
[opencl_init] opencl_number_event_handles: 25
[opencl_init] opencl_micro_nap: 1000
[opencl_init] opencl_use_pinned_memory: 0
[opencl_init] opencl_use_cpu_devices: 0
[opencl_init] opencl_avoid_atomics: 0
[opencl_init] 
[opencl_init] found opencl runtime library 'libOpenCL'
[opencl_init] opencl library 'libOpenCL' found on your system and loaded
[opencl_init] found 1 platform
[opencl_init] found 1 device
[opencl_init] discarding device 0 `Radeon RX 550 Series (POLARIS12 / DRM 3.19.0 / 4.14.14-1-MANJARO, LLVM 5.0.1)' due to missing image support.
[opencl_init] no suitable devices found.
[opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is OFF.

#10

Mesa opencl is not usable with real-world apps.


#11

Now I’m confused.

How do I install opencl for real-world apps?

I have removed opencl-mesa and reinstalled opencl-amd.

clinfo shows me now (nothing):

Number of platforms                               0

and

darktable-cltest show me following:

[opencl_init] opencl related configuration options:
[opencl_init] 
[opencl_init] opencl: 1
[opencl_init] opencl_library: ''
[opencl_init] opencl_memory_requirement: 768
[opencl_init] opencl_memory_headroom: 300
[opencl_init] opencl_device_priority: '*/!0,*/*/*'
[opencl_init] opencl_mandatory_timeout: 200
[opencl_init] opencl_size_roundup: 16
[opencl_init] opencl_async_pixelpipe: 0
[opencl_init] opencl_synch_cache: 0
[opencl_init] opencl_number_event_handles: 25
[opencl_init] opencl_micro_nap: 1000
[opencl_init] opencl_use_pinned_memory: 0
[opencl_init] opencl_use_cpu_devices: 0
[opencl_init] opencl_avoid_atomics: 0
[opencl_init] 
[opencl_init] found opencl runtime library 'libOpenCL'
[opencl_init] opencl library 'libOpenCL' found on your system and loaded
[opencl_init] could not get platforms: -1001
[opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is OFF.

How do I activate opencl to use it in other programs?


#12

Try the latest kernel version. Polaris should work with this (vega not)


#13

Hi, I installed last Friday the Kernel 4.15, unfortunately the resolution of the graphics card has been reduced from 2560 x 1440 to 1920x1080. KDE doesn’t offer me a higher resolution than the 1920 x 1080.

I haven’t tested the stable update from 03.02 yet, were there again significant adjustments to the AMD graphic drivers?


#14

Yes. DisplayCore was merged. You can activate it by installing amdgpu-experimental and reboot after that. It shoulnt be related to your resolution, but you can try.


#15

Even the current kernel 4.15.4 reduce the resolution of my graphic card from 2560 x 1440 to 1920x1080. I did not have installed amdgpu-experimental. Do I have to reconfigure my graphic card for the new kernel? e.g. with

sudo mhwd -r pci $(mhwd -li |grep 'video-' | awk '{print $1}')
sudo mhwd -a pci free 0300

#16

Maybe there is a bug in this kernel, maybe it’s something related to your EDID informations or maybe your OS is somehow wrong.

xrandr --prop 

maybe there is some more output. Also what is it for a display? model/type and how is it connected?


#17

Thanks for the quick response!

I’m using a BenQ SW2700PT display which is connecte via DVI to my Sapphire RX550 grapic card.

Screenfetch shows me following system information:


 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     mepi@mepi-pc
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     OS: Manjaro 17.1.5 Hakoila
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     Kernel: x86_64 Linux 4.15.4-2-MANJARO
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     Uptime: 15m
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ            β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     Packages: 1649
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     Shell: bash 4.4.18
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     Resolution: 1920x1080
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     DE: KDE 5.43.0 / Plasma 5.12.1
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     WM: KWin
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     WM Theme: Breath
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     GTK Theme: Maia [GTK2/3]
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     Icon Theme: maia
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     Font: Noto Sans Regular
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     CPU: AMD Phenom II X6 1055T @ 6x 2.8GHz [38.0Β°C]
                                  GPU: Radeon RX 550 Series (POLARIS12 / DRM 3.23.0 / 4.15.4-2-MANJARO, LLVM 5.0.1)
                                  RAM: 1845MiB / 7979MiB

I have now done the following steps:

Bootup my system with kernel 4.14.20-2 and ran xrandr --prop. I got the following output:

Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 16384 x 16384
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
	TearFree: auto 
		supported: off, on, auto
	dither: off 
		supported: off, on
	audio: auto 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	coherent: 1 
		range: (0, 1)
	link-status: Good 
		supported: Good, Bad
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
	TearFree: auto 
		supported: off, on, auto
	dither: off 
		supported: off, on
	audio: auto 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	coherent: 1 
		range: (0, 1)
	link-status: Good 
		supported: Good, Bad
DVI-D-0 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 596mm x 335mm
	EDID: 
		00ffffffffffff0009d1477f45540000
		191a0103803c22782ed5c0af4e32b926
		0e5054a56b8081c081008180a9c0b300
		d1c001010101565e00a0a0a029503020
		3500544f2100001a000000ff00563647
		3033353534534c300a20000000fd0032
		4c1e591b000a202020202020000000fc
		0042656e51205357323730300a200087
	TearFree: auto 
		supported: off, on, auto
	dither: off 
		supported: off, on
	audio: auto 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	coherent: 1 
		range: (0, 1)
	link-status: Good 
		supported: Good, Bad
   2560x1440     59.95*+
   1920x1080     60.00  
   1680x1050     59.88  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x800      59.91  
   1152x864      75.00  
   1280x720      60.00  
   1024x768      75.03    60.00  
   832x624       74.55  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
   720x400       70.08  

reboot system with kernel 4.15.4-2 and ran xrandr --prop again. Now with following output:

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
	TearFree: auto 
		supported: off, on, auto
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	non-desktop: 0 
		range: (0, 1)
	link-status: Good 
		supported: Good, Bad
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
	TearFree: auto 
		supported: off, on, auto
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	non-desktop: 0 
		range: (0, 1)
	link-status: Good 
		supported: Good, Bad
DVI-D-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 596mm x 335mm
	EDID: 
		00ffffffffffff0009d1477f45540000
		191a0103803c22782ed5c0af4e32b926
		0e5054a56b8081c081008180a9c0b300
		d1c001010101565e00a0a0a029503020
		3500544f2100001a000000ff00563647
		3033353534534c300a20000000fd0032
		4c1e591b000a202020202020000000fc
		0042656e51205357323730300a200087
	TearFree: auto 
		supported: off, on, auto
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	non-desktop: 0 
		range: (0, 1)
	link-status: Good 
		supported: Good, Bad
   1920x1080     60.00* 
   1680x1050     59.88  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x800      59.91  
   1152x864      75.00  
   1280x720      60.00  
   1024x768      75.03    60.00  
   832x624       74.55  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
   720x400       70.08  

#18

At first, please get yourself a displayport (1.2-1.4) cable. DVI is not a good thing to keep in 2018.

Other than that. You could try linux4.16RC already, just to test - since I dont have a real Idea whats wrong here.

I mean linux 4.15 was a BIG change for amdgpu. So It’s hard to tell…


#19

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.