Troubleshoot Common Graphics Issues on Linux VDA

Troubleshoot Common Graphics Issues on Linux VDA

book

Article ID: CTX235552

calendar_today

Updated On:

Description

This article provides an overview of the new graphics features/enhancements introduced in Linux VDA 7.18. It also provides general troubleshooting tips as well as common error scenarios for graphics issues.


Instructions

Linux VDA 7.18 introduces following four graphics features/enhancements, customers can configure the graphics mode based on their needs:

  • Support for H.265 video codec
Starting with the 7.18 release, Linux VDA supports the H.265 video codec for hardware acceleration of remote graphics and videos. You can use this feature on Citrix Receiver for Windows 4.10 and later. To benefit from this feature, enable it on both the Linux VDA and on Citrix Receiver.
To enable H.265 hardware encoding on the Linux VDA, configure the following policies from Citrix Studio:
  1. Enable the Use hardware encoding for video codec policy.
  2. Enable the Optimize for 3D graphics workload policy
  3. Ensure that the Use video codec for compression policy is default or set to For the entire screen.
  4. Ensure that the Visual quality policy is NOT set to Build to lossless or Always lossless.
To enable H.265 hardware encoding on Citrix Receiver:
  1. Open the Citrix Receiver Group Policy Object administrative template by running gpedit.msc.
  2. Under the Computer Configuration node, go to Administrative Templates > Citrix Receiver > User Experience.
  3. Select the H265 Decoding for graphics policy.
  4. Select Enabled.
  5. Click Apply and OK.
Note:
  • H.265 encoding is supported only on the NVIDIA GPU.
  • If the GPU at the endpoint does not support H.265 decoding using the DXVA interface, the policy settings are ignored and the session falls back to using the H.264 video codec.
  • Selective use of the H.264 video codes to compress graphics
Selective use of the video codec (H.264) to compress graphics is a feature introduced in Windows VDA version 7.11. Linux VDA 7.18 now supports this feature as well. This feature enables HDX Thinwire to detect and encode parts of the screen that are frequently updated using the H.264 video codec, for example, video content. Still image compression (JPEG, RLE) and bitmap caching are used for the rest of the screen, including text and photographic imagery. Users get the benefit of lower bandwidth and better quality for video content combined with lossless text or high quality imagery elsewhere.
To enable this feature, change the policy setting from Citrix Studio:
  • Set Use video codec for compression policy to Use when preferred (default) or For actively changing regions.
Note:
Windows VDA recently added support for Hardware Selective H.264/H.265. The Linux VDA only supports software H.264 encoding for this release (7.18).
  • Use H.264 for Build to Lossless in Thinwire+
One of the features of Thinwire+ is “Build to Lossless” for transient content. This means that content such as 3D or other moving imagery is initially displayed at low quality to improve frame rates and overall interactivity. Once user input has stopped, transient images are gradually sharpened to lossless.
Up to and including 7.17, Build to Lossless has always been JPEG-based. The JPEG codec can produce distorted results when bandwidth is low, particularly for fine line content. In 7.18, Build to Lossless now prefers H.264 over JPEG. H.264 offers superior image quality than JPEG at the same bandwidth, especially in WAN conditions.
To control the feature behaviour, set the policy setting from Citrix Studio:
  1. Set Visual quality policy to Build to Lossless
  2. Set Use Video Codec for compression policy to Use when preferred (default). This setting prefers H.264 over JPEG. If you want to force Build to Lossless to use JPEG, set Use Video Codec for compression policy to Do not use video codec.

Note:
H.264 build to lossless is only possible if the client Receiver supports Selective H.264. Currently, Citrix Receiver for Windows 4.9 (and above) and Citrix Receiver for Linux 13.5 (and above) support Selective H.264. If the H.264 Build to Lossless feature has been enabled in Citrix Studio while Citrix Receiver does not support Selective H.264, then Build to Lossless will fallback to JPEG-based.

  • Thinwire+ Progessive Display
This release introduces a progressive update mode to help improve screen interactivity in poor network scenarios. When low bandwidth (<2 Mbps) or high latency (> 200 ms) conditions are detected, images are heavily compressed and text quality is reduced. The quality gradually builds to lossless after user activity ceases.
For more information and configuration details, refer to KB CTX235349: Thinwire+ Progessive Display for static imagery (Fuzzy First).

Troubleshooting

How to check which encoding mode is in use

On Linux VDA, run the following command to check (0 means TW+; 1 means full-screen H.264; 2 means full-screen H.265):

sudo /opt/Citrix/VDA/bin/ctxreg dump | grep H264

As an example:

[root@LVDA ~]# sudo /opt/Citrix/VDA/bin/ctxreg dump | grep H264
create -k "HKLM\Software\Citrix\Ica\Session\2\Graphics" -t "REG_DWORD" -v "H264" -d "0x00000000" --force

How to check whether hardware encoding is in use for 3D Pro

You can check if hardware encoding is active in user session using either registry output or nvidia-smi tool:

  • Run the following command on Linux VDA (0 means not in use;1 means in use)

sudo /opt/Citrix/VDA/bin/ctxreg dump | grep HardwareEncoding

As an example:

[root@ LVDA ~]# sudo /opt/Citrix/VDA/bin/ctxreg dump | grep HardwareEncoding
create -k "HKLM\Software\Citrix\Ica\Session\2\Graphics" -t "REG_DWORD" -v "HardwareEncoding" -d "0x00000001" --force
create -k "HKLM\Software\Policies\Citrix\2\User\GraphicsPolicies" -t "REG_DWORD" -v "UseHardwareEncodingForVideoCodec" -d "0x00000001" --force

  • Launch Linux VDA session, open terminal and run command nvidia-smi, type “C+G” means hardware encoding is active:
User-added image

Note: The NVIDIA System Management Interface, nvidia-smi, is a command-line tool that reports management information for NVIDIA GPUs. See NVIDIA System Management Interface nvidia-smi for more information.

Here are some common error scenarios you might encounter while using graphics features on Linux VDA:

Common error scenario #1: User configured the policies to use H.265 hardware encoding on Linux VDA, however, after configuration H.264 is used from command output.

Perform the following steps to troubleshoot:

  • Ensure you’re using Linux VDA 7.18+ and Citrix Receiver for Windows 4.10+
  • Ensure the H.265 hardware encoding is enabled on both Linux VDA and Citrix Receiver
  • Ensure that the Visual quality policy is NOT set to Build to lossless or Always lossless. You can refer to the policy settings listed on the instructions on "Support for H.265 video codec" section in this article.
  • Ensure the GPU at the endpoint supports H.265 decoding using the DXVA interface. You can run a tool DXVA Checker on the client host where Citrix Receiver is running to check, if the result contains “HEVC_VLD_Main”, then the GPU at the endpoint supports H.265.
User-added image

How to get more detailed logging of graphics features

  • SSH to Linux VDA server
  • Set GFX_X11 log level to VERBOSE use command setlog:
/opt/Citrix/VDA/bin/setlog level GFX_X11 VERBOSE
Look for “ctxgfx*” lines in /var/log/xdl/hdx.log.
  • Check Xorg.*.log (the one most recently generated) under folder /var/log/ for any possible errors.
  • For general troubleshooting purpose, you may also need to collect CDF traces of Citrix Receiver.

Issue/Introduction

This article provides an overview of the new graphics features/enhancements introduced in Linux VDA 7.18. It also provides general troubleshooting tips as well as common error scenarios for graphics issues.