For suspend/hibernation driver testing I wrote a small utility which
switches computer to desired Sx state and wakes it automatically after set
time. It works as expected but there is a small usability problem. When
computer wakes up from suspend, screen remains blank until keyboard is hit
or mouse moved. I’d like to turn in on programatically but haven’t found a
way. I tried to send SC_MONITORPOWER message with -1 (which works in other
cases), simulate mouse_event() and nothing works. Any idea?
Best regards,
Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]
Try CallNtPowerInformation/SystemExecutionState/ES_USER_PRESENT
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Michal Vodicka”
To: “Windows System Software Devs Interest List”
Sent: Thursday, January 22, 2004 12:28 AM
Subject: [ntdev] OT: how to turn screen on after suspend
> For suspend/hibernation driver testing I wrote a small utility which
> switches computer to desired Sx state and wakes it automatically after set
> time. It works as expected but there is a small usability problem. When
> computer wakes up from suspend, screen remains blank until keyboard is hit
> or mouse moved. I’d like to turn in on programatically but haven’t found a
> way. I tried to send SC_MONITORPOWER message with -1 (which works in other
> cases), simulate mouse_event() and nothing works. Any idea?
>
> Best regards,
>
> Michal Vodicka
> STMicroelectronics Design and Application s.r.o.
> [michal.vodicka@st.com, http:://www.st.com]
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
Interesting idea, thanks.
CallNtPowerInformation allows only query for SystemExecutionState so I tried
SetThreadExecutionState(ES_USER_PRESENT) which returns 0 and GetLastError()
returns ERROR_INVALID_PARAMETER then. XP SP0. ES_DISPLAY_REQUIRED doesn’t
cause error but doesn’t seem to have desired effect. Will try more at
another computer tomorrow (current one has secondary VGA display for
debugger and it is blanked after suspend instead on main one).
Best regards,
Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]
From: xxxxx@storagecraft.com[SMTP:xxxxx@storagecraft.com]
Reply To: xxxxx@lists.osr.com
Sent: Thursday, January 22, 2004 5:17 AM
To: xxxxx@lists.osr.com
Subject: Re: [ntdev] OT: how to turn screen on after suspend
Try CallNtPowerInformation/SystemExecutionState/ES_USER_PRESENT
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Michal Vodicka”
> To: “Windows System Software Devs Interest List”
> Sent: Thursday, January 22, 2004 12:28 AM
> Subject: [ntdev] OT: how to turn screen on after suspend
>
>
> > For suspend/hibernation driver testing I wrote a small utility which
> > switches computer to desired Sx state and wakes it automatically after
> set
> > time. It works as expected but there is a small usability problem. When
> > computer wakes up from suspend, screen remains blank until keyboard is
> hit
> > or mouse moved. I’d like to turn in on programatically but haven’t found
> a
> > way. I tried to send SC_MONITORPOWER message with -1 (which works in
> other
> > cases), simulate mouse_event() and nothing works. Any idea?
> >
> > Best regards,
> >
> > Michal Vodicka
> > STMicroelectronics Design and Application s.r.o.
> > [michal.vodicka@st.com, http:://www.st.com]
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: michal.vodicka@st.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
Finally, SetThreadExecutionState(ES_DISPLAY_REQUIRED) has desired effect on
computers with one display. Thanks for pointing me right way, Max.
Best regards,
Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]
From:
xxxxx@veridicom.cz.nospam[SMTP:xxxxx@veridicom.cz.nospam]
Reply To: xxxxx@lists.osr.com
Sent: Thursday, January 22, 2004 5:56 AM
To: xxxxx@lists.osr.com
Subject: RE: [ntdev] OT: how to turn screen on after suspend
Interesting idea, thanks.
CallNtPowerInformation allows only query for SystemExecutionState so I
tried
SetThreadExecutionState(ES_USER_PRESENT) which returns 0 and
GetLastError()
returns ERROR_INVALID_PARAMETER then. XP SP0. ES_DISPLAY_REQUIRED doesn’t
cause error but doesn’t seem to have desired effect. Will try more at
another computer tomorrow (current one has secondary VGA display for
debugger and it is blanked after suspend instead on main one).
Best regards,
Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]
> ----------
> From: xxxxx@storagecraft.com[SMTP:xxxxx@storagecraft.com]
> Reply To: xxxxx@lists.osr.com
> Sent: Thursday, January 22, 2004 5:17 AM
> To: xxxxx@lists.osr.com
> Subject: Re: [ntdev] OT: how to turn screen on after suspend
>
> Try CallNtPowerInformation/SystemExecutionState/ES_USER_PRESENT
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com