Discussion:
Blanking the video display programmatically.
(too old to reply)
RossettoeCioccolato
2010-03-19 16:20:56 UTC
Permalink
Is there a way programmatically to blank (i.e. disable) CRTC0 and CRTC1 from
user mode. Win32k contains the functions
win32k!DrvEnableDisplay/win32k!DrvDisableDisplay which get called for
example when changing the video mode from the control panel and by the power
management subsystem. Is there a way to invoke these functions
programmatically?

Regards,

Rossetoecioccolato.
Tim Roberts
2010-03-21 02:22:38 UTC
Permalink
"RossettoeCioccolato" <***@newsgroup.nospam> wrote:
?
Post by RossettoeCioccolato
Is there a way programmatically to blank (i.e. disable) CRTC0 and CRTC1 from
user mode. Win32k contains the functions
win32k!DrvEnableDisplay/win32k!DrvDisableDisplay which get called for
example when changing the video mode from the control panel and by the power
management subsystem. Is there a way to invoke these functions
programmatically?
No. That's under the control of the power management system. You can try
calling LockWorkStation.
--
Tim Roberts, ***@probo.com
Providenza & Boekelheide, Inc.
RossettoeCioccolato
2010-03-22 16:56:40 UTC
Permalink
Tim,

Thanks for your timely response. Could I use PoRequestPowerIrp() with the
PDO of the video card for this? Obviously, this function needs to be called
from kernel mode. But I can live with that if it is my only option.
You can try calling LockWorkStation. <
I don't see how that would help. Even when the display is locked the CRTC's
will be enabled until the configured interval expires for the system to
power them down. Maybe I could change the configuration to use a
rediculously short interval and then wait. But I don't see any direct
relation between LockWorkStation and what I want to do.

Regards,

Rossetoecioccolato.
Leo Davidson
2010-03-22 19:32:11 UTC
Permalink
On Mar 22, 4:56 pm, "RossettoeCioccolato"
Thanks for your timely response.  Could I use PoRequestPowerIrp() with the
PDO of the video card for this?  Obviously, this function needs to be called
from kernel mode.  But I can live with that if it is my only option.
What are you actually trying to do?

If you just want all the monitors to enter power-saving state then
that's really easy and doesn't require any kernel mode calls. Not sure
if that's what you want, though.
RossettoeCioccolato
2010-03-22 19:54:07 UTC
Permalink
Leo,
If you just want all the monitors to enter power-saving state...<
Actually, I'm not interested in the monitors at all; it is the video source
that I am interested in. I want to quiet the source so that it is not doing
much. To be honest, I am not too thrilled about relying on user mode; I am
already working in the kernel. However, win32k!PowerOffGdi() appears to do
what I want and I am not going to access that from the kernel. Hence, the
search for a user mode API that would invoke it. win32k!PowerOffGdi() has
the advantage of syncing up the GDI with the hardware. But then there is
the question of reliability when you are relying on user mode for a critical
function.

I notice that there is a user mode power API. Maybe that will help.

Regards,

Rossetoecioccolato.
Nobody
2010-03-22 20:31:16 UTC
Permalink
Post by RossettoeCioccolato
I notice that there is a user mode power API. Maybe that will help.
See WM_SYSCOMMAND/SC_MONITORPOWER.
Nobody
2010-03-21 13:00:35 UTC
Permalink
Post by RossettoeCioccolato
Is there a way programmatically to blank (i.e. disable) CRTC0 and CRTC1
from user mode. Win32k contains the functions
win32k!DrvEnableDisplay/win32k!DrvDisableDisplay which get called for
example when changing the video mode from the control panel and by the
power management subsystem. Is there a way to invoke these functions
programmatically?
Why do you need to do this? Maybe there is another way to accomplish what
you are trying to do.
Valter Sini
2010-10-13 14:46:52 UTC
Permalink
Hi Rossetoecioccolato,
I'm looking for the same case.
I noticed that a possible way is to send a message to the graphics card driver (when power off supported), but I didn't find the right way yet ...
Post by RossettoeCioccolato
Is there a way programmatically to blank (i.e. disable) CRTC0 and CRTC1 from
user mode. Win32k contains the functions
win32k!DrvEnableDisplay/win32k!DrvDisableDisplay which get called for
example when changing the video mode from the control panel and by the power
management subsystem. Is there a way to invoke these functions
programmatically?
Regards,
Rossetoecioccolato.
Post by Tim Roberts
?
No. That's under the control of the power management system. You can try
calling LockWorkStation.
--
Providenza & Boekelheide, Inc.
Post by Nobody
Why do you need to do this? Maybe there is another way to accomplish what
you are trying to do.
Post by RossettoeCioccolato
Tim,
Thanks for your timely response. Could I use PoRequestPowerIrp() with the
PDO of the video card for this? Obviously, this function needs to be called
from kernel mode. But I can live with that if it is my only option.
I do not see how that would help. Even when the display is locked the CRTC's
will be enabled until the configured interval expires for the system to
power them down. Maybe I could change the configuration to use a
rediculously short interval and then wait. But I do not see any direct
relation between LockWorkStation and what I want to do.
Regards,
Rossetoecioccolato.
Post by Leo Davidson
the
alled
What are you actually trying to do?
If you just want all the monitors to enter power-saving state then
that is really easy and does not require any kernel mode calls. Not sure
if that is what you want, though.
Leo,
Actually, I am not interested in the monitors at all; it is the video source
that I am interested in. I want to quiet the source so that it is not doing
much. To be honest, I am not too thrilled about relying on user mode; I am
already working in the kernel. However, win32k!PowerOffGdi() appears to do
what I want and I am not going to access that from the kernel. Hence, the
search for a user mode API that would invoke it. win32k!PowerOffGdi() has
the advantage of syncing up the GDI with the hardware. But then there is
the question of reliability when you are relying on user mode for a critical
function.
I notice that there is a user mode power API. Maybe that will help.
Regards,
Rossetoecioccolato.
Post by Nobody
See WM_SYSCOMMAND/SC_MONITORPOWER.
Submitted via EggHeadCafe - Software Developer Portal of Choice
Autocorrelation method in C# for signal analysis
http://www.eggheadcafe.com/tutorials/aspnet/d39ee525-a402-46cf-9989-72b7256f76b1/autocorrelation-method-in-c-for-signal-analysis.aspx
Loading...