yashsingh1/xdaforums huggingface dataset:
[Nexus 6  General] LarappsOfDongle:
Disable crappy performance when below 40%!

I got sick and tired of my powerful shamu be throttled when my battery got low, making doing simple tasks laggy.

Here's a flashable zip (attached) to allow you to use the full power of your shamu. I take no responsibility if your device gets screwed up(it won't but if it does). Just flash it in recovery & reboot.

How to do this yourself or include it in your ROM/Kernel.

The file we will be editting is thermal-engine-shamu.conf

1. Find the first three sections, they will be the below three

2. Overwrite those sections with the below ones

[BAT-SOC-CPUFREQ]
algo_type monitor
sensor soc
sampling 5000
thresholds 100
thresholds_clr 99
actions cpu
action_info 1728000

[BAT-SOC-HOTPLUG]
algo_type monitor
sensor soc
sampling 5000
thresholds 100 100
thresholds_clr 99 99
actions hotplug_3 hotplug_2
action_info 1 1

[BAT-SOC-GPU]
algo_type monitor
sensor soc
sampling 5000
thresholds 100 100 100
thresholds_clr 99 99 99
actions gpu gpu gpu
action_info 500000000 389000000 300000000

These values explained.

- Thresholds is the battery percentage at which the throttling occurs. You might think it's weird to have this at 100 but it's how much percentage your battery has depleted. If you still don't get it, subtract the threshold from 100 and that's the percentage at which the throttling happens. In our case it happens at 0% or 1% and by that time your device is already dead.

Credits

- [MENTION=3357040]Imoseyon[/MENTION]

- [MENTION=2632235]bbedward[/MENTION]
[Nexus 6  General] NOSTALGIA:
will try this out for sure..
[Nexus 6  General] LarappsOfDongle:
Right now it seems to be working as I'm at 30% with no lag.
[Nexus 6  General] NOSTALGIA:
flashed it.. still at 87%.. will post results when below 20% ...
[Nexus 6  General] ronaldheld:
Will try it out.
[Nexus 6  General] christianpeso:
Would disabling BCL in the kernel achieve the same results? I do not get this throttling that you and others speak of because I read it was caused by BCL and disabled it in my kernel. Phone runs great all the way down to 3% or so.
[Nexus 6  General] raptoro07:
Seems to be working for me so far. At 38%.
[Nexus 6  General] danxdarkte:
Can work on DP 5?
[Nexus 6  General] NOSTALGIA:
are you on stock? i am on stock untouched kernel.. and ive been experiencing this everytime on stock whatever rom it is..
[Nexus 6  General] danxdarkte:
Whel, work for now on DP 5, when i have 15% update my status.
[Nexus 6  General] christianpeso:
Nope. On Dirty Unicorns custom Rom using the built in kernel.
[Nexus 6  General] LarappsOfDongle:
Some kernels have it some don't.
[Nexus 6  General] LarappsOfDongle:
:good:

Good to hear.

Yeah!

:good:
[Nexus 6  General] christianpeso:
Thanks, but that was not the original question at hand. The question was about your mod in this thread and does it accomplish the same thing by disabling BCL.
[Nexus 6  General] ronaldheld:
So far, so good at 38%.
[Nexus 6  General] LarappsOfDongle:
Easily googlable.

"BCL polls the battery monitor system for various values such as voltage, current and temperature through the battery. This driver is meant to help prevent possible reboots, but with it removed on several devices we have seen no issues.

The way it prevents reboots is by setting thresholds and when the threshold is passed or tripped, it will throttle or unplug cores, which is detrimental to performance."

After reading this, I've inferred that this is the same as BCL.
[Nexus 6  General] danxdarkte:
Ok. "Work" in DP 5 with elemental X. But reduces The frecuency. Is normal?

