You are not logged in.

#1 2006-05-16 17:56:04

Cobra
Member
Registered: 2004-07-30
Posts: 109

APM and power button

I'm trying to revive an old PC (pentium II MMX from around 1996). I'm going to change it into a music box. I have installed arch linux and I already got wireless with WPA working without any problems.

I'm stuck at configuring the action of the power button. Too bad the PC doesn't have support for ACPI, so I'm trying to do something with APM, but it doesn't work too well. I added the line apm=power-off to my kernel line and it already powers off after shutdown, so that's fixed. What's left is the power button.

I want the computer to shut down properly after I pressed the power button. I tried adding a script: /etc/apm/event.d/shutdown

This is what's in the script:

#!/bin/sh
shutdown -h now

If I press the power button, the computer suspends/goes standby but that's not what I want. After pressing a button on my keyboard, the pc wakes up again, only to crash of a kernel panic...

Now my question is: how exactly do I tell APM to perform a certain action if I pressed the power button?

Offline

#2 2006-05-17 19:24:37

Cobra
Member
Registered: 2004-07-30
Posts: 109

Re: APM and power button

I found out that the kernel apm (kapmd) suspends the machine if I press the power button. How can I override that action?

Offline

#3 2008-04-12 16:58:02

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: APM and power button

Is that the whole script ?

Where did you tell it what button press it should respond to ?


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

Board footer

Powered by FluxBB