Citrix Virtual Apps and Desktops

Thinwire

Introduction

Thinwire, a part of Citrix HDX technology, is the Citrix default display remoting technology used in Citrix Virtual Apps and Desktops.

Display remoting technology allows graphics generated on one machine to be transmitted, typically across a network, to another machine for display.

A successful display-remoting solution provides a highly interactive user experience that is similar to that of a local PC. Thinwire achieves this experience by using a range of complex and efficient image analysis and compression techniques. Thinwire maximizes server scalability and consumes less bandwidth than other display-remoting technologies.

Because of this balance, Thinwire meets most general business use cases and is used as the default display-remoting technology in Citrix Virtual Apps and Desktops.

HDX 3D Pro

In its default configuration, Thinwire can deliver 3D or highly interactive graphics and use a graphics processing unit (GPU), if present. However, we recommend enabling HDX 3D Pro mode using the Optimize for 3D graphics workload or Visual quality > Build to lossless policies for scenarios when GPUs are present. These policies configure Thinwire to use a video codec (H.264, H.265, or AV1) to encode the entire screen using hardware acceleration if a GPU is present. Doing so provides a more fluid experience for 3D professional graphics. For more information, see H.264 Build to lossless, HDX 3D Pro, and GPU acceleration for Windows Single-session OS.

Requirements

Thinwire is optimized for modern operating systems, including Windows Server 2022, Windows Server 2019, Windows 10, and Windows 7. For Windows Server 2008 R2, legacy graphics mode is recommended. Use the built-in Citrix policy templates, High Server Scalability-Legacy OS and Optimized for WAN-Legacy OS to deliver the Citrix recommended combinations of the policy settings for these use cases.

  • The policy setting that drives the behavior of Thinwire - Use video codec for compression is available on VDA versions in Citrix Virtual Apps and Desktops 7 1808 or later and XenApp and XenDesktop 7.6 FP3 and later. The Use video codec when preferred option is the default setting on VDA versions Citrix Virtual Apps and Desktops 7 1808 or later and XenApp and XenDesktop 7.9 and later.
  • All Citrix Workspace apps support Thinwire. Some Citrix Workspace apps might support features of Thinwire that others do not, for example, 8-bit or 16-bit graphics for reduced bandwidth usage. Support for such features is automatically negotiated by the Citrix Workspace app.
  • Thinwire uses more server resources (CPU, memory) in multi-monitor and high-resolution scenarios. It is possible to tune the amount of resources Thinwire uses, however, bandwidth usage might increase as a result.
  • In low bandwidth or high latency scenarios, consider enabling 8-bit or 16-bit graphics to improve interactivity. Visual quality might be affected, especially at 8-bit color depth.

Encoding methods

Thinwire can operate in two different encoding modes depending on policy and client capabilities:

  • Thinwire with Adaptive JPEG Use video codec for compression policy setting: Do not use video codec

  • Thinwire with Selective H.264, H.265, or AV1 Use video codec for compression policy setting: Use video codec when preferred or For actively changing regions
  • Thinwire with Full Screen H.264, H.265 or AV1 Use video codec for compression policy setting: For the entire screen

H.265

High Efficiency Video Coding (HEVC), also known as H.265 is the successor to H.264. Hardware encoding with the H.265 video codec is supported on the following GPUs:

  • NVIDIA Maxwell-based GPUs and upward
  • Intel 6th generation GPUs and upward
  • AMD Raven-based GPUs and upward

AV1

Citrix added support for the AV1 video codec. The benefit of AV1 is that it has superior image compression, better image quality, and lower bandwidth usage compared to H.264 and H.265.

The following requirements for AV1 must be met:

  • VDA 2305 or higher for NVIDIA GPUS, or
  • VDA 2308 or higher for Intel GPUs

The following GPUs are compatible for encoding:

  • NVIDIA Ada Lovelace-based GPU
  • Intel ARC or Intel Data Center GPU Flex Series GPUs

For more information about NVIDIA’s Ada Lovelace GPUS, see ADA architecture.

For more information about Intel’s ARC workstation and data center Flex Series GPUs, see Flex series and Overview.

Automatic video codec selection

You can automatically detect the best video codec to use when either the Use video codec for compression policy is enabled or Optimize for 3D graphics workload is enabled on the VDA. During installation of the Citrix Workspace app for Windows, the decoding capabilities of the endpoint are evaluated. Based on this information, the Citrix Workspace app for Windows negotiates the best codec to use with the VDA upon connection. The following list depicts the order in which the video codecs are evaluated:

  • AV1
  • H.265
  • H.264

