maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing! (https://talk.maemo.org/showthread.php?t=64170)

bakuur 2010-10-21 20:28

[ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
1 Attachment(s)
Disclamer:this script needs OCing and no one is responible for the damage made by it except YOU

what this script does checks the Temperature of the phone and if its above 45c then it will change to a very low voltage
and also depending on the battery level, so the batery level the lower the voltage given to the N900


notes:
1.you must read the whole post before doing anything!
2.if you have any ideas please share them but incase you want to declare how you find this script useless to you then please i dont need to hear about it. JUST keep it to yourself.
3.you will be needing to install the following:
1.kernel-power-settings
2.rootsh
3."queen beecon widget" or "desktop command execution widget"
4.if your N900 starts rebooting then its not because of the script! your N900 just needs diffrent profiles or voltages, so try editing the script based on what suits you (eg. starving profile might not work for you but ideal will and so on...)


okay so lets start:
1.make sure you downloaded what i asked for above, then try OCing manually just to see if it works
try entering the following code :
Code:

sudo gainroot
kernel-config load ideal
kernel-config limits 500 805

if everything was sucessful then please do continue to the next step, if not then try reinstalling or rebooting.

2.download the .zip file attached below and extract the smartclocker.sh to your /MyDocs directory.
and by that i mean "/home/user/Mydocs" or in simpler words the first directory you put the folders for the music and videos.

3.okay so for the sake of testing and to make sure you got everything going right.
open the terminal
and type in the following:
Code:

sudo gainroot
sh /home/user/MyDocs/smartclocker

you should get a notification that says "phone limits reset"
if so then you can go to the next step

4.this is a must do to enable a proper temperature reading!
open the terminal then type in the following:
Code:

sudo gainroot
modprobe bq27x00_battery
echo bq27x00_battery >> /etc/modules

5. finally just create a QBW or DCEW and click on "add cmd"
choose a name for it, then in the code area put:
Code:

sudo gainroot ; sh /home/user/MyDocs/smartclocker
then just choose a time interval for lets say every 30min or 1hour
and DONT choose the option where it says "@ start up" or "@ sight" or "@ Desktop"

and here you are done, please tell me how it goes with you :D
i also re updated the script to fix something
also many thanks to Almehdi and techie and to my biggest supporter renaldoTT

lemmyslender 2010-10-21 22:58

Re: [WIP] SmartClocker
 
Just a suggestion, no need to load ulv every time. I would just reset the limits at each level.

Perhaps add an additional check for last profile (ulv), then only change the profile if it will be different than current profile. But, I don't see why anyone would change profiles very often if ever.

bakuur 2010-10-22 08:05

Re: [WIP] SmartClocker
 
Quote:

Originally Posted by lemmyslender (Post 847517)
Just a suggestion, no need to load ulv every time. I would just reset the limits at each level.

Perhaps add an additional check for last profile (ulv), then only change the profile if it will be different than current profile. But, I don't see why anyone would change profiles very often if ever.

mate i already mentioned that for now im testing it to load ulv only
so that i know it actully worked or not
ofcource this needs alot of work
but at the end am sure even you will need it ;)

RenaldoTT 2010-10-22 18:31

Re: [WIP] SmartClocker
 
as expected another great idea from bakuur

bakuur 2010-10-22 18:45

Re: [WIP] SmartClocker
 
Quote:

Originally Posted by RenaldoTT (Post 848175)
as expected another great idea from bakuur

Part of it was your idea ;)

IM only here to help , let's just hope that soon I'll find someone to help me (a) with this script

techie 2010-10-22 19:36

Re: [WIP] SmartClocker
 
Quote:

Originally Posted by bakuur (Post 848189)
let's just hope that soon I'll find someone to help me (a) with this script

  1. The expression for curbar returned two matched lines leading to incorrect value being stored.Fixed!
  2. I removed sudo gainroot.You can't issue sudo when you are already root:rolleyes: Fixed!
  3. You might wanna replace if's with elif's to reduce comparision.Getting late here else would have done that as well for you.
Code:

#!/bin/bash

#set variables for current bar level and previous bar level
 curbar=`hal-device bme | grep battery.charge_level.current | awk '{print $3}'`
prevbar=`cat /home/user/.ledcharge/lastbar`
 
if [ $curbar -eq $prevbar ]; then
#exit without doing anything
 echo `date | awk '{print $4}'`
