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 Wed 01 Oct 2014, 10:44
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » System
acpi-tool-0.5.1 racy-5.3
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
Karl Godt


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

PostPosted: Sat 14 Apr 2012, 08:48    Post_subject:  acpi-tool-0.5.1 racy-5.3  

acpitool from actual debian sid compiled with its patches

plus patched by me to suppress "deprecated const char" warnings .

The kernel 3.x.y patch by debian looks like this ... Laughing
Code:
--- acpitool-0.5.1/src/acpitool.cpp      2009-08-13 14:37:48.000000000 -0500
+++ acpitool-0.5.1/src/acpitool.cpp       2011-07-28 08:40:37.000000000 -0500
@@ -205,8 +205,7 @@
    Kernel_24 = 1;           
    Kernel_26 = 0;
     }
-       
-    if(strncmp(str,"2.6",3)==0)
+    else
     {
    Kernel_24 = 0;           
    Kernel_26 = 1;
acpitool-0.5.1-i686.pet
Description  installs to /usr/local/* ; binary acpitool and manual page
pet

 Download 
Filename  acpitool-0.5.1-i686.pet 
Filesize  44.68 KB 
Downloaded  1292 Time(s) 
acpi-tool-0.5.1.const-char.diff.tar.bz2
Description  diff against unpatched source ; has small difference in acpitool.cpp
- char *filename, str[50];
+ const char *filename, string str; //str[50];
Where "string str" is changed by a debian patch .
Put that in if applied after the debian patch
bz2

 Download 
Filename  acpi-tool-0.5.1.const-char.diff.tar.bz2 
Filesize  2.03 KB 
Downloaded  748 Time(s) 
Back to top
View user's profile Send_private_message Visit_website 
vtpup


Joined: 15 Oct 2008
Posts: 1139
Location: Republic of Vermont

PostPosted: Sun 03 Jun 2012, 00:07    Post_subject:  

Thanks for this. Unfortunately in Racy 53 I get:

Code:
 # acpitool
acpitool: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by acpitool)

_________________
Acer Aspire 5349-2635 laptop dual proc, 4gb ram, frugal Racy 5.5.
1999 Thinkpad 600e hacked Pent 3, overclocked 800 mHz, 490 kb running Lupu 528

Back to top
View user's profile Send_private_message 
vtpup


Joined: 15 Oct 2008
Posts: 1139
Location: Republic of Vermont

PostPosted: Sun 03 Jun 2012, 14:10    Post_subject:  

Uninstalled, shut down, re-installed. And now it works. Don't know how, don't know why. But.....nevermind.....
_________________
Acer Aspire 5349-2635 laptop dual proc, 4gb ram, frugal Racy 5.5.
1999 Thinkpad 600e hacked Pent 3, overclocked 800 mHz, 490 kb running Lupu 528

Back to top
View user's profile Send_private_message 
Karl Godt


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

PostPosted: Sat 21 Jul 2012, 21:31    Post_subject:  

Sorry for answering late: Such problems are " common " on Puppy but most messages " No version information " seems to not harm anything . I recently upgraded libz/zlib on a Puppy 4 that does not want to show a version information with the outcome that mtpaint does not want to save .png with compression levels other than 0 .
Back to top
View user's profile Send_private_message Visit_website 
Pelo


Joined: 10 Sep 2011
Posts: 3159
Location: Mer méditerrannée (1 kms°)

PostPosted: Tue 11 Sep 2012, 04:24    Post_subject: acpi tool : what is it used for ?
Sub_title: A quoi sert-il ? Para qué sirbe ?
 

acpi tool : what is it used for ?
A quoi sert-il ? Para qué sirbe ?

Wikipedia : L’Advanced Configuration and Power Interface (ACPI) (« interface avancée de configuration et de gestion de l’énergie » en anglais) est une norme co-développée par Hewlett Packard, Intel, Microsoft, Phoenix Technologies et Toshiba, très largement répandue dans les ordinateurs personnels.

Le but de cette norme est de réduire la consommation d’énergie d’un ordinateur en mettant hors tension certains éléments (tels que les lecteurs CD-ROM, les disques durs, l’écran…).

Merci messieurs les techniciens / please explain the usage : to reduce the consumption.
Back to top
View user's profile Send_private_message YIM 
Krishnamurti Naskar


Joined: 20 Apr 2012
Posts: 85
Location: Calcutta

PostPosted: Mon 23 Sep 2013, 01:11    Post_subject:  Re: acpi-tool-0.5.1 racy-5.3  

Karl Godt wrote:
acpitool from actual debian sid compiled with its patches

plus patched by me to suppress "deprecated const char" warnings .

The kernel 3.x.y patch by debian looks like this ... Laughing
Code:
--- acpitool-0.5.1/src/acpitool.cpp      2009-08-13 14:37:48.000000000 -0500
+++ acpitool-0.5.1/src/acpitool.cpp       2011-07-28 08:40:37.000000000 -0500
@@ -205,8 +205,7 @@
    Kernel_24 = 1;           
    Kernel_26 = 0;
     }
-       
-    if(strncmp(str,"2.6",3)==0)
+    else
     {
    Kernel_24 = 0;           
    Kernel_26 = 1;


Thanx Karl,luv you!.
It worked like charm(The 1st pet only alone did the job.)
But Rolling Eyes can you suggest how do i create a "suspend to ram'' button in Shutdown manager,that will do the work for me in a click and no command-line?

_________________
--------------------
| Crying or Very sad || Embarassed |
--------------------
Kill Bill..(Gates,of course and his Windows)

Code:
So I dual-booted Puppy+PCBSD.

Back to top
View user's profile Send_private_message 
Karl Godt


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

PostPosted: Mon 23 Sep 2013, 09:36    Post_subject:  

Jup , thats
/usr/sbin/plogout
script :
Add
Code:
tenthButton = fltk:Fl_Button(20, 305, 180, 40, "acpitool -s");
tenthButton:color(219)

and change
Code:
quitButton1  = fltk:Fl_Button(20, 350, 180, 40, "Cancel");
quitButton1:color(1)

so the second value matches the fourth value of 40+5
Then add
Code:
tenthButton:callback(
    function(slider1)
                   a=io.popen('"/usr/local/bin/psuspend2ram"');
                   os.exit();
     end)

further down .

[EDIT]
a=io.popen('"/usr/local/bin/accpitool -s"'); did not work since it treated it as a filename with space .
So a wrapper is needed, let's call it /usr/local/bin/psuspend2ram :
Code:
#!/bin/sh

/usr/local/bin/acpitool -s

Just tested that all on my Dell desktop PC and it worked nicely Smile
( Had to use unpatched acpitool compilation because running kernel 2.6.30.9 )
[TIDE]

NOTE : Macpup 550 has additionally plogoutE and plogoutJWM besides the plogout - likely they need to be altered the above way too .
plogout_with_acpitool.jpg
 Description   
 Filesize   23.16 KB
 Viewed   1070 Time(s)

plogout_with_acpitool.jpg

Back to top
View user's profile Send_private_message Visit_website 
Krishnamurti Naskar


Joined: 20 Apr 2012
Posts: 85
Location: Calcutta

PostPosted: Tue 01 Oct 2013, 23:16    Post_subject:  

Sorry, karl!
I did everything u suggested,but in vain!
i did tweak your code a bit to make suitable to my box,
hav a look_
Code:

tenthButton = fltk:Fl_Button(20, 265,180,40, "Supend/Sleep");
tenthButton:color(210)

then_

Code:
tenthButton:callback(
    function(slider1)
                   a=io.popen('"/usr/local/bin/psuspend2ram"');
           os.exit();
  end)   


--created a wrapper ,suspend2ram.
whoosh!all in vain.......

can u please tell me another way?
shot-2013-10-02_13-23-42.jpg
 Description   it's my skreeny!
 Filesize   11.35 KB
 Viewed   1019 Time(s)

shot-2013-10-02_13-23-42.jpg

Back to top
View user's profile Send_private_message 
Karl Godt


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

PostPosted: Sat 05 Oct 2013, 06:57    Post_subject:  

Krishnamurti , did you made the wrapper executable ?
Code:
chmod +x /usr/local/bin/psuspend2ram


Otherwise to debug , please run the corresponding plogout in terminal to catch error messages .
Back to top
View user's profile Send_private_message Visit_website 
Krishnamurti Naskar


Joined: 20 Apr 2012
Posts: 85
Location: Calcutta

PostPosted: Thu 10 Oct 2013, 20:42    Post_subject:  

Karl Godt wrote:
Krishnamurti , did you made the wrapper executable ?
Code:
chmod +x /usr/local/bin/psuspend2ram


Otherwise to debug , please run the corresponding plogout in terminal to catch error messages .


Embarassed yeah karl,did that all to get nuthin'! Crying or Very sad
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » System
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.0777s ][ Queries: 13 (0.0070s) ][ GZIP on ]