Hardware Acceleration for Linux endpoints with AMD GPUs

Hardware Acceleration for Linux endpoints with AMD GPUs

book

Article ID: CTX236304

calendar_today

Updated On:

Description

Starting from version 2.5, HDX RTME supports hardware acceleration for video compression on Linux thin clients or fat clients with AMD GPU. Specifically, for video encoding RTME uses VCE 2.0 or higher. Video decoding has limited support because of some technical limitations, and it is disabled in RTME by default.

OMX IL is used for offload video processing to GPU.
Hardware video encoding on Linux could be disabled by registry key DisableOnboardHardwareH264Encoding (DWORD value 1-disabled or 0-enabled by default) in HKEY_CURRENT_USER\Software\Citrix\HDXRTConnector\MediaEngine\
 


Ubuntu 16.04 environment set-up

Install AMD driver stack from
https://www.amd.com/en/support/kb/faq/amdgpu-installation
Install kernel (example command line, latest available version should be used):
sudo dpkg -i linux-image-4.4.11-289-amd+_4.4.11-289-amd+-10.00.Custom_amd64.deb linux-headers-4.4.11-289-amd+_4.4.11-289-amd+-10.00.Custom_amd64.deb
sudo reboot

Install userspace:
Create local repository as it is described in amdgpu_UserGuide.pdf or proceed manually with dpkg.


NOTE:
To verify available package versions:
apt-cache policy <package name>
To overwrite 'man' or header files:
-o Dpkg::Options::="--force-overwrite" (apt-get)
--force-overwrite (dpkg)


In case of unmet dependencies, you can resolve them by installing strictly with dpkg -i, pulling needed packages alongside.
During these steps, please, prefer packages from AMD driver stack. For isntance you may install "llvm-5.0-dev=5.0-519", while "llvm-5.0-dev" will set up the latest Ubuntu package.


libllvm5.0 llvm-5.0-dev llvm-5.0-runtime llvm-5.0
 
llvm-runtime llvm-dev llvm
 
libdrm-dev libdrm-amdgpu1 libdrm-radeon1 libdrm2
 
libdrm-dev libdrm-amdgpu1 libdrm-radeon1 libdrm2
 
libva-dev libva1 libva-drm1 libva-egl1 libva-glx1 libva-tpi1 libva-wayland1 libva-x11-1 vainfo apt-cache policy libva-dev libva1 libva-drm1 libva-egl1 libva-glx1 libva-tpi1 libva-wayland1 libva-x11-1 vainfo
 
libegl1-mesa-dev libegl1-mesa-drivers libegl1-mesa libgbm-dev libgbm1 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libgles1-mesa-dev libgles1-mesa libgles2-mesa-dev libgles2-mesa libosmesa6-dev libosmesa6 libwayland-egl1-mesa libxatracker-dev libxatracker2 mesa-common-dev mesa-omx-drivers mesa-vdpau-drivers
 
gst-omx xserver-xorg-video-amdgpu
Install bellagio:
libomxil-bellagio0 (Generic core OMXIL implementation)
libomxil-bellagio-bin (to register available OMX components)
Register these components run omxregister-bellagio (from libomxil-bellagio-bin) with the noted above path.

  • Run omxregister-bellagio -l and you should get the following output:
  • *********************************
  • * List of registered components *
  • *********************************
  • Component OMX.mesa.video_decoder
  •           supported formats:
  •              OMX.mesa.video_decoder.mpeg2
  •              OMX.mesa.video_decoder.avc
  •  
  • Component OMX.mesa.video_encoder
  •           supported formats:
  •              OMX.mesa.video_encoder.avc
  • Installed components and a path to the library are stored in an OMX registry file:
  • $ cat ~/.omxregister
  • /usr/lib/libomxil-bellagio0/libomx_mesa.so
  •  ==> OMX.mesa.video_decoder ==> OMX.mesa.video_decoder.mpeg2:OMX.mesa.video_decoder.avc:
  •  ==> OMX.mesa.video_encoder ==> OMX.mesa.video_encoder.avc:
 
 
Driver requirements:

These are described in AMD's site https://www.amd.com/en/support/kb/faq/amdgpu-installation 

RTME uses OMX API for video encoding and decoding.
This API is implemented by Bellagio OpenMAX IL (libomxil-bellagio0 and libomxil-bellagio-bin).

Hardware requirements: AMD GPU with VCE 2.0 or above. Specifically, Citrix is using Mullins and Carrizo.
 
Known limitations:
-          video encoding is supported on Mullins series only. Carrizo series were tested too, but problems were found with unstable video bitrate. As a result, a stream was encoded with poor quality.
-          video decoding is disabled by default, and could be enabled from registry on VDA. It was done because HW decoder introduces high latency up to 500ms.
It was found that described limitations became visible only on Linux platforms. The same GPU works great on Windows endpoints.

 

 

Environment

Citrix is not responsible for and does not endorse or accept any responsibility for the contents or your use of these third party Web sites. Citrix is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement by Citrix of the linked Web site. It is your responsibility to take precautions to ensure that whatever Web site you use is free of viruses or other harmful items.

Issue/Introduction

Information regarding the RTME 2.5 release for Linux endpoints that have an AMD APU

Additional Information

Capability Checker for Linux platforms:

We have implemented a utility that verifies computer capabilities (support of hardware decoding and encoding). Simply launching this executable will produce a compatibility report. This tool can be downloaded from here

https://citrix.sharefile.com/d-s4c50507142b4b229

Additional info for Thin Client vendors:
It’s possible to switch these limitations off by adding registry keys on the VDA  (HKEY_CURRENT_USER\Software\Citrix\HDXRTConnector\MediaEngine\) :

-          DisableLinuxAMDH264HardwareDecoding (DWORD: 1 – default value, 0 – enable HW decoding)
-          SupportedAMDHWAVideoCardList (STRING: list of GPU PID in hex with coma as separator, for example “0x9870, 0x9874, 0x9875”)