The Linux Virtual Desktop v1.1 release continues to evolve the Linux VDA’s graphics capabilities with multi-monitor support. The Linux VDA supports dual monitor out-of-the box with maximum resolution of 2560×1600 per monitor and can be configured to support up to 9 monitors. This article explains how to configure the Linux VDA for different monitor resolutions and monitor layouts.
Virtual Session Desktop
As with the Windows VDA, 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 could be larger than the area covered by the monitors of the client.
Virtual Session Desktop Size
The origin of the virtual session desktop is calculated from the top-left corner of the bounding rectangle of all monitors. That point is considered X = 0, Y = 0, where X is horizontal and Y is vertical.
The width of the virtual session desktop is 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 vertical distance, in pixels, from the origin to the bottom-left corner of the bounding rectangle of all monitors.
This is important for a few reasons:
- Allowing for different client monitor layouts
- Understanding memory usage on the Linux VDA
Allowing for different client monitor configurations
Knowing the maximum virtual desktop size for your various client monitor configurations will allow you to configure the Linux VDA to be flexible in terms of client monitor configurations.
Consider the following client monitor configuration:
If each monitor in the above diagram has a resolution of 2560×1600 then this diagram shows the out-of-the-box multi-monitor configuration for Linux VDA v1.1.
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 then 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 client monitor layout. In order to accommodate the client monitor configuration in this example the Linux VDA virtual desktop should be set to a size of 4160×2560.
For the most flexibility in a multi-monitor setup, you need to find the smallest bounding rectangle of all monitor layouts you want/need to support. Consider a dual monitor setup with two 2560×1600, 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
In order to accommodate all of the above layouts, you need to have a virtual session desktop of 5120×2560 as this is the smallest bounding rectangle that can contain all of the desired layouts.
If all your users only have one monitor in the typical landscape layout, the virtual desktop size should be set to the maximum resolution of one monitor only – typically the monitor with the highest resolution.
In this example, the virtual desktop should be set to a size of 2560×1600. Note that since the default configuration is 5120×1600 and 2 monitors, a configuration change is required to optimize memory usage for single monitor deployments.
Understanding memory usage on the Linux VDA
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 and doesn’t change for the life of the session. This is not the total amount of memory used for the session, however it is the vast majority and the easiest way of calculating per-session memory usage.
To calculate how much memory will be allocated to each HDX session use the following formula:
- M is the amount of memory used for sessions graphics
- X is the width of the virtual session desktop
- Y is the height of the virtual session desktop
- Z is the colour depth of the HDX session window. The value is in bytes, not bits so use 4 for 32 bit colour.
NOTE: The colour depth of the X server starts and cannot change with 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 colour depth requested for the session.
For example, for a 1024×768 session the memory used is:
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 minimise memory wastage 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 grey area is unused and equates to 16,384,000 (i.e. 2560 x 1600 x 4) bytes of wasted memory.
Citrix multi-monitor related configuration parameters
The Linux VDA’s multi-monitor functionality is controlled by the following configuration parameters:
|Description||Number of monitors to support|
|Description||Maximum height of virtual session desktop|
|Description||Maximum width of virtual session desktop|
The MaxScreenNum parameter sets an upper limit on the number of client monitors which can be used within the HDX session. There is a hard limit of 9 monitors.
Changing the Linux VDA multi-monitor configuration
The following outlines how to enable, configure and disable multi-monitor functionality on the Linux VDA.
Set the maximum number of monitors using:
Where NumMons is a value between 1 and 9.
Set the maximum height of the virtual session desktop using:
Where MaxHeight is a value between 1024 and 8192.
Set the maximum width of the virtual session desktop using:
Where MaxWidth is a value between 1024 and 8192.
To read more from the Linux Virtual Desktop Team, check out all posts here.