Active Topics

 



Notices


Reply
Thread Tools
Posts: 80 | Thanked: 95 times | Joined on Aug 2010
#1
Hi i followed this guide to overclock my N900:and i've got my N900 doing this:
Underclock/Overclock when phone is Locked/Unlocked (by Fecn)
So i did the script:
Code:
#!/bin/sh
 
idlefreq=`awk '{if ($2 > 0) print $1}' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state | tail -n 1`
tis1=`awk '{sum += $2} END {print sum}' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state`
tis2=`awk '$1 == "'"$idlefreq"'" {idle = $2} {sum += $2} END {print sum-idle}' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state`
 
echo -e "
TIME_IN_STATE ANALYSING SCRIPT
By rooted (maemo.org)
Revision 7
wiki.maemo.org/Overclocking
 
 
FREQUENCY\tUSED\t\tWHEN BUSY\n"
awk '
{if ($1 >= 1000000)                 printf ("%.0f MHz\t",$1/1000); else printf ("%.0f MHz\t\t",$1/1000)}
{if ($2 == 0)                       printf "unused";               else printf ("%.1f %\t\t",($2*100)/"'"$tis1"'")}
{if ($2 == 0 || $2/"'"$tis2"'" > 1) printf "\n";                   else printf ("%.1f %\n",($2*100)/"'"$tis2"'")}
' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
 
echo -e "
Kernel:                  `uname -r`
kernel-power:            `dpkg -l kernel-power | awk '$2 == "kernel-power" {print $3}'`
kernel-power-settings:   `dpkg -l kernel-power-settings | awk '$2 == "kernel-power-settings" {print $3}'`
Uptime:                  `uptime | sed -e 's/.*p *//' -e 's/, l.*//' -e 's/  / /'`
Load:                    `uptime | sed 's/.*e: //'`
Boot reason:             `cat /proc/bootreason`
Temperature:             `cat /sys/class/power_supply/bq27200-0/temp` degrees C\n"
i named this script: overclock-stats
Anyways what i wanna ask you guys is this:
Can i my the script name a terminal command for maemo?
Like this:
I open x-terminal and write: overclock-stats and i get the output instead of doing:
Code:
./home/user/MyDocs/overclock-stats
Can it be made?
I see that stkeys uses this method but i don't know how to manage it!!
Can anyone help me please?
Use chmod?
 
Posts: 268 | Thanked: 1,052 times | Joined on May 2010 @ The Netherlands
#2
Open terminal:
Nokia-N900:~$ root
Nokia-N900:~# cp /home/user/MyDocs/overclock-stats /usr/bin/overclock-stats
Nokia-N900:~# chmod +x /usr/bin/overclock-stats

First command is obvious, second command copies the script to the directory made for non-essential executables, third command makes it executable
 
Posts: 80 | Thanked: 95 times | Joined on Aug 2010
#3
Originally Posted by iDont View Post
Open terminal:
Nokia-N900:~$ root
Nokia-N900:~# cp /home/user/MyDocs/overclock-stats /usr/bin/overclock-stats
Nokia-N900:~# chmod +x /usr/bin/overclock-stats

First command is obvious, second command copies the script to the directory made for non-essential executables, third command makes it executable
Extracted stkeys.deb and i've seen that the script was in /usr/bin/
Thanks a lot mate
 
Posts: 174 | Thanked: 187 times | Joined on Apr 2013 @ Poland
#4
Hey, I got my own personal question, to do some adjusting to my one particular n900 unit, is there any way to adjust script from wiki page - overclock, I mean this one:

Code:
Filename: /usr/local/bin/overclock
#!/bin/sh
TEMP=`cat /sys/class/power_supply/bq27200-0/temp`
echo "Temp is:" $TEMP "C"
MAXSPEED="1150"
if [ $TEMP -gt "38" ] ; then MAXSPEED="1000" ; fi
if [ $TEMP -gt "40" ] ; then MAXSPEED="950" ; fi
if [ $TEMP -gt "43" ] ; then MAXSPEED="850" ; fi
if [ $TEMP -gt "45" ] ; then MAXSPEED="750" ; fi
if [ $TEMP -gt "47" ] ; then MAXSPEED="600" ; fi

BATTERY=`cat /sys/class/power_supply/bq27200-0/capacity`
echo "Battery is:" $BATTERY "% full"
MAXSPEEDTWO="1150"
if [ $BATTERY -lt "60" ] ; then MAXSPEEDTWO="850" ; fi
if [ $BATTERY -lt "40" ] ; then MAXSPEEDTWO="600" ; fi
if [ $BATTERY -lt "25" ] ; then MAXSPEEDTWO="500" ; fi

if [ $MAXSPEEDTWO -lt $MAXSPEED ] ; then MAXSPEED=$MAXSPEEDTWO ; fi

echo "Setting max as:" $MAXSPEED "Mhz"

kernel-config limits 250 $MAXSPEED
To depend only on battery capacity but instead of kernel-config limits 500-720 load the particular overclock profile from ;kernel folder by kernel-config load max and also load one profile when the phone is locked?
 
Posts: 174 | Thanked: 187 times | Joined on Apr 2013 @ Poland
#5
Nobody?

I started something on my own, created two scripts each for over and underclock. underclock is easy and works. I will now try to run overclock script. I created something like this, will it work?

Code:
Filename: /usr/local/bin/overclock
#!/bin/sh
BATTERY=`cat /sys/class/power_supply/bq27200-0/capacity`
echo "Battery is:" $BATTERY "% full"
kernel-config load 1100
if [ $BATTERY -lt "90" ] ; then kernel-config load 1000 ; fi
if [ $BATTERY -lt "85" ] ; then kernel-config load 950 ; fi
if [ $BATTERY -lt "80" ] ; then kernel-config load 850 ; fi
if [ $BATTERY -lt "65" ] ; then kernel-config load 800 ; fi
if [ $BATTERY -lt "50" ] ; then kernel-config load 720 ; fi
if [ $BATTERY -lt "35" ] ; then kernel-config load 600 ; fi
if [ $BATTERY -lt "25" ] ; then kernel-config load 500 ; fi
if [ $BATTERY -lt "15" ] ; then kernel-config load 250 ; fi
And if so, is there a way to make scripts activates the offline mode if say baterry reach 10%?
 
Posts: 174 | Thanked: 187 times | Joined on Apr 2013 @ Poland
#6
And it doesnt seem to work, any help?

ok, I adjusted the original script to meet my needs, all works great

Last edited by Ridd92; 2018-05-13 at 15:39.
 
Reply

Thread Tools

 
Forum Jump


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