Horizon View – Applications flip screens after reconnect

Published by Richard on

When you disconnect a VDI session in Horizon View and applications flip screen from the primary monitor to the secondary monitor or vice versa after reconnecting to the session you can try the following work around to fix this issue.

I’ve seen this issue when using Horizon View in combination with NVidia vGPU powered desktops. In our case the issue only occurred after the first reconnect. Subsequent reconnects would not lead to application flipping.

Windows 10 saves monitor configuration in the following registry location:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Connectivity]

Since this particular environment uses NVidia vGPU you loose the ability to connect through the vSphere Console. I use the Horizon View Direct Connect agent to connect to my Golden Image to properly shutdown the image making use of a shutdown script. In this shutdown script I appended an extra line which imports a .reg file to remove the keys. The contents of the .reg file are:

Windows Registry Editor Version 5.00

[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration]
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Connectivity]

So far I’ve not seen the issue anymore after applying this workaround. No more application flipping between primary and secondary monitors so happy end users.
VMware describes a similar issue with Windows 7 in the following article but they also state this issue does not happen in Windows 10, so that’s not so helpful.