Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ACPI e power button [Risolto]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Sasdo
Guru
Guru


Joined: 18 Feb 2004
Posts: 542
Location: 44.476474,11.644446 circa.

PostPosted: Mon Feb 23, 2004 1:21 pm    Post subject: ACPI e power button [Risolto] Reply with quote

ciao, è tutta la mattina che cerco di risolvere questo problema:

vorrei che quando pigio il bottone per spegnere il pc, linux se ne accorga e spenga tutto in maniera corretta.

dunque, per ora quello che ho fatto è stato:

abilitare nel bios la funzione ACPI 8prima era disabilitata), installare acpid, montare il modulo button, aggiungere acpi=on a lilo.conf

ho pasticciato un po' con lo script /etc/acpi/default.sh ma tutto quello che ho ottenuto è che quando pigio il bottone per spegnere il pc è che questo manco si spegne.
E' già un passo avanti: prima si spegneva.

Sapreste dirmi come devo programmare il suddetto script ed il suo collega in /etc/acpi/event/default ?

Altri dettagli: dopo un dmesg | grep ACPI ho ottenuto tutt'una fila di righe tra cui le più importanti mi sembra siano:
ACPI: System [ACPI] (supports S0 S1 S4 S5)
ACPI: Power Button (FF) [PWRF]

mi trova anche la ventola ma non mi interessa.

infine, dopo aver fatto modprobe button ottengo che mi vengono create le directory button/power/PWRF/ nella già esistente /proc/acpi/

beh di più non so cosa dirvi...
...grazie mille!

il Sasdo
_________________
LinuxUser #362518
--
Ochei lo ammetto: il mio cervello lo tengo in frigo.
Back to top
View user's profile Send private message
matteo*
Tux's lil' helper
Tux's lil' helper


Joined: 17 Nov 2003
Posts: 128
Location: bologna, italy

PostPosted: Mon Feb 23, 2004 4:12 pm    Post subject: Reply with quote

benve l'ha fatto..
mandagli un pm o mp e chiedigli come perchè non me lo ricordo...
Back to top
View user's profile Send private message
julius malchovitch
Tux's lil' helper
Tux's lil' helper


Joined: 16 Sep 2003
Posts: 135
Location: Italia

PostPosted: Mon Feb 23, 2004 5:33 pm    Post subject: Reply with quote

matteo* wrote:
benve l'ha fatto..
mandagli un pm o mp e chiedigli come perchè non me lo ricordo...


Quando poi hai risolto posta la soluzione qui dentro. E' interessante anche per me

Ciao
Back to top
View user's profile Send private message
MyZelF
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 2010
Location: Venice, Italy

PostPosted: Mon Feb 23, 2004 5:56 pm    Post subject: Reply with quote

Il log di acpid che dicono? Dovresti trovare qualcosa del tipo:

Code:
[Sat Feb  7 16:10:51 2004] received event "button/power PWRF 00000080 00000001"
[Sat Feb  7 16:10:51 2004] executing action "/etc/acpi/default.sh button/power
PWRF 00000080 00000001"


Se non c'è nulla del genere il problema è a monte (acpid o kernel), altrimenti a valle (in /etc/acpi).
_________________
"Larry the Cow was a bit frustrated at the current state of Linux Distributions..."
Back to top
View user's profile Send private message
Josuke
Veteran
Veteran


Joined: 07 May 2003
Posts: 1175
Location: Italy - Bolzano

PostPosted: Mon Feb 23, 2004 7:09 pm    Post subject: Reply with quote

se ho capito cosa intendi..io ho risolto creandomi l'"evento".

nano /etc/acpi/events/power

e ci metti
Code:

# shutdown when power-button is pressed
event=button/power.*
action="/sbin/halt"


e il gioco è fatto

ovviamente acpid deve essere avviato
_________________
fletto i muscoli...e sono nel vuoto
Back to top
View user's profile Send private message
Sasdo
Guru
Guru


Joined: 18 Feb 2004
Posts: 542
Location: 44.476474,11.644446 circa.

PostPosted: Mon Feb 23, 2004 8:29 pm    Post subject: Reply with quote

Ho risolto così:

lasciando perdere lo script default.sh

e creando il file: /etc/acpi/events/power contenente:

event=button/power (PWR.|PBTN)
action=/sbin/poweroff


per Josuke:
<OT>
leggi il RAT-MAN!?! Grande!
</OT>
_________________
LinuxUser #362518
--
Ochei lo ammetto: il mio cervello lo tengo in frigo.
Back to top
View user's profile Send private message
Josuke
Veteran
Veteran


Joined: 07 May 2003
Posts: 1175
Location: Italy - Bolzano

PostPosted: Mon Feb 23, 2004 11:09 pm    Post subject: Reply with quote

He he si a dir poco fantastico ;)

ottima la soluzione del poweroff 8)
_________________
fletto i muscoli...e sono nel vuoto
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum