Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Micro HowTo][Soft Powerdown with powerbutton]
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) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
koma
Advocate
Advocate


Joined: 06 Jun 2003
Posts: 2702
Location: Italy

PostPosted: Sun Dec 19, 2004 7:19 pm    Post subject: [Micro HowTo][Soft Powerdown with powerbutton] Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Sun Dec 19, 2004 7:20 pm    Post subject: Reply with quote

Con acpi e' possibile questo se non sbaglio
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
koma
Advocate
Advocate


Joined: 06 Jun 2003
Posts: 2702
Location: Italy

PostPosted: Sun Dec 19, 2004 7:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
Sasdo
Guru
Guru


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

PostPosted: Sun Dec 19, 2004 7:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Sun Dec 19, 2004 7:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
koma
Advocate
Advocate


Joined: 06 Jun 2003
Posts: 2702
Location: Italy

PostPosted: Sun Dec 19, 2004 9:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Sun Dec 19, 2004 10:23 pm    Post subject: Reply with quote

Allora [risolto] al titolo
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sun Dec 19, 2004 10:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Sun Dec 19, 2004 10:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
gaffiere
Guru
Guru


Joined: 13 Nov 2003
Posts: 406
Location: Provincia Milano

PostPosted: Sun Dec 19, 2004 11:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Mon Dec 20, 2004 11:01 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools) 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