Before at 15% the coree 2 and 3 is offline and the frequence is of 1.7, after the cores still online but the frequence is on 1.9
[Nexus 6  General] LarappsOfDongle:
Which means that the throttling is gone. Throttling is turning cores off at lower percentages and keeping frequencies down not at regular.
[Nexus 6  General] rignfool:
How far down can you discharge your battery before the random BCL flavored shutdowns occur?
[Nexus 6  General] LarappsOfDongle:
Well I don't exactly know but I've gone all the way to 1% with bcl disabled and no weird shutdowns
[Nexus 6  General] oOflyeyesOo:
I may give this a shot if my new kernel doesn't have BCL. Just waiting for final N to come out.
[Nexus 6  General] rignfool:
I'm so jealous... I can have them as high as 40% under the right circumstances...
[Nexus 6  General] NOSTALGIA:
my phone reached until 15% after playing pokemon go and it never slowed down. so i guess its working..
[Nexus 6  General] erk1725:
is this while using the script you posted in OP? I have disabled BCL as well and usually get the shutdown around 15% when the light and alarm should come on letting my know my battery is low....instead it just shuts down and when I turn it back on without charging knowing I have battery left, i just get repeated systemUI force closes and cant do anything until I plug the phone in....just curious. Maybe your scripts works better with different tuneables rather than just disabling all together? Nexus6 DP5

Thank you!
[Nexus 6  General] :
Just like all of us.

Hehe :silly:

The pokemon go lag was real before this

That's what I'm thinking. I used both and found better results changing the tuneables rather than disabling it all together.
[Nexus 6  General] Sugarkryptonite:
Thanks for this, surprised no one has done this before.

Is it normal that waking up from sleep after a while has 2 cores disabled? Then they come on around a minute later? That's what happens to me (around 35% battery right now). I'm guessing that's correct because of the device using doze/power saving bla bla?

Basically from what I gather standard operation of a stock device would not even bring the remaining 2 cores online, correct?
[Nexus 6  General] :
Exactly! This not bringing the cores online might save ya a little juice but I'd rather my device usable!
[Nexus 6  General] Sugarkryptonite:
Sounds good to me, buddy! Seems to be working so far! Thanks again
[Nexus 6  General] zhuchella:
Can somebody made the flashable zip for recovery on this mod?
[Nexus 6  General] :
Read the OP! Its attached to it.
[Nexus 6  General] mauropgarcia96:
Hi! Im using pure nexus rom + pure nexus stock kernel. Does this affect the rom kernel or its not related? thanks in advance.
[Nexus 6  General] :
Yes it does, all kernels for the N6 unless they contain an option to disable BCL which isn't in many
[Nexus 6  General] Free4ever2:
I haven't experienced any throttling while playing games, even with the battery under 15%, so this mod is working great for me. No unexpected shutdowns either. I'm on DP5 and ElementalX.
[Nexus 6  General] zachjen:
I flashed the zip. How can i go back to the way it was before?
[Nexus 6  General] :
Dirty flash ROM.
[Nexus 6  General] mimsiroll:
working at Android N latest preview.
[Nexus 6  General] rignfool:
Unless flar2 recently changed... He disabled the hotplugging and left the frequency throttle for BCL...
[Nexus 6  General] keboom:
Seems to not working for me. It is very annoying. I have Nexus 6 for a year and Iam seriously curious about selling it. After flashing this via TWRP (Iam on stock MRA58R + ElementalX kernel) I have chcecked config file, if it matches and yes. Under about 50% and then 20% I get still underclock to 1958MHz!!! And two cores are turning off randomly. I cannot do anything with CPU governor, frequency or turn on cores until I give it on charge.

Iam really sad. This phone is amazing until this started occuring.

Taking photo with HDR+ and low battery takes ages and after taking it will freeze phone down enourmously. Pokemon GO is unplayable, normal work with phone too...

Any advices before i post it on some online shop?
[Nexus 6  General] :
Navigate to /sys/devices/qcom,bcl.39/ and open up the file named mode, it'll probably say enabled so change it to disabled. Then reboot.
[Nexus 6  General] keboom:
Is normal that it gets re-enabled after restart?

edit:

still turning off two of four cores, still lowering frequency to 1,9GHz :(
[Nexus 6  General] keboom:
So now Iam really without any ideas. Because I didnt wanted to do difficult unpacking of ramdisk and changing it I decided to try write this:

echo disable > /sys/devices/qcom,bcl.39/mode

And yes! Iam using Script manager and it sets after reboot properly, but still not working. Having two cores off on 1.9GHz. When I charge it up it turns into normal, as always. Any advice what else can do this?
[Nexus 6  General] keboom:
I realized that there is kicking in thermal throttling too (on higher percentages of battery charge). I changed it via two my scripts too (echo N > /sys/modules/msm_thermal/parameters/enabled and second script to raise limit from 60 to 90°C). But when Iam close to 60°C it starts to turning off cores and underclock them. I wanna find the solution, because many owners of N6 have it.
[Nexus 6  General] :
Hmm good info, I'll check that out
[Nexus 6  General] keboom:
Now Iam on Franco kernel (for ensuring, that it isnt kernel issue) and after turning off every thermal and core throttling wint turning off BCL in Init.d after bootup still underclocking. Iam now at high battery percentage but I quess, it will be the same situation in low battery situation.
[Nexus 6  General] Tysovwik:
Same here, bcl renabled after reboot

Running latest purenexus, stock kernel
[Nexus 6  General] fhblake04:
Could this mod be inhibiting USB fast charge? On ElementalX 4.07. Thank you!
[Nexus 6  General] Yasharkhan:
This mod actually turns off both cores under 30 percent and it makes music from speakers really distorted
[Nexus 6  General] :
No

No it does not, that's your kernel governor.
[Nexus 6  General] msgpacket:
Does anyone have an uninstaller for this? O forgot to backup the .prop file
[Nexus 6  General] :
Just reflash ROM.
[Nexus 6  General] Dashing_97:
Okay bro, i have been testing this mod for a lot of time now, i must say that it has improved things, but still throttling does happen. We need to fix it completely.
[Nexus 6  General] youssefkr:
guys, does this mod work with 7.0 ?

Edit : it's working.

another question though , how to revert the changes made ? I already backed up boot with TWRP.

Does restoring that will revert back ? or I can simply adb flash the stock kernel ?
[Nexus 6  General] Isley_:
Dirty flash your ROM. Or, you should've backed up the system partition instead the boot.
[Nexus 6  General] youssefkr:
my device is running official 7.0 rooted with twrp

so I guess I can't dirty flash ?..
[Nexus 6  General] Isley_:
I can send you the file this Mod modified, but I'm on CM14 so I'm not sure if the file is the same as stock.
[Nexus 6  General] cris_webb:
Flash the factory image without wipe data then flash two again if you want.
[Nexus 6  General] mwebb34:
Will this mod work if I have 100% battery?
[Nexus 6  General] dlfluke:
Maybe a stupid question, but do I need root to get this to work? I'm on all stock no root atm.
[Nexus 6  General] :
You won't be throttled at any percentage

If u have twrp you can flash it and use without root.
[Nexus 6  General] dlfluke:
Thank you for quick response
[Nexus 6  General] mwebb34:
So is it better to flash this? Will I have better battery if I flash this mod?

H-AS Pharma V.I.P
[Nexus 6  General] :
It doesn't improve battery it just disables the throttling that occurs when under 40%.
[Nexus 6  General] mwebb34:
Oh, I gotcha..

H-AS Pharma V.I.P

---------- Post added at 02:10 PM ---------- Previous post was at 02:05 PM ----------

I'v been looking for boot animation sounds and splash screen sounds. I have bhoot from google play that app has tons of custom boot animations. Now all I need is a cool splash screen. I would like to incorporate the sounds with either the boot or splash to make it more fun.. I tookba break from the nexus 6 a few months ago because the note 4 got root so I sold the nexus, but later determined that I made a big mistake and ended up buying another nexus from swappa. I love this phone there is so much that you can do with it! I can't wait to see what the new 2016 nexus 6 is gonna be like!!

H-AS Pharma V.I.P
[Nexus 6  General] :
2016 Google phones have already been released.
[Nexus 6  General] mwebb34:
Lol shows how much I keep up. I work so much I don't time to take a ****...

H-AS Pharma V.I.P

---------- Post added at 02:28 PM ---------- Previous post was at 02:14 PM ----------

I googled the new Motorola nexus 6 2016 and I'm not finding much.

Edit, Nevermind HTC made the nexus....

H-AS Pharma V.I.P
[Nexus 6  General] cmbeid:
I am not new to Android - I have flashed many things in my time. But I cannot seem to get this to work. Bootloader unlocked, temporarily boot into TWRP, install the zip, reboot, and the changes are not saved. The thermal-engine-shamu.conf file always reverts back to the original file.

I even tried manually copying it - mounting the /system partition in write mode in TWRP and also modifying the file directly with VI. But upon rebooting, the file always reverts back.
[Nexus 6  General] starcms:
I found that disabling BCL disables TurboCharge 2.0 and it takes forever to charge from AC. (this mod doesn't disable BCL, but it's been discussed in the thread)
[Nexus 6  General] raptoro07:
I've been wondering why it seems it's taking so much longer to charge these days! [emoji12] [emoji16]
[Nexus 6  General] rignfool:
Sounds like your running stock...

Iirc dm-verity will revert that change... But I don't remember clearly...

A different kernel would fix the problem... But you shouldn't have to do that
[Nexus 6  General] H4X0R46:
Would backing up thermal-engine-shamu.conf and then replacing it with the original file with a root explorer reverse this just in case?
[Nexus 6  General] :
Yep
[Nexus 6  General] requiiiem:
Work on 7.0 october?
[Nexus 6  General] :
All versions.
[Nexus 6  General] aroy97:
I'm on 7.0 Pure Nexus, with Franco kernel installed, after flashing this it caused a boot loop. Reflashing Franco kernel fixed the boot loop. Anyone else with this problem?
[Nexus 6  General] Isley_:
If I install this but I let the 'BCL Hotplug' enabled (in the app I use to tweak the Kernel), would the fast charge still be active?
[Nexus 6  General] Neejay:
No, but this mod doesn't appear to work with r55. Cores 3 and 4 still go offline.
[Nexus 6  General] Eddiemc:
[MENTION=5863006]RachetPanda[/MENTION]

Great work, seems to work like a charm on n 7.0

How does this mod affect battery saver mode though, considering that mode normally throttles a lot?

Will battery saver mode still apply as normal, or will the cpu/gpu stay on full with just refresh rate and animations being adjusted?
[Nexus 6  General] gothy.gothy:
[MENTION=6320543]RatchetPanda[/MENTION] any plans for a 7.1 ROM?
[Nexus 6  General] :
It will work the same way

Nope.
[Nexus 6  General] scutzi128:
I flashed this zip and verified the changes in the .conf. I'm at 22% and still have 2 core disabled. I'm running 7.0 stock.
[Nexus 6  General] rignfool:
Not to pick in you personally... But...

There has been extensive discussion about what this mod does and does not do...

It does take care of throttling at low battery...

It does not stop BCL throttling... Which is what you more than likely experienced...

Please use Google and familiarize yourself with it...
[Nexus 6  General] nemanja066:
There is no difference after mod. Turns off the cores, and reduces the freq, when the battery is bellow 20%.

I know it would be different if I disable BCL, but I do not want it, because of the restart of the phone.
[Nexus 6  General] rignfool:
Sorry... No dev has taken on BCL more than just disabling it...

Which is a pity for those of us with these issues...
[Nexus 6  General] bhudson:
Might as well ask here too (I have a new thread on Q&A) - has anyone verified BCL is actually disabled on their phone? AFAIK the way to do it is to write disabled into the mode file. That does NOT work on my 6. I still get below 40% two cores off and frequency capped at 1958mhz. I'm also running BenzoCore which supports this via a switch in KAmod, and the switch corresponds to the contents of the file. Tried another kernel or two that purports to support this, no difference.

If yours is disabled for sure, I'd love to hear about how you did it.
[Nexus 6  General] youssefkr:
Here is how I did it : first I flashed ElementalX kernel , then flashed this mod . Everything is working smoothly , all cores are active until battery reaches 5%.
[Nexus 6  General] youssefkr:
Guys does this work on 7.1 roms ?
[Nexus 6  General] Isley_:
Yes.
[Nexus 6  General] ozzmanj1:
Just want to chime in that I have read that Flash kernel disables BCL... I have been running flash since it was released along with this disable-throttle and have experienced zero sounds isues... nice and loud
[Nexus 6  General] ajaxodessa:
Installed on 7.0 NBD90Z twice but both times cores 3 and 4 are still disabled, even at 56%

Надіслано від мого Nexus 6, використовуючи Tapatalk
[Nexus 6  General] nemanja066:
Disable BCL. :good:
[Nexus 6  General] youssefkr:
It works better with a custom kernel.

Try it with ElementalX
[Nexus 6  General] raidyne:
Unfortunately, it does not work on 7.1.1. with elementalx kernel 4.16. Limit @ 1958 Mhz. any ideas?
[Nexus 6  General] rignfool:
Yes... You need to read some more...

1958 MHz means BCL throttling... Which is not affected by this file...

Now... This file still does exactly what it's supposed to do... I don't use this one... I made my own....
[Nexus 6  General] ozzmanj1:
By chance would you be willing to share own created file? I'd like to try yours out. Also I made flashable zip of a script that supposedly prefers BCL from activating. Thank you in advance
[Nexus 6  General] rignfool:
I don't disable anything...

I turn it up... I throttle sooner... And harsher... After 2 years, and what started as a 4 year old boy... My battery performs like an asthmatic 95 year old, running a marathon...

I've got it to the point that I know which programs I can't open below 30% without a charger near by (IM LOOKING AT YOU MAPS)
[Nexus 6  General] raidyne:
sorry to bring this up again,

but: i've flashed the disable throttling zip from this thread as well as the disable BCL zip (that was mentioned and linked in this thread) but still my nex6 is throttled @ 1958Mhz.

What can I do in order to prevent throttling now?
[Nexus 6  General] ardonhs:
I try try it but its not working..

i am on Nitrogen 7.1.1 stock kernel
[Nexus 6  General] Jdgregson:
Vanilla Nexus 6?

Will this work if I still have a purely vanilla Nexus 6 on Android 6.1?
[Nexus 6  General] enigma776:
Something I want to know too, I need to end this throttling its driving me up the wall.
[Nexus 6  General] Th30n1:
Any body know if this is working on pure nexus latest build?
[Nexus 6  General] omarespino9110:
I'm on 7.1.1 Arise Rom with Franco kernel R64 and this Mod work fine for me, all cores work in low battery.
[Nexus 6  General] ktmom:
I don't use this, but use PN. Turning off battery saver is all I need.
[Nexus 6  General] burdo:
Im on 7.0 stock with unlocked bootloader.

Will this work? will it wipe the device?

Even after recharging the phone is still unusable once it got under 40%
[Nexus 6  General] Isley_:
It should. And no, it won't wipe your device but always have a backup just in case.
[Nexus 6  General] burdo:
Do I need a custom recovery to flash it? or Can i do it via adb? how?

Thanks guys
[Nexus 6  General] Isley_:
It's easier if you have a custom recovery. You can also edit the file with the parameters stated in the OP. I don't know how to flash it via ADB, sorry.
[Nexus 6  General] awyeahh1:
is this working on android nougat 7.0? please advise if possible, ty
[Nexus 6  General] Th30n1:
Yes I'm using it with pure nexus 7.1.1
[Nexus 6  General] BenClay13:
Stock nougat, rooted, nexus 6 running franco kernel. Can i flash this zip using flashfire? Would it work and not screw up my phone?
[Nexus 6  General] dgm_mixtoon:
This mod fix low audio volume?
[Nexus 6  General] johnb380:
No... The 2 things have nothing to do with one another.
[Nexus 6  General] dgm_mixtoon:
there is no way to fix it, right? :(
[Nexus 6  General] zekrifon:
Does it work on a rooted nexus 6 with TWRP and stock kernel 7.1.1 ?
[Nexus 6  General] drugz4fun:
Here is what I did on my rooted nexus 6 with lineageos 14.1 (android 7.1.2):

1. Installed the mod from this thread.

2. Verified content of /system/etc/thermal-engine-shamu.conf

3. Verified content of /sys/devices/qcom,bcl.39/mode to make sure BCL is disabled:

#: cat /sys/devices/qcom,bcl.39/mode
disabled

"disabled" was there by default and I can't change it to "disable":

4. Tried to disable BCL using Kernel Adiutor

but I still have only 2 cores working when battery is low. Any ideas what else I should check?
[Nexus 6  General] nemanja066:
5. You need to insert startup script (init.d) with this command for disable BCL, and reboot phone.

But I also don'tt recommend the disabling BCL. You 're risking shutdown phone when the battery is low. :)
[Nexus 6  General] Didit_Anshari:
Can i apply this mod to an Oreo rom ? Im using Aicp 13 Oreo
[Nexus 6  General] nemanja066:
Check the contents of the thermal conf file (with the text editor), but I guess it is the same. You can manually change it, it's easier. :)
[Nexus 6  General] mikivila:
yes, work perfect and no low audio
[Nexus 6  General] EternalFlame:
Yep, but i'm on beltz tho.
[Nexus 6  General] ditchmagnet:
Can I flash this if I am using stock& magisk systemless?
[Nexus 6  General] sandman96:
I can't get this to work. Stock android 7.1.1 with Franco. Unlocked and rooted with magisk. I get an error in twrp that says zip verification failed.
[Nexus 6  General] donkeypunch1257:
Confirmation

I didn't use the zip in the thread, but I did manually change the values of the thermal config file and I can confirm working with February 9, 2018 release of Lineage with stock kernel.
[Nexus 6  General] ocbones:
im on lineage ver 14.1 2-9-18 release also how did you get to that menu?
[Nexus 6  General] herecomedatboi:
I'm on RR 8.1 and was also having throttling issues.

Flashing the mod did not fix this.

I did find an old thread that had a .zip file for disabling BCL.

I tried it out and I was still using all cores at 30% battery so it seems to work for now...

You can find the original post and file here: https://xdaforums.com/showpost.php?p=70414880&postcount=2
[Nexus 6  General] stivakos:
FYI, On latest NEO's RR build, cpu throttling is disabled by default.

No stuttering, no hiccups till the battery runs out of juice.
[Nexus 6  General] herecomedatboi:
Weird because my device became basically unusable under 40% battery and Kernel Auditor confirmed it was indeed disabling two cores. It went away after charging it above 40% and came back when it went under. The zip I flashed fixed it for me...

---------- Post added at 06:02 PM ---------- Previous post was at 05:58 PM ----------

I'm sorry, forgot to reply to your post and instead replied to the whole post.
[Nexus 6  General] zip545:
It did not work my stock 7.1.1

It did not work on LineageOS 14.1 from the stock kernel

The only fusion method was on lineageOS 14.1 + elementalx
[Nexus 6  General] billyb1987:
Will I need to reflash the zip every time I update LineageOS?
[Nexus 6  General] 4L3xN3t:
Hi!

I would like to set the thresholds to 10/15% so I understood I should set the value to 90 or 85 but...there are so much thresholds values...should I change all of them?

thanks
[Nexus 6  General] zip545:
Hello, I came up with an interesting thing:

I'm going to 100% stock 7.1.1 (lock bootloader, factory image ..)

I noticed that a lot of people say they will turn off two cores when it goes below 50%,40% ..

I am a heavy player of PUBG and although I have a 30% battery, so we play well.

However, I noticed that cpu-z and other programs show that I have two core offline, which is not true, the programs can not be properly cleaned on a nougat processor.

Systempanel 2 shows that both kernels are running, simple system monitor shows that the kernels are turned off but are still being used.

https://imgur.com/a/tqcec2n
[Nexus 6  General] watoan:
Hello all, had anyone flashed this mod on NitrogenOS (8.1) with Magisk 16? Can SafetyNet pass?