The automatic selection only applies to 4:2:0 variants of these codecs. If the Visual Quality setting is set to ‘Build-to-Lossless’ or ‘Always Lossless’ and when Allow Visually Lossless is set to ‘enabled’, automatic selection of the video codec is disabled.

When connecting to a resource, the Citrix Workspace app tests the endpoint’s capability to decode H.265 and AV1 and save the capabilities in the registry. Citrix Workspace app then automatically selects the best video codec to use and negotiates this with the VDA. If both the VDA and the client can use H.265 and AV1, then AV1 is selected as the video codec. If AV1 is not available on either the VDA or on the client, H.265 is negotiated. If H.265 is also not available on either, the session uses H.264 as the video codec.

Note:

This feature is enabled by default. This behavior can be changed by setting the new client-side registry setting DisableDecoderCaps.

To disable the automatic selection of the video codec, set ‘DisableDecoderCaps’ as HKLM\Software\WOW6432Node\Policies\Citrix\ICA Client\Graphics Engine DWORD DisableDecoderCaps = 1 or HKCU\Software\Policies\Citrix\ICA Client\Graphics Engine DWORD DisableDecoderCaps = 1.

If either of these values is set to 1, automatic selection of the video codec is not used. The graphics status indicator and the HDX monitor can monitor the video codec.

Configuration

Thinwire is the default display-remoting technology.

The following Graphics policy setting sets the default and provides alternatives for different use cases:

  • Use video codec for compression
    • Use video codec when preferred. This is the default setting. No additional configuration is required. Keeping this setting as the default ensures that Thinwire is selected for all Citrix connections, and is optimized for scalability, bandwidth, and superior image quality for typical desktop workloads. This is functionally equivalent to For actively changing regions.
  • Other options in this policy setting continue to use Thinwire with other technologies for different use cases. For example:
    • For actively changing regions. The adaptive display technology in Thinwire identifies moving images (video, 3D in motion) and uses H.264, H.265, or AV1 only in the part of the screen where the image is moving.
    • For the entire screen. Delivers Thinwire with full-screen with H.264, H.265, or AV1 to optimize for improved user experience and bandwidth in cases with heavy use of 3D graphics. In the case of H.264 4:2:0 (the Visually lossless policy is disabled), the final image is not pixel perfect (lossless) and might not be suitable for certain scenarios. In such cases, consider using H.264 Build to lossless or H.265 Build to lossless instead.

Video codec

Various other policy settings, including the following Visual display policy settings, can be used to fine-tune the performance of display remoting technology. Thinwire supports them all.

To get the Citrix recommended combinations of policy settings for different business use cases, use the built-in Citrix Policy templates. The High Server Scalability and Very High Definition User Experience templates use Thinwire with the optimum combinations of policy settings for your organization’s priorities and your users’ expectations.

Monitoring Thinwire

You can monitor the use and performance of Thinwire from Citrix Director. The HDX virtual channel details view contains useful information for troubleshooting and monitoring Thinwire in any session. To view Thinwire-related metrics:

  1. In Director, search for a user, machine or endpoint, open an active session and click Details. Or, you can select Filters > Sessions > All Sessions, open an active session and click Details.

  2. Scroll down to the HDX panel.

    HDX monitoring

  3. Select Graphics - Thinwire.

    Thinwire

Lossless compression codec (MDRLE)

In a typical desktop session, most of the imagery is simple graphics or text regions. Thinwire determines where these regions are and selects these areas for lossless encoding using the 2DRLE codec. At the Citrix Workspace app client side, these elements are decoded using the Citrix Workspace app-side 2DRLE decoder for session display.

In XenApp and XenDesktop 7.17, we added a higher compression ratio MDRLE codec that consumes less bandwidth in typical desktop sessions than the 2DRLE codec. This new codec does not impact server scalability.

Lower bandwidth usually means improved session interactivity (especially on shared or constrained links) and reduced costs.

Configuration isn’t required for the MDRLE codec. If Citrix Workspace app supports MDRLE decoding, the VDA uses the VDA MDRLE encoding and the Citrix Workspace app MDRLE decoding. If Citrix Workspace app doesn’t support MDRLE decoding, the VDA automatically falls back to 2DRLE encoding.