exit
else
echo $curbar
#set pattern to current bar level
 if [ $curbar -eq 8 ];then
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 7 ];then
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 6 ];then
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 5 ];then
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 4 ];then
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 3 ];then
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 2 ];then
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 1 ];then
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi
 if [ $curbar -eq 0 ];then
sudo kernel-config load ulv
 sudo kernel-config limits 250 805
fi

fi

exit

Didn't have time to check more thoroughly.Let me know if you face anymore problems.

Edit:
Another possible optimization- awk can completely replace use of grep;)

woody14619 2010-10-22 19:40

Re: [WIP] SmartClocker
 
I was of the impression that setting the lower limit to 500 was more efficient power wise in the long run. Is that not the case? If so, why are you setting the lower limit to 250 in your script? :)

AMLJ 2010-10-22 19:46

Re: [WIP] SmartClocker
 
lol
I don't have time to check your script, but what you are trying to do looks good... Thanks:)
WORK FASTER :) jk

bakuur 2010-10-22 19:59

Re: [WIP] SmartClocker
 
Quote:

Originally Posted by woody14619 (Post 848209)
I was of the impression that setting the lower limit to 500 was more efficient power wise in the long run. Is that not the case? If so, why are you setting the lower limit to 250 in your script? :)

its just for the sake of testing
my limits are 500 950
so that if the script would work id be sure both limits will change

i will have to do alot of testing to give a proper limit for each battery level

hopefully wont disappoint you guys :d

bakuur 2010-10-22 20:01

Re: [WIP] SmartClocker
 
dear techie!

thanks alot for taking the time to check it out

something is wrong with my N900 so ill have to reflash so that i can text the script

so ill reply my result soon hopefully
cant wait till i test it!!

RenaldoTT 2010-10-23 00:48

Re: [WIP] SmartClocker
 
Quote:

Originally Posted by bakuur (Post 848189)
Part of it was your idea ;)

You could of taken full credit because I don't even remember what I said that brought this up lol

Oh well... too late now. I feel good that I am part of something this large.

RenaldoTT 2010-10-23 01:01

Re: [WIP] SmartClocker
 
I know you guys are still working on coding and I'm not sure if it's implimented yet but what about a banner notification to alert the user of what the scrip is doing. Just a thought

It can say "Starving Profile Set, Limits *what ever the limits are"

bakuur 2010-10-23 12:01

Re: [WIP] SmartClocker
 
Quote:

Originally Posted by RenaldoTT (Post 848377)
You could of taken full credit because I don't even remember what I said that brought this up lol

Oh well... too late now. I feel good that I am part of something this large.

be proud ;) here is where the idea started

okay so its working perfectly now!
ive been on it all day long!

by now battery should be half way over but its still 74%

ill also add a notification every time the phone gets clocked ;)

you will have an option to enable or disable it ;)

further more you will also to choose the limits manually or go by my recomendations and use the limits i use myself ;)

it also has a temperature sensor where if the temperature is 50°c then it will load a starving profile ;)

still needs some work though but soon it will be up and running!!

RenaldoTT 2010-10-23 12:09

Re: [WIP] SmartClocker
 
Cool well let me know when it's safe enough to test

bakuur 2010-10-24 11:29

Re: [WIP] SmartClocker
 
Quote:

Originally Posted by RenaldoTT (Post 848613)
Cool well let me know when it's safe enough to test

done mate :D :D
this is the second day of testing and gosh ive save heck alot of battery
upto 50% if i may say
and i still got to enjoy the lovely performance offered by the N900

try it out or as always wait till everything is safe

im glad its finally up and running!

RenaldoTT 2010-10-24 11:55

Re: [ANNOUNCED] SmartClocker
 
I'll wait a bit, see how the thread is going and then do some damage, doesn't hurt to be patient sometimes.

bakuur 2010-10-24 17:52

Re: [ANNOUNCED] SmartClocker
 
hehe but i cant understand why no one have given the feed back on how is it... :s

come on people!! i almost failed my biology test for it!! :p

Mentalist Traceur 2010-10-24 18:55

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
I think most people are either not interested or worried about using this. Those who are comfortable overclocking are fine where they are, those of us who aren't aren't necessarily willing to start with a script that changes clocks and voltage settings all the time.

