Re: power button to shutdown linux

From: Erez Doron (erez_at_nonexisting.hamakor.org.il)
Date: Wed 21 Jan 2004 - 16:31:03 IST


hi

the kernel does not seem to let me load both apm and acpi,
so though now automatically when i press the power button, it does
/sbin/poweroff
but now the computer does not poweroff, just software shutdown,

any idea ?

cheers,
erez.

Erez Doron wrote:

> you need to create a file named 'powerbtn' in /etc/acpi/events/
> The contents of the file:
>
> event=button[ /]power
> action=/sbin/poweroff
>
> cheers,
> erez.
>
>
> Behdad Esfahbod wrote:
>
>> The fact that you see those messages perhaps means that you have
>> "button" built into kernel, since loading "button" fails.
>>
>> Well, do "tail -f /var/log/acpid" and press power button.
>>
>> behdad
>>
>> On Tue, 20 Jan 2004, Diego Iastrubni wrote:
>>
>>
>>
>>> On Tuesday 20 January 2004 20:55, Behdad Esfahbod wrote:
>>>
>>>
>>>> On Tue, 20 Jan 2004, Diego Iastrubni wrote:
>>>>
>>>>
>>>>> [root_at_cucomania root]# cat /proc/acpi/event
>>>>> button/power PWRF 00000080 00000002
>>>>> button/power PWRF 00000080 00000003
>>>>> button/power PWRF 00000080 00000004
>>>>> button/power PWRF 00000080 00000005
>>>>> button/power PWRF 00000080 00000006
>>>>> ..
>>>>> and goes on each time i press (one line at a time).
>>>>>
>>>>> [root_at_cucomania root]# cat /etc/acpi/events/power
>>>>> event=button/power (PWR.|PBTN)
>>>>> action=/sbin/poweroff
>>>>>
>>>>> What can go wrong?
>>>>>
>>>>
>>>> Does it work if you run /sbin/poweroff?
>>>>
>>>
>>> yes it does.
>>> I have a link on my desktop which runs "halt" which also shuts down
>>> the box.
>>>
>>> more interesting, after "service acpi restart" i get on dmeg:
>>> ACPI: Processor [CPU1] (supports C1, 16 throttling states)
>>> ACPI: Power Button (FF) [PWRF]
>>> ACPI: Processor [CPU1] (supports C1, 16 throttling states)
>>> ACPI: Power Button (FF) [PWRF]
>>> ACPI: Processor [CPU1] (supports C1, 16 throttling states)
>>> ACPI: Power Button (FF) [PWRF]
>>>
>>> and...:
>>> [root_at_cucomania todos]# modprobe button
>>> /lib/modules/2.4.22-10mdk/kernel/drivers/acpi/button.o.gz:
>>> init_module: No
>>> such device
>>> Hint: insmod errors can be caused by incorrect module parameters,
>>> including
>>> invalid IO or IRQ parameters.
>>> You may find more information in syslog or the output from dmesg
>>> modprobe: insmod
>>> /lib/modules/2.4.22-10mdk/kernel/drivers/acpi/button.o.gz
>>> failed
>>> modprobe: insmod button failed
>>>
>>> btw... the system is Mandrake 9.2
>>>
>>>
>>
>>
>> =================================================================
>> To unsubscribe, send mail to linux-il-request_at_linux.org.il with
>> the word "unsubscribe" in the message body, e.g., run the command
>> echo unsubscribe | mail linux-il-request_at_linux.org.il
>>
>>
>
>
>
> =================================================================
> To unsubscribe, send mail to linux-il-request_at_linux.org.il with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail linux-il-request_at_linux.org.il

=================================================================
To unsubscribe, send mail to linux-il-request_at_linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request_at_linux.org.il



This archive was generated by hypermail 2.1.7 : Wed 21 Jan 2004 - 16:41:25 IST