Notices


Reply
Thread Tools
Posts: 559 | Thanked: 166 times | Joined on Jan 2010 @ Cyprus
#41
kernel 49....any update on the savecpu software?it shows 0 on the temp
 
m750's Avatar
Posts: 249 | Thanked: 345 times | Joined on Aug 2010 @ Italy
#42
Sorry, no time now. Please wait a week.
__________________
maxcpu : change cpu's clock with a TAP!
savecpu : overheating control for overclocked n900.
shaketowake2 : Enable/Disable wake up/rest by shaking.
tilt2control : control mediaplayer by tilting your n900.
gpstracker-c : easy handle your gpstracker tk102.
pyOBD for maemo (OBD-II cars diagnostic)

Last edited by m750; 2011-11-20 at 10:15.
 
m750's Avatar
Posts: 249 | Thanked: 345 times | Joined on Aug 2010 @ Italy
#43
Ehi @sophocha... I have just upgraded to v49... savecpu still working. No modification requiered.
__________________
maxcpu : change cpu's clock with a TAP!
savecpu : overheating control for overclocked n900.
shaketowake2 : Enable/Disable wake up/rest by shaking.
tilt2control : control mediaplayer by tilting your n900.
gpstracker-c : easy handle your gpstracker tk102.
pyOBD for maemo (OBD-II cars diagnostic)
 

The Following User Says Thank You to m750 For This Useful Post:
Posts: 24 | Thanked: 6 times | Joined on Nov 2010 @ Rome-Italy
#44
ottima app, grazie mucio Marco!!!!!

Last edited by skricciolo1981; 2011-11-28 at 18:02.
 

The Following User Says Thank You to skricciolo1981 For This Useful Post:
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#45
Ciao m750,

I have your app in the background running since a long time. And it was helpful to me a few times.
But now (I am on KP 50/51), it did not work anymore. So I investigated a bit and found some needs for modification.

I did a few and now it seems to be working again.
Here are my changes

in savecpu.py
Code:
~ $ diff /opt/savecpu/savecpu.py.ori /opt/savecpu/savecpu.py
--- /opt/savecpu/savecpu.py.ori
+++ /opt/savecpu/savecpu.py
@@ -187,23 +187,26 @@
 
                 time.sleep(0.1)
                 #temperatura = os.popen('cat /sys/class/power_supply/bq27200-0/temp').read()
-                temperatura = os.popen('cat /sys/devices/platform/omap34xx_temp/temp1_input').read()
+                ###temperatura = os.popen('cat /sys/devices/platform/omap34xx_temp/temp1_input').read()
+                temperatura = os.popen('echo $(sudo i2cget -y 2 0x55 0x06 w) | awk \'{ printf ($1*0.25-273)*100 }\'').read()
                 # kernel v47
-                #print temperatura
+                print temperatura
                 #temperatura=temperatura.strip()
                 #print temperatura
                 #if len(temperatura) == 3 :
                 #    temperatura = int(temperatura) / 10
-                temperatura = int(temperatura) + 7
+                ###temperatura = int(temperatura) + 7
+                temperatura = (int(temperatura) + 50) / 100
 
                 temperatura=str(temperatura)    
-                #print temperatura
+                print temperatura
 
 
 
 
 
-                check = os.popen('ps -ef | grep /opt/savecpu/savecpu.sh | awk \'/start/ {print $7}\'').read()
+                ###check = os.popen('ps -ef | grep /opt/savecpu/savecpu.sh | awk \'/start/ {print $7}\'').read()
+                check = os.popen('ps -ef | grep /opt/savecpu/savecpu.sh | awk \'/start/ {print $8}\'').read()
                 check=check.strip()
 
                 #print check
and in savecpu.sh
Code:
~ $ diff /opt/savecpu/savecpu.sh.ori  /opt/savecpu/savecpu.sh
--- /opt/savecpu/savecpu.sh.ori
+++ /opt/savecpu/savecpu.sh
@@ -49,7 +49,7 @@
 # imposta il valore, espresso in secondi, tra una verifica e l'altra
 #intervallo=10
 
-# imposta intensit� LED, sconsiglio di superare il valore 20
+# imposta intensità LED, sconsiglio di superare il valore 20
 ledi=18
 
 #imposta colore LED: $verde o $rosso o $blu
@@ -79,13 +79,15 @@
 
 while [ $start == 1 ]
 do
-  #echo "riduci �: " $riduci
-  #echo "led �: " $accendi_led
+  #echo "riduci è: " $riduci
+  #echo "led è: " $accendi_led
   #echo $minima
   #echo $massima
   #temperatura=`cat /sys/class/power_supply/bq27200-0/temp`
