• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root (Guide) Unleash the Dual Core!! (Enable CPU1)

Bard

Android Expert
What is this?
Inspred by rhino889a's post here.
http://androidforums.com/motion-4g-all-things-root/691591-snappy.html

LG Motion is Dual Core phone which means there are two CPUs in our phone; CPU0 and CPU1.
On default, CPU0 stays online all the time and does the major works.
CPU1 sleeps first (offline). It wakes up and works on certain events (CPU intensive work I guess)

According to rhino889's observation, CPU1 seemed like sleeping too often. So I decided to wake him up all the time lol.


Do at your own risk

This modifies one of the important script on booting.
You must be rooted and familiar with folder structure.
You must know how to edit file and save with Super User previlege.
This may drain your battery fast or (even worse) may damage your CPU.



Easy Way
1. Use Root Browser or File Manager then navigate to /system/etc

2. Change init.qcom.post_boot.sh to init.qcom.post_boot.bak (backup)

3. Download modified init.qcom.post_boot.sh from below link.
https://docs.google.com/file/d/0B69dMfqyU4n9QXhWYnd3VmhfRzg/edit?usp=sharing

4. Copy & Paste it on /system/etc

5. Restart your phone

6. Enjoy

7. If you don't like this feature, you can simply delete init.qcom.post_boot.sh, then change init.qcom.post_boot.bak to init.qcom.post_boot.sh. Reboot your phone.




Hard Way

1. As rhino889a and Sepero mentioned the goal is turn on CPU1 by this command echo 1 > /sys/devices/system/cpu/cpu1/online and apply it on boot.

2. Locate init.qcom.post_boot.sh in /system/etc folder with your root browser (I used Rom Tool Box)

3. Create a backup file of this (i.e. init.qcom.post_boot.bak)

4. Now Modify the original init.qcom.post_boot.sh file

5. Our Board is msm8960. Find msm8960 related code block.

case "$target" in
"msm8960")
...
...
;;
esac

6. At the end of case block you see below.

chmod 220 /sys/devices/system/cpu/mfreq
chown root.system /sys/devices/system/cpu/cpu1/online
chmod 664 /sys/devices/system/cpu/cpu1/online

7. Add echo 1 line. Change chmod 664 to 444

chmod 220 /sys/devices/system/cpu/mfreq
chown root.system /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu1/online
chmod 444 /sys/devices/system/cpu/cpu1/online

8. Save the file. Make sure your change is applied.

9. Restart the phone.

10. After restart, check if CPU1 is online. You can use app or open up /sys/devices/system/cpu/cpu1/online and see if its value is 1

11. If you don't like this feature, remove modified lines (remove echo 1 line. Change chmod 444 to 664) or delete .sh file and rename .bak file to .sh. Make sure restart the phone.




Screen Shots

Screenshot_2013-02-26-15-14-34%5B1%5D.png



Screenshot_2013-02-26-15-14-45%5B1%5D.png



Screenshot_2013-02-26-18-09-43%5B1%5D.png



More Code
It seems like you can also set Governor and other properties on this code block.

case "$target" in
"msm8960")
echo 1 > /sys/module/rpm_resources/enable_low_power/L2_cache
echo 1 > /sys/module/rpm_resources/enable_low_power/pxo
echo 1 > /sys/module/rpm_resources/enable_low_power/vdd_dig
echo 1 > /sys/module/rpm_resources/enable_low_power/vdd_mem
echo 0 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/suspend_enabled
echo 0 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/suspend_enabled
echo 0 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/idle_enabled
echo 0 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/idle_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/idle_enabled
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo 4 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chown system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
chown system /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chown root.system /sys/devices/system/cpu/mfreq
chmod 220 /sys/devices/system/cpu/mfreq
chown root.system /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu1/online
chmod 444 /sys/devices/system/cpu/cpu1/online
;;
esac


Things to play with

1. It feels like phone operation is smooth'er and snappy'er. But the phone was already snappy in the beginnig anway... so it might be just feeling.

What I am testing is opening up bunch of apps altogether then keep switching them (long press home key). It feels like phone is switching and loading apps faster but again.. it's subjective...

2. Antutu bench mark is about same (1300 ish).

I admit that I was expecting higher score but again Dual Core doesn't mean it's twice faster, more like it can do multi tasks more efficiently.

