View previous topic :: View next topic |
Author |
Message |
koma Advocate


Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
Posted: Sun Dec 19, 2004 7:19 pm Post subject: [Micro HowTo][Soft Powerdown with powerbutton] |
|
|
Ciao a tutti! .
Credo che siate passiate un po' tutti da questo problema un pc linux una shell e il problema di farlo spegnere a qualcuno che nn ha idea nemmeno di cosa sia un mouse .
La soluzione ideale sarebbe che premendo il pulsante di accensione avvenga lo spegnimento un po' come per i pc con windows.
Sapete aiutarmi? _________________ http://www.youtube.com/watch?v=_yoJI-Tl94g GLORY GLORY HYPNOTOAD
Last edited by koma on Sun Dec 19, 2004 10:35 pm; edited 1 time in total |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31525 Location: here
|
Posted: Sun Dec 19, 2004 7:20 pm Post subject: |
|
|
Con acpi e' possibile questo se non sbaglio _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
koma Advocate


Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
Posted: Sun Dec 19, 2004 7:21 pm Post subject: |
|
|
comncio a cercare... intanto se qualcuno sa una qualche link o a voglia di scrivermelo poi io ci faccio un piccolo howto _________________ http://www.youtube.com/watch?v=_yoJI-Tl94g GLORY GLORY HYPNOTOAD |
|
Back to top |
|
 |
Sasdo Guru


Joined: 18 Feb 2004 Posts: 542 Location: 44.476474,11.644446 circa.
|
Posted: Sun Dec 19, 2004 7:24 pm Post subject: |
|
|
Code: |
crea il file
/etc/acpi/events/power
e scrivici:
event=button/power (PWR.|PBTN)
action=/sbin/poweroff
|
devi avere:
a) kernel appropriato (ACPI-->powerbutton)
b) acpid installato ed avviato (emerge acpid && rc-update add acpid default )
a me così funziona. _________________ LinuxUser #362518
--
Ochei lo ammetto: il mio cervello lo tengo in frigo. |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31525 Location: here
|
Posted: Sun Dec 19, 2004 7:25 pm Post subject: |
|
|
Una volta che hai messo acpi nel kernel e mergiato acpid nel file /etc/acpid/default.sh mi pare sia gia' impostato
Code: | button)
case "$action" in
power)
logger "[ACPI] power button pushed"
reboot
;;
*)
logger "[ACPI] action $action is not defined"
;;
esac |
Che fa mi pare in questo caso faccia il reboot ma se cambi con shutdown il problema e' risolto _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
koma Advocate


Joined: 06 Jun 2003 Posts: 2702 Location: Italy
|
Posted: Sun Dec 19, 2004 9:55 pm Post subject: |
|
|
Funziona perfettamente e nn serve manco l'howto basta fare emerge acpid dopo aver abilitato le robe nel kernel e poi /etc/init.d acpid
e rc-update add acpid default
Code: |
#emerge acpid
---
#/etc/init.d/apmd stop
#rc-update del apmd
#/etc/init.d/apcid start
#rc-update add acpid default
|
E poi premere il pulsantino per provare. Al max non succede nulla _________________ http://www.youtube.com/watch?v=_yoJI-Tl94g GLORY GLORY HYPNOTOAD |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31525 Location: here
|
Posted: Sun Dec 19, 2004 10:23 pm Post subject: |
|
|
Allora [risolto] al titolo _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
cloc3 Advocate


Joined: 13 Jan 2004 Posts: 4815 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Sun Dec 19, 2004 10:28 pm Post subject: |
|
|
fedeliallalinea wrote: | Allora [risolto] al titolo |
Aspetta: questa una soluzione di Silian in stile appunti linux, da ricordare. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31525 Location: here
|
Posted: Sun Dec 19, 2004 10:49 pm Post subject: |
|
|
cloc3 wrote: | una soluzione di Silian in stile appunti linux, da ricordare. |
Ma mi pare che non centri molto con quello chiesto da koma _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
gaffiere Guru


Joined: 13 Nov 2003 Posts: 406 Location: Provincia Milano
|
Posted: Sun Dec 19, 2004 11:43 pm Post subject: |
|
|
fedeliallalinea wrote: | Una volta che hai messo acpi nel kernel e mergiato acpid nel file /etc/acpid/default.sh mi pare sia gia' impostato
Code: | button)
case "$action" in
power)
logger "[ACPI] power button pushed"
reboot
;;
*)
logger "[ACPI] action $action is not defined"
;;
esac |
Che fa mi pare in questo caso faccia il reboot ma se cambi con shutdown il problema e' risolto |
molto probabilmente dipende dal fatto che le versiondi di acpid differiscono (qui sys-apps/acpid-1.0.2-r2) ed infatti il mio default.sh differisce, ma con la pressione del pulsante di power-down viene eseguito init 0 che man init wrote: | Runlevels 0, 1, and 6 are reserved. Runlevel 0 is used to halt the sys-tem, runlevel 6 is used to reboot the system, and runlevel 1 is used to get the system down into single user mode. |
see ya _________________ Thomaz "Gaffiere"
Middle-Earth XP2200+, 1Gb Ram, 80Gb + 160Gb Hd, SbLive!, Nvidia 6800GT AGP8x
Gentoo Gnu/Linux 2.6.12-gentoo-r10 |
|
Back to top |
|
 |
gutter Bodhisattva


Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Mon Dec 20, 2004 11:01 am Post subject: |
|
|
fedeliallalinea wrote: | cloc3 wrote: | una soluzione di Silian in stile appunti linux, da ricordare. |
Ma mi pare che non centri molto con quello chiesto da koma |
Infatti la soluzione corretta è quella proposta da fedeliallalinea infatti io la uso adesso e funziona perfettamente  _________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
 |
|