Re: How Shutdown but not power off.



Hello Konstantin,
your gues is right, even using
'ExitWindowsEx (EWX_FORCE | EWX_SHUTDOWN, 0)'
the system shuts down without warning message.
Looking in Device Manager at "ACPI uniprocessor PC" I see that power supply
mappings are s0->D0, S1, S2, S3, S4, S5 -> D3.
D0= PS ON D3=PS OFF.
Mapping is according bios since Hibernate is not enabled.
I fear that is not possible to modify behavior.
Thanks again for your help


"KM" <konstmor@xxxxxxxxxxxxxxxx> ha scritto nel messaggio
news:u6pKFmlTHHA.1364@xxxxxxxxxxxxxxxxxxxxxxx
crus,

The problem is that if you are using ACPI HAL it reports back to app level
through power driver that your device supports PowerOFF (S5) state (and it
can be forced by software). If S5 state is supported and reported through
power capability flags (via NtPowerInformation API, for instance) then the
system will ignore PowerDownAfterShutdown key and the shell will always
call ExitWindows(EWX_POWEROFF) on shutdown.

You can try and write some test code to call ExitWindowsEx(EWX_SHUTDOWN)
(but not EWX_POWEROFF) manually to see if with the ACPI HAL you can even
see that dialog "It is safe now to turn off the computer" showing up. Just
make sure your calling process has the enough (SE_SHUTDOWN_NAME)
privileges to make the call.
(http://msdn2.microsoft.com/en-us/library/aa376868.aspx)
I don't think though it is going to work as the call gets forwarded to the
HAL anyway and it will turn the power off.

On the system with APM supported there is more that can be done but it is
a different story (you didn't mention APM at all in your post so I assume
it is not the feature on your hardware).


Btw, if instead of poweroff something like standby, hibernate or logoff is
accepted for your system specs, you can use "Shutdown settings" value
(feature of Explorer shell) to replace the default shutdown behavior. See
more here:
http://technet2.microsoft.com/WindowsServer/en/library/c187eb15-acc8-496d-b9bc-f95bb84cee1e1033.mspx

--
=========
Regards,
KM


Yes, I have done it, using Standard Pc or MPS Uniprocessor Pc the
behavior is as it should: no power off, but I should stay with ACPI
When I use Standard or MPS PC HAL init problem appears, such COMs and
Touch no more responding.
I'm investigating on that but a way to prevent power to go off on ACPI
should be better.
Regards

<jbcseri@xxxxxxxxx> ha scritto nel messaggio
news:1170871931.727825.137900@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Have you tried to replace the computer component (ACPI Uniprocessor,
etc.) with Standard PC? You won't be able to use any other ACPI
functions, but you may get the behavior your looking for.




.



Relevant Pages

  • Re: acpi ...apm tab missing
    ... > tab in power managment in control panel and nothing in device manager about ... The APM tab shows up in Power Options when using a system board using this ... If not certain what HAL was installed, open Device Manager and check what ... dual CPU or hyperthreading) and it's ACPI compliant. ...
    (microsoft.public.windowsxp.general)
  • Re: KB835732 breaks S3 standby timer
    ... APM is a BIOS ... for power control. ... most late SCSI and NDIS drivers hook WDM ACPI messages. ... Windows driver interaction issues, you should disable ACPI for these ...
    (microsoft.public.win2000.windows_update)
  • Re: acpi ...apm tab missing
    ... is it possible to update" standard pc" driver in device manager to a acpi ... > just got the Hibernate tab as you say in power options in control panel ... > managment although m/board box says acpi ready unless the shutdown ...
    (microsoft.public.windowsxp.general)
  • Re: FreeBSD 6.1-STABLE: Unexplained power off
    ... Check the power cable. ... I can only disable some ACPI ... <ACPI PCI bus> on pcib0 ... 2 ports with 2 removable, ...
    (freebsd-stable)
  • Re: FYI: device_suspend(...) in kernel_power_off().
    ... >> It seems there is an fundamental incompatibility with ACPI power off. ... > Powerdown is going to have the same problems as the powerdown at the ...
    (Linux-Kernel)