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

Root [Rom][5-17-12]Broken Out Connect 1.0 w/ Blitzkrieg Kernel

honestly just 750 per core is enough


I know this is kind of a noobish question haha, but when you set the speed of the cores in SetCPU, am i setting it for just one or is that number the total of the two? For instance i set mine at 1350 Mhz, does that mean each core is at 1350 oorrr both cores are actually at 675 and when put together they make 1350? Completely off topic from the ROM here haha but its just a quick question, didnt think i should start a whole thread about it :p Thank you in advance =)
 
Upvote 0
I know this is kind of a noobish question haha, but when you set the speed of the cores in SetCPU, am i setting it for just one or is that number the total of the two? For instance i set mine at 1350 Mhz, does that mean each core is at 1350 oorrr both cores are actually at 675 and when put together they make 1350? Completely off topic from the ROM here haha but its just a quick question, didnt think i should start a whole thread about it :p Thank you in advance =)


legit question. I was wondering the same thing when I read that. How do you set each core? Can it be done with romtoolbox?
 
Upvote 0
The only thing that I've seen that even acts as if it knows that there are two cores is the Connect Optimizer.
To further that, according to what I've read the second core is (at times) disabled by default, so unless otherwise specified to stay on it wouldn't matter what you set it's clocks to.

Downclocking the second core is useless since at max speed it will automatically use the second core to optimize thread handling, and at a lower speed requirement, it would simply disable it, expanding your battery life.
 
Upvote 0
legit question. I was wondering the same thing when I read that. How do you set each core? Can it be done with romtoolbox?

No you wont ever be able to set each core speed seperatley because they both run off one clock and have the same multiplier installed. While u can set the processor speed they have to run at the same speed because of the limits set by the hardware of the chipset
 
Upvote 0
No you wont ever be able to set each core speed seperatley because they both run off one clock and have the same multiplier installed. While u can set the processor speed they have to run at the same speed because of the limits set by the hardware of the chipset

Yup, has to do with the way the software is embedded into the processors control set when they're cutting them from the die. You'll never (as far as I know from fifteen + years of working on computers) be able to set a core speed individually unless there's a chip that is specifically coded for that purpose, but I highly doubt it since as I stated before, they clock and disable on their own as well as know when they're necessary for use way before you could.
 
Upvote 0
Cross post from another thread. Appears that the other thread is dead so also making it here in hopes for people to view and confirm my suspicions
http://androidforums.com/connect-4g-all-things-root/552634-broken-out-rom-cpu-clock-settings-fix.html#post4522428

actually that file needs edited not just deleted ;)

if you look at it :

Code:
#!/system/bin/sh
# Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#     * Redistributions of source code must retain the above copyright
#       notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above copyright
#       notice, this list of conditions and the following disclaimer in the
#       documentation and/or other materials provided with the distribution.
#     * Neither the name of Code Aurora nor
#       the names of its contributors may be used to endorse or promote
#       products derived from this software without specific prior written
#       permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

target=`getprop ro.product.device`
case "$target" in
    "msm7201a_ffa" | "msm7201a_surf" | "msm7627_ffa" | "msm7627_surf" | "msm7627a" | \
    "qsd8250_surf" | "qsd8250_ffa" | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "qsd8650a_st1x")
        echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
        chown system /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
        ;;
esac

case "$target" in
    "msm7201a_ffa" | "msm7201a_surf")
        echo 500000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
        ;;
esac

case "$target" in
    "msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
        echo 75000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
        echo 1 > /sys/module/pm2/parameters/idle_sleep_mode
        ;;
esac

case "$target" in
    "msm8660_surf" | "msm8660_csfb" | "cayman")
     echo 1 > /sys/module/rpm_resources/enable_low_power/L2_cache
     echo 1 > /sys/module/rpm_resources/enable_low_power/pxo
     echo 2 > /sys/module/rpm_resources/enable_low_power/vdd_dig
     echo 2 > /sys/module/rpm_resources/enable_low_power/vdd_mem
     echo 1 > /sys/module/rpm_resources/enable_low_power/rpm_cpu
     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/standalone_power_collapse/suspend_enabled
     echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_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 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/idle_enabled
     echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/idle_enabled
     echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
     echo 50000 > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate
     echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
     echo 90 > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/up_threshold
     echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
     echo 4 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
     chown system /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
     chown system /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate
     echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
     echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
     [COLOR="red"][B]chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq[/B][/COLOR]
     chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
     [COLOR="Red"][B]chown system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq[/B][/COLOR]
     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
     chmod 664 /sys/devices/system/cpu/cpu1/online
        ;;
esac

case "$target" in
    "msm7627_ffa" | "msm7627_surf" | "msm7627a")
        echo 25000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
        ;;
esac

case "$target" in
    "qsd8250_surf" | "qsd8250_ffa" | "qsd8650a_st1x")
        echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
        ;;
esac

case "$target" in
    "qsd8650a_st1x")
        mount -t debugfs none /sys/kernel/debug
    ;;
esac

emmc_boot=`getprop ro.emmc`
case "$emmc_boot"
    in "1")
        chown system /sys/devices/platform/rs300000a7.65536/force_sync
        chown system /sys/devices/platform/rs300000a7.65536/sync_sts
        chown system /sys/devices/platform/rs300100a7.65536/force_sync
        chown system /sys/devices/platform/rs300100a7.65536/sync_sts
    ;;
