Power Switch

ME dugan at libwais.sonoma.edu
Mon Feb 14 11:16:31 PST 2000


On Mon, 14 Feb 2000, Walter Coole wrote:
> Subject: Power Switch
> 
> Does anyone know how to tell Linux to use the soft power switch on my
> newish Compaq?
> 
> What I want is: when my three-year-old pushes the switch, it does a
> clean shutdown.  Windows (bleah) knows how to do this, so the hardware
> is there.  My old HP-UX system could handle this, but I don't know if
> Linux knows this trick.

Often it can be set up to use the software enabled shutdown if the kernel
includes support for it in the APM section when compiling a kernel.

After it is enabled in the kernel and the kernel is in use with AMP etc.

shutdown -h now
(halt)
will bring down your system and often uses the software enabled shutdown
to turn off the power. Many BIOS support this, try it, and see if you like
it.

When examining my 2.2.x kernel .config file for how i compiled it to work,
I se the entries:
CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
# CONFIG_APM_DO_ENABLE is not set
# CONFIG_APM_CPU_IDLE is not set
CONFIG_APM_DISPLAY_BLANK=y
CONFIG_APM_POWER_OFF=y
CONFIG_APM_IGNORE_MULTIPLE_SUSPEND=y
CONFIG_APM_IGNORE_SUSPEND_BOUNCE=y
# CONFIG_APM_RTC_IS_GMT is not set
# CONFIG_APM_ALLOW_INTS is not set

Once I enabled the "CONFIG_APM=y", then enabled the
"CONFIG_APM_POWER_OFF=y" a "shutdown -h now" turned off the power.

Try it out, see if it works for you. Works great for me bu YMMV.

-ME





More information about the talk mailing list