[Q] Unexpected values in adj for lowmemorykiller param? - Moto G Q&A, Help & Troubleshooting

On my Moto G 4G (XT1039) I was poking around with the minfree settings and reading about it I found out there was a paired file it uses to determine the adj levels for each of the min settings.
So I got curious:
[email protected]:/ $ cat /sys/module/lowmemorykiller/parameters/adj
0,58,117,176,529,1000
[email protected]:/ $ cat /sys/module/lowmemorykiller/parameters/minfree
12288,15360,18432,21504,24576,30720
The adj parameters seems to be wrong. I believe the valid values for this will be 0 to 15 (it is actually -17 to 15 but the negative values are used for system/native/persistent processes -- you know things that shouldn't be killed).
Most info seemed to be suggesting adjusting minfree but never took a look into its twin/paired file adj.
I just feel it is a bit off from what I would have expected to be in that file. I think the stock settings for this is 0,1,2,7,14,15

Related

Discussion on User.conf/tweaking AOSP ROMs

I shared my user.conf a while back with the guys on the xROM thread. I got really positive feedback from them so I decided to share it in a few other threads. JAC is included a lot of my ideas in xROM 1.4 and is going to include more in 1.5 It has grown and become more popular so I decided to start a thread at the request of a few people who use my config.
I didn't think it deserved the space until now to make a thread so I never started one. I'm not trying to make this thread all about me. I've said more than once, I would love for someone to come up with a config that is better than mine because I will be the first one to use it. I just don't want to keep derailing other conversations in other threads anymore. And while I appreciate all of the emails that I get, I think a separate thread will be an easier place to discuss this and help people out.
So I will start by posting giving a general outline of how I came up with my settings. If you want to give me feedback, I appreciate it. Even if you have emailed me in the past or posted something on one of the threads I would appreciate a post in this thread. If only the people who have problems post here I won't know how many people it is helping or not.
That is only part of the thread though. If you have a configuration that you have seriously tested and you want other people to try it, post your method and how to set it up and let's see what we can come up with. Please don't just post random configs hoping someone else will test them for you. I don't want the thread to turn into a confusing mess that doesn't help anyone. My goal is to have this thread spawn some new ideas that will make everyone's phone faster. If you've done your homework and you think you have something good, let's share it. I never thought that my config would be used by so many people. I was just trying to make my phone faster. Maybe you can do better.
Testing Method:
I generally use two apps to benchmark the performance of my phone. They are Benchmark Pi and Benchmark. Both are available on the market. I use Benchmark Pi for a rough comparison because it is faster and focuses mostly on how fast the CPU is running. When I get down to fine tuning I use Benchmark. It takes longer to run but it measure graphics, CPU, memory, and filesystem performance. For Benchmark Pi I usually will run it 10 times and use the average response. With Benchmark I set it to run each bench 5 times each and it automatically averages the values. Then I export that to a csv file and compare them that way.
I think I am a pretty heavy user of my phone so I took what I normally use and added a little bit to it. Here is what I used:
- All testing was done on xROM
- Over 120 apps installed
- 5 home screens
- 18 widgest and 8 shortcuts to apps (I can post specifics if anyone cares)
- I run the phone until it is definitely swapping. I play music, open large web pages, run CPU intesive apps, etc.
- ask me if you want more details
I use Advanced Task Manager, which I highly recommend, to keep an eye on what is running and kill any apps that are not being used by me or my desktop. I try to simulate heavy usage of my phone with only the things running that should be. I also use cat /proc/swaps, free, and sh /system/bin/swap -s (sh /system/sd/userinit.sh -s for othe ROMs).
I started out comparing Compcache and Linux Swap since those are the biggest choices. Compcache came out slightly better with the recommended configs that I could find at the time. Then I benchmarked and tested each of the Compcache settings. I found huge improvements made from tuning Compcache, especially adding backing swap. I know it got a bad rap in earlier builds because, well, it probably wasn't very good. But 0.6 is good and it has a bright future. Read this article http://lwn.net/Articles/334649/
Then I tuned swapiness, CPU, and tried on VM. It was mostly just painstaking, tedious testing of one setting to the next. I can honestly say that I have tuned every setting in the User.conf. If I change any of them the benchmarks go down. So when people tell me they tweaked this or that I don't want to say anything because I have probably tested that exact scenario and I got worse performance. But maybe it is working for them, I haven't seen any benchmark numbers. I tried on the VM but nothing seemed to help very much and I didn't want to cause problems so I stuck with the default settings there. Maybe someone can come up with better settings for the VM if that is their area of expertise.
Results:
I'm not going to post some grand report like I would at work. I'm not getting paid for this. Plus not very many people would look at it and I don't know how much it would mean in the long run.
The easiest comparision I can make is using Benchmark Pi. The average of all of the users who have ever tested using that app is around 15 seconds to calculate pi. Stock G1's will calcluate it in about 16 or 17 seconds depending on how loaded they are. xROM stock was getting a result of about 13.5 seconds with just scaling the CPU up to 528 MHz. After tweaking all of the other settings I got down to sub 12 seconds. My best time is about 11.6 seconds. I saw someone with 11.5 who used xROM 1.4. When I loaded CM 4.0.4 last night I was getting just under 13 seconds with my best times. Still a very good time considering everything that I have running.
I did a lot of other testing with Benchmark to monitor the filesystem and memory. I monitored /proc/swaps to see how much memory Compcache was using and how much was being swapped.
I learned a lot about the phone doing all of this. For instance, when you set the CPU max threshold really low, it is going to keep bumping up the CPU really fast until you get to the max. So you have a pretty good delay until you get to the max CPU frequency because the fequency keeps changing and pauses when that happnes. But then it is good until it drops again. If you make it too high, it will overwork the processor and you will see delays again. The key is to find the best setting that allows the processor to be exercised but not overworked. I don't have the time to write down everything I learned from it and you probably don't want to read it. But if you ask a specific question I will be happy to answer it.
I'd like to thank Huanyu for his thread (http://forum.xda-developers.com/showthread.php?t=542899). I wouldn't have been able to tune any of this without it and for JAC and Manup for helping me so much with xROM.
I hope this thread is helpful. Let me know what you think of my work and post your ideas too.
I have links to installing my User.conf in my signature. This post is long enough without putting that in here too. And this is more about discussion than pushing my settins on people. I don't know if mhy config will work at all with Hero. I haven't done much testing on it. I plan to do the same project for Hero when I have time. JAC has volunteered to help me out with that. If anyone wants to try it, go for it. But I don't want to confuse this thread too much by discussing Hero and the AOSP ROMs. Maybe I will start another thread for just Hero.
I look forward to seeing where this thread goes.
Ok, I decided to add more now that I have some extra time. I'm working to get backing swap working with a swap file instead of using a swap partition. A lot of people don't have or want a third partition on their phone and backing swap helps out a lot. Compcache 0.6 supports this but it wouldn't work on the G1 (or any ARM processor). I opened an issue with the compcache development team. They gave me a fix which allowed me to enable it but it ended up trashing my ext3 partition. I had to wipe my phone because the data became so corrupted. The issue is still open and the compcache developer is working on resolving it. When it is resovled, I will post an updated user.conf file that uses swap file instead of swap partition.
Many thanks for your test.
Just one question, why you don't turn the linux swap on in Cyanogen's ROM?
I found you turn on the compcache and backingswap in user.conf.
Is it better than compcache with linux-swap?
min scaling frequency 192000?
I applied the settings from your user.conf in the Cyan thread you linked to except the min scaling frequency because it seems to be set to a non-existent step (192000). Is that a typo or...? Is that user.conf the latest one you tested with CM 4.0.4?
Thanks for doing all this testing and sharing your settings!
fengwuyu said:
Many thanks for your test.
Just one question, why you don't turn the linux swap on in Cyanogen's ROM?
I found you turn on the compcache and backingswap in user.conf.
Is it better than compcache with linux-swap?
Click to expand...
Click to collapse
Compcache with backing swap uses the linux swap partition but it lets compcache manage both the compressed and non compressed storage. When a file can't or shouldn't be compressed it doesn't have to pass it back to the OS to deal with. It just moves it directly to swap. That is why it shows 100% good compression with backing swap turned on. All of my testing has shown that compcache + linux swap is much slower and more cpu intensive thand compcache + backing swap.
my experiences are non-scientific and completely anecdotal, but I like the way my phone behaves w/ a 92 meg linux swap partition enabled w/o compcache. I'm giving up a bit of responsiveness across the board (once it starts swapping) for more virtual memory. Since I have a class 6 card, the lag is bearable (i can't imagine it would be on a slower one).
I like to have my browser still be in memory after loading terminal, gmail, or a couple of other apps. but that's just me & how i use my phone. it's not a perfect config by any means, but it works best for me
ei8htohms said:
I applied the settings from your user.conf in the Cyan thread you linked to except the min scaling frequency because it seems to be set to a non-existent step (192000). Is that a typo or...? Is that user.conf the latest one you tested with CM 4.0.4?
Thanks for doing all this testing and sharing your settings!
Click to expand...
Click to collapse
It's not a typo. Some of the overclocking apps use it as an option. I've used it for a long time and so have other peole. If you want to change it, that is fine. I used 245760 for a while because of some apps I was running. The CPU frequency is one area that you can play with to meet your needs without changing much. I wouldn't suggest going below 192. You can try it but it makes the phone slow to wake up for some people.
alapapa said:
my experiences are non-scientific and completely anecdotal, but I like the way my phone behaves w/ a 92 meg linux swap partition enabled w/o compcache. I'm giving up a bit of responsiveness across the board (once it starts swapping) for more virtual memory. Since I have a class 6 card, the lag is bearable (i can't imagine it would be on a slower one).
I like to have my browser still be in memory after loading terminal, gmail, or a couple of other apps. but that's just me & how i use my phone. it's not a perfect config by any means, but it works best for me
Click to expand...
Click to collapse
That is a pretty good configuration. You will probably see better performance at a slightly higher swapiness with 92MB of swap. I think around 40 is a good setting.
You are right with a Class 6 card the performance is not that bad. You won't see a lot of lag until the file grows to the point that the OS needs to clean it up to make room for more memory. Then it will slow down. If you reboot every day it's not as much of an issue.
I've tried to come up with a configuration that works well for everyone. I helped a guy with a Class 2, 1GB card last night. He thought that my config was slowing him down on CM 4.0.4. We reparititoned and gave him a smaller ext (256 MB) to free up more memory on his FAT32 partition. I have a lot on my phone and my dalvik-cache is on my ext partition and I am using about 215MB so he should be fine with that setting. He got all of his apps installed and setup everything. Then he tested his it out with the stock settings. After he had an idea of how it was running he switched to mine and saw a noticable improvement. Using Benchmark Pi he had the same score I had with a Class 6 8GB card running on CM 4.0.4 the other day. Now my card will beat him out in other tests. Anything that requires swapping to the linux swap partition or a lot of I/O on the SD card will be better on my phone. But because he was using Compcache his performance was still pretty good.
Also, if you enable backing swap your browser should still be in memory after loading other apps. One of the biggest things people notice is that after they have been using the browser or something else that takes a lot of memory and they hit the home button they don't have to wait for it to reload. It's just there waiting for them.
Yes, he speaks the truth. After updating to a recent Cyanogen ROM, my phone just got super clunky and annoying to use, so I set out to do a completely fresh install: resizing, reformatting, wiping, fresh ROM flash, and fresh app dls. I thought since I was stuck using the stock 1GB SD card (for now at least) that is inherently Class 2, it was causing me a major bottleneck since CC and BackingSwap both employ fair usage of your SD card. Well after updating to Cyanogen's 4.1.2.1 and installing all my apps, Benchmark Pi clocked in at about 15.5ms - 16.5ms using Cyano's stock CC settings built into his ROM. Next I pushed Taylor00's user.conf with the 0.1.4.1 userinit.sh. After rebooting, my phone clocked in at 12.6ms - 13.2ms on Benchmark Pi, a definite improvement.
-Maleko48
miketaylor00 said:
That is a pretty good configuration. You will probably see better performance at a slightly higher swapiness with 92MB of swap. I think around 40 is a good setting.
You are right with a Class 6 card the performance is not that bad. You won't see a lot of lag until the file grows to the point that the OS needs to clean it up to make room for more memory. Then it will slow down. If you reboot every day it's not as much of an issue.
I've tried to come up with a configuration that works well for everyone. I helped a guy with a Class 2, 1GB card last night. He thought that my config was slowing him down on CM 4.0.4. We reparititoned and gave him a smaller ext (256 MB) to free up more memory on his FAT32 partition. I have a lot on my phone and my dalvik-cache is on my ext partition and I am using about 215MB so he should be fine with that setting. He got all of his apps installed and setup everything. Then he tested his it out with the stock settings. After he had an idea of how it was running he switched to mine and saw a noticable improvement. Using Benchmark Pi he had the same score I had with a Class 6 8GB card running on CM 4.0.4 the other day. Now my card will beat him out in other tests. Anything that requires swapping to the linux swap partition or a lot of I/O on the SD card will be better on my phone. But because he was using Compcache his performance was still pretty good.
Also, if you enable backing swap your browser should still be in memory after loading other apps. One of the biggest things people notice is that after they have been using the browser or something else that takes a lot of memory and they hit the home button they don't have to wait for it to reload. It's just there waiting for them.
Click to expand...
Click to collapse
if i notice it being laggy, i just swapoff & swapon and it's like i'm fresh off a reboot.
what would be epic is if someone ported anacron / atd to android -- i could set it to do this at 4am.
alapapa said:
if i notice it being laggy, i just swapoff & swapon and it's like i'm fresh off a reboot.
what would be epic is if someone ported anacron / atd to android -- i could set it to do this at 4am.
Click to expand...
Click to collapse
I believe that crontab is a part of busybox. You can use that.
I'm still not following
miketaylor00 said:
It's not a typo. Some of the overclocking apps use it as an option. I've used it for a long time and so have other peole. If you want to change it, that is fine. I used 245760 for a while because of some apps I was running. The CPU frequency is one area that you can play with to meet your needs without changing much. I wouldn't suggest going below 192. You can try it but it makes the phone slow to wake up for some people.
Click to expand...
Click to collapse
What I'm confused about is the significance of choosing 192000 as a scaling frequency at all. My understanding is that the CPU can only run at certain frequencies and 192000 is not one of them. If you set 192000 as your minimum scaling frequency, doesn't that have exactly the same effect as setting it for 245760? Since there are no frequencies available between 122880 and 245760, any setting (for minimum scaling frequency) between those would default to the higher frequency, in this case 245760. Am I missing something here?
The reason I thought it might be a typo is because there is a 19200 frrequency available, but from all reports anything near that low will just lock up the phone.
ei8htohms said:
I applied the settings from your user.conf in the Cyan thread you linked to except the min scaling frequency because it seems to be set to a non-existent step (192000). Is that a typo or...? Is that user.conf the latest one you tested with CM 4.0.4?
Thanks for doing all this testing and sharing your settings!
Click to expand...
Click to collapse
Here is a copy/paste of that section of the latest user.conf set with MT00's settings:
Code:
#cpu clock
proc_cpu{
proc_cpu_en=1 # enable(1) or disable(0) user cpu configurations
# freqency options
# 19200
# 122880
# 128000
# 245760
# 384000
# 528000
scaling_min_freq=192000 # default 245760
scaling_max_freq=528000 # default 528000
sampling_rate=2000000 # default 2000000 depending on kernel version
powersave_bias=0 # default 0, (200 since CM3.9.6+ )
up_threshold=45 # default 40, percent cpu usage before going up a speed step
While 192000 is not an option listed, here is the output of my userinit.sh:
Code:
C:\Documents and Settings\user>adb remount
remount succeeded
C:\Documents and Settings\user>adb shell
sh-3.2# sh /system/sd/userinit.sh -s
sh /system/sd/userinit.sh -s
=== user.conf ===
*** general ***
apps2sd=0
media2sd=0
*** CompCache ***
compcache_en=1
cc_memlimit=18
cc_disksize=32
cc_backingswap_en=1
cc_backingswap=/dev/block/mmcblk0p3
swappiness=28
*** Swap File ***
swap_file_en=0
linux_swap_file_size=32
linux_swap_file=/system/sd/swap.file
*** Linux Swap ***
linux_swap_en=0
linux_swap_partition=/dev/block/mmcblk0p3
*** VM ***
sys_vm_en=1
page_cluster=3
laptop_mode=0
dirty_expire_centisecs=3000
dirty_writeback_centisecs=500
dirty_background_ratio=5
dirty_ratio=10
*** CPU ***
proc_cpu_en=1
scaling_min_freq=192000
scaling_max_freq=528000
sampling_rate=2000000
powersave_bias=0
up_threshold=45
=== CompCache status ===
CompCache version 0.6+
Compcache enabled
CompCache: MemLimit 18432(system) 18432(user)
CompCache: BackingSwap /dev/block/mmcblk0p3(system) /dev/block/mmcblk0p3(user)
CompCache: cc_swappiness - 28(system) 28(user)
=== CompCache status output ===
BackingSwap: /dev/block/mmcblk0p3
DiskSize: 32130 kB
MemLimit: 18432 kB
NumReads: 8048
NumWrites: 10222
FailedReads: 0
FailedWrites: 0
InvalidIO: 0
NotifyFree: 3870
PagesDiscard: 0
ZeroPages: 177
GoodCompress: 100 %
NoCompress: 0 %
PagesStored: 4340
PagesUsed: 1060
OrigDataSize: 17360 kB
ComprDataSize: 4078 kB
MemUsedTotal: 4240 kB
BDevNumReads: 1233
BDevNumWrites: 1731
=== VM status ===
Set VM: page-cluster - 3(system) 3(user)
Set VM: laptop_mode - 0(system) 0(user)
Set VM: dirty_expire_centisecs - 3000(system) 3000(user)
Set VM: dirty_writeback_centisecs - 500(system) 500(user)
Set VM: dirty_background_ratio - 5(system) 5(user)
Set VM: dirty_ratio - 10(system) 10(user)
=== CPU status ===
Set CPU: scaling_min_freq - 192000(system) 192000(user)
Set CPU: scaling_max_freq - 528000(system) 528000(user)
Set CPU: sampling_rate - 2000000(system) 2000000(user)
Set CPU: powersave_bias - 0(system) 0(user)
Set CPU: up_threshold - 45(system) 45(user)
That setting seems to take.
You can set the frequncy to 1234 if you want to. I wouldn't recommend it but you can. I don't know why it isn't listed as an option. It should be. It is a valid setting.
miketaylor00 said:
You can set the frequncy to 1234 if you want to. I wouldn't recommend it but you can. I don't know why it isn't listed as an option. It should be. It is a valid setting.
Click to expand...
Click to collapse
You actually cant set the frequencies to any arbitrary number. There are a set of defined frequencies in the arch/arm/mach-msm/clock.c file. So you can't try to clock your CPU at let's say 523.12 or 99.8 mHz atm. Unless that frequency table is expanded to include every single frequency. Where's coolbho3000 he might be able to explain it better. lol
After the phone has rebooted you can use the following command to see if everything is running properly:
Code:
su
sh /system/sd/userinit.sh -s
Everything seems to work right for me on the install but after I reboot and enter this code. I get "sh: Can't open /system/sd/userinit.sh".
Does this mean it did not work?
bigragu said:
After the phone has rebooted you can use the following command to see if everything is running properly:
Code:
su
sh /system/sd/userinit.sh -s
Everything seems to work right for me on the install but after I reboot and enter this code. I get "sh: Can't open /system/sd/userinit.sh".
Does this mean it did not work?
Click to expand...
Click to collapse
Which ROM are you on? Different builds require the userinit in different places.
Have you done this?
Code:
su
cd /system/sd
chmod 755 userinit.sh
chmod 755 user.conf
reboot
overground said:
Which ROM are you on? Different builds require the userinit in different places.
Have you done this?
Code:
su
cd /system/sd
chmod 755 userinit.sh
chmod 755 user.conf
reboot
Click to expand...
Click to collapse
I'm on CyanogenMod v4.0.4. I clicked the link from this post which lead me to the code he had posted in another thread. I followed the instructions there. I don't believe the code was exactly what you have here. Will try. Thanks.
andonnguyen said:
You actually cant set the frequencies to any arbitrary number. There are a set of defined frequencies in the arch/arm/mach-msm/clock.c file. So you can't try to clock your CPU at let's say 523.12 or 99.8 mHz atm. Unless that frequency table is expanded to include every single frequency. Where's coolbho3000 he might be able to explain it better. lol
Click to expand...
Click to collapse
That is not true at all I just set mine to 192123. Are you telling me that is in the clock.c file?
Code:
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
192123
bigragu said:
After the phone has rebooted you can use the following command to see if everything is running properly:
Code:
su
sh /system/sd/userinit.sh -s
Everything seems to work right for me on the install but after I reboot and enter this code. I get "sh: Can't open /system/sd/userinit.sh".
Does this mean it did not work?
Click to expand...
Click to collapse
Most likely you don't have a userninit.sh. If you are on CM 4.x it doesn't come by default. Follow the steps in this thread:
http://forum.xda-developers.com/showthread.php?t=542899

[Q] Programs to check vsel value

are there any programs out there that shows the current frequency and its corresponding vsel? SetCPU only shows frequency and does not show vsel values
thank you
You can see it right in Milestone Overclock, or use adb shell or a terminal editor and put: cat /proc/overclock/max_vsel

[TWEAK]Improve Performance and battery by Saving Power Usage - app, update.zip added

Hey Guys,
I have found this tweak on the G1 forums posted by defconoi.
One Click APP for the following tweak by dympy - Download
Update.zip for the following tweak by pcz - Download
When echoing in the following sysctl settings they do not remain after reboot, so we can adb remount then create a sysctl.conf file on our pc's with these settings, then ./adb push sysctl.conf /etc/ then the kernel should apply the settings every reboot.
Open a Terminal and Execute these commands as root
Tweak virtual memory to conserve power when running on battery:
Code:
echo 0 > /proc/sys/vm/swappiness #can be ignored if you dont use swap
echo 0 > /proc/sys/vm/dirty_expire_centisecs #can be ignored if you dont use swap
echo 0 > /proc/sys/vm/dirty_writeback_centisecs #can be ignored if you dont use swap
echo 60 > /proc/sys/vm/dirty_background_ratio
echo 95 > /proc/sys/vm/dirty_ratio
Tweak virtual memory for running on Charger:
Code:
echo 0 > /proc/sys/vm/swappiness #can be ignored if you dont use swap
echo 3000 > /proc/sys/vm/dirty_expire_centisecs #can be ignored if you dont use swap
echo 500 > /proc/sys/vm/dirty_writeback_centisecs #can be ignored if you dont use swap
echo 10 > /proc/sys/vm/dirty_background_ratio
echo 40 > /proc/sys/vm/dirty_ratio
Detecting apps/services that hog the battery/cpu:
Also while on battery, you should stop all applications that don't really stay idle when you're not using them, if you want to find which apps arent really staying idle you can:
Code:
strace -p $(pidof yourapp) # for all your running applications
ps aux | awk '{print$10,$11}' | sort -n # will list all running softs sorted by used cpu time
By default when Linux runs out of memory it goes through the process list and starts killing off processes that it thinks are using too much memory. This sysctl makes Linux kill the runaway process that made the system run out of memory instead, which is usually what you want.(this will also reduce cpu time and increase battery usage).
Code:
sysctl -w vm.oom_kill_allocating_task=1
Credit: ccpp0
vfs_cache_pressure to 10 , gives more mem to cache fs dentry and inode to save cpu
At the default value of vfs_cache_pressure = 100 the kernel will attempt to reclaim dentries and inodes at a "fair" rate with respect to pagecache and swapcache reclaim. Decreasing vfs_cache_pressure causes the kernel to prefer to retain dentry and inode caches. Increasing vfs_cache_pressure beyond 100 causes the kernel to prefer to reclaim dentries and inodes.
Code:
sysctl -w vm.vfs_cache_pressure=10
I have not tested these yet, if you test them, please post on the thread, so others can benefit from the same
fact : i?m a newb and i do not know if what i'm about to say is possible / compatible with this trhead,
question: can you make a update.zip of this?
+1 on update.zip
Yes. An update.zip would be nice.
Hope some DEV can take a look in to this it looks very useful and a good thing to implement in Future roms
Will dis work on ma galaxy 5???
Sent from my Galaxy5 Cyanogen7 using XDA Premium App
I don't know how to create an update.zip from this.
But since it's all terminal codes, I can put them in an app with separate buttons for each of them. (if I'm right, the Runtime.exec("the line you want to execute"); Or something into that direction (it works for other adb shell commands))
If anyone's interested, let me know.
Dympy
yup if you can do it like one click that would be nice
Sure thing!
Just going to make my last exams today and then I will get started (but first I'll finish another little project I'm working on).
Dympy
dympy said:
Sure thing!
Just going to make my last exams today and then I will get started (but first I'll finish another little project I'm working on).
Dympy
Click to expand...
Click to collapse
gr8...all the best
School network was down, so the exam couldn't be done.
Anyhow, I assume you'll need Super User for this?
I'm making the app right now and will upload in about an hour or so.
Will report then.
Dympy
Howw nice man good luck with it i will be on to check it and Thanks
I'm having some errors building the code.
Never had them before..
Will google something and retry.
Dympy
Has anyone tried this manually?
as long as it works take your time
I can build again.
The name of the project was given trouble.
The app will be very basic but needs super user permission (prompted when started).
It consists of 4 buttons.
2 for when the phone is on battery and 2 for when the phone is on charger.
Both set of buttons consist of a version WITH swap enabled and one WITHOUT swap enabled.
But ron_gangte is right, has someone even mentioned if it worked?
Dympy
dympy said:
I can build again.
The name of the project was given trouble.
The app will be very basic but needs super user permission (prompted when started).
It consists of 4 buttons.
2 for when the phone is on battery and 2 for when the phone is on charger.
Both set of buttons consist of a version WITH swap enabled and one WITHOUT swap enabled.
But ron_gangte is right, has someone even mentioned if it worked?
Dympy
Click to expand...
Click to collapse
It is a part of my battery saver ROM
I used tweak virtual memory to conserve power when running on battery
Alright then, I'm going to add the final onclicks for the buttons, build and upload.
Give me half an hour MAX
Dympy
dympy said:
Alright then, I'm going to add the final onclicks for the buttons, build and upload.
Give me half an hour MAX
Dympy
Click to expand...
Click to collapse
take how much time you need...
thanks for doing this
Good work

