Zum Hauptinhalt springen

Hinweise für Citrix

Hinweis

Unser Dank für diesen Beitrag geht an Herrn Dzubiel von der Stadt Gifhorn.

Warnung

MuM kann keinen leider keinen Support für Citrix Umgebungen bieten.
Wenden Sie Sich dafür bitte direkt an die Citrix Hotline.
Die Nutzung der hier beschriebenen Benutzererfahrungen und sind ohne Gewähr und auf eigene Gefahr.

Zur Nutzung der vGPU bei Citrix ist folgendes zu beachten.

Es gibt eine Option um das Rendering für WPF Anwendungen in Citrix Multisession Umgebungen zu beeinflussen, dies wird hier beschrieben:

Getting the best out of WPF apps on Windows multi-session OS - Citrix Blogs

Hierzu gibt es ein Skript mit dem bei Citrix CVAD Umgebungen mit Grafikkarten und Multisession OS (Terminalserver/RDSH) eine zuverlässige Unterstützung möglich sein sollte.

Enabling WPF Rendering for Citrix HDX on Multi-Session VDAs

Achtung: Das Original Skript von Citrix ist fehlerhaft, hier das korrigierte Script

# Define the registry paths
$graphicsHelperPath = "HKLM:\SOFTWARE\Citrix\CtxHook\AppInit_DLLs\Graphics Helper"
$requiredSettings = @{
"AdapterHandle" = 0x00000001
"DevicePath" = 0x00000001
"Flag" = 0x00000412
"WPF" = 0x00000001
}

# Function to check if the system is a VDA and Multi-session OS
function Test-VdaMultiSession {
$vdaKey = "HKLM:\SOFTWARE\Citrix\VirtualDesktopAgent"
$multiSessionKey = "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server"

if (Test-Path $vdaKey) {
$isMultiSession = (Get-ItemProperty -Path $multiSessionKey -Name "TSAppCompat" -ErrorAction SilentlyContinue).TSAppCompat
if ($isMultiSession -eq 1) {
return $true
}
}
return $false
}

if (-not (Test-VdaMultiSession)) {
Write-Host "This script should only be run on a Multi-session VDA. Exiting..." -ForegroundColor Red
exit
}

# Ensure the Graphics Helper registry key exists
if (!(Test-Path $graphicsHelperPath)) {
New-Item -Path $graphicsHelperPath -Force | Out-Null
Write-Host "Created Graphics Helper registry key." -ForegroundColor Green
}

# Check and set required registry values
foreach ($key in $requiredSettings.Keys) {
$existingValue = (Get-ItemProperty -Path $graphicsHelperPath -Name $key -ErrorAction SilentlyContinue).$key
if ($existingValue -ne $requiredSettings[$key]) {
Set-ItemProperty -Path $graphicsHelperPath -Name $key -Value $requiredSettings[$key] -Type DWord
Write-Host "Set $key to $($requiredSettings[$key])" -ForegroundColor Green
} else {
Write-Host "$key is already set correctly." -ForegroundColor Yellow
}
}

# Prompt the user for the application path or name
$appInput = Read-Host "Enter the application path or name (e.g., C:\\Path\\To\\App.exe or App.exe)"

# Extract only the executable name
$appName = [System.IO.Path]::GetFileName($appInput)

# Ensure the application name has .exe extension
if (![System.IO.Path]::HasExtension($appName) -or [System.IO.Path]::GetExtension($appName) -ne ".exe") {
$appName = "$appName.exe"
}

if (-not $appName -or $appName -eq "") {
Write-Host "Invalid input. Please enter a valid application name." -ForegroundColor Red
exit
}

# Ensure the sub-key for the application exists
$appRegistryPath = "$graphicsHelperPath\\$appName"
if (!(Test-Path $appRegistryPath)) {
New-Item -Path $appRegistryPath -Force | Out-Null
Write-Host "Created registry key for $appName under Graphics Helper." -ForegroundColor Green
} else {
Write-Host "$appName is already registered under Graphics Helper." -ForegroundColor Yellow
}

Write-Host "Reboot the server for the settings to take effect." -ForegroundColor Cyan

13:07:10.333 INFO RenderCapability=2 - Graphics hardware acceleration active

Beachten Sie auch den Schalter "Benutze Software Rendering" in den MapEdit Desktop Optionen:

https://help.mapedit.de/user-guide/mapedit-desktop/options/#benutze-software-rendering

Intern wird hier die verwendet:

System.Windows.Media.RenderOptions. ProcessRenderMode = System.Windows.Interop.RenderMode.SoftwareOnly;

https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.renderoptions.processrendermode?view=netframework-4.8.1

Für MuM Mitarbeiter: Siehe auch Internes Redmine Ticket #17614