Page 1 of 1

Soft Off

Posted: Tue Jun 28, 2005 11:00 pm
by Phibred
Hey,
Does any one know how to do a 'Soft Off', like how Windows and Linux 'turn off the computer automatically'. I've been searching for a bit but I can't find it in the Linux Kernel.

Thanks,

Re: Soft Off

Posted: Tue Jun 28, 2005 11:00 pm
by dembol
Hi

First, you should write the APM driver for your OS because APM provides API for machine power management. If you would like to do a 'Soft off' you should call APM's set_power_state() routine with the power state APM_POWER_STATE_OFF

Look at my code: http://dembol.inwestuj.com/cgi-bin/sour ... apm.c#L150

Re: Soft Off

Posted: Wed Jun 29, 2005 11:00 pm
by Phibred
I'll have to take a good long look at that one. It just seams like a lot of overhead for just turnning the computer off though, but I see its use for laptop drivers and such.

I'll try to post my assembler version of the apm driver so people doing asm can enjoy that.