esac


# Post-setup services
case "$target" in
    "msm8660_surf" | "msm8660_csfb" | "cayman")
        start mpdecision
        start thermald
    ;;
esac

you can see it does other things other than set cpu speeds. I dont see where a max is set but you can clearly see where min is set.

not sure of the needed changes just yet, but just deleting will most likely lead to other issues elsewhere. ;)

After checking in the file /system/etc/init.qcom.post_boot.sh and also checking the logcat from kanaida, compared to my logcat as well.

log states:
  • E/ThermalDaemon( 1005): CPU[0] frequency limited to 1512000
  • E/ThermalDaemon( 1005): CPU[1] frequency limited to 1512000

Going through the /system/etc/init.qcom.post_boot.sh I noticed to lines of code that has a reference to scaling max frequency. *Also highlighted in the original text of the above file for reference.

  • chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  • chown system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq


I believe that these are the system persistent files pertaining to the MAX level allowed for the CPU. Maybe mtmichaelson can confirm this as he originally created the ROM and Kernel.

Further checking of these 2 files show a value of 1512000. I believe that these 2 files are marking the upper level that the CPU is allowed access. Hence why when placing the CPU at 1836 it automatically scales back down to the 1512 file. These files constantly write that max CPU can only be 1512. I have noticed that even if I try to underclock my CPU it defaults back to 1512.

Given that, if the files are changed to a different value, they may constantly refresh setcpu, no-frill, etc, to the newly changed value. I am unsure of how these programs actually write the changes to the file(s) that are being used or even what files are changed. Seems to be some form of issue with the kernel itself but I will do my best to continue troubleshooting on my end with my limited knowledge to see if it is a system persistent write issue or not.

I will be testing this on my own phone tonight when I get a chance but if anyone else would care to give it a shot I would not be able to stop you.


*EDIT - So messing with setCPU app. I believe that I have found a work around to a few things here.

1. Enable profiles and add a profile for battery level >= 50%(or whatever you want) and set as your top priority, nothing above it.
2. Set your CPU for whatever you want and make the profile not exclusive

Have tested this and it seems to be holding the changes now.


*If anyone does test this before I get a chance either PM with the results or just post if it worked. I have the original files backed up if need be.
 
Upvote 0
[*]chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
[*]chown system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
[/LIST]

Try adding this:

Code:
echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1800000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq

under
Code:
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
[code]

so that it looks like this...

[code]
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1800000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq


and see if that'll work to stick them.
 
  • Like
Reactions: flboy91 and X2Damon
Upvote 0
Try adding this:

Code:
echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1800000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq

under
Code:
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
[code]

so that it looks like this...

[code]
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 1800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1800000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq


and see if that'll work to stick them.

Adding those couple of lines to "init.qcom.post_boot.sh" worked like a charm, my cpu speeds are sticking
 
Upvote 0
Adding those couple of lines to "init.qcom.post_boot.sh" worked like a charm, my cpu speeds are sticking

sweet, I'm glad it worked, I was actually concerned with the speeds that I'd given you because I wasn't sure if there was a specific multiplier I needed to follow for the CPU to recognize the clocks. The speeds I gave you were standard 1.8ghz converted to kilohertz; but I'm really glad it works :D
 
Upvote 0
sweet, I'm glad it worked, I was actually concerned with the speeds that I'd given you because I wasn't sure if there was a specific multiplier I needed to follow for the CPU to recognize the clocks. The speeds I gave you were standard 1.8ghz converted to kilohertz; but I'm really glad it works :D

I thought the same thing. Its supposed to be 1.82Ghz or something like that but if it works... it works :p
 
Upvote 0
sweet, I'm glad it worked, I was actually concerned with the speeds that I'd given you because I wasn't sure if there was a specific multiplier I needed to follow for the CPU to recognize the clocks. The speeds I gave you were standard 1.8ghz converted to kilohertz; but I'm really glad it works :D

You are right, those values are missing. I dropped the post boot file back in and added these values, and yes it does stick now, but I'm getting a conflict somewhere. The phone has frozen 4 times since. I've deleted the file again and the phone is running right again with no freezing.

Going to play with it more later and see if I can't figure it out.
 
Upvote 0
You are right, those values are missing. I dropped the post boot file back in and added these values, and yes it does stick now, but I'm getting a conflict somewhere. The phone has frozen 4 times since. I've deleted the file again and the phone is running right again with no freezing.

Going to play with it more later and see if I can't figure it out.


Strange, for me it still wont stick. Deleting it is the only solution for my particular phone.
 
Upvote 0
Strange, for me it still wont stick. Deleting it is the only solution for my particular phone.

Did you reboot after you put the file back and changed the values? Either way it was causing my phone to freeze totally, I had to hard restart the phone.

Alas, deleting the file is all that works for me too, but no big deal. It works with the file gone the way its supposed to and I've seen no.negative consequence yet after a Month.
 
Upvote 0
Did you reboot after you put the file back and changed the values? Either way it was causing my phone to freeze totally, I had to hard restart the phone.

Alas, deleting the file is all that works for me too, but no big deal. It works with the file gone the way its supposed to and I've seen no.negative consequence yet after a Month.

Yup I did. No biggie for me too. I moved the file to the SD card, so to have it just in case.

I have no negative side effects either, so far so good.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones