Author |
Message |
Patriot

Joined: 15 Jan 2009 Posts: 734
|
Posted: Thu 29 Jan 2009, 22:28 Post subject:
acpid-1.0.8-i486 pet package for Puppy 4.1.x Subject description: Press power button to shutdown & poweroff your puppy |
|
Hmmm .....
I was wondering why puppy doesn't react to the power button ... instead power just gets cut-off ... woops ...
Hmm, ok ACPI module isn't loaded ... now ACPI loaded with acpi=force ... but, still no reaction to power button ... looked for clues and found acpid ... Right, went off to grab the source, had a look and made a binary ... Configured and loaded acpid ... woops ... still no reaction to power button ...
Ok, after more reading and more checking, I understand now how it works ... Made a simple script to turn on power button support and set the config for puppy ... Walla ... press power button and puppy will now shutdown-and-poweroff ...
I did a search for a pet but found a pup ... Figured that a pet could make life easier for some ... This pet package contains acpid & acpi_listen daemon compiled from latest source 1.0.8 ... The /etc/acpi/events/acpid.conf file has the settings to shutdown and poweroff puppy which can be expanded to cover other acpi events ... A small script rc.acpi will be placed into init.d to turn on button and start acpid daemon ...
This pet package was tested with a LiveCD/Frugal & full hdd install on an old pentium II pc with a pre-2001 bios where ACPI needs to be turned on by acpi=force ...
Anyone who's willing to give this a try, please let me know how it goes ...
Rgds
Added: Updated acpid package with revised script.
 |
Description |
acpid-1.0.8 pet package, poweroff script updated.
|

Download |
Filename |
acpid-1.0.8-3-i486.pet |
Filesize |
15.38 KB |
Downloaded |
2171 Time(s) |
Description |
acpid-1.0.10 pet package, poweroff script updated.
|

Download |
Filename |
acpid-1.0.10-i486.pet |
Filesize |
15.72 KB |
Downloaded |
2426 Time(s) |
Last edited by Patriot on Sat 30 Jan 2010, 10:32; edited 4 times in total
|
Back to top
|
|
 |
big_bass
Joined: 13 Aug 2007 Posts: 1742
|
Posted: Fri 30 Jan 2009, 01:17 Post subject:
|
|
Quote: | This pet package contains acpid & acpi_listen daemon compiled from latest source 1.0.8 .. |
Patriot
I was reading about that today also and downloaded the 1.0.4
it gave a compile error so I am glad to see that you got 1.0.8
working
I'll give it a try on live cd tomorrow *its late now
I'll keep ya posted
have you seen this post ?
http://www.murga-linux.com/puppy/viewtopic.php?t=38072
welcome to puppy
big_bass
|
Back to top
|
|
 |
Patriot

Joined: 15 Jan 2009 Posts: 734
|
Posted: Fri 30 Jan 2009, 05:56 Post subject:
|
|
Hmmm .....
Hey there big_bass !
Been using puppy for quite a while actually ... Definitely grew on me by each day ...
Quote: | it gave a compile error so I am glad to see that you got 1.0.8
working |
Went straight to sourceforge and found an updated source ... compiled sucesssfully on first try ... figuring how to get it to work took a bit while longer ...
Quote: | have you seen this post ?
http://www.murga-linux.com/puppy/viewtopic.php?t=38072 |
I just did ... wowzer ... for fun, I did try recompiling the kernel myself and screwed up something ... haha ... need more time to experiment on that one ...
And could you try this one out for me ? I don't have a problematic system poweroff and it's only just a hunch .... Just to observe if there's anything different ... (it's supposedly do a forced shutdown bypassing init ... since init is busybox itself...)
- Edit /sbin/poweroff and add -f switch at the end, like this
exec /sbin/busybox poweroff -f
I'm also interested to know on what system config would such problematic poweroff occurs ...
And finally, I've revised the rc.acpi script to handle start/stop/restart ... I just noticed the acpid exit msg on shutdown and it bugs me, so I did a proper script ... I hope it is satisfactory ...
Rgds
Edit:
I've found a bug that prevents acpid to poweroff if you exit to terminal prompt. This should be the last fix for the week as I ran this pet over and over again until I get it right ... The new pet can be cleanly installed over the previous pet.
Please let me know how it goes ... Thanks ...
.
|
Back to top
|
|
 |
