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

Root Broken out rom CPU clock settings fix

ChiweN

Android Expert
Dec 5, 2011
885
579
Detroit, Michigan
As many of us are seeing, CPU clock settings in the broken out rom revert back to 1.5 ghz after a reboot or even on their own sometimes.

If you want your CPU settings to stick delete the file /system/etc/init.qcom.post_boot.sh then reboot. Your overclock setting will stick and stop reverting until YOU change them :D

I didn't post this in the rom thread because I wanted to make sure everyone would see this.

Thanks button is at the bottom :D cheers!
 
As many of us are seeing, CPU clock settings in the broken out rom revert back to 1.5 ghz after a reboot or even on their own sometimes.

If you want your CPU settings to stick delete the file /system/etc/init.qcom.post_boot.sh then reboot. Your overclock setting will stick and stop reverting until YOU change them :D

I didn't post this in the rom thread because I wanted to make sure everyone would see this.

Thanks button is at the bottom :D cheers!

will try right now :D
 
Upvote 0
The only problems I have witnessed so far are:
1. When in gallery viewing a picture, if I pinch zoom, or use the softkeys after about 0.5 seconds it will reset to the default viewing size instead of staying at the zoomed size.
2. Download notifications in portrait mode still under-lap the time on the status bar.
3. A "feature request" if possible would be to have the music controls removed from the status bar. They're unnecessary resources drained for something that a lot of people don't use as most locks allow music controls built into them. (go locker and several others.)

Open the app "music" go to settings and untick show notification!
 
Upvote 0
Confirmed and working on my LG Connect 4G replacement (This is the third one I've had to have them give me.)
*NOTE* Mine is NOT a refurb. I told them if they sent me one I would walk into LG's headquarters with a bomb strapped to my chest. I didn't pay 400 bucks for some redesigned imperfect piece of shit that's used...
 
Upvote 0
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
     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
     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. ;)
 
  • Like
Reactions: dslaven
Upvote 0
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
     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
     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. ;)

I get what you are saying PG, but I deleted this file like 6 days ago and I have yet to see any negative consequence to doing it.
 
Upvote 0
After deleted that script I couldn't open the LG Optimizer app any more, kept getting an error message. If I would run the script then I could open the app again. Here's a screenshot of the error popup toast, hope it helps...
ae8dd55b-3ded-6716.jpg

ae8dd51d-3e25-151b.jpg

ae8dd51e-3e91-736b.jpg
 
Upvote 0
I did not realize the optimizer utilized this script to do what it does. That being said, and nothing at all against kanaida, but I find his app unnecessary. Pretty much everything it does can be easily be done without the app. Setting clock speeds can be done without his app also, the purpose of this was to make cpu settings stick.

Of course if you paid for the optimizer app you are going to want to be able to use it. I will put up a copy of the file so that people needing it to use the connect optimizer can put it back. I don't use it or need it so it doesn't effect me.
 
Upvote 0
I don't use the app very often, but I noticed the error and wanted to share just in case for those that rely on it more than I do and to possible help find what needs to be edited on the script so we can have control over the cpu and use the optimizer.

Here's alogcat I pulled during the time the error occured, hopefully it will be helpful...

https://www.asuswebstorage.com/navigate/share/GY4NQJPG94
 
Upvote 0
I did not realize the optimizer utilized this script to do what it does. That being said, and nothing at all against kanaida, but I find his app unnecessary. Pretty much everything it does can be easily be done without the app. Setting clock speeds can be done without his app also, the purpose of this was to make cpu settings stick.

Of course if you paid for the optimizer app you are going to want to be able to use it. I will put up a copy of the file so that people needing it to use the connect optimizer can put it back. I don't use it or need it so it doesn't effect me.
main purpose to his app is to make a bunch of thing accessible from one app. Most of what the optimizer does I do with ROM Toolbox ;)
 
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