Marcel
Marcel That's me: Marcel

Azure Virtual Desktop - Login error Protocol Error Code 0x112f - Windows 11

Azure Virtual Desktop - Login error Protocol Error Code 0x112f - Windows 11

Login error: Protocol Error Code 0x112f

There are a lot of posts regarding this issue. I figured out that this old issue comes back in a specific combination with RDS settings and Windows 11.

If a user has multiple monitors and connecting to AVD, an error message is raised, if: The session uses all of the monitors AVCHardwareEncodePreferred is set to 1 (e.g., by using the GPO "Configure H.264/AVC hardware encoding for Remote Desktop Connections") The operating system is Windows 11 (22H2) - I was not able to reproduce the issue with Windows 10 and with the same configuration

Solution: If policies are used: Unconfigure all protocol-related settings in Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Remote Session Environment.

Configure the protocol-related settings through the registry on the hosts or on the Golden Master (e.g., with a script in Hydra for Azure Virtual Desktop or WVDAdmin). Important is the value for AVCHardwareEncodePreferred. That should be 2 (which cannot be set with the GPO). The teams optimization is optional:

Write-Host "RDS Settings"
New-Item -Path "HKLM:\SOFTWARE" -Name "Policies" -ErrorAction Ignore
New-Item -Path "HKLM:\SOFTWARE\Policies" -Name "Microsoft" -ErrorAction Ignore
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft" -Name "Windows NT" -ErrorAction Ignore
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT" -Name "Terminal Services" -ErrorAction Ignore
New-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" -Name "AVC444ModePreferred" -Value 0 -force  # if 1 - browser mm redirection is not workuing
New-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" -Name "AVCHardwareEncodePreferred" -Value 2 -force
New-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" -Name "bEnumerateHWBeforeSW" -Value 1 -force
New-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" -Name "fEnableRemoteFXAdvancedRemoteApp" -Value 1 -force
New-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" -Name "fEnableTimeZoneRedirection" -Value 1 -force
New-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" -Name "KeepAliveEnable" -Value 1 -force
New-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" -Name "KeepAliveInterval" -Value 1 -force

Write-Host "Teams Optimization"
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server" -Name "AddIns" -ErrorAction Ignore
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\AddIns" -Name "WebRTC Redirector" -ErrorAction Ignore
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\AddIns\WebRTC Redirector" -Name "Policy" -ErrorAction Ignore
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\AddIns\WebRTC Redirector\Policy" -Name "ShareClientDesktop " -Value 1 -force
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\AddIns\WebRTC Redirector\Policy" -Name "DisableRAILScreensharing  " -Value 0 -force
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\AddIns\WebRTC Redirector\Policy" -Name "DisableRAILAppSharing" -Value 0 -force