acpi-tool-0.5.1 racy-5.3

Core libraries and systems
Post Reply
Message
Author
User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

acpi-tool-0.5.1 racy-5.3

#1 Post by Karl Godt »

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 ... :lol:

Code: Select all

--- 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;
Attachments
acpitool-0.5.1-i686.pet
installs to /usr/local/* ; binary acpitool and manual page
(44.68 KiB) Downloaded 2171 times
acpi-tool-0.5.1.const-char.diff.tar.bz2
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
(2.03 KiB) Downloaded 1208 times

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#2 Post by vtpup »

Thanks for this. Unfortunately in Racy 53 I get:

Code: Select all

 # acpitool
acpitool: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by acpitool)
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#3 Post by vtpup »

Uninstalled, shut down, re-installed. And now it works. Don't know how, don't know why. But.....nevermind.....
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#4 Post by Karl Godt »

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 .

Pelo

acpi tool : what is it used for ?

#5 Post by Pelo »

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.

User avatar
Krishnamurti Naskar
Posts: 82
Joined: Fri 20 Apr 2012, 10:16
Location: Calcutta

Re: acpi-tool-0.5.1 racy-5.3

#6 Post by Krishnamurti Naskar »

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 ... :lol:

Code: Select all

--- 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 :roll: 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?
--------------------
| :cry: || :oops: |
--------------------
[u]Kill Bill..(Gates,of course and his Windows)[/u]

[code]So I dual-booted Puppy+PCBSD.[/code]

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#7 Post by Karl Godt »

Jup , thats
/usr/sbin/plogout
script :
Add

Code: Select all

tenthButton = fltk:Fl_Button(20, 305, 180, 40, "acpitool -s");
tenthButton:color(219)
and change

Code: Select all

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: Select all

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: Select all

#!/bin/sh

/usr/local/bin/acpitool -s
Just tested that all on my Dell desktop PC and it worked nicely :)
( 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 .
Attachments
plogout_with_acpitool.jpg
(23.16 KiB) Downloaded 2838 times

User avatar
Krishnamurti Naskar
Posts: 82
Joined: Fri 20 Apr 2012, 10:16
Location: Calcutta

#8 Post by Krishnamurti Naskar »

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: Select all

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

Code: Select all

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?
Attachments
shot-2013-10-02_13-23-42.jpg
it's my skreeny!
(11.35 KiB) Downloaded 2710 times

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#9 Post by Karl Godt »

Krishnamurti , did you made the wrapper executable ?

Code: Select all

chmod +x /usr/local/bin/psuspend2ram
Otherwise to debug , please run the corresponding plogout in terminal to catch error messages .

User avatar
Krishnamurti Naskar
Posts: 82
Joined: Fri 20 Apr 2012, 10:16
Location: Calcutta

#10 Post by Krishnamurti Naskar »

Karl Godt wrote:Krishnamurti , did you made the wrapper executable ?

Code: Select all

chmod +x /usr/local/bin/psuspend2ram
Otherwise to debug , please run the corresponding plogout in terminal to catch error messages .
:oops: yeah karl,did that all to get nuthin'! :cry:

Post Reply