Telling the ATX PSU to turn off

How can I tell the ATX PSU to turn off (under software control,
or using a commandline utility)?
Searching on Google didn’t turn up anything obvious.

There were links which shows an interface to APM (linux source code).
How can this be done under QNX6 (easily)?

How come the standard QNX6.2 install doesn’t do this?

Assuming “PSU” == “Power Supply Unit”,
acellarius@yahoo.com sed in <3F81BA7E.58EB0737@yahoo.com>:

How can this be done under QNX6 (easily)?

Not “Easily”, as current RTP/Momentics doesn’t have any APM support.

On x86 platform, you can directly poke with the APM BIOS as in
<URL:news://inn.qnx.com/aaae68$fs2$1@inn.qnx.com>
URL:nntp://inn.qnx.com/qdn.public.qnxrtp.x86/44

See below for APM 1.2 Specification
URL:http://www.microsoft.com/whdc/hwdev/archive/BUSBIOS/amp_12.mspx
but modern motherboards seems to be going for ACPI.

For non-x86, it really depends on platform.

kabe

Did you ever find a good way of calling your apmoff application for powering
down?

Thanks
Jens


<kabe@sra-tohoku.co.jp> wrote in message
news:2978007200321.141054@sra-tohoku.co.jp.msgid

Assuming “PSU” == “Power Supply Unit”,
acellarius@yahoo.com > sed in <> 3F81BA7E.58EB0737@yahoo.com> >:

How can this be done under QNX6 (easily)?

Not “Easily”, as current RTP/Momentics doesn’t have any APM support.

On x86 platform, you can directly poke with the APM BIOS as in
URL:news://inn.qnx.com/aaae68$fs2$> 1@inn.qnx.com
URL:nntp://inn.qnx.com/qdn.public.qnxrtp.x86/44

See below for APM 1.2 Specification
URL:> http://www.microsoft.com/whdc/hwdev/archive/BUSBIOS/amp_12.mspx
but modern motherboards seems to be going for ACPI.

For non-x86, it really depends on platform.

kabe

Thank you Kabe!
Will give it a try.

Search through the helpviewer docs turned up some info
on PM-is it any use for this purpose?

file://localhost/L:/QNXsdk/target/qnx6/usr/help/product/power_mgmt_en/user_guide/about.html

kabe@sra-tohoku.co.jp wrote:

Assuming “PSU” == “Power Supply Unit”,
acellarius@yahoo.com > sed in <> 3F81BA7E.58EB0737@yahoo.com> >:

How can this be done under QNX6 (easily)?

Not “Easily”, as current RTP/Momentics doesn’t have any APM support.

On x86 platform, you can directly poke with the APM BIOS as in
URL:news://inn.qnx.com/aaae68$fs2$> 1@inn.qnx.com
URL:nntp://inn.qnx.com/qdn.public.qnxrtp.x86/44

See below for APM 1.2 Specification
URL:> http://www.microsoft.com/whdc/hwdev/archive/BUSBIOS/amp_12.mspx
but modern motherboards seems to be going for ACPI.

For non-x86, it really depends on platform.

kabe

jhj@remove-nospam-videk.com sed in <bluf4e$k6l$1@inn.qnx.com>:

Did you ever find a good way of calling your apmoff application for powering
down?

No.

The stock “shutdown -S system” seems to do something like “for(;;);”
which spins infinitely and not yielding CPU to any other process.
Therefore any background tweaks are disabled.

“shutdown -S reboot” will call sysmgr_reboot() before anything
can kick butt.

So I’m now using a homebrew shutdown program which
includes APM powerdown support.

At least I can do something if the stock shutdown does
“for(;; pause(),sleep(1));”; please reconsider this > QSSL


acellarius@yahoo.com sed in <3F8319E0.598CCC54@yahoo.com>:

file://localhost/L:/QNXsdk/target/qnx6/usr/help/product/power_mgmt_en/user_guide/about.html
It looks like a SE thingie; not in NC. Unable to comment, sorry.


kabe

Thanks Kabe, this works just fine on this P4 PC.
Now for a way to hook it into a shutdown?
Did you ever get find a way as asked in the quoted post:

Now, how should I fire this after “shutdown” “phshutdown” ?
(daemonize, trap SIGPWR, wait 9 secs then powerdown?)

kabe@sra-tohoku.co.jp wrote:

Assuming “PSU” == “Power Supply Unit”,
acellarius@yahoo.com > sed in <> 3F81BA7E.58EB0737@yahoo.com> >:

How can this be done under QNX6 (easily)?

Not “Easily”, as current RTP/Momentics doesn’t have any APM support.

On x86 platform, you can directly poke with the APM BIOS as in
URL:news://inn.qnx.com/aaae68$fs2$> 1@inn.qnx.com
URL:nntp://inn.qnx.com/qdn.public.qnxrtp.x86/44

See below for APM 1.2 Specification
URL:> http://www.microsoft.com/whdc/hwdev/archive/BUSBIOS/amp_12.mspx
but modern motherboards seems to be going for ACPI.

For non-x86, it really depends on platform.

kabe