Hey Everyone!
A bit of a weird one on my hands. I’m in the process of getting a special build of FFmpeg going to accelerate HDR->SDR tone-mapping of HEVC content. I can do it all in software as of now, but (to the surprise of nobody) it isn’t exactly realtime performance, even with 24 threads.
As such, I’m trying to implement the same sort of thing using an rx 5600xt as an accelerator card. both VA-API and OpenCL support versions of the transforms I’m looking to use, so unless there’s a massive performance difference, I’m not overly bothered about which one to use.
I’ve listed a lot of details/steps I’ve already tried below, am open to any and all suggestions!
As of now that would mean 3 options for HWacceleration configuration:
- AMD’s AMF decoder/encoder. Unfortunately little to no linux support whatsoever, tho I am following the github issues to see if/when that changes.
- VA-API. Well supported and reasonably well documented, this is my first choice if I can get it working.
- OpenCL. VERY well documented but not included in the open source amdgpu driver, you can perform a “hack” using the amdgpu-pro package topotentially install the OpenCL libraries with support for Navi-10
When I run vainfo I get: error: can't connect to X server! error: failed to initialize display
Where it get’s very weird is that, when running journalctl -b | grep -iE 'vdpau | dri driver'
it returns
Sep 19 19:19:49 felix-server /usr/lib/gdm3/gdm-x-session[1764]: (II) AMDGPU(0): [DRI2] DRI driver : radeonsi
Sep 19 19:19:49 felix-server /usr/lib/gdm3/gdm-x-session[1764]: (II) AMDGPU(0): [DRI2] VDPAU driver: radeonsi
Indicating what I think is that the radeon driver has flagged that the system is capable of VA-API support.
When Trying to run clinfo it initially returned:
clinfo
Number of platforms 0
Trying to trouble shoot I found this guide on the blender forums for enabling OpenCL by only using a portion of the AMDGPUPro drivers- with documented success of openCL working on popos 20.04 LTS, tho in their case it was with an RX580.
After having used that “Hack” and then running clinfo, I received:
Number of platforms 1
Platform Name AMD Accelerated Parallel Processing
Platform Vendor Advanced Micro Devices, Inc.
Platform Version OpenCL 2.1 AMD-APP (3143.9)
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
Platform Host timer resolution 1ns
Platform Extensions function suffix AMD
Platform Name AMD Accelerated Parallel Processing
Number of devices 0NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, …) No platform
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, …) No platform
clCreateContext(NULL, …) [default] No platform
clCreateContext(NULL, …) [other] No platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No devices found in platform
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) No devices found in platform
Unfortunately it now seems that the OpenCL packages are installed and recognized, but are not grabbing the GPU as an eligible device.
in terms of platform, here’s the output of uname -a followed by lshw -short inside of the summery tab
Linux felix-server 5.4.44-2-pve-navipatch-pcrmrrpatch #1 SMP PVE 5.4.44-2 (Wed, 01 Jul 2020 16:37:57 +0200) x86_64 x86_64 x86_64 GNU/Linux
Summary
H/W path Device Class Description
system ProLiant ML350 G6 (600425-005)
/0 bus Motherboard
/0/0 memory 64KiB BIOS
/0/400 processor Intel® Xeon® CPU X5670 @ 2.93GHz
/0/400/710 memory 192KiB L1 cache
/0/400/720 memory 1536KiB L2 cache
/0/400/730 memory 12MiB L3 cache
/0/406 processor Intel® Xeon® CPU X5670 @ 2.93GHz
/0/406/716 memory 192KiB L1 cache
/0/406/726 memory 1536KiB L2 cache
/0/406/736 memory 12MiB L3 cache
/0/1000 memory 144GiB System Memory
/0/1000/0 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/1 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/2 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/3 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/4 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/5 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/6 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/7 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/8 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/9 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/a memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/b memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/c memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/d memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/e memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/f memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/10 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/11 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/100 bridge 5520 I/O Hub to ESI Port
/0/100/1 bridge 5520/5500/X58 I/O Hub PCI Express Root Port 1
/0/100/2 bridge 5520/5500/X58 I/O Hub PCI Express Root Port 2
/0/100/3 bridge 5520/5500/X58 I/O Hub PCI Express Root Port 3
/0/100/3/0 scsi4 storage SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon]
/0/100/3/0/0.0.0 /dev/sdb disk 3TB WDC WD30EFRX-68E
/0/100/3/0/0.0.0/1 /dev/sdb1 volume 2047MiB swap partition
/0/100/3/0/0.0.0/2 /dev/sdb2 volume 2792GiB ZFS partition
/0/100/3/0/0.1.0 /dev/sdc disk 3TB WDC WD30EFRX-68E
/0/100/3/0/0.1.0/1 /dev/sdc1 volume 2047MiB swap partition
/0/100/3/0/0.1.0/2 /dev/sdc2 volume 2792GiB ZFS partition
/0/100/3/0/0.2.0 /dev/sdd disk 3TB WDC WD30EFRX-68E
/0/100/3/0/0.2.0/1 /dev/sdd1 volume 2047MiB swap partition
/0/100/3/0/0.2.0/2 /dev/sdd2 volume 2792GiB ZFS partition
/0/100/3/0/0.3.0 /dev/sde disk 10TB ST10000DM0004-1Z
/0/100/3/0/0.3.0/1 /dev/sde1 volume 2047MiB swap partition
/0/100/3/0/0.3.0/2 /dev/sde2 volume 9311GiB ZFS partition
/0/100/3/0/0.4.0 /dev/sdf disk 10TB ST10000DM0004-1Z
/0/100/3/0/0.4.0/1 /dev/sdf1 volume 2047MiB swap partition
/0/100/3/0/0.4.0/2 /dev/sdf2 volume 9311GiB ZFS partition
/0/100/3/0/0.5.0 /dev/sdg disk 10TB ST10000DM0004-1Z
/0/100/3/0/0.5.0/1 /dev/sdg1 volume 2047MiB swap partition
/0/100/3/0/0.5.0/2 /dev/sdg2 volume 9311GiB ZFS partition
/0/100/4 bridge 5520/X58 I/O Hub PCI Express Root Port 4
/0/100/5 bridge 5520/X58 I/O Hub PCI Express Root Port 5
/0/100/5/0 bridge Navi 10 XL Upstream Port of PCI Express Switch
/0/100/5/0/0 /dev/fb0 bridge Navi 10 XL Downstream Port of PCI Express Switch
/0/100/5/0/0/0 display Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT]
/0/100/5/0/0/0.1 multimedia Navi 10 HDMI Audio
/0/100/6 bridge 5520/X58 I/O Hub PCI Express Root Port 6
/0/100/7 bridge 5520/5500/X58 I/O Hub PCI Express Root Port 7
/0/100/8 bridge 5520/5500/X58 I/O Hub PCI Express Root Port 8
/0/100/9 bridge 7500/5520/5500/X58 I/O Hub PCI Express Root Port 9
/0/100/a bridge 7500/5520/5500/X58 I/O Hub PCI Express Root Port 10
/0/100/a/0 storage Silicon Motion, Inc.
/0/100/14 generic 7500/5520/5500/X58 I/O Hub System Management Registers
/0/100/14.1 generic 7500/5520/5500/X58 I/O Hub GPIO and Scratch Pad Registers
/0/100/14.2 generic 7500/5520/5500/X58 I/O Hub Control Status and RAS Registers
/0/100/1c bridge 82801JI (ICH10 Family) PCI Express Root Port 1
/0/100/1c/0 bridge EPB PCI-Express to PCI-X Bridge
/0/100/1c/0/4 enp3s4f0 network NetXtreme BCM5715 Gigabit Ethernet
/0/100/1c/0/4.1 enp3s4f1 network NetXtreme BCM5715 Gigabit Ethernet
/0/100/1d bus 82801JI (ICH10 Family) USB UHCI Controller #1
/0/100/1d/1 usb2 bus UHCI Host Controller
/0/100/1d/1/2 input Virtual Keyboard
/0/100/1d.1 bus 82801JI (ICH10 Family) USB UHCI Controller #2
/0/100/1d.1/1 usb3 bus UHCI Host Controller
/0/100/1d.2 bus 82801JI (ICH10 Family) USB UHCI Controller #3
/0/100/1d.2/1 usb4 bus UHCI Host Controller
/0/100/1d.3 bus 82801JI (ICH10 Family) USB UHCI Controller #6
/0/100/1d.3/1 usb5 bus UHCI Host Controller
/0/100/1d.3/1/1 bus Generic USB Hub
/0/100/1d.3/1/1/1 input Dell MS116 USB Optical Mouse
/0/100/1d.3/1/1/4 input G513 Carbon GX Blue
/0/100/1d.7 bus 82801JI (ICH10 Family) USB2 EHCI Controller #1
/0/100/1d.7/1 usb1 bus EHCI Host Controller
/0/100/1d.7/1/1 scsi5 storage Mass Storage Device
/0/100/1d.7/1/1/0.0.0 /dev/sdh disk 3963MB Flash Reader
/0/100/1d.7/1/1/0.0.0/0 /dev/sdh disk 3963MB
/0/100/1d.7/1/1/0.0.0/0/1 /dev/sdh1 volume 2047MiB swap partition
/0/100/1d.7/1/1/0.0.0/0/2 /dev/sdh2 volume 1731MiB ZFS partition
/0/100/1e bridge 82801 PCI Bridge
/0/100/1e/3 display ES1000
/0/100/1e/4 generic Integrated Lights Out Controller
/0/100/1e/4.2 generic Integrated Lights Out Processor
/0/100/1e/4.4 bus Integrated Lights-Out Standard Virtual USB Controller
/0/100/1e/4.4/1 usb6 bus UHCI Host Controller
/0/100/1e/4.6 bus Integrated Lights-Out Standard KCS Interface
/0/100/1f bridge 82801JIB (ICH10) LPC Interface Controller
/0/100/1f.2 scsi1 storage 82801JI (ICH10 Family) 4 port SATA IDE Controller #1
/0/100/1f.2/0.1.0 /dev/sda disk 128GB HP SSD S700 Pro
/0/100/1f.2/0.1.0/1 /dev/sda1 volume 497MiB EXT4 volume
/0/100/1f.2/0.1.0/2 /dev/sda2 volume 114GiB EXT4 volume
/0/100/1f.2/0.1.0/3 /dev/sda3 volume 4095MiB Linux swap volume
/0/100/1f.5 storage 82801JI (ICH10 Family) 2 port SATA IDE Controller #2
/0/101 bridge Intel Corporation
/0/102 bridge Intel Corporation
/0/103 bridge Intel Corporation
/0/104 bridge Intel Corporation
/0/105 bridge 7500/5520/5500/X58 Physical Layer Port 0
/0/106 bridge 7500/5520/5500 Physical Layer Port 1
/0/107 bridge Intel Corporation
/0/108 bridge Intel Corporation
/0/109 bridge Intel Corporation
/0/10a bridge Intel Corporation
/0/10b bridge Intel Corporation
/0/10c bridge Intel Corporation
/0/10d bridge Xeon 5600 Series QuickPath Architecture Generic Non-core Registers
/0/10e bridge Xeon 5600 Series QuickPath Architecture System Address Decoder
/0/10f bridge Xeon 5600 Series QPI Link 0
/0/110 bridge Xeon 5600 Series QPI Physical 0
/0/111 bridge Xeon 5600 Series Mirror Port Link 0
/0/112 bridge Xeon 5600 Series Mirror Port Link 1
/0/113 bridge Xeon 5600 Series QPI Link 1
/0/114 bridge Xeon 5600 Series QPI Physical 1
/0/115 bridge Xeon 5600 Series Integrated Memory Controller Registers
/0/116 bridge Xeon 5600 Series Integrated Memory Controller Target Address Decoder
/0/117 bridge Xeon 5600 Series Integrated Memory Controller RAS Registers
/0/118 bridge Xeon 5600 Series Integrated Memory Controller Test Registers
/0/119 bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Control
/0/11a bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Address
/0/11b bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Rank
/0/11c bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Thermal Control
/0/11d bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Control
/0/11e bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Address
/0/11f bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Rank
/0/120 bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Thermal Control
/0/121 bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Control
/0/122 bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Address
/0/123 bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Rank
/0/124 bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Thermal Control
/0/125 bridge Xeon 5600 Series QuickPath Architecture Generic Non-core Registers
/0/126 bridge Xeon 5600 Series QuickPath Architecture System Address Decoder
/0/127 bridge Xeon 5600 Series QPI Link 0
/0/128 bridge Xeon 5600 Series QPI Physical 0
/0/129 bridge Xeon 5600 Series Mirror Port Link 0
/0/12a bridge Xeon 5600 Series Mirror Port Link 1
/0/12b bridge Xeon 5600 Series QPI Link 1
/0/12c bridge Xeon 5600 Series QPI Physical 1
/0/12d bridge Xeon 5600 Series Integrated Memory Controller Registers
/0/12e bridge Xeon 5600 Series Integrated Memory Controller Target Address Decoder
/0/12f bridge Xeon 5600 Series Integrated Memory Controller RAS Registers
/0/130 bridge Xeon 5600 Series Integrated Memory Controller Test Registers
/0/131 bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Control
/0/132 bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Address
/0/133 bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Rank
/0/134 bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Thermal Control
/0/135 bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Control
/0/136 bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Address
/0/137 bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Rank
/0/138 bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Thermal Control
/0/139 bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Control
/0/13a bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Address
/0/13b bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Rank
/0/13c bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Thermal Control
/0/1 system PnP device PNP0c02
/0/2 input PnP device PNP0303
/0/3 input PnP device PNP0f13
/0/4 communication PnP device PNP0501
/0/5 system PnP device PNP0b00
/1 power 512327-B21
/2 power 512327-B21
/3 virbr0 network Ethernet interface
/4 virbr0-nic network Ethernet interface
/5 br1 network Ethernet interface
/6 virbr1-nic network Ethernet interface
/7 virbr1 network Ethernet interface
/8 br0 network Ethernet interface