Configure graphics

This article provides guidance for the Linux VDA graphics configuration and fine-tuning.

For more information, see System requirements and the Installation overview section.

Configuration parameters

There are several graphics-related configuration parameters under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Citrix\Thinwire that you can tune with the ctxreg utility.

How to enable Thinwire Plus

Thinwire plus is enabled by default, for both standard VDA and 3D Pro.

How to enable H.264

In addition to the operating system requirement, H.264 has a minimum requirement for the Citrix Workspace app (formerly Citrix Receiver) version. If the client does not meet the requirements, it falls back to Thinwire Plus.

Operating system Minimum requirement for H.264
Windows 3.4 or later
Mac OS X 11.8 or later
Linux 13.0 or later
Android 3.5
iOS 5.9
Chrome OS 1.4

The latest feature matrix for Citrix Workspace app is available at https://docs.citrix.com/en-us/citrix-workspace-app/citrix-workspace-app-feature-matrix.html.

Run the following command to advertise H.264 encoding on the VDA:

sudo ctxreg create -k "HKLM\System\CurrentControlSet\Control\Citrix\Thinwire" -t "REG_DWORD" -v "AdvertiseH264" -d "0x00000001" --force
<!--NeedCopy-->

How to enable hardware encoding in HDX 3D Pro

For the HDX 3D Pro, the AdvertiseH264 setting only enables software H.264 encoding. Run the following command to enable hardware encoding:

sudo ctxreg create -k "HKLM\System\CurrentControlSet\Control\Citrix\Thinwire" -t "REG_DWORD" -v "HardwareEncoding" -d "0x00000001" --force
<!--NeedCopy-->

Note:

If you get the ctxreg command can't be found error, use the ctxreg command with a full path. For example, use sudo /opt/Citrix/VDA/bin/ctxreg create -k "HKLM\System\CurrentControlSet\Control\Citrix\Thinwire" -t "REG_DWORD" -v "AdvertiseH264" -d "0x00000001" –force instead of sudo ctxreg create -k "HKLM\System\CurrentControlSet\Control\Citrix\Thinwire" -t "REG_DWORD" -v "AdvertiseH264" -d "0x00000001" –force.

How to tune Thinwire Plus for lower bandwidth

  • MaxColorDepth

     Default 0x20, type DWORD
     <!--NeedCopy-->
    

    This option specifies the color depth of graphics transferred through the Thinwire protocol to the client.

    To save bandwidth, set it to 0x10 (which represents the preferred color depth for simple graphics) or to 0x8 (the experimental low bandwidth mode).

  • Quality

    Visual quality

     Default: 0x1(medium), type: DWORD, valid values: 0x0(low), 0x1(medium), 0x2(high), 0x3(build to lossless), 0x4 always lossless.
     <!--NeedCopy-->
    

    To save bandwidth, set Quality to 0x0(low).

  • More parameters

    • TargetFPS

      Target frame rate

      Default: 0x1e (30), Type: DWORD
      <!--NeedCopy-->
      
    • MinFPS

      Target minimum frame rate

       Default: 0xa (10), Type: DWORD
       <!--NeedCopy-->
      
    • MaxScreenNum

      Maximum number of monitors the client can have

       Default: 0x2, Type: DWORD
       <!--NeedCopy-->
      

      For a standard VDA, you can set a maximum value of up to 10. For 3D Pro, the maximum value allowed is 4.

Troubleshooting

Check which encoding is in use

Run the following command to check whether H.264 encoding is in use (1 means H.264; 0 means TW+):

sudo ctxreg dump | grep H264
<!--NeedCopy-->

The results resemble:

create -k "HKLM\Software\Citrix\Ica\Session\1\Graphics" -t "REG_DWORD" -v "H264" -d "0x00000001" --force

create -k "HKLM\System\CurrentControlSet\Control\Citrix\Thinwire" -t "REG_DWORD" -v "AdvertiseH264" -d "0x00000001" --force

Check whether hardware encoding is in use for 3D Pro

Run the following command (0 means not in use; 1 means in use):

sudo /opt/Citrix/VDA/bin/ctxreg dump | grep HardwareEncoding
<!--NeedCopy-->

The results resemble:

create -k "HKLM\Software\Citrix\Ica\Session\1\Graphics" -t "REG_DWORD" -v "HardwareEncoding" -d "0x00000001" --force

Another way is to use the nvidia-smi command. The outputs resemble the following if hardware encoding is in use:

Tue Apr 12 10:42:03 2016
+------------------------------------------------------+
| NVIDIA-SMI 361.28     Driver Version: 361.28         |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GRID K1             Off  | 0000:00:05.0     Off |                  N/A |
| N/A   42C    P0    14W /  31W |    207MiB /  4095MiB |      8%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0      2164  C+G   /usr/local/bin/ctxgfx                          106MiB |
|    0      2187    G   Xorg                                            85MiB |
+-----------------------------------------------------------------------------+
<!--NeedCopy-->

Verify that the NVIDIA GRID graphics driver is installed correctly

To verify that the NVIDIA GRID graphics driver is installed correctly, run nvidia-smi. The results resemble:

+------------------------------------------------------+
| NVIDIA-SMI 352.70     Driver Version: 352.70         |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla M60           Off  | 0000:00:05.0     Off |                  Off |
| N/A   20C    P0    37W / 150W |     19MiB /  8191MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
<!--NeedCopy-->

Set the correct configuration for the card:

etc/X11/ctx-nvidia.sh

HDX 3D Pro multi-monitor redraw issues

If you are seeing redraw issues on screens other than the primary monitor, check that the NVIDIA GRID license is available.

Check Xorg error logs

The log file of Xorg is named similar to Xorg.{DISPLAY}.log in the /var/log/ folder.

Known issues and limitations

For vGPU, the XenServer local console shows the ICA desktop session screen

Workaround: Disable the VM’s local VGA console by running the following command:

xe vm-param-set uuid=<vm-uuid> platform:vgpu_extra_args="disable_vnc=1"
<!--NeedCopy-->

NVENC API is not supported in vGPU profiles other than 8Q

NVIDIA Tesla M60 card vGPU profiles other than 8Q do not support cuda, as a result, NVENC API and Citrix 3D Pro hardware encoding are not available.

NVIDIA K2 graphics cards do not support YUV444 hardware encoding in pass-through mode

This is a limitation of NVIDIA K2 graphics cards.

Gnome 3 desktop popups slow when logging on

It is a limitation of Gnome 3 desktop session startup.

Some OpenGL/WebGL applications do not render well upon resizing the Citrix Receiver window

Resizing the Citrix Receiver window changes the screen resolution. The NVIDIA proprietary driver changes some internal states and might require applications to respond accordingly. For example, the WebGL library element lightgl.js might spawn an error saying that ‘Rendering to this texture is not supported (incomplete frame buffer)’.

Configure graphics