maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] saveCPU - overheating control for overclocked n900 (https://talk.maemo.org/showthread.php?t=71454)

peterleinchen 2012-07-19 20:05

Re: [Announce] saveCPU - overheating control for overclocked n900
 
Quote:

Originally Posted by m750 (Post 1239868)
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!

m750,

I am sorry but you will have to put another version again.
You are correct but I am also
standard busysbox will produce output of ps likel
Code:

~ $ /bin/busybox.ori ps -ef | grep /opt/savecpu/savecpu.sh
 1613 root      2840 S    /bin/sh /opt/savecpu/savecpu.sh start
 3277 user      2848 S    grep /opt/savecpu/savecpu.sh

where $7 is right
but busybox-power (which I use and advise to use) produces:
Code:

~ $ /bin/busybox ps -ef | grep /opt/savecpu/savecpu.sh
 1613 root      2840 S    {savecpu.sh} /bin/sh /opt/savecpu/savecpu.sh start
 5699 user      2848 S    grep /opt/savecpu/savecpu.sh

I will check code and put some solution, just wait a few minutes ...

... edit
Ok, took a few minutes longer, needed some dinner in bewteen.
Here is patch
Code:

~ diff /opt/savecpu/savecpu.py.ori.py /opt/savecpu/savecpu.py
--- /opt/savecpu/savecpu.py.ori.py
+++ /opt/savecpu/savecpu.py
@@ -191,7 +191,7 @@
                ###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 :
@@ -200,14 +200,17 @@
                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 $8}\'').read()
+                bb = os.popen('readlink /usr/sbin/watchdog').read()
+                if str(bb.strip())=='/bin/busybox':
+                  check = os.popen('ps -ef | grep /opt/savecpu/savecpu.sh | awk \'/start/ {print $7}\'').read()
+                else:
+                  check = os.popen('ps -ef | grep /opt/savecpu/savecpu.sh | awk \'/start/ {print $8}\'').read()
                check=check.strip()
 
                #print check

Important is this
Code:

+                bb = os.popen('readlink /usr/sbin/watchdog').read()
+                if str(bb.strip())=='/bin/busybox':
+                  check = os.popen('ps -ef | grep /opt/savecpu/savecpu.sh | awk \'/start/ {print $8}\'').read()
+                else:
+                  check = os.popen('ps -ef | grep /opt/savecpu/savecpu.sh | awk \'/start/ {print $7}\'').read()

whereas above I also disable temporary print instructions...

Acurus_ 2012-07-19 20:43

Re: [Announce] saveCPU - overheating control for overclocked n900
 
Quote:

Originally Posted by peterleinchen (Post 1239942)
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...

Hi, I have installed saveCPU two hours ago. Testing and devel are active. I got 17-1. And now I got an upgrade information. After upgrading I have version 17-2. I rebooted the phone, started saveCPU again but there is still a "0". When I type "dpkg -l | grep i2c" in the terminal I get:

ii i2c-tools
3
.0.2-1maemo3
I2c tools for linux

peterleinchen 2012-07-19 20:49

Re: [Announce] saveCPU - overheating control for overclocked n900
 
Yes, 17-2 was latest update (which will need some correction, but only regarding UI On/Off indicator)

Please try
sudo i2cget -y 2 0x55 0x06 w
in termnal and let me know.

Acurus_ 2012-07-19 20:56

Re: [Announce] saveCPU - overheating control for overclocked n900
 
I typed:

sudo gainroot (enter)
i2cget -y 2 0x55 0x06 w (enter)

Message: "Could not set address to 0x55: Device or resource busy"

peterleinchen 2012-07-19 21:01

Re: [Announce] saveCPU - overheating control for overclocked n900
 
Oops!
Do not know what is going on.
Please do a shutdown, pull out battery for a few seconds, then boot up and try again.

Acurus_ 2012-07-19 21:09

Re: [Announce] saveCPU - overheating control for overclocked n900
 
Same result. Could meecolay-core be the reason?

Otherwise I am running a widget, which shows the temperatur on the desktop ...

peterleinchen 2012-07-19 21:23

Re: [Announce] saveCPU - overheating control for overclocked n900
 
Possibly yes.
Seems there are some libs replaced. (pls see also this http://talk.maemo.org/showthread.php?t=83939)
But I do not know.

Would love to get some confirmation of other testers.

@acurus_
Which widget, what code?
Using omap temp are useless (constand -40 or 0 or ...), bq27x00 deprecated together with BME, so i2cget is my preference to use.

Acurus_ 2012-07-19 21:37

Re: [Announce] saveCPU - overheating control for overclocked n900
 
I have installed saveCPU now on another N900 where I haven't installed meecolay-core. But saveCPU do not run as well. Therefore meecoly-core is not the reason.

I am using Desktop Command Execution Widget with this script:

echo `cat /sys/class/power_supply/bq27200-0/temp` °C | sed 's/\B[0-9]\{1\}/&,/'

EDIT: I killed this widget and rebooted the phone. But there is still the "0" for temperature ...

peterleinchen 2012-07-19 21:48

Re: [Announce] saveCPU - overheating control for overclocked n900
 
OK, confirm your problem here. Module bq27x00 is the problem.
So seems you are on KP <50?

Will investigate and think it is easy to fix that too.
So for people having bq27x00 enabled using that and for others using i2cget.

Do not know if I make it ready tonight, so could take until tomorrow.
And we have to wait for m75p to release it.

Acurus_ 2012-07-19 21:59

Re: [Announce] saveCPU - overheating control for overclocked n900
 
Sounds good! Thanks!!!!!!

I am using Power Kernel 50.


All times are GMT. The time now is 17:29.

vBulletin® Version 3.8.8