Notices


Reply
Thread Tools
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#51
Originally Posted by m750 View Post
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...

Last edited by peterleinchen; 2012-07-19 at 20:44.
 

The Following User Says Thank You to peterleinchen For This Useful Post:
Acurus_'s Avatar
Posts: 209 | Thanked: 156 times | Joined on Jun 2012
#52
Originally Posted by peterleinchen View Post
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

Last edited by Acurus_; 2012-07-19 at 20:45.
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#53
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.
 

The Following User Says Thank You to peterleinchen For This Useful Post:
Acurus_'s Avatar
Posts: 209 | Thanked: 156 times | Joined on Jun 2012
#54
I typed:

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

Message: "Could not set address to 0x55: Device or resource busy"
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#55
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_'s Avatar
Posts: 209 | Thanked: 156 times | Joined on Jun 2012
#56
Same result. Could meecolay-core be the reason?

Otherwise I am running a widget, which shows the temperatur on the desktop ...
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#57
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_'s Avatar
Posts: 209 | Thanked: 156 times | Joined on Jun 2012
#58
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 ...

Last edited by Acurus_; 2012-07-19 at 21:47.
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#59
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.
 

The Following User Says Thank You to peterleinchen For This Useful Post:
Acurus_'s Avatar
Posts: 209 | Thanked: 156 times | Joined on Jun 2012
#60
Sounds good! Thanks!!!!!!

I am using Power Kernel 50.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 07:44.