big_bass
Joined: 13 Aug 2007 Posts: 1742
|
Posted: Sat 31 Jan 2009, 02:34 Post subject:
|
|
Patriot
I did try your package on a live CD puppy 4.12
I was not able to correctly test your pet for these reasons:
1.) my computer's power button doesn't send an event so I cant trap it
this is no fault of your package but my keyboard
2.)/proc/acpi folder is not there either so I cant even remap another key to test with
but ....since I have a slackware install also that already comes with acpi version 1.0.4 on slackware 12.1 I can see if another key would work
I did compile the latest 1.08 on my slack box and made a slackware.tgz package
so I'll keep ya posted
I hope we get some more testers
this has a lot of potential for laptops
even though I have a desktop
big_bass
|
Back to top
|
|
 |
WhoDo

Joined: 11 Jul 2006 Posts: 4440 Location: Lake Macquarie NSW Australia
|
Posted: Sat 31 Jan 2009, 17:20 Post subject:
|
|
big_bass wrote: | I hope we get some more testers
this has a lot of potential for laptops
even though I have a desktop |
I can help there. I have included this for Puppy-4.2alpha3 release, so you should get a plethora of testers from that!
_________________ Actions speak louder than words ... and they usually work when words don't!
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com
|
Back to top
|
|
 |
Legeya
Joined: 10 Jan 2010 Posts: 12
|
Posted: Fri 29 Jan 2010, 14:12 Post subject:
|
|
Patriot,
i installed your *.pet, rebooted and tried to shutdown computer by pressing the power-button. It switched off without any preparing procedures. Now puppy cannot boot, stops after "Recognising media devices".
What to do ?!!!!
P.S.
Forgot ! Puppy installed on HDD fully, and my computer is laptop Toshiba Satellite 4030CDT
|
Back to top
|
|
 |
mikeb

Joined: 23 Nov 2006 Posts: 11281
|
Posted: Fri 29 Jan 2010, 16:12 Post subject:
|
|
http://www.murga-linux.com/puppy/viewtopic.php?t=36944
http://www.murga-linux.com/puppy/viewtopic.php?t=47668
http://www.murga-linux.com/puppy/viewtopic.php?t=45992
Quote: |
Now puppy cannot boot, stops after "Recognising media devices".
What to do ?!!!! |
see the above links
mike
|
Back to top
|
|
 |
afishe2000
Joined: 29 Jan 2010 Posts: 37
|
Posted: Fri 29 Jan 2010, 17:57 Post subject:
|
|
I'm very new to linux but started out with an Apple IIe a long time ago and love all the things that can be done with scripting and such...
Got it working on a Dell Inspiron 2200 running Puppy 4.3.
Installed then rebooted.
Confirmed /usr/sbin/acpid was running as a process.
Edited /etc/acpi/events/acpid.conf to:
event=button/power*
action=/usr/bin/wmpoweroff
Momentary press of the power button preforms a normal shutdown.
Thanks...
|
Back to top
|
|
 |
Patriot

Joined: 15 Jan 2009 Posts: 734
|
Posted: Sat 30 Jan 2010, 10:13 Post subject:
|
|
Hmmm .....
Legeya wrote: | ..... my computer is laptop Toshiba Satellite 4030CDT |
The 4030CDT is likely to have acpi disabled by the kernel if the bios predates 2001 ... If acpi is not working, acpid won't either ... You can try adding acpi=force on the kernel line on bootup to force acpi on ... If I'm not mistaken the bios dsdt should work for acpi on 4030CDT ... YMMV ...
afishe2000 wrote: | ..... Edited /etc/acpi/events/acpid.conf to:
event=button/power*
action=/usr/bin/wmpoweroff |
Ok, I will update the packages in a couple of days to support all puppy >= 4.0 versions ...
Rgds
|
Back to top
|
|
 |
bigpup

Joined: 11 Oct 2009 Posts: 12980 Location: S.C. USA
|
Posted: Sun 14 Feb 2010, 16:58 Post subject:
How Does It Work? Subject description: pressing power button to shut down Puppy |
|
I added this to Puppy Stardust 009 and it works for me.
Push power button, Puppy does normal shutdown, and computer powers off.
Nice!
Note:
My power button is the kind that has to be pushed for 4 or 5 seconds to kill power. When using this program, I push it for 1 or 2 seconds and it does not shut off power, but starts Puppy shutdown. Power shuts off at the end of Puppy shutdown.
|
Back to top
|
|
 |
