Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 21 Sep 2014, 12:22
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
acpid-1.0.8-i486 pet package for Puppy 4.1.x
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
Patriot


Joined: 15 Jan 2009
Posts: 734

PostPosted: Thu 29 Jan 2009, 22:28    Post_subject:  acpid-1.0.8-i486 pet package for Puppy 4.1.x
Sub_title: 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.
acpid-1.0.8-3-i486.pet
Description  acpid-1.0.8 pet package, poweroff script updated.
pet

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

 Download 
Filename  acpid-1.0.10-i486.pet 
Filesize  15.72 KB 
Downloaded  1588 Time(s) 

Edited_times_total
Back to top
View user's profile Send_private_message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: 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 Very Happy
big_bass
Back to top
View user's profile Send_private_message 
Patriot


Joined: 15 Jan 2009
Posts: 734

PostPosted: 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 ... Smile

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
View user's profile Send_private_message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: 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 Wink
even though I have a desktop

big_bass
Back to top
View user's profile Send_private_message 
WhoDo


Joined: 11 Jul 2006
Posts: 4441
Location: Lake Macquarie NSW Australia

PostPosted: 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 Wink
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! Wink

_________________
Actions speak louder than words ... and they usually work when words don't!
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com
Back to top
View user's profile Send_private_message 
Legeya

Joined: 10 Jan 2010
Posts: 12

PostPosted: 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
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8253

PostPosted: 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
View user's profile Send_private_message 
afishe2000

Joined: 29 Jan 2010
Posts: 37

PostPosted: 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
View user's profile Send_private_message 
Patriot


Joined: 15 Jan 2009
Posts: 734

PostPosted: 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
View user's profile Send_private_message 
bigpup


Joined: 11 Oct 2009
Posts: 5142
Location: Charleston S.C. USA

PostPosted: Sun 14 Feb 2010, 16:58    Post_subject: How Does It Work?
Sub_title: 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
View user's profile Send_private_message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: 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
View user's profile Send_private_message 
shinobar


Joined: 28 May 2009
Posts: 2630
Location: Japan

PostPosted: Thu 25 Feb 2010, 22:28    Post_subject: acpid-1.0.10-1.pet
Sub_title: 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.
acpi_poweroff.png
 Description   Popping up a dialog when the power button pressed.
 Filesize   15.04 KB
 Viewed   5857 Time(s)

acpi_poweroff.png

Back to top
View user's profile Send_private_message Visit_website 
george2002

Joined: 20 Sep 2010
Posts: 22

PostPosted: Thu 07 Oct 2010, 18:51    Post_subject: Re: acpid-1.0.10-1.pet
Sub_title: 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 Smile 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 Smile

Greetings 4 all
George2002
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: 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
View user's profile Send_private_message Visit_website 
soliver

Joined: 31 Oct 2009
Posts: 22
Location: Germany - Koblenz

PostPosted: Thu 10 Feb 2011, 15:47    Post_subject: Changed acpid_poweroff
Sub_title: 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 Wink

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
acpi_poweroff.png
 Description   
 Filesize   6.32 KB
 Viewed   4440 Time(s)

acpi_poweroff.png

Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1240s ][ Queries: 13 (0.0043s) ][ GZIP on ]