The Linux VDA provides the out-of-the-box multi-monitor support with a default resolution of 2560×1600 per monitor. Standard VDAs support up to nine monitors, and HDX 3D Pro VDAs support up to four monitors.
This article describes how to configure the Linux VDA for different monitor resolutions and layouts.
Like the
Windows VDA, the Linux VDA has the concept of a multi-monitor virtual desktop, which is based on the bounding rectangle of all monitors, not the actual layout of the monitors. Thus, the area of the virtual desktop can theoretically be larger than the area covered by the monitors of the client.
The origin of the virtual session desktop is calculated from the top-left corner of the bounding rectangle of all monitors. That point is located at X = 0, Y = 0, where X and Y are the horizontal and vertical axes, respectively.
The width of the virtual session desktop is the horizontal distance, in pixels, from the origin to the top-right corner of the bounding rectangle of all monitors.
Similarly, the height of the virtual session desktop is the vertical distance, in pixels, from the origin to the bottom-left corner of the bounding rectangle of all monitors.
This is important for the following reasons:
- Allowing for different client monitor layouts
- Understanding memory usage on the Linux VDA
Knowing the maximum virtual desktop size for your various client monitor configurations allows you to configure the Linux VDA to be flexible in terms of client monitor configurations.
Consider the following client monitor configuration:
The diagram above shows an out-of-the-box multi-monitor configuration with two monitors, each with a resolution of 2560×1600.
Now, consider connecting to the same Linux VDA with the following client monitor configuration:
If each monitor in the above diagram has a resolution of 2560×1600, the out-of-the-box multi-monitor configuration parameters will be insufficient. The maximum height is too small to accommodate the virtual session desktop for this monitor layout. To accommodate the client monitor configuration in this example, the Linux VDA virtual desktop must be set to a size of 4160×2560.
For the greatest flexibility in a multi-monitor configuration, find the smallest bounding rectangle of all monitor layouts you want to support. For configurations with two 2560×1600 monitors, the possible layouts include:
- Monitor1 2560×1600 and Monitor2 2560×1600
- Monitor1 1600×2560 and Monitor2 2560×1600
- Monitor1 2560×1600 and Monitor2 1600×2560
- Monitor1 1600×2560 and Monitor2 1600×2560
To accommodate all of the layouts above, you need to have a virtual session desktop of 5120×2560 because this is the smallest bounding rectangle that can contain all the desired layouts.
If all your users have only one monitor in the typical landscape layout, set the maximum virtual desktop size to the resolution of the monitor with the highest resolution.
In this example, the virtual desktop should be set to a size of 2560×1600. Note that because the default configuration is 5120×1600 and 2 monitors, a configuration change is required to optimize memory usage for single-monitor deployments.
Note: If a desktop displays at an improper resolution in a multi-monitor setup, adjust Dots Per Inch (DPI) settings on the Citrix Workspace app. For more information, see Knowledge Center article
CTX230017
Knowing the virtual desktop size allows you to calculate the amount of memory used by each HDX session. This is the memory allocated to each session for its graphics data when the session begins. It does not change for the life of the session. While this is not the total amount of memory used for the session, it is the easiest way of calculating per-session memory usage.
To calculate how much memory is allocated to each HDX session, use the following formula:
M = X×
Y×
Z,
Where:
- M is the amount of memory used for session graphics
- X is the width of the virtual session desktop
- Y is the height of the virtual session desktop
- Z is the color depth of the HDX session window. The value is in bytes, not bits, so use 4 for 32-bit color.
NOTE: The color depth of the X server starts and cannot change with the life of the session (from login through disconnects/reconnects until logoff). Hence, the Linux VDA always allocates the virtual session desktop as 32-bit and down samples to the color depth requested for the session.
For example, for a 1024×768 session, the memory used is:
1024 × 768 × 4 / 2^20 MB = 3 MB
Knowing the various client monitor configurations in your environment, the virtual session desktop size, and being able to calculate the memory usage allows you to minimize memory waste on the Linux VDA. This is important for increasing session density on each Linux VDA.
Consider the following client monitor configuration:
Assuming each monitor has a resolution of 2560×1600, to accommodate this client monitor configuration, the virtual session desktop size needs to be 5120×3200. Notice that the gray area is unused and equates to 16,384,000 (i.e. 2560 x 1600 x 4) bytes of wasted memory.
The multi-monitor functionality of the Linux VDA is controlled by the following configuration parameters:
Parameter HKEY_LOCAL_MACHINE/System/CurrentControlSet/Control/Citrix/Thinwire/MaxScreenNum
Description Number of monitors to support
Type DWORD
Default 2
Maximum 9 for standard VDA, 4 for HDX 3D Pro VDA
Parameter HKEY_LOCAL_MACHINE /System/CurrentControlSet/Control/Citrix/Thinwire/MaxFbWidth
Description Maximum width of a virtual session desktop
Type DWORD
Default 5,120
Maximum 16,384 (8,192 x 2)
Parameter HKEY_LOCAL_MACHINE /System/CurrentControlSet/Control/Citrix/Thinwire/MaxFbHeight
Description Maximum height of a virtual session desktop
Type DWORD
Default 1,600
Maximum 16,384 (8,192 x 2)
The following section outlines how to enable, configure, and disable the multi-monitor functionality on the Linux VDA.
Set the maximum number of monitors by using:
sudo /opt/Citrix/VDA/bin/ctxreg create -k "HKEY_LOCAL_MACHINE \System\CurrentControlSet\Control\Citrix\Thinwire" -t "REG_DWORD" -v "MaxScreenNum" -d "NumMons" --force
Where NumMons is a value between 1 and 9 for standard VDA or 1 and 4 for HDX 3D Pro VDA. Set the maximum width of a virtual session desktop by using:
sudo /opt/Citrix/VDA/bin/ctxreg create -k "HKEY_LOCAL_MACHINE \System\CurrentControlSet\Control\Citrix\Thinwire" -t "REG_DWORD" -v "MaxFbWidth" -d "MaxWidth" --force
Where
MaxWidth is a value between 1,024 and 16,384.
Set the maximum height of a virtual session desktop by using:
sudo /opt/Citrix/VDA/bin/ctxreg create -k "HKEY_LOCAL_MACHINE \System\CurrentControlSet\Control\Citrix\Thinwire" -t "REG_DWORD" -v "MaxFbHeight" -d "MaxHeight" --force
Where
MaxHeight is a value between 1,024 and 16,384.