Screensaver not working in a XenDesktop VDI environment

XenDesktop 7

Note: This blogpost is also posted on the PepperCrew website.

The Story

I was troubleshooting some RES Workspace Manager (RES WM) issues in a customer’s XenDesktop 7.x (Citrix) environment when I came across the following issue: The screensaver didn’t start automatically, even though I had forced a screensaver through RES WM. After some research I’d come to the conclusion that this was a known issue in XenDesktop 7.x. Apparently Citrix has decided to disable Screen savers and power-save options in XenDesktop. They provide the following solution in their eDocs documentation:

Edit the registry and create the following DWORD value:

HKLM\Software\Citrix\Graphics\SetDisplayRequiredMode = 0

This change does not prevent the remote machine screen saver or power save mode from coming on. If the power save mode comes on, the remote session is not updated until the user provides input (mouse/keyboard), but the screen will not be blanked. [#380550]

I implemented this solution by creating a GPO Preference that set the registry setting, but somehow it wasn’t working for me. Also, applying this fix has the disadvantage that it enables the power-save options as well so you’d have to force the power-save settings through a GPO. Luckily, I found a shortcut to get it all working:

The Solution

The utility Powercfg.exe provided the way out. You can use this tool to see which process is preventing the powerplan from activating the screensaver, put the PC to sleep etc. In case of XenDesktop it turns out it’s a process called picaDispMgr.exe. We can then use the same tool to override that process’s powerrequests that keeps the screensaver inactive. Here’s how it’s done:

Open an elevated command prompt and run the following command:

\> powercfg /requestsoverride PROCESS picaDispMgr.exe DISPLAY

That’s all there is to it. You can either run this command using a startup script in RES WM or GPO or you can run it once in your XenDesktop build.

Advertisements

About MicaH

I'm a Technical Specialist at PepperByte BV (the Netherlands).
This entry was posted in Citrix, RES Workspace Manager and tagged , , , , , . Bookmark the permalink.

14 Responses to Screensaver not working in a XenDesktop VDI environment

  1. powercfg /requestsoverride PROCESS gfxmgr.exe DISPLAY

    This will fix 7.6 – this was renamed.

    • Rashid Amin says:

      Thank you, this worked for me on 7.6

    • Rashid Amin says:

      Hey man, how did you determine gfxmgr.exe needed to be overridden. Looks like VDA 7.6 FP 3 has added further processes that need to be excepted. Please let me know how you went about discovering this. Thanks!

  2. kman says:

    Hi

    I am confused

    A. Do you need the “registry fix + powercfg + enable screen saver” to get things working?

    OR

    B. Running “Powercfg + enable screen saver” is enough?

    • MicaH says:

      You only have to run the powercfg command

      • L says:

        We recently upgraded our VDA from 7.6.1 to 7.6.300 and then the screen saver stopped working. We were able to make ScreenSaver work with “powercfg /requestsoverride PROCESS gfxmgr.exe DISPLAY”. . This stopped working the second the VDA was upgraded. Is there a different process for screen saver in 7.6.300?

  3. Rashid Amin says:

    Looks like 7.6.3 added yet another executable. I will pose here when I find it…

  4. L says:

    We recently upgraded our VDA from 7.6.1 to 7.6.300 and then the screen saver stopped working. We were able to make ScreenSaver work with “powercfg /requestsoverride PROCESS gfxmgr.exe DISPLAY”. . This stopped working the second the VDA was upgraded. Is there a different process for screen saver in 7.6.300?

  5. Jery says:

    Hi Micah, Eric,
    Thanks for your suggestions.
    Just Confirmed that the registry key and below 3 powercfg commands kicks in the screensaver in 7.6.300
    HKLM\Software\Citrix\Graphics\SetDisplayRequiredMode = 0
    powercfg /requestsoverride PROCESS gfxmgr.exe DISPLAY
    powercfg /requestsoverride PROCESS picaDispMgr.exe DISPLAY
    powercfg /requestsoverride PROCESS ctxgfx.exe DISPLAY

    • MicaH says:

      Nice. Thank you for that, Jery.

    • MicaH says:

      Are you shure you need all of those together, though? I’d be really surprised if this wouldn’t work without the registry setting or the picaDispMgr.exe exclusion. Is it possible for you to check which are the minimal requirements?

  6. Jery says:

    Hi Micah,
    We did some further testing. We found that if we run the following command
    C:\Windows\system32>powercfg requests
    and if the following is displayed then the screensaver does not kick in

    DISPLAY:
    [PROCESS] \Device\HarddiskVolume2\Program Files\Citrix\ICAService\GfxMgr.exe

    If we kill this task (it starts again)
    taskkill /im gfxmgr.exe /F

    and run the command again then the result is
    DISPLAY:
    None.
    Then if gfxmgr.exe is displayed under overrides then screen saver kicks in.

    C:\Windows\system32>powercfg requestsoverride
    [PROCESS]
    gfxmgr.exe DISPLAY

    If it is not displayed we need to run
    powercfg /requestsoverride PROCESS gfxmgr.exe DISPLAY

    The other 2 powercfg commands are not required but confirmed the registry key is a must.
    Will update once we have devised a method to deploy this for users.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s