MDRLE Requirements:

  • Citrix Virtual Apps and Desktops minimum version 7 1808 VDAs
  • XenApp and XenDesktop minimum version 7.17 VDAs
  • Citrix Workspace app for Windows minimum version 1808
  • Citrix Receiver for Windows minimum version 4.11

Progressive Mode

Citrix Virtual Apps and Desktops 1808 introduced progressive mode and enabled it by default. In constrained network conditions (default: bandwidth < 2 Mbps, or latency > 200 ms), Thinwire increased the compression of text and static imagery to improve interactivity during screen activity. The heavily compressed text and images are then progressively sharpened, in a random block fashion, when screen activity stops. While compressing and sharpening this way improves overall interactivity, it reduces cache efficiency and increases bandwidth usage.

As of Citrix Virtual Apps and Desktops 1906, progressive mode is disabled by default. We now use a different approach. The quality of still images is now based on network conditions and floats between a pre-defined minimum and maximum value for each Visual quality setting. Because there is no explicit sharpening step, Thinwire optimizes image delivery and maintains cache efficiency, while providing nearly all of the benefits of progressive mode.

Changing progressive mode behavior

You can change the progressive mode state with the registry key. For information, see Progressive mode in the list of features managed through the registry.

Build to lossless

Build to lossless is a special Thinwire configuration that optimizes graphics delivery for interactivity and final image quality. You can enable this setting by setting the Visual quality policy to Build to lossless.

Build to lossless compresses the screen using H.264, H.265, or AV1 during screen activity and sharpens to pixel perfect (lossless) when activity stops. The lossy image quality adapts to available resources to maintain the best possible frame rate. The sharpening step is performed gradually. For example, selecting a model and rotating it.

Build to lossless offers all the advantages of using a video codec for the entire screen, including hardware acceleration, but with the added benefit of a final, guaranteed lossless screen. This is critical for 3D-type workloads that require a final pixel-perfect image. For example, manipulating medical imagery. Also, H.264 Build to lossless uses fewer resources than full-screen H.264 4:4:4. As a result, using Build to lossless usually results in a higher frame rate than Visually lossless H.264 4:4:4.

Note:

You can disable the use of a video codec when using a build to lossless. Simply set the Use video codec policy to Do not use video codec. This results in moving images being encoded with Adaptive JPEG instead.

Visually lossless encoding

Visually Lossless encoding uses the YUV 4:4:4 color space instead of the chroma-subsampled YUV 4:2:0 color space for video codec compression. This ensures that no color information is lost during color space conversion, and once decoded, is visually imperceptible from the original RGB image.

Consider the following example. If using a video codec to compress the entire screen, 4:2:0 color compression can degrade high-contrast details like text, making them fuzzy and harder to read. In contrast, 4:4:4 preserves nearly all color information and does not exhibit any visually perceptible degradation.

Lossless Graphics

Workloads that require pixel perfect quality or accurate color display can benefit from Visually Lossless encoding.

Visually Lossless encoding is available with both H.264 and H.265. H.264 4:4:4 encoding is a purely software-based solution, and as a result, there may be a significant impact on CPU utilization on both the VDA and the client. This may also affect the frame rate.

H.265 4:4:4 support was added with the release of Citrix Workspace app 2305, enabling Thinwire to use both a GPU on the VDA and client for H.265 4:4:4 encoding, significantly improving performance.

To allow Visually Lossless 4:4:4 encoding, two policies need to be enabled:

  • Visual Quality: Set to Build to Lossless or Always Lossless
  • Allow Visually Lossless: Set to Enabled

Note:

If Allow Visually Lossless is not enabled, we switch to our Thinwire encoder in either Build to lossless or Always Lossless.

H.265 4:4:4 visually lossless has the additional requirements:

  • NVIDIA GPUs require VDA version 2209 or higher
  • Intel GPUs require VDA version 2308 or higher

The following GPUs are supported for H.265 4:4:4:

  • NVIDIA Pascal-generation GPUs and onward
  • Intel 10th generation GPUs and onward

For the client, Citrix Workspace app for Windows version 2305 is required (version 2309.1 is recommended).

Hardware decoding of H.265 4:4:4 is possible with the following client device GPUs:

  • NVIDIA Turing-generation GPUs and onward
  • Intel 10th generation GPUS and onward
Thinwire