[GUIDE] Comprehensive Guide To Overclocking The ATRIX 2

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
*If you find this Guide Thread helpful, feel free to hit the "thanks" button below!​
I know there are several posts that have been made regarding the overclocking method(s) for the ATRIX 2 both on this forum, as well as some others, however; many of these posts are somewhat old, and I am just providing a guide thread here on XDA since most of the original threads were still beta at the time. This being the case, I take no credit for the instructions I will outline below, but will credit those who deserve to be credited for their efforts they have made in getting these methods to work stably. I am simply compiling some information that users may find helpful in the overclocking process. This is specifically geared toward ATRIX 2 owners who want to have a working knowledge of overclocking and how to accomplish this. If I have missed anything, or if the information is either A) outdated, or B) there is another "newer" more approved method in achieving overclock WITHOUT init.d support, please let me know and I will update the OP...
*Make sure you have a backup in place before attempting any of the following steps, and PLEASE understand how to flash the FXZ file to return to stock if you run into any surprises -though, if you follow the instructions exactly, I would be surprised if you would find the need to do so...​
First & Foremost:​
*DISCLAIMER: I cannot be held responsible for any and all damage related to Hardware loss or data or Software, which the user might cause while overclocking there device. Additionally, I am taking the liberty to assume that anyone who attempts to Overclock their device understands the risks involved. Such risks include, but aren’t limited to: failure of hardware, voiding warranties, and data corruption. While many users enjoy overclocking their own devices, they should do so knowing such risks involved.​
*CPU overclocking is something that you should fully understand BEFORE attempting! Remember that the ultimate goal is speed with stability. Extreme clock speeds are merely academic exercises if the overclocked system can't run your device's operating system and/or applications reliably.
*Please note that the guide thread is based on a more generalized approach to give best results for the majority of users; just because someone's CPU processor runs at 1.25 GHz (or even higher) DOES NOT ENSURE that yours will!​
CPU Overclocking Overview:​
What Is "CPU"?
The term "CPU" is an abbreviation for Central Processor Unit. Essentially, the CPU is the brains of your device's system. It is the internal component which carries out the instructions of a program by performing the basic arithmetical, logical, and input/output operations of the system. Your Android's CPU is responsible for handling all instructions it receives from hardware components and applications running on your device. The CPU performs operations on data held in the computer memory -the RAM. The CPU relies on an "Operating system" (Android OS) for input and output of data, interaction with the user and for storing information.​
What Is CPU Overclocking?
If you think overclocking sounds like an ominous term, you may have the right idea. Basically overclocking means to run a microprocessor faster than the clock speed for which it has been tested and approved. Overclocking is a popular technique for getting a little performance boost from your system, without making any changes to the actual device's hardware. Because of the performance boost found in overclocking, it seems to be something desired by users who demand more from their device, such as heavy gamers, and may perhaps be even somewhat of a novelty for those that really don't need such performance increases. All CPUs have a fundamental clock rate, from which all of the other clock rates inside the CPU are derived. Various sections of the processor take this fundamental clock rate, which acts as a kind of standard timekeeper, and multiply it to get an internal clock speed for a particular section of the CPU. In conjunction with overclocking, the CPU core voltage (VSel or uVolt as it may be referred to) is sometimes raised above the default setting to stabilize an overclocked CPU.​
What Is "Clock Speed"?
Clock speed: Given in megahertz (MHz) or in gigahertz (GHz), the clock speed determines how many instructions per second the processor can execute. The higher the value, the more powerful the CPU. In overclocking your device's CPU, you must be somewhat familiar with it's hardware, and it is always a procedure conducted at your own risk. When overclocking there are some problems and issues you'll have to deal with, such as excessive heat, random reboots, and/or operating system freezes. Even though your device's CPU can be overclocked, it doesn't mean your RAM modules will stably support some of the higher CPU clock speeds that others have seen.​
What Are The Risks Involved?
Overclocking comes with many risks, such as overheating, random system rebooting, and system freezing, so you should become familiar with all the pros and cons before you attempt it. Additionally, overclocking isn't supported by some of the Android Operating System kernels (ICS/JB -at least not as of yet) which means overclocking your CPU may not work on all Android versions -and will obviously void your warranty and leave you with an inoperable CPU if you overclock too high and damage the CPU in the process. Overclocking may also decrease the lifespan of the CPU, cause failure in critical components and may even result in some data corruption, as well as an increase in unexplainable crashes and freezes, as previously mentioned.​
VSel & uVolt (Undervolting) Overview:​
What Is Undervolting?
Undervolting is the practice of modding an Android device to run at a lower voltage than the stock settings. The idea behind kernel undervolting is to reduce that stock voltage to the bare minimum required to run the phone at factory settings. The main battery saver is a low VSel1 (the lowest voltage at the lowest speed), because your phone runs at this speed most of the time. Underclocking VSel1 is not a good idea, because below the default 300 MHz it takes noticeably longer before your phone responds to an incoming call in standby mode. Reducing VSel1 too much makes your phone hang or reboot when it's idle, but you can reduce VSel1 within reason to increase standby time. If you cut VSel1 from 33 to 20 the processor uses 40% less power most of the time, which can make the difference between your phone lasting a full day or blacking out before you get a chance to plug it in. (There are more ways to stretch your battery without "dumbing" down your smartphone)
Lowering the intermediate voltage at medium speed (600 MHz by default) saves a bit of juice when you're playing with your phone a lot, because VSel2 is the typical setting when you're using your phone. If you use your phone as an mp3 player on a long trip you may notice the difference. Your phone rarely runs, or should rarely, at top speed. It spikes at VSel3 occasionally, but even with QueueTube streaming, Wi-Fi Ruler scanning, GPS Status looking for satellites, and Dolphin HD loading pages in the background my processor spent most of the time at 600 MHz instead of the default maximum (800 MHz) or my custom 1.25 GHz CPU frequency scaling.​
What are the "Pros" Regarding Undervolting?
The pros, as mentioned before, are increased battery life and cooler temperatures. It should be noted at this juncture that there is controversy regarding whether or not undervolting truly provides increased battery life; there are those that believe it makes no difference, and unfortunately much of the evidence is circumstantial or based on hearsay, since usage patterns, rogue apps, and any number of other factors can contribute to a perceived difference in battery drain or conservation. Undervolting can help battery life, up to a point, although once the voltage drops below a certain threshold, the battery life actually suffers due to errors caused by the baseband radio not getting enough power. Suffice it to say, it is possible to safely take it to mean that undervolting does in fact provide better battery life than stock settings.​
What Are The "Cons" Regarding Undervolting?
On the flip side, undervolting has its pitfalls. Undervolting a phone too much can cause serious errors to appear as the power-starved processor starts to error out. The radio from above is a perfect example, but there have also been numerous other errors that result from extreme undervolting. These errors can range from random reboots to the phone locking up when the WiFi is turned on, and quite often there is no indication that the undervolting is the cause. The very worst case scenario for undervolting your Android device is that you may in fact "soft brick" the phone; the lack of voltage during boot could conceivably corrupt the phone’s firmware, leaving the phone unusable.​
[GUIDE] Comprehensive Guide To Overclocking The ATRIX 2 (ICS 4.0.4 ONLY)
Modules :
Filesystem
ntfs.ko (read/write support)
cifs.ko (with extra attributes)​
Kernel hacking
symsearch.ko (Unexported symbol finder by Skrilax_CZ)​
CPU scaling governor (back ported from other dev)
cpufreq_interactiveX.ko [@] (interactiveX V2 governor by imoseyon)
early suspend support and hotplugging
cpufreq_hotplugX.ko [@] (hotplugX governor by imoseyon)
early suspend support and tweaks
cpufreq_smartass2.ko [@] (SmartassV2 governor by erasmux)
cpufreq_pegasusq.ko [@] (Samsung multi-core governor)
based on modification done by Gokhanmoral
cpufreq_boostedASSv2.ko [@] (a modified smartassv2 governor)
ported from BMc08GT​
CPU/GPU frequency control
cpu-control.ko [@] (Tweak CPU frequency & voltage to your like)
my 1st kernel module. based on milestone overclock & opptimizer.​
I/O scheduler
sio-iosched.ko (Simple IO scheduler by waninkoko)
based on Noop, Deadline and V(R) IO schedulers. In android world, simple is better​
modules with [@] mark requires symsearch.ko to operate
Disclaimer : I don't write all of these modules. Only make a few changes/tweak for it to work on our device. Enjoy!
Kernel version : 3.0.8
Kernel source : 67.42.17.XT910S.SKT.en.KR
Compiler setup : CodeSourcerey arm-2012.03-56-arm-none-eabi (-O2 optimization)
Build revision : Project Lense build​
Change logs:
0.1.1
- Add Simple I/O scheduler.
0.1.2
- Recompile with -O2 flag. I notice some instability when using -O3 flag
- Tweaked sio scheduler
- Add tweaked pegasusq governor.
0.1.3
- Add cpu overclock/underclock module
- Add boostedASSv2 governor
**For best practices, only load module when it's needed. That would save some kernel memory.​
Source code :
ttps://github.com/whirleyes/extra_kernel_module​
Download link :
extra_kernel_modules_0.1.3.zip - contains all the modules
init.d_n_governor_installer_0.1.3.zip - optional. init.d installer (load all modules to memory on startup).
Update : Add a preview of Tweakerz app.
- Include all kernel module. Module are loaded from app storage.(no install /alter system partition.)
- Load/unload kernel module on-the-fly (No save setting or set on boot option)
- Set CPU voltage/freq via GUI (No persist option yet)​
Easy Install method: (For init.d)
Reboot to recovery
Install extra_kernel_modules_0.1.zip
Install init.d_n_governor_installer.zip (Thanks to core720)​
Install guide for adding init.d script via Script Manager - SManager app
1.Extract all *.ko files from extra_kernel_modules_0.1.2.zip to /system/lib/modules
2.Open Script Manager, Create new script / modify existing script
Code:
#!/system/bin/sh
insmod /system/lib/modules/symsearch.ko
insmod /system/lib/modules/cpufreq_interactiveX.ko
insmod /system/lib/modules/cpufreq_hotplugX.ko
insmod /system/lib/modules/cpufreq_smartass2.ko
insmod /system/lib/modules/cpufreq_pegasusq.ko
insmod /system/lib/modules/sio-iosched.ko
3.Save to /system/etc/init.d/​
Q: How to load a cpufreq governor
1.Load symsearch.ko
2.Load your choice of governor
3.Enable it
Code:
insmod /system/lib/modules/symsearch.ko
insmod /system/lib/modules/cpufreq_interactiveX.ko
echo interactivex > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Q: What is the best cpu-freq governor
Maybe this will help you choose/tweak
CPU Governors explained
Pegasusq Governor​
Q: How to load cpu frequency/voltage (underclock/overclock)
1.Load symsearch.ko
2.Load cpu_control.ko
Code:
insmod /system/lib/modules/symsearch.ko
insmod /system/lib/modules/cpu_control.ko
Q: How to change cpu frequency & voltage
echo id frequency(Mhz) voltage(mV) > /proc/cpu_control/tweak_cpu
Example:
Code:
echo 0 196 980 > /proc/cpu_control/tweak_cpu
echo 1 500 1195 > /proc/cpu_control/tweak_cpu
echo 2 750 1320 > /proc/cpu_control/tweak_cpu
echo 3 1000 1388 > /proc/cpu_control/tweak_cpu
echo 4 1350 1410 > /proc/cpu_control/tweak_cpu
ICS kernel default voltage&frequency table
Code:
Id Freq Volt(mV)
0 300 1025
1 600 1200
2 800 1325
3 1000 1388
4 1200 1398
GB kernel default voltage&frequency table
Code:
Id Freq Volt(mV)
0 300 1025
1 600 1200
2 800 1313
3 1000 1374
4 1200 1375
** voltage min : 830mV, max : 1410mV​
More/Details about cpu_control.ko module
To view ICS default frequency-voltage table
Code:
cat /proc/cpu_control/opp_table_default
To view current frequency-voltage table
Code:
cat /proc/cpu_control/opp_table_current
To view current CPU & GPU frequency
Code:
cat /proc/cpu_control/frequency_current
​
[GUIDE] Comprehensive Guide To Overclocking The ATRIX 2 (2.3.6)
PREREQUISITES:
A Rooted ATRIX 2: (for obvious reasons) Check THIS THREAD as well as THE BEGINNER'S GUIDE for references and instruction for rooting your device.
Clockworkmod Recovery (CWM): You can find the installation procedure for this in THE BEGINNER'S GUIDE as well.
If your ROM does not support init.d: download the mo_simp_1.5_edison-signed.zip and flash in CWM Recovery.
Root Explorer: This application will allow you access to the init.d folder to edit your echo table values. You can find this application HERE.
SetCPU: This application will provide verification of your CPU overclocking settings. You can find this application HERE.
Terminal Emulator: You can find this application HERE.
Instructions For Users WITHOUT init.d Support Already Running (Stock/Rooted 2.3.6. etc):
1) Download the latest mo_simp_1.5.x_YOUR_DEVICE.zip
2) Move the mo_simp_1.5.x_YOUR_DEVICE.zip to the root of your SD card
3) Flash in Clockwork Recovery
Optional for Motorola Devices:
4) If your ROM does not have init.d support, download this file and flash from CWM Recovery: moto_init_d-signed.zip
5) Reboot your ATRIX 2 after you have flashed the mo_simp_1.5.x_YOUR_DEVICE.zip and/or moto_init_d-signed.zip
*Note, this will remove any old kernel modules, or init.d script you may have. Backup your old init.d script before flashing -if any!
Basic Usage:
*These are the basic terminal commands, to be entered as Root or "su". The Milestone Overclock interface exists as four individual files located at /proc/overclock/*
6) Switch to "SuperUser" (NOTE: All commands must be done as SuperUser. Switch from the "$" symbol that you will see when you first open the Terminal Emulator to the "#" symbol simply by typing in "su" -without the quotation marks!):
What you will see when you open Terminal Emulator initially:
Code:
[email protected]:/$ export PATH=/data/local/bin:$PATH
[email protected]:/$
What you should see AFTER typing in "su" (without quotation marks):​
Code:
[email protected]:/$ export PATH=/data/local/bin:$PATH
[email protected]:/$ su
[email protected]:/#
7) Next, type this command in Terminal Emulator: cat /proc/overclock/*
Code:
cat /proc/overclock/*
Below is what you should see in Terminal Emulator after entering: cat /proc/overclock/*​
Code:
[email protected]:/$ export PATH=/data/local/bin:$PATH
[email protected]:/$ su
[email protected]:/# cat /proc/overclock/*
//RAZR Stock
freq_table[0] index=0 frequency=300000
freq_table[1] index=1 frequency=600000
freq_table[2] index=2 frequency=800000
freq_table[3] index=3 frequency=1000000
freq_table[4] index=4 frequency=1200000
cpumin=300000 cpumax=1200000 min=300000 max=1200000 usermin=300000 usermax=1200000
clk_get_rate=300000
mpu_opps[5] rate=1200000000 opp_id=5 vsel=61 u_volt=1375000
mpu_opps[4] rate=1000000000 opp_id=4 vsel=61 u_volt=1374000
mpu_opps[3] rate=800000000 opp_id=3 vsel=55 u_volt=1313000
mpu_opps[2] rate=600000000 opp_id=2 vsel=43 u_volt=1200000
mpu_opps[1] rate=300000000 opp_id=1 vsel=26 u_volt=1025000
1.5-mapphone-yokohama
//Droid3, Bionic, Atrix2 Stock
freq_table[0] index=0 frequency=300000
freq_table[1] index=1 frequency=600000
freq_table[2] index=2 frequency=800000
freq_table[3] index=3 frequency=1000000
cpumin=300000 cpumax=1000000 min=300000 max=1000000 usermin=300000 usermax=1000000
clk_get_rate=300000
mpu_opps[3] rate=1000000000 opp_id=3 vsel=61 u_volt=1375000
mpu_opps[2] rate=800000000 opp_id=2 vsel=55 u_volt=1313000
mpu_opps[1] rate=600000000 opp_id=1 vsel=43 u_volt=1200000
mpu_opps[0] rate=300000000 opp_id=0 vsel=26 u_volt=1025000
1.5-mapphone-yokohama
8) Read all current settings: (useful for verifying that the frequency table and opp tables match)
9) Next, read just mpu_opps info for the Droid 3, Bionic, and ATRIX 2 Stock:
Code:
[COLOR="DarkOrange"]Droid3/Bionic/Atrix2 stock Settings
echo 3 1000000000 1375000 > /proc/overclock/mpu_opps
echo 2 800000000 1313000 > /proc/overclock/mpu_opps
echo 1 600000000 1200000 > /proc/overclock/mpu_opps
echo 0 300000000 1025000 > /proc/overclock/mpu_opps[/COLOR]
10) Write the new frequency & voltage: (Format: echo /proc/overclock/mpu_opps)
*Note: Change only the top frequency/voltage on ATRIX 2 by typing in the full code line "echo 3 1125000000 1375000 > /proc/overclock/mpu_opps" (without quotation marks)
Code:
echo 3 1125000000 1375000 > /proc/overclock/mpu_opps
11) To verify the changes made to echo 3, type in "cat /proc/overclock/mpu_opps" (without quotation marks)
Code:
[email protected]:/# cat/proc/overclock/*
echo 3 1125000000 1375000 > /proc/overclock/mpu_opps
echo 2 800000000 1313000 > /proc/overclock/mpu_opps
echo 1 600000000 1200000 > /proc/overclock/mpu_opps
echo 0 300000000 1025000 > /proc/overclock/mpu_opps
*Note: Voltage can be set as a VSEL or uV value. Max VSEL for most Motorola devices is 63.
Code:
# insmod /system/lib/modules/symsearch.ko
# insmod /system/lib/modules/overclock.ko
The new update.zip's will install a basic init.d script to "/system/etc/init.d/00opptimize". If you've found settings that are "stable" for your device, and you'd like to run these at boot, you may edit this file accordingly. By default, this script only loads the kernel modules. This requires your ROM to have init.d support to work. If you cannot find a method of getting init.d working, you can use Script Manager to execute this file at boot.
11) Reboot after making changes.
12) Open SetCPU to confirm whether your CPU echo values stuck through rebooting. Also, make sure that the "Set On Boot" box is left un-ticked, so as to not have the changed CPU clock speed set upon reboot, and to further test to make sure you are able to run higher CPU clock speeds.
Instructions For Users WITH init.d Support Already Running (Custom ROM WITH init.d Built-In):
1) Open Root Explorer, and navigate to: system>etc>init.d>00pptimize (See Explanatory Images Below)
2) Next, open the 00pptimize file and open using Text Editor (See Explanatory Image Below)
3) Then, after opening the 00pptimize file using text editor, scroll down until you see the section of code highlighted in red below:
4) Make sure your permissions are set to "R/W" instead of "R/O" in Root Explorer!
Code:
# RAZR stock Settings
# echo 5 1200000000 1375000 > /proc/overclock/mpu_opps
# echo 4 1000000000 1374000 > /proc/overclock/mpu_opps
# echo 3 800000000 1313000 > /proc/overclock/mpu_opps
# echo 2 600000000 1200000 > /proc/overclock/mpu_opps
# echo 1 300000000 1025000 > /proc/overclock/mpu_opps
[COLOR="Red"]# Droid3/Bionic/Atrix2 stock Settings
echo 3 1000000000 1375000 > /proc/overclock/mpu_opps
echo 2 800000000 1313000 > /proc/overclock/mpu_opps
echo 1 600000000 1200000 > /proc/overclock/mpu_opps
echo 0 300000000 1025000 > /proc/overclock/mpu_opps
# LG Thrill 4G/Optimus 3D Froyo stock Settings[/COLOR]
# echo 3 1008000000 1350000 > /proc/overclock/mpu_opps
# echo 2 800000000 1260000 > /proc/overclock/mpu_opps
# echo 1 600000000 1100000 > /proc/overclock/mpu_opps
# echo 0 300000000 930000 > /proc/overclock/mpu_opps
5) Now, using the Text Editor in Root Explorer, change the echo 3 table value from "echo 3 1000000000 1375000 > /proc/overclock/mpu_opps" to something like: "echo 3 1100000000 1375000 > /proc/overclock/mpu_opps" (without the quotation marks)
6) Next, click the "back" button.
7) Root Explorer will ask you to save changes. A window will show after you have made changes, and will say:
Warning
You have made changes to this file.
Do you want to save these changes before exiting?​
Click "Yes" to save. The newly made changes will be saved to a file that will be called "00pptimize.bak".
8) Now, find and delete the "00pptimize.bak" file created after you made your changes by long pressing this file and choosing the "Delete" option.
9) Finally, exit out of Root Explorer and reboot your device.
10) Once you have rebooted, open SetCPU and you should see your CPU frequency scaling value you changed from 1000000000 to 1100000000, or check the settings by using Terminal Emulator and typing "cat /proc/overclock/*" -what you should see is a clock speed that was 1GHz and is now 1.1GHz. Also, leave the "Set On Boot" box un-ticked until you have fully tested the new CPU clock speeds and are certain they are at a stable frequency.
11) You can continue this process using small incremental jumps from 1.1GHz to 1.12GHz, to 1.14GHz, to 1.16GHz, etc. until you find a your highest stable running CPU clock speed.
*I have been able to slowly work my way up to run my CPU at 1.25GHz stably, but you may find that your device can either handle more or less clock speed. Again, handle with care, and patience in achieving your highest stable clock speed is something you need to take into consideration throughout this entire process!
UNDERVOLTING GUIDE: Updated: 08/09/2012
Please Reference THIS THREAD For Loading/Changing CPU Voltages.
Credit Goes To:
whirleyes​
CPU GOVERNOR SETTING EXPLANATION: Updated: 08/09/2012
Please Reference THIS THREAD For CPU Governors Explained.
Credits goes to:
http://icrontic.com/discussion/95140...m-tuner-tegrak
http://forum.xda-developers.com/show....php?t=1369817​
*I recommend that after you make changes to the clock speed, you run your device for 5-10 minutes. Open applications, play a quick game, browse the web, etc. to make sure that your device can handle the new clock speeds before making any further increases to the CPU.
**You can also underclock in the same manner that you have used to overclock, but by changing the echo table values at echo 0 to something like "echo 0 240000000 1025000 > /proc/overclock/mpu_opps" -which is always a good idea when overclocking to give the CPU a load relief when using CPU settings like "performance". This will run your CPU at its lowest frequency scaling to 240MHz rather than at 300MHz, but again, experimentation/patience/extensive testing is a must!​
Credits: tekehuna,cogeary, JRW 28, alteredlikeness, whirleyes, 00pptimizer Project via RootzWiki, and probably more to come to credit. Please let me know if you can add to/provide more info/correct me on misinformation/or should be listed in credits also and I will update the OP!​
Good one bro very useful for noobs
Sent from my MB865 using xda app-developers app
Mods, can you sticky this?
Sent from my ATRIX 2 using my toes
Fantastic! I've always said "I'll try out overclocking when I have time to do the research" but I guess now I won't have an excuse. Thanks a bunch. :good:
iarejohnsmith said:
Fantastic! I've always said "I'll try out overclocking when I have time to do the research" but I guess now I won't have an excuse. Thanks a bunch. :good:
Click to expand...
Click to collapse
Glad you found this thread useful! I know overclocking can be a bit daunting when you think about it, but it really is quite easy after a few basic commands are learned and preformed a few times. If you need any more guidance in your OC'ing, please feel free to PM me, and I'll step you through anything you might be unsure of!
Thanks for taking the time for this. Realy appreciate it. :good:
So who all did this?
I believ OCing to 1.2 Ghz wudnt cause any problems as it is the same chipset(OMAP 4430) as in Razr(1.2 Ghz Clocked)?
djabhi003 said:
Thanks for taking the time for this. Realy appreciate it. :good:
So who all did this?
I believ OCing to 1.2 Ghz wudnt cause any problems as it is the same chipset(OMAP 4430) as in Razr(1.2 Ghz Clocked)?
Click to expand...
Click to collapse
I'm clocked at 1.25GHz stable. Some have been known to hit as high as 1.3GHz. Seems as though there's nothing consistent (across the board) for all ATRIX 2's to be able to clock to. You'll just have to experiment and test at some length to find your highest possible CPU clock speed that's stable and reliable...
Sent from my MB865 using xda's premium carrier pigeon service
"9) Finally, exit out of Root Explorer and reboot your device."
This step is unnecessary as you can just run the shell script for it to take effect instantly.
I actually recommend people copying this shell script elsewhere outside of the init.d directory so it doesn't run at startup, and only copy the script back over when you've extensively tested for random reboots. Altering the startup script files and rebooting to test increases your likelyhood of bootlooping.
Note: For the atrix 2 at least, it IS possible to adb into your phone and replace, move, or remove the files in the init.d directory before they run at startup; I've had to do this to get out of a overclock-related bootloop at least twice...
IIRC, in my case it was spamming something like this in a command line while the phone booted up
Code:
adb shell "su -c "mount -o rw,remount /dev/null /system"&&"rm /system/etc/init.d/Oc3""
(may need more quotation marks lol)
It would be 00pptimize in the context of your posting (adb must be enabled in the phone development settings obviously)
moofree said:
"9) Finally, exit out of Root Explorer and reboot your device."
This step is unnecessary as you can just run the shell script for it to take effect instantly.
I actually recommend people copying this shell script elsewhere outside of the init.d directory so it doesn't run at startup, and only copy the script back over when you've extensively tested for random reboots. Altering the startup script files and rebooting to test increases your likelyhood of bootlooping.
Click to expand...
Click to collapse
This is true, and I suppose I can include a caveat in the OP to let users know.
moofree said:
Note: For the atrix 2 at least, it IS possible to adb into your phone and replace or remove the files in the init.d directory before it runs at startup; I've had to do this to get out of a overclock-related bootloop at least twice...
IIRC, in my case it was something like spamming this in a command line while the phone booted up
Code:
adb shell "su -c "rm /system/etc/init.d/Oc3""
It would be 00pptimize in the context of your posting (adb be enabled in the phone development settings obviously)
Click to expand...
Click to collapse
As far as using adb, I didn't reference any methodologies to include this, as some users may not have any knowledge/experience with using it. Again, I can look at this more closely and possibly include something in the OP that will give more instruction concerning this usage soon.
This Guide Thread is one I am going to update as newer overclocking methods and/or shortcuts are discovered and tested. I also have intent to write an undervolting section as well. I want this guide to be one specifically for the ATRIX 2 community, and further I want to maintain it to keep both accuracy and understandability as well as open for suggestion(s) -as you have made; and I thank you.
Sent from my MB865 using xda's premium carrier pigeon service
Excellent guide, will try it out tonite, any suggestions on what vsel to give on different clocks, like 300/600/1000 or 300/600/1100 ?
nikolain said:
Excellent guide, will try it out tonite.
Click to expand...
Click to collapse
Let me know (PM me) if you have any questions...
Sent from my MB865 using xda's premium carrier pigeon service
nikolain said:
Excellent guide, will try it out tonite, any suggestions on what vsel to give on different clocks, like 300/600/1000 or 300/600/1100 ?
Click to expand...
Click to collapse
Apex_Strider said:
Let me know (PM me) if you have any questions...
Sent from my MB865 using xda's premium carrier pigeon service
Click to expand...
Click to collapse
Any suggestion on Voltages ?
nikolain said:
Any suggestion on Voltages ?
Click to expand...
Click to collapse
You shouldn't try to go any higher than vSel=63 at echo 3, or you'll likely experience problems. There's other init.d files that have uVolt as well as vSel. The uVolt is a more fine tuning of voltages, but like I said you can edit the vSel at echo 3 to vSel 63 and you should be golden...
Sent from my MB865 using xda's premium carrier pigeon service
the ICS leak from searet is using 1200mhz clock speed. Isnt it high? it working well now just maybe if some expert can give me some hints.
Titankahn said:
the ICS leak from searet is using 1200mhz clock speed. Isnt it high? it working well now just maybe if some expert can give me some hints.
Click to expand...
Click to collapse
I am not on the leaked ICS AT&T version, so I really can't answer to this. What exactly are you wondering about? I know there's been some question as to why some ICS leaks have users clocked to 1.2GHZ and others at the stock 1GHz. That been sort of a mystery. Further, since I've not flashed the leak to be able to test higher click speeds myself (curious as to what the maximum stable clock speed might be with ICS) so I just have no insight. Yet...
Sent from my Atari Falcon030
Hey Apex, quick question,
Every time I try to underclock echo0, to say, 240mhz, I'll reboot and SetCPU says its UC'd, but phone won't fall below echo1 value at idle, in this case 600mhz. If I reset echo0 too 300mhz, its fine. And it doesn't matter what the GPU is set, still the same. Maybe voltage change is warranted?
Sent from my ATRIX 2 sill on GB
captaincado said:
Hey Apex, quick question,
Every time I try to underclock echo0, to say, 240mhz, I'll reboot and SetCPU says its UC'd, but phone won't fall below echo1 value at idle, in this case 600mhz. If I reset echo0 too 300mhz, its fine. And it doesn't matter what the GPU is set, still the same. Maybe voltage change is warranted?
Sent from my ATRIX 2 sill on GB
Click to expand...
Click to collapse
What rom are you running, or are you rooted/stock? Since I'm running Lithium v1.3.1 it (obviously) has the 00pptimize folder with all the code needed to over/underclock in the 00pptimize from unit.d folder. I've underclocked to 220MHz at echo table 0 with no voltage changes, and have seen no ill-effects as result. How are you modifying the echo tables, Terminal Emulator or Root Explorer?
Sent from my Atari Falcon030
I'm on lithium 1.3.1, using root explorer, but, this happens on any rom. I've been changing values in OC3, instead of uncommenting in 00optimize.
Om a side note, I can OC to 1335mhz, 48 hour stable.
Sent from my ATRIX 2 still on GB

Trickster Mod Kernel Settings

You might have noticed we have a spanish rom that popped up in the android development section. I've been browsing through it as best I can and one of the things I noticed is they are using trickster mod kernel settings available on xda here: http://forum.xda-developers.com/showthread.php?t=1768315 to control some settings in their kernel...so I tried the same things and it seemed to both speed up performance AND lower temperature as that's one of the settings you can enable. In any case it looks like the spanish rom lowers the minimum cpu speed from 960 to 800 and sets it to enable on boot. The min speed gets set back to 960 at odd times..not sure why yet. They set the readahead cache on the sd to 1024 up from the default 512 I set the scheduler to "deadline" since it provides a performance boost when using flashed based media. Those are all under "General Settings". Under "Specific Settings" enabled "Temperature Throttle" which will lower cpu speed when the cpu starts getting hot....the phone runs much cooler and yet I still don't see the lag I was seeing before. Give it a try..all these options are available in the free version.
hmm ill give it a try no issues?
gecko702 said:
hmm ill give it a try no issues?
Click to expand...
Click to collapse
No issues other than the phone resets the min speed to 960 instead of 800 even though I've got it set on boot. I also set the speed. io scheduler etc using rom toolbox (pro) without issue which is what I'm using now cause I tweaked a few other things. Both worked fine. We can't really get into any of the "fancy" settings till we get a kernel compiled that allows it.
Hmm i see until alcatel releases their source thats when a proper kernel can be compiled right? And yes it overheats and feels really hot when im charging and using an app lets say youtube
The trickster mod also has a section for temperature control. It works pretty well. Yes when they release the source we can compiler own kernel.
Sent from my 6045I using Tapatalk
I tried it works thanks!
famewolf said:
You might have noticed we have a spanish rom that popped up in the android development section. I've been browsing through it as best I can and one of the things I noticed is they are using trickster mod kernel settings available on xda here: http://forum.xda-developers.com/showthread.php?t=1768315 to control some settings in their kernel...so I tried the same things and it seemed to both speed up performance AND lower temperature as that's one of the settings you can enable. In any case it looks like the spanish rom lowers the minimum cpu speed from 960 to 800 and sets it to enable on boot. The min speed gets set back to 960 at odd times..not sure why yet. They set the readahead cache on the sd to 1024 up from the default 512 I set the scheduler to "deadline" since it provides a performance boost when using flashed based media. Those are all under "General Settings". Under "Specific Settings" enabled "Temperature Throttle" which will lower cpu speed when the cpu starts getting hot....the phone runs much cooler and yet I still don't see the lag I was seeing before. Give it a try..all these options are available in the free version.
Click to expand...
Click to collapse
Clock speeds get reset because of mpdecison which is the stock Qualcomm daemon.
techware7 said:
Clock speeds get reset because of mpdecison which is the stock Qualcomm daemon.
Click to expand...
Click to collapse
So using Rom toolbox and setting up profiles for instance to lower cpu speed when phone is hotter than 100F are going to be useless?
I found this in a google search......
The easiest way to avoid the restart of the mpdecision service is to rename the mpdecision binary. You can use the following steps to do so from a shell on your computer:
// To disable MP decision
$ adb root [ for us adb shell and then su ]
$ adb remount [for us "mount -o remount,rw /system"]
$ adb shell stop mpdecision [for us just "stop mpdecision"]
$ adb shell mv /system/bin/mpdecision /system/bin/mpdecision-rm <---- *problem* There is no "mpdecision" in /system/bin
// To re-enable MP decision
$ adb root [ for us adb shell and then su ]
$ adb remount [for us "mount -o remount,rw /system"]
$ adb shell mv /system/bin/mpdecision-rm /system/bin/mpdecision <--- *same problem*
$ adb shell start mpdecision [ for us "start mpdecision"]
The start and stop mpdecision commands work but no idea where the binaries are or even whether disabling mpdecision so I can do cpu profiles is a good idea.
Well we need to have something like intelliplug or some modded mpdecision - pretty much a custom kernel
Anyone getting random infrequent reboots? 3 times for me today. I've started backing off on some of the recommended settings. I'm currently down to just using the 1024 read ahead buffer and CPU governor as ondemand. I'll report back if I get any more reboots.
psu2fan said:
Anyone getting random infrequent reboots? 3 times for me today. I've started backing off on some of the recommended settings. I'm currently down to just using the 1024 read ahead buffer and CPU governor as ondemand. I'll report back if I get any more reboots.
Click to expand...
Click to collapse
My idol is fine with no reboots; but for those values/variables I have the defaults: 512 readahead cache (I think is the most optimized) and interactive as governor. Interactive Is newer than ondeman - you should feel less "lag/jerkiness" when you switch from one app to another with interactive. Interactive came along with the whole project butter initiative.
Can we use this with stock-rooted rom?
snugroho3 said:
Can we use this with stock-rooted rom?
Click to expand...
Click to collapse
Yes, somewhat.
techware7 said:
My idol is fine with no reboots; but for those values/variables I have the defaults: 512 readahead cache (I think is the most optimized) and interactive as governor. Interactive Is newer than ondeman - you should feel less "lag/jerkiness" when you switch from one app to another with interactive. Interactive came along with the whole project butter initiative.
Click to expand...
Click to collapse
In rom toolbox it does benchmarking for the readahead and with my sd card 4096 was the best read/write performance. Interactive is the default governor. In the end I ditched the app because the stock kernel resets the cpu settings. The io scheduler I use is deadline which is supposed to give superior performance when dealing with flash based media....which all our media is. It's also the default for lollipop I think.
famewolf said:
So using Rom toolbox and setting up profiles for instance to lower cpu speed when phone is hotter than 100F are going to be useless?
I found this in a google search......
The easiest way to avoid the restart of the mpdecision service is to rename the mpdecision binary. You can use the following steps to do so from a shell on your computer:
// To disable MP decision
$ adb root [ for us adb shell and then su ]
$ adb remount [for us "mount -o remount,rw /system"]
$ adb shell stop mpdecision [for us just "stop mpdecision"]
$ adb shell mv /system/bin/mpdecision /system/bin/mpdecision-rm <---- *problem* There is no "mpdecision" in /system/bin
// To re-enable MP decision
$ adb root [ for us adb shell and then su ]
$ adb remount [for us "mount -o remount,rw /system"]
$ adb shell mv /system/bin/mpdecision-rm /system/bin/mpdecision <--- *same problem*
$ adb shell start mpdecision [ for us "start mpdecision"]
The start and stop mpdecision commands work but no idea where the binaries are or even whether disabling mpdecision so I can do cpu profiles is a good idea.
Click to expand...
Click to collapse
There are a few interesting things in /etc/init.qcom.post_boot.sh, regarding CPU profiles among others. I'll take a look later today and let you know if I find anything worth looking into. You can also just put the mpdecision stop command in there.
Sent from my 6039H using XDA Free mobile app

Categories

Resources