DaveS

Joined: 09 Oct 2008 Posts: 3726 Location: UK
|
Posted: Sun 14 Feb 2010, 17:34 Post subject:
|
|
Patriot, this is so cool. I hated that this was missing from 4.3, but could not find how to implement it. Found this thread via the stardust thread, thanks so much.............
_________________ Spup Frugal HD and USB
Root forever!
|
Back to top
|
|
 |
shinobar

Joined: 28 May 2009 Posts: 2674 Location: Japan
|
Posted: Thu 25 Feb 2010, 22:28 Post subject:
acpid-1.0.10-1.pet Subject description: suspend support for note books, shutdown dialog |
|
Hi Partiot and to all,
Here you can find acpid-1.0.10-1.pet supports suspend with lid closing for notebooks.
it also offers shutdown dialog when the power button is pressed.
Description |
Popping up a dialog when the power button pressed. |
Filesize |
15.04 KB |
Viewed |
8208 Time(s) |

|
|
Back to top
|
|
 |
george2002
Joined: 20 Sep 2010 Posts: 22
|
Posted: Thu 07 Oct 2010, 18:51 Post subject:
Re: acpid-1.0.10-1.pet Subject description: suspend support for note books, shutdown dialog |
|
shinobar wrote: | Hi Partiot and to all,
Here you can find acpid-1.0.10-1.pet supports suspend with lid closing for notebooks.
it also offers shutdown dialog when the power button is pressed. |
Thx for that nice program works like harm on puppy 5.1 and HP Thin Client T5520
I only reconfigured time that puppy wait for shuttdown to 5 seconds after key is pressed
Greetings 4 all
George2002
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 4208 Location: Kiel,Germany
|
Posted: Tue 07 Dec 2010, 06:24 Post subject:
|
|
Quote: | Here you can find acpid-1.0.10-1.pet supports suspend with lid closing for notebooks.
it also offers shutdown dialog when the power button is pressed. |
Found one bug at least :
Quote: | #!/bin/sh
# Patriot Jan 2009 for Puppy Linux 4.1.1 GPL
# Revision 0.0.2
### ACPI : Power Button ###
acpi_start() {
if [ -f proc/acpi/button/power/PWRF/info ]; then
echo "Power Button module already loaded." |
should be
if [ -f /proc/acpi/button/power/PWRF/info ]; then
|
Back to top
|
|
 |
soliver
Joined: 31 Oct 2009 Posts: 22 Location: Germany - Koblenz
|
Posted: Thu 10 Feb 2011, 15:47 Post subject:
Changed acpid_poweroff Subject description: for me it now supports standby |
|
Hello there and many thanks (Patriot and shinobar) for the prog.
I made some changes to get standby working (and some other little things). Don't know if it's working for all comuters, but for my Asus, Sony and Dell notebooks it is.
Here's the code of the acpi_poweroff.sh. Please have a look at it and sorry for playing so "bad" with the script. I'm a rookie
Code: | #!/bin/sh
# Patriot Jan 2009 for Puppy Linux 4.1.1 GPL
# Revision 0.0.6
# 13sep09 dialogbox by shinobar
# 4nov09 TIMELIMIT 30sec
# 26dec09 wmpoweroff, adjustable less than 10sec.
# 12feb10 stop acpid before powroff
# little mods and german locale by soliver for veggie-pupp THANKS to Patriot and shinobar
TIMELIMIT=30 # sec, no dialog if 0(zero).
#_farewell="Power button is pushed, and about to shut down..."
_press="Press"
_ok="'OK'"
_shutdown="to shutdown right now,"
_standby="'Standby'"
_standbymodus="to go to standby modus (be careful!),"
_standbycomment="(will TRY to unmount all drives)"
_cancel="'Cancel'"
_or="or"
_continue="to continue with puppy."
_ten_sec="Shutting down in 10 seconds."
_limit1="Shutting down in"
_limit2="seconds."
#echo $0 > /root/acpi.log
#date >> /root/acpi.log
#changed sound ;-)
#SOUND="/usr/share/audio/leave.wav"
#PLAY="aplay"
#[ -f "$SOUND" ] && which $(basename $PLAY) >/dev/null && $(basename $PLAY) "$SOUND"
#echo "DISPLAY=$DISPLAY" >> /root/acpi.log
X_pid=`ps ax | awk '{if (match($5, "X$") || $5 == "X") print $1}'`
if [ "$X_pid" != "" ]; then
#if [ "$DISPLAY" != "" ]; then
[ -f /etc/rc.d/PUPSTATE ] && source /etc/rc.d/PUPSTATE
[ -f /etc/rc.d/pupsave.conf ] && source /etc/rc.d/pupsave.conf
GTKDIALOG=$(which gtkdialog3)
PUPSAVECONFIG=$(which pupsaveconfig)
[ "$PUPSAVECONFIG" = "" ] && PUPSAVECONFIG=$(which pupsave)
[ "$TIMELIMIT" = "" ] && TIMELIMIT=0
if [ $TIMELIMIT -gt 0 ] && [ "$GTKDIALOG" != "" ] && \
[ "$PUPMODE" != "5" -o "$PRECHOICE" != "" -o "$PUPSAVECONFIG" = "" ]; then
mo=acpi.mo
# set locale
for lng in C $(echo $LANGUAGE|cut -d':' -f1) $LC_ALL $LANG;do :;done # ex. ja_JP.UTF-8
# search locale file
lng1=$(echo $lng|cut -d'.' -f1) # ex. ja_JP
lng2=$(echo $lng|cut -d'_' -f1) # ex. ja
LOCALEDIR=/usr/share/locale
[ "$mo" ] || mo=$(basename $0).mo
for D in en C $lng2 $lng1 $lng
do
F="$LOCALEDIR/$D/LC_MESSAGES/$mo"
[ -f "$F" ] && . "$F"
done
DIV=10
[ $TIMELIMIT -le 20 ] && DIV=5
[ $TIMELIMIT -le 10 ] && DIV=$TIMELIMIT
STEP=$(($TIMELIMIT / $DIV))
TIMELIMIT=$(($STEP * $DIV))
PITCH=$((100 / $DIV))
export DIALOG="<window title=\"acpid_poweroff\">
<vbox>
<pixmap><input file>/usr/share/themes/Yattacier2/gtk-2.0/gtk-stop.png</input></pixmap>
<text use-markup=\"true\">
<label>\"$_press <b><i>$_ok</i></b> $_shutdown\"</label>
</text>
<text use-markup=\"true\">
<label>\"<b><i>$_standby</i></b> $_standbymodus\"</label>
</text>
<text use-markup=\"true\">
<label>\"<b><small>$_standbycomment</small></b>\"</label>
</text>
<text use-markup=\"true\">
<label>\"$_or <b><i>$_cancel</i></b> $_continue\"</label>
</text>
<progressbar>
<label>$_limit1 $TIMELIMIT $_limit2</label>
<input>for i in \$(seq 0 $PITCH 100); do echo \$i; sleep $STEP; done</input>
<action type=\"exit\">OK</action>
</progressbar>
<hbox>
<button>
<label>Standby</label>
<input file>/usr/local/lib/X11/mini-icons/mini-monitor3.xpm</input>
<action>ls /mnt | while read m;do umount -a -f "/mnt/$m" 2>/dev/null ; done</action>
<action>sleep 2</action>
<action>echo 3 > /proc/acpi/sleep &</action>
<action type=\"exit\">Cancel</action>
</button>
<button cancel></button>
<button ok></button>
</hbox>
</vbox>
</window>"
#echo "$DIALOG"
eval $($GTKDIALOG -p DIALOG -c)
[ "$EXIT" = "Cancel" ] && exit
fi
#doesn't work for my eeepc but for my dell (it's even working without this)
# P=wmpoweroff
#else
# P=poweroff
fi
#doesn't work for my eeepc but for my dell (it's even working without this)
#/etc/init.d/rc.acpi stop
#exec $P
#sound now here
SOUND="/usr/share/audio/leave.wav"
PLAY="aplay"
[ -f "$SOUND" ] && which $(basename $PLAY) >/dev/null && $(basename $PLAY) "$SOUND"
#poweroff
/etc/init.d/rc.acpi stop
rxvt +sb -fn 7x14 -geometry 30x1 -bg lightblue -title acpi_poweroff -e wmpoweroff |
Made with puppy 4.1.2
If someone is interested I can upload the prog as a pet.
Thanks and Greets
sOliver
Description |
|
Filesize |
6.32 KB |
Viewed |
7062 Time(s) |

|
|
Back to top
|
|
 |
|