Understanding Citrix HDX Graphics Citrix TechEdge 2016 Have you ever stayed awake at night wondering if you were giving your users the absolute best experience that you can? According to the big blue letters we’re going to help put your mind at rest an allow you to get some sleep. Jeff Traylor Senior Escalation Engineer
Introduction Senior Escalation Engineer Have been at Citrix 4 years Worked at Cisco (Scientific-Atlanta) Prior experience as developer, IT Manager, Automation Engineer Jeff Traylor I’ve been with Citrix for ~4 years Prior experience at Cisco (Scientific-Atlanta) playing with IP TV delivery Have had an assortment of other jobs in the IT field for 30+ years If it’s legal, involves a computer, and I’m getting paid I would probably try it.
Agenda Background HDX graphics display modes HDX graphics use cases Basic graphics tuning options Basic troubleshooting tips and tools Case study and quick fixes Key takeaways Q & A What we are going to talk about today
What we are not covering HDX 3D Pro Complex topic Would require a separate 45 minute presentation Linux VDA Use your survey to suggest topics Why we won’t be covering HDX 3D Pro or the Linux VDA due to complexity and time constraints Please use your survey to suggest it as a future topic
The Jargon File XPDM – Windows XP Driver Model WDDM – Windows Display Driver Model Kernel Mode User Mode DWM - Desktop Window Manager A few key concepts and terms that you need to know The oldest driver model is XPDM WDDM was introduced with Vista and being the transition from … Kernel Mode drivers run in the kernel memory space – this is why you get BSOD User Mode drivers – new way of handling drivers, much less prone to taking the whole system down DWM is what MS added with WDDM and Aero to enable extra functionality CODEC – enCODer / DECoder
Changes to Windows Display Model
Changes introduced Desktop OS Version Windows XP – Introduces XPDM Windows Vista – Introduces WDDM, DWM, and Aero Windows 7 – Updates to WDDM 1.1, extends DWM Windows 8 – Updates to WDDM 1.2, removes XPDM support Windows 8.1 – Updates to WDDM 1.3 The changes to the Windows Video driver model by version, once Windows 8 hit we no longer get to use XPDM Windows 10 – Updates to WDDM 2.0
Changes introduced by Server OS Version Server 2003– Introduces XPDM Server 2008 – Introduces WDDM to Server OS Server 2008R2 – Updates to WDDM Server 2012 – Updates to WDDM 2.0, removes XPDM support Of course the corresponding Server OS’s were updated in step
Old display model – prior to DWM Each program is responsible for it’s own window and draws right into the buffer Programs need to be aware of overlapping windows Programs need to be aware of their z-order
New display model – with DWM Each program draws into it’s own off-screen buffer The Desktop Window manager is responsible for z-order Allows for Aero effects such as peek and transparency
DWM What do these changes enable? Aero Peek Aero Glass (Transparent Frames) Windows Flip Windows Animations DWM Because DWM handles the compositing of the desktop new features are available that aren’t when each program has to track it’s own display Aero Peek in the taskbar Aero Glass to see the application behind the topmost window The ability to change orientation easily A lot of the new Windows animation depend on DWM, including the “Shrink to taskbar” effect
What did Citrix change? CTXGFX.EXE User Mode Graphics Driver Loads Display CODEC Allows Aero on non-Windows Endpoints One Weird Little Trick CTXGFX.EXE Our good friend CTXGFX.EXE I’m sure that you’ve met as this is brand new with the 7.x series VDA First Citrix User Mode driver for graphics Controls loading the appropriate CODEC Allows us to present a full Aero desktop to non-Windows endpoints And One Weird Little Trick – we’ll just leave that teaser there
Introducing the HDX Display Modes Time to “Meet the Modes” that are vying for your attention
HDX Display Modes Desktop Composition Redirection (DCR) H.264 SuperCodec Compatibility Mode (Thinwire+) DCR – Current champion of user experience, quite the good looking fellow H.264 – Great user experience, lower server scalability Compatibility mode – Good user experience with lower server requirements Framehawk – the new kid on the block - Good user experience in WAN/WLAN lossy environments Legacy – the old timer of the bunch - Same as XD 5.6 / XA 6.5 Framehawk Legacy Graphics
Use Case - Desktop Composition Redirection Most “desktop like” user experience Users on LAN for high bandwidth Full Windows PC or high powered Windows thin client as endpoint Windows 7 or newer VDA Desktop OS only Enabled by Policy Desktop Composition Redirection – “Enabled” Support for DCR was added to Receiver for Mac in version 12.1 Support for GPU on endpoint was added in Receiver 4.4 Lower stress on the server as a lot of rendering is offloaded to the endpoint In initial releases of XA/XD 7 this was the default mode, no longer default NEW Available for Mac in Receiver 12.1 GPU Acceleration in Receiver for Windows 4.4
Use Case – H.264 SuperCodec High definition user experience Users on LAN or good WAN connection to support bandwidth Minimum 2 vCPU, 4 vCPU recommended Windows 7 / Server 2008 or newer VDA Makes Aero available on any device that can support H.264 Enabled by Policy Desktop Composition Redirection – “Disabled” This is now the default mode H.264 is the same CODEC used in HDX3D Pro, as well as DVDs
Use Case – Compatibility Mode (Thinwire+) Good user experience with light server requirements Users on LAN or good WAN connection to support bandwidth Minimum 2 vCPU recommended Works with older endpoints and Receiver versions Windows 7 / Server 2008 or newer VDA Enabled by Policy Desktop Composition Redirection – “Disabled” Use Video Codec – “Disabled” Does NOT use the H.264 CODEC Based on improvements to Legacy Thinwire
Use Case - Framehawk Provides a good user experience over poor connections Users on lossy WAN or Wireless connections Minimum 2 vCPU recommended Full Windows PC or properly enabled Thin Client or Tablet/Phone Windows 7 / Server 2008 or newer VDA Enabled by Policy Framehawk – “Enabled” Used in few instances, but when it’s needed it’s there If the network is dropping >5% packets then Framehawk is a good option
Use Case – Legacy Graphics Good user experience with highest endpoint compatibility Users on bandwidth constrained connections (low packet loss) Minimum 1 vCPU recommended Windows 7 / Server 2008R2 VDA only Windows 2012 VDA in special circumstances Enabled by Policy Legacy Graphics – “Enabled” Classic Thinwire – the most compatible mode
Performance Tuning Options
Policy Templates Introduced in XenDesktop / XenApp 7.6 FP3 Introduced in XenApp/XenDesktop 7.6 Feature Pack 3 Performance / quality tuning is a big topic, Citrix recommends using a policy template as a starting point Full details of each template are contained in the HDX Policy Templates Whitepaper eDocs - Policy Templates https://docs.citrix.com/en-us/xenapp-and-xendesktop/7-6/xad-policies-article/xad-policies-templates.html
Display Policy Templates Very High Definition User Experience High Server Scalability Optimized for WAN High Server Scalability – Legacy OS Each of these templates is defined in the Policy Template whitepaper The Whitepaper is really the “go to” source for Policy information Optimized for WAN – Legacy OS
Individual Options for Tuning Performance Detailed information in the Whitepaper on Templates http://support.citrix.com/article/CTX202330 Additional information in Citrix articles http://support.citrix.com/article/CTX139331 Important point – not all policies apply to all display modes http://support.citrix.com/article/CTX202687 Extra performance from Compatibility mode https://www.citrix.com/blogs/2015/10/23/thinwire-compatibility-tuning-lowering-your- bandwidth-even-further/ You can get even more tuning options, and here are the resources to find them
Basic Troubleshooting Need to learn long division before getting to use a calculator
Troubleshooting – Detecting Current Display Mode WMIC Commands HDX Monitor Site Graphics Mode Script Remote Display Analyzer WMIC – Window Management Interface – the long division method HDX monitor for an easier way to do the math Site graphics script to look at your entire site The “swiss army knife” – Remote Display Analyzer
WMIC Commands – Desktop Composition Redirection Path citrix_virtualchannel_d3d Event_Message=Composition Redirection has started successfully and Policy_AeroRedirection=TRUE indicates DCR Active
WMIC Commands – H.264, Compatibility, Legacy Path citrix_thinwire Component_Encoder – DeepCompressionV2Encoder, CompatabilityEncoder IsActive = Active IsEnabled = True Policy_LegacyGraphicsMode = False
HDX Monitor Graphics Display The easier way to do it – HDX Monitor, look at the graphics section Click on one of the icons to get to the advanced screens with more information
HDX Monitor – Desktop Composition Redirection If using DCR then the Graphics – DCR tab – WMI tab will show that Composition Redirection has started successfully
HDX Monitor – H.264 In this case the graphics mode is using H.264 as noted by ‘DeepCompression’ Note that if Legacy mode is enabled, the same information will still be displayed however a warning message will appear at the bottom indicating that this graphics mode is not in use.
HDX Monitor – Compatibility Mode In this case the graphics mode is using H.264 as noted by ‘DeepCompression’ Note that if Legacy mode is enabled, the same information will still be displayed however a warning message will appear at the bottom indicating that this graphics mode is not in use.
HDX Monitor – Framehawk In this case the graphics mode is using H.264 as noted by ‘DeepCompression’ Note that if Legacy mode is enabled, the same information will still be displayed however a warning message will appear at the bottom indicating that this graphics mode is not in use.
HDX Monitor – Legacy Graphics The Thinwire tab which displays Legacy Mode information will also display a warning if it is not enabled. The warning message on either tab is the simplest way to distinguish whether Legacy Mode is in use. It is only used if explicitly enabled through policy.
View the Site – Site Graphics Mode Script Site Graphics Mode Script link available in Resources 10000 foot overview of sitewide display modes Written by a Citrite, but not officially supported
RDAnalyzer – a Third Party Tool Mentioned in many blog posts, including by Citrix bloggers Written by Barry Schiffer and Bram Wolfs Not supported by Citrix, community tool Paid version enables “One Weird Little Trick” Changing graphics settings and modes on the fly A great tool created by Bram Wolfs and Barry Schiffer Paid / Registered version allows for switching display modes on the fly
Case Study and Quick Fixes A quick description of a case, and a couple of tips/fixes for known issues
Case Study – Display Performance A great tool to show graphics performance – the HTML5 Fishbowl Adjust the parameters on the bottom left, top left shows FPS https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/fishbowlie/
Case Study – Display Performance VDA Specs 4 vCPU with 4 Gig RAM OS – Win7 x64 Hypervisor – VMWare 5.5 Endpoint Specs HP 620 Thin Client Discrete graphics chip 2 Gig RAM Windows 7 Embedded Customer environment where we saw some performance issues, describing the actual customer setup
Case Study – Display Perfomance Fishbowl on VDA -> thin client – 7 FPS Fishbowl on VDA -> Windows laptop – 30+ FPS Fishbowl on VDA (RDP) -> thin client – 7 FPS Fishbowl on VDA (RDP) – Windows laptop – 30+ FPS Poor performance in both ICA and RDS Power management turned off results in 30+ FPS on thin client Performance was the same in ICA and RDP – good on the laptop and lousy on the thin client Thin client certainly should have had enough “oomph” to run at the same speed as the laptop Noticed the Energy Star sticker on the thin client Turned off Power Management and set everything to “High Performance” Best guess is that power management was throttling the CPU/GPU between frames One we disabled power management the performance was the same as the laptop
Quick Fix 1 – Applications with blue/purple overlay Most often seen in Adobe applications Photoshop Indesign Illustrator Other graphically intense applications can also show the symptom Registry key is needed to fix HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA\Thinwire Create REG_SZ value – “DisableOSSForProcesses” Set value to list of applications – “photoshop.exe;indesign.exe;illustrator.exe” Sometimes graphics intensive applications show a blue or purple overlay on the screen Usually seen with Adobe software Setting the reg key generally fixes this issue Issue with “DisableOSSForProcesses” in VDA 7.6FP3, fixed in 7.6CU1
Quick Fix 2– Applications don’t redraw correctly Occurs rarely, but has been seen in some apps Caused by occasional compatibility issues between the app and the Citrix 3D display driver Can be fixed by “Blacklisting” the app https://www.citrix.com/blogs/2014/11/11/broadening-3d-application-display-compatibility-in- xendesktop-blacklisting-an-interim-workaround/ A registry key needs to be created per app to blacklist them When the application probes for a 3D GPU the driver reports that it does not exist so the app falls back to internal rendering methods You have likely seen “Enable Hardware Acceleration” option in MS Applications
Key Takeaways • The available HDX Display Modes • HDX Display Mode Use Cases and Basic Tuning Options • Troubleshooting Tools and Tips What we, hopefully, were able to convey
Q & A
Questions Q: How do the settings affect a double-hop? A: They only affect the connection between one VDA and one Receiver Do the display modes impact upstream data (i.e. Webcams)? A: No, those are separate virtual channels A couple of questions that were asked internally Audience Q&A
Resources eDocs - Thinwire Compatibility Mode http://docs.citrix.com/en-us/xenapp-and-xendesktop/7-6/xad-hdx-landing/thinwire-compatibility-mode.html eDocs - Policy Templates https://docs.citrix.com/en-us/xenapp-and-xendesktop/7-6/xad-policies-article/xad-policies-templates.html CTX - Group Policy Template Updates for XenApp/XenDesktop http://support.citrix.com/article/CTX202000 CTX - Whitepaper: HDX Policy Templates http://support.citrix.com/article/CTX202330
Resources CTX - HDX Graphics Modes - Which Policies Apply to DCT/Thinwire/H.264 - An Overview for XenDesktop/XenApp 7.6 FP3 http://support.citrix.com/article/CTX202687 CTX - How to Determine HDX Display Mode http://support.citrix.com/article/CTX200370 Blogs - Thinwire Compatibility Mode Developers Blog https://www.citrix.com/blogs/2015/10/09/a-big-leap-in-ica-protocol-innovation-for-citrix/ Blogs - Thinwire Compatibility Tuning https://www.citrix.com/blogs/2015/10/23/thinwire-compatibility-tuning-lowering-your-bandwidth-even-further/
Resources - Tools Citrix Site Graphics Utility HDX Monitor https://www.citrix.com/blogs/2015/01/30/site-wide-view-of-hdx-graphics-modes/ HDX Monitor https://cis.citrix.com/hdx/download/ Remote Display Analyzer https://rdanalyzer.com/ HTML 5 Fishbowl https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/fishbowlie/