-  temperatura=`cat /sys/devices/platform/omap34xx_temp/temp1_input | awk '{ sub(/-/,""); print $1+7}'`
-  #echo "temp: " $temperatura
+  ###temperatura=`cat /sys/devices/platform/omap34xx_temp/temp1_input | awk '{ sub(/-/,""); print $1+7}'`
+  temperatura=`echo $(i2cget -y 2 0x55 0x06 w) | awk '{ printf ($1*0.25-273)*100 }'`
+  temperatura=`expr \( $temperatura + 50 \) \/ 100`
+  echo "temp: " $temperatura
 
 # v47
 #  lunghezza=${#temperatura}
@@ -109,7 +111,7 @@
        massima=$(/usr/sbin/kernel-config show | grep 'max.' | tr '\n' ' ' | awk '{print $3}') 
        if [ 650 -le $massima ]
        then
-         /usr/sbin/kernel-config limits 250 600
+         /usr/sbin/kernel-config limits - 600
          dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"savecpu: temp. >= "$temperatura_max" degrees centigrade - downgrade overclock" uint32:0 string:"OK"
          echo "RIDUCO"
        fi
@@ -149,7 +151,7 @@
       then
           echo "RIPRISTINO"
           /usr/sbin/kernel-config limits $minima $massima
-          #echo "riduci �: " $riduci
+          #echo "riduci è: " $riduci
           riduci=0
           #echo "SPENGO LED"
           accendi_led=0
I attached my modified scripts.

P.S.: I also added rounding of temp values
Attached Files
File Type: zip savecpu_patch.zip (4.6 KB, 96 views)
 

The Following User Says Thank You to peterleinchen For This Useful Post:
m750's Avatar
Posts: 249 | Thanked: 345 times | Joined on Aug 2010 @ Italy
#46
Danke Peter, ich werde deine patch probieren!

Thank's Peter, i will try your patch.
__________________
maxcpu : change cpu's clock with a TAP!
savecpu : overheating control for overclocked n900.
shaketowake2 : Enable/Disable wake up/rest by shaking.
tilt2control : control mediaplayer by tilting your n900.
gpstracker-c : easy handle your gpstracker tk102.
pyOBD for maemo (OBD-II cars diagnostic)

Last edited by m750; 2012-07-17 at 16:26.
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#47
Perfetto tedesco.

Just got the notification of update available in devel

For me it is working, but we should mention the need for i2c (maybe add as dependency?).
I forgot to mention the dependency to i2c-tools in former post. It is needed to read the correct temp value (without bq27x00, omap value is totally nonsense).

Did you take over my changes 1:1?
But anyway I will update and compare/test.
--edit: compared and tested, flawlessly

Grazie,

--edit
Another annotation to i2c-tools (as for lots of devel stuff):
Maintainer: Mohammad Abu-Garbeyyeh
Description: I2C tools for linux
WARNING!
Using i2cset and i2ctools may cause serious permanent HARDWARE damage to the device, use it with caution and ONLY if you know what you're doing.
The developers and the maintainers are NOT responsible for any damage done.
You have been warned.
This package contains an heterogeneous set of I2C tools for Linux. These tools
were originally part of the lm-sensors package but were finally split into
their own package for convenience.

But using only i2cget will be safe.

Last edited by peterleinchen; 2012-07-17 at 22:57.
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
m750's Avatar
Posts: 249 | Thanked: 345 times | Joined on Aug 2010 @ Italy
#48
Ciao Peter,
I kept all your modifications for i2c-tools utilization.
I just removed this:

check = os.popen('ps -ef | grep /opt/savecpu/savecpu.sh | awk \'/start/ {print $8}\'').read()
because it is not correct ($7 as $8 is correct).
I forgot to update the dependencies. Now I have added a new version and in the menu "about" I put the WARNING.

Nochmals vielen Dank!
__________________
maxcpu : change cpu's clock with a TAP!
savecpu : overheating control for overclocked n900.
shaketowake2 : Enable/Disable wake up/rest by shaking.
tilt2control : control mediaplayer by tilting your n900.
gpstracker-c : easy handle your gpstracker tk102.
pyOBD for maemo (OBD-II cars diagnostic)
 
Acurus_'s Avatar
Posts: 209 | Thanked: 156 times | Joined on Jun 2012
#49
Jungs, ich habe das Programm eben zum ersten Mal installiert (ja, Linux-Power-Kernel laeuft auch bei mir). Das Programm zeigt bei Temperatur aber eine 0. Was tun?
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#50
At first, please switch to English? Obwohl ich dich ja gut verstehe

When did you install? From which repo (must be testing or devel)? Just checked and latest version is not yet available. So I assume you got 17-1 which did not have the dependency, so probably you are missing i2c-tools. Check via
dpkg -l | grep i2c
and if not
sudo apt-get install i2c-tools
with testing (or devel) repo enabled.
Alles klar? Meld dich wieder...
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 05:51.