When I've experimented with overclocking on my own, and have gained enough knowledge to understand how this works, I'll be sure to try it.

Rest assured your contribution is appreciated, even if most of the people here aren't actively adopting it.

bakuur 2010-10-24 19:04

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
Quote:

Originally Posted by Mentalist Traceur (Post 849758)
I think most people are either not interested or worried about using this. Those who are comfortable overclocking are fine where they are, those of us who aren't aren't necessarily willing to start with a script that changes clocks and voltage settings all the time.

When I've experimented with overclocking on my own, and have gained enough knowledge to understand how this works, I'll be sure to try it.

Rest assured your contribution is appreciated, even if most of the people here aren't actively adopting it.

to be honest i made this script to avoid all problems caused by overclocking
many people had alot of doubts and some messed things up

im only trying to make things easier

but i guess the look of it scares people
ill try making it simpler
as i said a more noob friendly tutorial is on the horizon ;)

mele 2010-10-24 19:18

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
I just run the script from the first post.....now i`m waiting to see what happens :)

Mentalist Traceur 2010-10-24 19:32

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
Actually it looks pretty simple to me personally. If you want to make it truly newb friendly, hide all the code and package it into a .deb. That way the truly-newb people won't have to think about how it works, and it' won't scare them at all.

Just like swappolube vs manually making a script yourself.

Anyway, I wouldn't make it "simpler", unless there's something in the code that could truly use simplifying. It looks pretty simple enough. I just don't have the knowledge to figure out if the simple looking stuff is actually good.

One thing I HAVE figured out from looking at the script, is you understand DBus. And I just so happen to have a particular shell command that I would like to know, that I know uses DBus.

So, if you don't mind telling me: How do I fetch device orientation (portrait vs landscape) using dbus? Not with python/C/C++/Qt - just from the command-like (so I can stick it into my Conky.conf file for something I've been trying to do). I have this tidbit of python code from the wiki:

Code:

$import dbus
bus = dbus.SystemBus()           
accel = bus.get_object('com.nokia.mce',
        '/com/nokia/mce/request',
        'com.nokia.mce.request')
orientation , stand , face , x , y , z = accel.get_device_orientation()

This is where I hit a wall, because I know nothing of what to put into the command line (or even if I need to use dbus-send, or dbus-monitor, or some other command), or what options to use, etc. So, while this is off topic, any chance you could help out?

retsaw 2010-10-24 19:58

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
What is the benefit to dynamically changing the OC profile?

Surely if one profile gives improved battery life over another why not just keep it on that one. I do see what you are doing with the switching to the starving profile when the battery gets low, but that won't work for me since my n900 reboots after about a minute on the starving profile. I normally run the ideal profile with limits 500 and 850, I don't really see where your script would save my battery since I can't safely switch to the starving profile. Since this script certainly won't provide stable operation on all phones (there is a reason the default profile is what it is), I wouldn't go recommending this to those who would normally be afraid to OC their n900.

Mentalist Traceur 2010-10-24 20:19

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
Note that me thanking retsaw (or anyone else) doesn't necessarily mean that I agree with them - just that I find the post informative or think it brings up a good question/point.

On another note, isn't there an application in the repos that basically works like cron-jobs? Allowing you to make this script run occasionally without the need for a QBW?

Couldn't we somehow adapt this to work with not just battery level but also with current being drawn and processor demand? Or would that require the script to run too often?

Also, one thing I wanted to say, for public notice: Advanced Power, BME, and the bq27x00_battery module do not play well together (It's something about that combination as a whole, since I haven't seen anyone report it when just using BME and bq27x00, though it's possible everyone just doesn't notice). So when you have bq27x00 enabled to fetch temperature, it will make the values BME reports for battery be lower than they actually are.

Best way to test this is install conky, and in the conky.conf file, stick in one line to fetch the BME reported battery left percentage, and one to fetch the bq27x00 reported battery left percentage. Save the conf file, launch conky, and compare. If they don't report the same thing, problem.

- Edit -

I'm stupid - best way to test the above is to just run the two queries in command-line - less effort is needed. The two I use are:

hal-device bme |grep "percentage" |awk '{print $3}' <-- to get BME's battery percentage, and:
cat /sys/class/power_supply/bq27200-0/capacity <-- to get the bq27x00_battery's battery percentage.

RenaldoTT 2010-10-25 00:36

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
Yea, I noticed bakuurs plan from day one, if people don't actively show an interest that's them, let them do things the hard way, I read the hard way, I understand it but in life if you get an easier way to achieve the same task take it. So I'm going to test this now... creating QueenBeeCon Widget as we speak

K I made the widget, clicked it, limits are now set to 125 600, interval to run script
every 1hr.

is the limit at 8bars supposed to be 125 600 because this is what I'm getting here when I run oc-script and view my current freq settings
Lets see what happens now

Mentalist Traceur 2010-10-25 01:46

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
I'd still like people to report the differences, if any, that you notice between

hal-device bme | grep "percentage" | awk '{print $3}'
and
cat /sys/class/power_supply/bq27200-0/capacity

Meanwhile [sarcasm]thanks so much to everyone who read my request for dbus help and actually knew dbus enough to knows how to do what I asked.[/sarcasm]. I get that most people don't know dbus that well, and some might not have had time or had something impostant to do instead - but if you knew how to help and didn't bother, middle finger to you.

For anyone who cares, I figured it out, I would like to say that the script on the first page actually helped, so an indirect sincere thanks for that. So to all those who'd like to know how to use the command line to get accelerometer values and device orientation (as well as two other things) through DBus (which as far as I know is the only way to get device orientation directly):

dbus-send --system --print-reply --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.get_device_orientation

From there, I've figured out how to combine grep and awk to get just the device orientation returned (though it's not exactly right for what I want, but I can figure that out a lot easier).

- Edit -

To the OP (who's name eludes me and I can't see because the edit mode doesn't show you previous posts), I'll try this script, or some tweek of it, in the near future. I will definitely be implementing the "lower-clock if temperature is critical" thing eventually - at least if I have what appears to be overheating problems.

RenaldoTT 2010-10-25 03:38

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
Well right now I'm not sure if the script is working. First time I made the widget and checked my freq it was set to 125 600 I removed the widget and set my freq back to normal using the "easy overclock" script and replaced the SmartClocker Widget and now my freq is set at 250 600. It's running now and updating every hour so lets see what happens, battery doesn't seem to have improved for me though.

Ok I went into "Advanced" and paste the script, saved and ran it, limits now set to 500 900 ideal profile

bakuur 2010-10-25 04:09

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
Quote:

Originally Posted by retsaw (Post 849806)
What is the benefit to dynamically changing the OC profile?

Surely if one profile gives improved battery life over another why not just keep it on that one. I do see what you are doing with the switching to the starving profile when the battery gets low, but that won't work for me since my n900 reboots after about a minute on the starving profile. I normally run the ideal profile with limits 500 and 850, I don't really see where your script would save my battery since I can't safely switch to the starving profile. Since this script certainly won't provide stable operation on all phones (there is a reason the default profile is what it is), I wouldn't go recommending this to those who would normally be afraid to OC their n900.

Yes since Your phone can't handle low voltages then isuggest laying off the script as why is it useful? Well friend the titLe says it all

bakuur 2010-10-25 04:12

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
Quote:

Originally Posted by RenaldoTT (Post 850026)
Well right now I'm not sure if the script is working. First time I made the widget and checked my freq it was set to 125 600 I removed the widget and set my freq back to normal using the "easy overclock" script and replaced the SmartClocker Widget and now my freq is set at 250 600. It's running now and updating every hour so lets see what happens, battery doesn't seem to have improved for me though.

Ok I went into "Advanced" and paste the script, saved and ran it, limits now set to 500 900 ideal profile

Ahh dear friend am currently outside my house as soon am home ill show you how to create the widget

THanks a lot for your support

bakuur 2010-10-25 04:15

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
Quote:

Originally Posted by Mentalist Traceur (Post 849972)
I'd still like people to report the differences, if any, that you notice between

hal-device bme | grep "percentage" | awk '{print $3}'
and
cat /sys/class/power_supply/bq27200-0/capacity

Meanwhile [sarcasm]thanks so much to everyone who read my request for dbus help and actually knew dbus enough to knows how to do what I asked.[/sarcasm]. I get that most people don't know dbus that well, and some might not have had time or had something impostant to do instead - but if you knew how to help and didn't bother, middle finger to you.

For anyone who cares, I figured it out, I would like to say that the script on the first page actually helped, so an indirect sincere thanks for that. So to all those who'd like to know how to use the command line to get accelerometer values and device orientation (as well as two other things) through DBus (which as far as I know is the only way to get device orientation directly):

dbus-send --system --print-reply --desk=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.get_device_orientation

From there, I've figured out how to combine grep and awk to get just the device orientation returned (though it's not exactly right for what I want, but I can figure that out a lot easier).

- Edit -

To the OP (who's name eludes me and I can't see because the edit mode doesn't show you previous posts), I'll try this script, or some tweek of it, in the near future. I will definitely be implementing the "lower-clock if temperature is critical" thing eventually - at least if I have what appears to be overheating problems.

yes my friend i found a diffrence between the two battery levels
can you futher explain why is that?
And I'm glad you found the dbus commaNd you were looking fOr

EDIT:sorry for the miss types in the post i was using a black berry and god it!!! :@

smartypants 2010-10-25 05:22

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
i can haz userfriendly?

dchky 2010-10-25 05:22

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
Quote:

Originally Posted by Mentalist Traceur (Post 849972)
Meanwhile [sarcasm]thanks so much to everyone who read my request for dbus help and actually knew dbus enough to knows how to do what I asked.[/sarcasm]. I get that most people don't know dbus that well, and some might not have had time or had something impostant to do instead - but if you knew how to help and didn't bother, middle finger to you.

Thankyou kindly for the middle finger. It is much appreciated.

When the information is already out there and has already been posted several times, it gets somewhat tiring to do the silver spoon feeding thing.

Since power saving is the order of the day, it would be imperceptibly and almost unmeasurably more efficient to get rid of all the if/then business and replace it with a case (Switch) - it is also far more elegant to look at.

Code:

case expression in
    pattern1 )
        statements ;;
    pattern2 )
        statements ;;
    ...
esac


Mentalist Traceur 2010-10-25 06:50

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
@dchky: Except the information isn't there. I can understand that if I was asking something like "how do I make this script executable", or "how do I replace system icons" or god forbid, something that is reasonably well documented yet is buried among threads that aren't exactly easy to find with a search engine, like "how do I partition my SD card" - then you could go and say it's a silver spoon feeding thing.

But when I'm asking about a very specific DBus command, I shouldn't have to literally write out all the pages I visited, both at x.org (which has some general dbus documentation/tutorials) and in the developer documentation at maemo.org, for the reader to think 'gee, maybe this isn't blatantly obvious from what is out there'.

I didn't just go on here and ask something so *****ically obvious that it can be answered with "cd [filepath], and then try to run your script from there - oh, and you need to edit your .profile to permanently add your code to path". It's one thing to say explaining how to properly use something like cp or chmod is silver spoon feeding.

Did me quoting a snippet of python code (from the maemo.org wiki no less, but admittedly that's not necessarily too obvious) not indicate that I had looked around the place? Did the fact (if you saw me asking this in a few other threads) that I had been asking this for a few days now, with references to digging around the documentation, not indicate that maybe I was actually trying to find this on my own? Did I slip up somewhere on my grammar or capitalization or other basic articulation skills, so as to make myself look like the more typical ignorant-and-not-trying-to-fix-it individuals that come on these forums?

Honestly, by all means, if you can find where either that script has been posted, or non-fragmented, actually reasonably-easy-to-understand-without-prior-coding-knowledge documentation exists, then please, by all means - point it out to me. And then, please, do share what arcane combination of search terms you entered to find it.

Here's my issue, and why I feel the middle finger is deserved for the small subcategory of people who it's aimed at: No one even did that. Yes the code is only like 50 characters long, but hell, I would have been happy if someone had just said ">Link< Go read." In fact, I would have preferred that. Then maybe I wouldn't have had to spend like 8 hours of my day on slightly editing the same command and going from guess to guess on how exactly to combine the elements "com.nokia.mce" "/com/nokia/mce/request" and "get_device_orientation". And then by now I would have probably posted a nice portrait-mode capable config file to the Beautify Conky thread so that people could benefit from that that much earlier.

But no, apparently it's supposed to be obvious to the not-computer-programming-versed individual that unrelated-to-accelerometer documented dbus scripts can be almost exactly-identically translated to this one. Not to mention the fact that until I read through a mass of general DBus documentation, I didn't even think "com.nokia.mce /com/nokia/mce/request com.nokia.mce.request" made sense as a block of text in a command. I mean, yeah, I now know why that's the way it is - I can't pull up the technical explanation in words from memory, but I have a general understanding of. But was that explanation easy to find or repeatedly stated on this forum? No. Though at least it was easier to find for me than than the worst of this command.

Then there's a page - I'll even link you to it so you can see I actually dug around ( http://maemo.org/api_refs/5.0/5.0-fi...928a6ae2fc0c9e ) that simply says, with little explanation:

#define MCE_DEVICE_ORIENTATION_GET get_device_orientation
Query the device orientation information.

I get that it's a reference page - it shouldn't have explanations in it. And that's fine. But somewhere those explanations should exist. I spent like an hour (if not more if you count all the pauses to look through or search for more scripts/examples/documentation) trying variants of:

dbus-send [--system] [--print-reply] --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request [#define] [MCE_DEVICE_ORIENTATION_GET] [.][accel.][get_device_orientation]

The stuff in brackets being the stuff I took in/out (not blind try-every-possible combination, mind - there were educated guesses, and the [.] came in only once, when I did com.nokia.mce.request.accel.get_device_orientation ). And yeah it looks ridiculous now, especially the accel. thing because I eventually figured out that "accel." was the python variable (at least that's what I think it is) substituting pretty much the entire dbus addressing stuff before it. So sorry, but no where is it explained that #define MCE_DEVICE_ORIENTATION_GET get_device_orientation translates to stick .get_device_orientation at the end of com.nokia.mce.request. And I know for a fact that not a one of the pages (including all those code examples, most of which aren't even shell compatible, but are written in something else) that I looked through actually says that "com.nokia.mce.request.get_device_orientation is the proper dbus method_call or whatever it's called for fetching device orientation. Indeed, no where in the accelerometer documentation is anything stated about how to fetch device state - except for the aforementioned python code snippet (though that will be changed at the latest tomorrow, when I'm going to edit in the dbus command that I figured out today into the wiki, if no one else does it by then).

Did I figure it out eventually? Yeah. But it's not written anywhere that I could find, it's not easy to understand from what's available, and if anything, telling me the line of code in question would not be feeding me from a silver spoon. At the worst it would be doing a step of the cooking for me - though I would liken it to simply explaining how to make the meal in question, as opposed to expecting me to figure out how (from ingredients I have to scavenger hunt for, no less).

And note that I did not ask for help figuring out how to make grep filter a line that has either x or y or z. I figured that out on my own, after browsing on my own some similarly less than intuitive documentation on grep options. Same with certain things regarding awk that I wasn't clear on. I get that this forum gets a lot of annoying posts. I get that way too few people bother even trying to learn something on their own. But no matter how frustrating that gets, that doesn't mean that every question that is self-apparent to you is oh-so-well documented that everyone can be expected to figure it out. And it doesn't mean that you get to place people indiscriminately in the same category unless a person expressly takes the time to craft their post so as to show off all the research/work/searching they did.

bakuur 2010-10-25 07:14

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
Quote:

Originally Posted by RenaldoTT (Post 849953)
Yea, I noticed bakuurs plan from day one, if people don't actively show an interest that's them, let them do things the hard way, I read the hard way, I understand it but in life if you get an easier way to achieve the same task take it. So I'm going to test this now... creating QueenBeeCon Widget as we speak

K I made the widget, clicked it, limits are now set to 125 600, interval to run script
every 1hr.

is the limit at 8bars supposed to be 125 600 because this is what I'm getting here when I run oc-script and view my current freq settings
Lets see what happens now

the code you will be needing to enter in the QBW is as follow
Code:

sudo gainroot | sh /home/user/MyDocs
once you run it you should be getting a notification that limits were reset ;)

dchky 2010-10-25 11:04

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
TMO looks like it was down for a while....

The reason I was fairly abrasive in my response was not just the finger thing, but because dbus notifications are already well explained

That was all.

dchky 2010-10-25 11:13

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
The reason I was fairly abrasive in my response was not just the finger thing, but because dbus notifications are already well explained

That was all.

retsaw 2010-10-25 18:03

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
Quote:

Originally Posted by bakuur (Post 850043)
Yes since Your phone can't handle low voltages then isuggest laying off the script as why is it useful? Well friend the titLe says it all

My point in saying that it won't work for my phone, is that mine won't be the only one, and whilst it is fine for people who know what they are doing with overclocking, it is not responsible to recommend it to people who don't know what they are doing at least not without providing a clear warning.

And with respect, the title doesn't say it all. It may surprise you, but I can actually read the title, if I thought it said it all I wouldn't have posed my question; I can also read your script and understand what it is doing. All the title does is state the intent of your script, what I don't understand is how your script is better than just keeping a sensible low voltage profile to save battery, and if you wish you could set a QueenBeacon widget to temporarily change to a high performance profile if you need better performance for some reason. In other words, why change the profile in response to changing battery levels rather than keeping an optimally energy efficient profile all the time?

Don't get me wrong, I'm not trying to knock your efforts, I just don't understand the benefit of this. And I hope I don't come across as too negative, I'm following what you are doing here because I'm interested in it.

bakuur 2010-10-25 20:28

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
Quote:

Originally Posted by retsaw (Post 850557)
My point in saying that it won't work for my phone, is that mine won't be the only one, and whilst it is fine for people who know what they are doing with overclocking, it is not responsible to recommend it to people who don't know what they are doing at least not without providing a clear warning.

And with respect, the title doesn't say it all. It may surprise you, but I can actually read the title, if I thought it said it all I wouldn't have posed my question; I can also read your script and understand what it is doing. All the title does is state the intent of your script, what I don't understand is how your script is better than just keeping a sensible low voltage profile to save battery, and if you wish you could set a QueenBeacon widget to temporarily change to a high performance profile if you need better performance for some reason. In other words, why change the profile in response to changing battery levels rather than keeping an optimally energy efficient profile all the time?

Don't get me wrong, I'm not trying to knock your efforts, I just don't understand the benefit of this. And I hope I don't come across as too negative, I'm following what you are doing here because I'm interested in it.

i really undersatnd what you're saying , i admit being being careless with me end work but its just because i have limited time to work on this and instead the discourgment by some i would really appreciate a hand lended for help
ideas from here and there would make this script amazing
i know it can as it has a great base to work from
furthur more the reason why i got careless at the end part is because its my final year at school and as most of us know its not easy!
this isnt for lets say "new" users of the N900 and i would soon make it more user friendly
maybe make a .deb file is someone would take the efford to guide me
so dear friend i was told once linux is all about sharing
so if you have any idea or suggestion please dont hesitate to mention it
and the "whats the use? question" try laying away from it
no one likes to hear that

thanks alot,
bakuur

Benson 2010-10-25 21:45

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
Okay, since you don't like polite "what's the use" questions, I guess I'd better stick to the answer instead: There is no use to change the profile, ever. Sorry if this seems harsh, but that fact was already raised politely, and you dismissed it.

When the profile is set correctly for your device, it will run without crashing at any speed. Want to limit power consumption near the end of battery life? limit the speed. If you drop to a lower profile, it will crash. If it doesn't crash, then you should have tuned your original profile tighter.

It's really that simple.

RenaldoTT 2010-10-25 21:49

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
Bakuur, my limits are now set to 125 600 as default, I did't do this though.

A bug perhaps?

stevomanu 2010-10-26 12:46

Re: [ANNOUNCED] SmartClocker - save up battery and stop worrying about OCing!
 
After runnin this script i end up gettin this

Code:

shell (ash)
Enter 'help' for a list of built-in commands.

/home/user # sudo gainroot | sh /home/user/MyDocs/smartclocker
/home/user/MyDocs/smartclocker: line 1: #!/bin/bash: not found
cat: can't open '/sys/class/power_supply/bq27200-0/temp': No such file or directory

sh: 45: unknown operand
4
This kernel version 2.6.28-omap1 is not supported
Please make sure that kernel-power is installed and running.
If you have just installed the kernel, you need to shutdown and boot to activate it.
To reinstall the power user kernel run:
'apt-get install --reinstall kernel-power kernel-power-flasher'
This kernel version 2.6.28-omap1 is not supported
Please make sure that kernel-power is installed and running.
If you have just installed the kernel, you need to shutdown and boot to activate it.
To reinstall the power user kernel run:
'apt-get install --reinstall kernel-power kernel-power-flasher'
Failed to open connection to "session" message bus: (null)
/home/user #

have tryed reinstallin , then rebooting 3 times an still same thing any idea


All times are GMT. The time now is 11:41.

vBulletin® Version 3.8.8