3. I didn't have enough time to check battery consumption. You guys may test this and post result.

So far my 2+ hours of light use, I don't see any difference. Need more testing result here.

4. As far as I know there are 5 CPU Governors available. Feel free to try different combinations.
Personally I am interested in msm-dcvs as it's one of the new governor made for Qualcomm specific model

msm-dcvs
ondemand (default)
userspace
powersave
performance

For more information on each governor check this thread @ XDA.
http://forum.xda-developers.com/showthread.php?t=1736168
 
Wow awesome. This wont make benchmarks faster.but make the phone a little quicker off the jump.sometimes my cpu1 goes offline when it should not it seems.
 
I notice a huge impact with my usage of my phone. So to help with idle stages and other conditions i will try to set the minimum frequency to something like half of what the stock is set for. I personally realky apreciate this time you all have spent on this.

In response to above
This is a mod that doesnt gives braggin rights of benchmarks.but gives you quicker response.you push the go button and bam yer there. And i had problems with my cpu1 dropping off at times i felt it should not.

AND REMEMBER you dont have to use this hard written setting. You can activate it with terminak emulater or kernel tuner. Also if you use this method you can deactive it at will
 
Enabling CPU1 will definitely consume more battery but it may not (or may..) be very noticable.

From my 2 hours of use, I don't really see difference on battery drain though. Of course I need more time to testing out with heavy usage (playing game etc..)


Also, this line puts Governor on each CPU. Maybe we can set Power Save or Conservative on CPU1 to save battery? I haven't tested out though.

echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
 
  • Like
Reactions: k0r
if i recall correctly, from using System Tuner to turn it on at boot, i used it for a week and it maybe took a 10% hit to the battery...nothing major...definitely worth the snappiness if you choose to use it
 
May i suggest that the script allows the option to run cpu1 at a user set percentage i.e set cpu1 to.run at 30 percent idle and and 90 percent ondemand. Is this possible.
 
I am going to assume that in constant high like gaming you wont notice effect on batfery ir added speed. The difference is at idle minimal use. At least i would assume.
 
Bard, your script here will work with BootBuddy. I would just recommend that users rename the file to 10init.qcom.post_boot.sh

Simply drop the script in the boot_buddy_scripts folder and it's good to go. Cheers
:o
 
My phone runs fine at 800mghz and will play any game I want. And I get great battery life. (W/O cpu1 online all the time) IMHO this is a waste of time
 
One thing i noticed here. Setcpu settings seem to effect the 0 core not the 1core. That may are may not help desired manipulations.
Also would use cause (wear) like cpu0 might wearout quicker without this more even setting. Or maybe less heat factor for the 0 core.?

To above post Limiting the frequency may actually cause cpu1 to be more online anyways.. Just guessing.
But i know what you are saying .i sometimes leave my settings at 384 0r the 500 something setting. Seems to alot of my needs just fine.


So now i am wondering because i never thought to check cpu1 till recently. Without this mod. If you use setcpu or ther app to limit to say 720. Is it actually limiting the second core to 720. I never thought to check as the moniitir aop i used,before did not reveal the cpu1 speed.

Jpizle for my curiousity can you verify that cpu1 does not go above 800?
 
Yes there's an app. Can't remember the name but it allows you to turn on the 2nd core all the time and you can see the frequency. The app is called CPU something there's a whole thread on it here somewhere. This so-called mod can be done with this app it was found 6 months ago
 
Here's the threadhttp://androidforums.com/showthread.php?t=616285 Shipped with one processor offline Motion
 
"I dont need an app i was just curious if your second core exceded your 800 limit. I can quickly revert my file to test if though.
 
"I dont need an app i was just curious if your second core exceded your 800 limit. I can quickly revert my file to test if though.

This may not be not be for everybody.even the people that worked on it may decide to not use it. But is was suggested then it was conquered. I personally learned a little lesson here about my phone and implementation of scripts and teamwork.
 
Don't get me wrong I am grateful for all the Dev work and I do mean all. I just think this will cause more harm than good;)
 
Both cores run at the same speed at all times when the second core is running, the 8-900 mhz is just the physical limit for the second core being used as a main core. ;)
 
Back
Top Bottom