yashsingh1/xdaforums huggingface dataset:
[Nexus 6  Original Android Development] pkgnex:
Thanks for the tip!

I remember reading about that as a work-around in the earlier days when people were complaining about BCL, but when I tried it this morning when the cores were stuck off-line (even after recharging above 40%), it didn't do anything.

I'll take your word for it that it fixes the "stuck-at-max freq" issue - it makes sense that it would given what Franco has found so far.

I'm still hoping that I'll never have to deal with it again since I have it permanently disabled via boot script and my cores are now all online and not pegged to 2.6 GHz. :)
[Nexus 6  Original Android Development] cujo6801:
Just popping in to say reading these last few pages with the interaction going back and forth.. this is why I love these forums.

You guys are awesome...
[Nexus 6  Original Android Development] franciscofranco:
Ok r50 is up https://plus.google.com/u/0/+FranciscoFranco1990/posts/7PTW4UWkN2T

Feedback is appreciated!
[Nexus 6  Original Android Development] pkgnex:
I saw it pop a little while ago and have been running it for 15 minutes or so.

It didn't kill my cat, and otherwise seems fine. I'll let you know if I find anything weird or see any improvement over the next day or two.
[Nexus 6  Original Android Development] pkgnex:
BCL r50

Franco,

I've noticed improvement over r49, but there are still some oddities...

- After flashing r50 and setting the bcl_hotplug_enable to "0", I was able to run my phone almost all the way down to 0% battery without any cores going offline - which was expected and what I wanted to happen.

- It does seem that core 1 now spikes over hispeed_freq (often to max_freq (2.6 GHz)) more often than it ever did before, but that is somewhat anecdotal and I don't really care since operationally everything seemed fine.

- Charging back up to ~20% and then taking off the charger, all cores remained online and none of them were stuck at max_freq. - still good!

- Resetting the bcl_hotplug_enable flag to "1" and rebooting (still at ~20% battery), the phone booted and the last 2 cores were offline - as expected, good!

- I then put my phone on the charger, and noticed the cores came back online - this was unexpected.

- When I then unplugged my phone and ran it down to below 15%, the cores never went back offline - I found this to be really odd.

- FURTHER, after the brief charge, it seems when the last two cores came back online, they lost their FKU settings - at least the min_freq interactive governor setting. I could tell because I have min_freq set to 422 MHz to avoid an audio static issue when the screen goes off, and while cores 1 & 2 never dropped below 422 MHz, cores 3 & 4 were idling down to 300 MHz.

Nothing so far caused any operational problems with my phone, but the brief charge when below 20% seeming to disable the bcl hotplug and resetting the cpu settings for cores 3 and 4 only is somewhat concerning.

Update: I was unable to replicate the core 3&4 reset on charge phenomenon a second time... so I'm not sure what happened.

I ran the phone down until the cores were kicked offline then plugged it in. The cores came back online and were performing as they should.

I then changed the bcl_hotplug_enable flag to "0" in my boot script and rebooted (at 20% battery), and when the phone came back up, cores 3&4 were still stuck offline. Disappointing! Seems like the cores being offline still persists during reboot even if the BCL hotplug is turned off.

Cores never came back online even when charging up to 75%. Rebooting (with bcl_hot_plug_enable set to "0") brought them back.

Sooooo, I'm done with BCL - I'm just going to leave it off since it doesn't do anything for me stability wise and just causes problems with cpu's 3 & 4 getting stuck offline.
[Nexus 6  Original Android Development] franciscofranco:
I spent ~4 hours debugging this yesterday and I couldn't figure out the cores offline<->online part just like you described. It probably needs more work and a whole lot of code to fix it. I'll have another go at it this weekend, trying a different approach. At least the max_freq thing is fixed.
[Nexus 6  Original Android Development] szale9001:
Ok so I am just going out on a limb here but, on my local build, I had issues where the thermal driver would offline cores at low battery and not bring them up after reboot.

So what was happening was the thermal driver would offline cores 3 and/or 4 at ~15% (I always had BCL hotplugging disabled). After that, and letting the battery die, when I would boot the phone back up on the charger the cores that thermal driver offlined would not come back up consistently (or at all) leaving me in a similar situation as described above. Here are the patches to the thermal driver that seemed to resolve this issue for me:

https://github.com/neobuddy89/shamu/commit/fc944fddae93bb1562e950c49178f3fecab15691

https://github.com/neobuddy89/shamu/commit/81552f183e3390df5b15a53be07d73fac76fc246

https://github.com/neobuddy89/shamu/commit/67024353378586747286ae3b76b33d2348cb6b2e

With the recent changes to cpufreq to fix the max_freq issue, maybe this will finally put this issue to rest? Hope so anyways :fingers-crossed:
[Nexus 6  Original Android Development] franciscofranco:
I have core_control set to 0 on ther thermal driver by default, unless KTM does it regardless. I'll check those patches from CAF.
[Nexus 6  Original Android Development] franciscofranco:
r51 is up! https://plus.google.com/u/0/+FranciscoFranco1990/posts/RiewDpkBpFg
[Nexus 6  Original Android Development] :
It probably does.

You can actually enable/disable bcl by using:

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

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

Rather than the other bcl hotplug addition.

I think you can disable bcl on boot by deleting this line from the dtsi, as it is what the bcl driver is looking for. https://github.com/franciscofranco/...c4f/arch/arm/boot/dts/qcom/apq8084.dtsi#L4843

Then you can probably re-enable it post-boot via init.rc script by writing the appropriate value from above.
[Nexus 6  Original Android Development] pkgnex:
This weekend at one point my phone was down a bit below 20% battery, and I noticed that cores 3 & 4 were off - this was on r50. I verified that bcl_hotplug_enable was off, so I'm not sure why this happened.

Additionally, even after charging back up to 50%, the cores stayed offline. I had to reboot my phone to get them back online - this is essentially the same behavior as previously when i had left bcl_hotplug_enable on.

So, now it seems like I either can't turn the battery hotplugging off, or there is something else causing the cores to go offline.

This didn't happen on builds r48 and lower.

I'm on r51 now... but the changelog doesn't indicate any reworking of the BCL hotplug driver (yet), so we'll see what happens.

Thanks for the update, regardless. One other question - what does the "backlight dimmer" do? It sounds like it should be obvious, but I've never noticed a difference having it on or off in FKU.

---------- Post added at 07:16 AM ---------- Previous post was at 07:11 AM ----------

Going to try this to turn the darn BCL driver off (disabling via su.d script).

Thanks, Yoinx!
[Nexus 6  Original Android Development] franciscofranco:
Don't bother asking for FK for Nougat or ETAs, things will be released after Google pushes the final Kernel source (which haven't done so by the time of this post). So save me and yourself some time before posting about it.
[Nexus 6  Original Android Development] Prack:
Can you fix the donate screen, still shows meal, meal, bigger meal, should be FKUpdater, meal, bigger meal or whatever the achievements are called :)
[Nexus 6  Original Android Development] firewhank:
I see other´s having their cpu2 & cpu3 offline when the battery is under 40%, but that doesn´t happens to me. Is that normal? I didn't turn off BCL. R51
[Nexus 6  Original Android Development] TonikJDK:
Yea we want "Bag of Nip for the cat"
[Nexus 6  Original Android Development] pkgnex:
It's not always 40% - just whenever the BCL driver detects battery current lowering beyond some threshold. It shouldn't ever happen above 40%, to my understanding, but there's not a set battery % that it always happens. For example, mine usually has to be in the 17%-21% battery range before the cores get kicked offline.
[Nexus 6  Original Android Development] franciscofranco:
I already made huge improvements on that screen, but it's only available in the beta channel (should push it to production tomorrow).
[Nexus 6  Original Android Development] pkgnex:
Stupid BCL $h!#

Franco,

I know you're busy, and I don't want to come off as just complaining... but here is my most recent experience with r51:

Even after turning off the bcl_hotplug_enable and the gcom,bcl.39 driver mode, my phone is STILL off-lining 2 cores around 20% - 25%, turning my phone into a laggy mess that never used to happen. Even worse, the cores will not come back online unless I do the magic dance of charging back well over 40% AND rebooting. I can re-charge to 100% but if I don't reboot, I'm stuck with only 2 cores. It's an odd experience having a fully-charged, thermally cool, phone that is crawling due to only having 2 cpu's online. My Galaxy Nexus was almost as fast before I retired it ;).

Due to my usage profile (having to re-charge between meetings at work and often hovering in the 20 - 50% range), this is causing me to boot a couple times each day. I used to be able to go for a week or more before I felt the need to reboot.

And here's the (not) hilarious thing - on a whim after my cores went offline today and wouldn't come back (I wasn't close to a charger), i just went into recovery and flashed r48 - the last kernel before this BCL madness started. When the phone booted up my 3rd and 4th cores had come back online, and my phone was smooth as butter - even though I was at 19% battery. The cores never went back offline, either!

Here's hoping the N6 Nougat franco.kernel (re)abandons BCL, or you find a way to automagically fix it or turn it off reliably with F.KU. I'll be standing by on r48 for a while, I think.
[Nexus 6  Original Android Development] ihancioglu:
Hi all,

I was able to workaround this BCL problem , defined bcl disabled in code so all cores are online while booting

static bool bcl_hotplug_enable = false;

as soon as all cores are assigned to correct governor, freq, etc. I have enabled bcl hotplug with init script,

write /sys/module/battery_current_limit/parameters/bcl_hotplug_enable Y

I don't face any governor problem after this setup guys.

Thanks,

Ibrahim
[Nexus 6  Original Android Development] franciscofranco:
Yes, that'll work.
[Nexus 6  Original Android Development] pkgnex:
So forgive this question, but how would I use the above to keep the BCL hotplug disabled permanently?

Would just having the first line in a start-up script accomplish that? Would I also have to have the second line (with the flag set to "N" instead of "Y")? Or is this something that needs to be accomplished in the kernel code?

Thanks in advance.
[Nexus 6  Original Android Development] ihancioglu:
You can disable bcl with

echo N > /sys/module/battery_current_limit/parameters/bcl_hotplug_enable

but this does not prevent stuck to performance gorvernor for cpu2,3 because BCL offline them before governor setup. So Francisco should disable it in code.
[Nexus 6  Original Android Development] pkgnex:
Franco seemed to have fixed the "cores stuck on performance governor" issue with r50.

HOWEVER, I have been using the line of code you mention in my start-up script since r49, and my cores are still going offline at low battery. I've even verified that it is being set (cat /sys/module/battery_current_limit/parameters/bcl_hotplug_enable returns "N"). Even worse, when the cores go offline, they won't come back on r49 through r51 unless I charge the phone over 40% AND reboot.

Flashing r48 eliminates these problems - even if my cores are off on r51 and I flash r48 without recharging, the cores are all back online even if I do this at 15% battery. This has never happened before r49, so I'm 99% sure it is the BCL driver causing the issue, and echoing the bcl_hotplug_enable flag to "N" is not actually disabling it on my device.
[Nexus 6  Original Android Development] franciscofranco:
Yeah but if BCL boots as disabled and then I enable it after governor/cpu init is done you won't have cores stuck which is what the other user said. I'll update the Kernel with this for N - waiting for the source code to drop.
[Nexus 6  Original Android Development] ihancioglu:
There are two posibility for offline cores, BCL(check current voltage and offline in some cases.) and thermal-engine(offline at certain battery levels.). So this looks like thermal-engine offline cores at certain battery levels. I think thermal-engine disabled at r48. This is only case that described your problem.

You can check the file at

/etc/thermal-engine-shamu.conf

You have a few actions that you take for this issue.

1- edit

/etc/thermal-engine-shamu.conf

that file for lower values.

2- disable core_control for thermal-engine

echo 0 > /sys/module/msm_thermal/core_control

But I don't know IF this harms your device as It will not offline any core on higher heats. But still reduce maximum freq on thermal cases.

3- completely disable thermal-engine

service thermal-engine stop

at terminal emulator.

Hopefully you get your answers.

Thanks,
[Nexus 6  Original Android Development] pkgnex:
I don't think it's the thermal driver - because it happens only at low battery and even when my phone is cool the cores stay offline. Seems like there is probably some sort of conflict between the kernel code Franco has to keep the cores from getting stuck on Performance governor and trying to turn off bcl_hotplug_enable with a start-up script, as Franco mentioned.

Sounds like Franco may be able to do his magic on his the first N kernel to help straighten this out. I'm keeping the faith until then!
[Nexus 6  Original Android Development] franciscofranco:
Hey friends! Here's FKUpdater 2.0, the most powerful release yet. I'm really proud of it: https://plus.google.com/u/0/+FranciscoFranco1990/posts/1Ft5939yL1x
[Nexus 6  Original Android Development] Phrodini:
Thank you. At quick glance that fku got me a bit,was surprised that there was a version 2 too
[Nexus 6  Original Android Development] franciscofranco:
I'm sorry, not sure I understand what you mean.
[Nexus 6  Original Android Development] ihancioglu:
It is absolutely thermal driver my friend. It is configured offline cpu3 at %15 battery level and offline cpu2 at %7 , does not matter what is temperature of the device. You should have to look at the file at "/etc/thermal-engine-shamu.conf"

You will find the section "[BAT-SOC-HOTPLUG]". You have to change action_info parameters to "0 0"

Then thermal driver will stop offline your last cores at low battery levels.

But you will have to change that file every rom updates as it is located at /etc/ and surely wipe every update.
[Nexus 6  Original Android Development] rignfool:
[MENTION=3292224]franciscofranco[/MENTION]

When using this mod

http://xdaforums.com/android/software/mod-magisk-v1-universal-systemless-t3432382/page106

I lose the dt2w toggle and the CPU boost menu in FKU...

As a byproduct I also lose boost control in per app profiles...
[Nexus 6  Original Android Development] Tysovwik:
Latest pure Nexus and franco 51, works like a magic ;)

input boost set to 1500 for snappy UI, default 250 too low,

bcl disabled.
[Nexus 6  Original Android Development] franciscofranco:
I don't know. Maybe Flar's code is wrong, I used his voltage control code to save me the trouble of implementing it. My voltage tables are stock though. I'll check his code :)

But clear why? Absolutely no correlation between my shared preferences and the CPU voltages...
[Nexus 6  Original Android Development] muntain:
R4+vomertweaks = 16 hours running and 70% battery left ;)

Now I'm going to try R5
[Nexus 6  Original Android Development] TEW999:
Thank you Franco. According to my kmesg I have a PVS bin of 4 and an SVS bin of 13 (whatever SVS bin means) but even with the PVS of 4 the voltage table is still wrong according to the known voltage tables for the snapdragon 805.

PS. My source for stock voltage settings are taken from the lean kernel FAQ page where all the stock freq tables are listed by PVS number
[Nexus 6  Original Android Development] PDP///M:
I have a pvs 4 and my voltages are wrong from 300-883mhz, or at least according to the voltage table in lean kernel page.
[Nexus 6  Original Android Development] flar2:
in drivers/clk/qcom/clock-krait-8974.c

/* Find the split freq for svs fmax */
ret = of_property_read_u32(dev->of_node, "qcom,svs-fmax",
&svs_fmax);

and in arch/arm/boot/dts/qcom/apq8084.dtsi

qcom,svs-fmax = <883200000>;

Everything over that freq is bumped up
[Nexus 6  Original Android Development] chief2842:
Do we have to reinstall vomertweaks, asking because my CPU MAX is showing 2649?
[Nexus 6  Original Android Development] franciscofranco:
Thanks for the heads-up :)
[Nexus 6  Original Android Development] TEW999:
Thanks guys for clearing that up. So basically there are 2 bins for this chip one for the lower frequencies and one for the higher frequencies. Not quite sure personally why Qualcomm has done this though.... And yeah I have noticed that that the jump between 883mhz and 960mhz is 90mv
[Nexus 6  Original Android Development] mr_clean5953:
not at all
[Nexus 6  Original Android Development] paychex:
And here come the issues. I'm UV 100mV across the board, I don't know what the problem is.

If you feel the need to undervolt (you don't need too) at least taper it as the frequency increases. Or just UV the lowest frequency

---------- Post added at 04:22 PM ---------- Previous post was at 04:21 PM ----------

So you still got 75% deep sleep? What else do you want?

---------- Post added at 04:23 PM ---------- Previous post was at 04:22 PM ----------

Did it on r4?
[Nexus 6  Original Android Development] gambit07:
Sounds like your phone might be doing other stuff for you too with R4, better get that reverted!

:good:
[Nexus 6  Original Android Development] githyanki:
You want Amplify, unfortunately it doesn't work yet until Xposed is updated for Lollipop. See here: http://xdaforums.com/android/general/guide-0-0-hour-idle-battery-drain-stock-t2973588
[Nexus 6  Original Android Development] dipstik:
No problems here. I typically have to resetup every time I flash something, but no crashes.

Pure shamu 3.92 fk r5 PA 1225 stock with vomer dual.
[Nexus 6  Original Android Development] cobyman7035:
when u autoflash using FKU app, does it reboot auto?
[Nexus 6  Original Android Development] rotaryheadrx7:
Yes it does.
[Nexus 6  Original Android Development] pinoyflayv:
Safe to run this Kernel with those voltages?

Since they don't correlate with the Snapdragon 805 voltages, is this safe with our device?
[Nexus 6  Original Android Development] pinoyflayv:
Earlier discussions...

Quote:

Originally Posted by TEW999

I don't know if this is normal or not but here goes. I've just updated to r5 and now as I'm able to look at the frequency vdd table I've noticed that my stock voltages do not fall in line with any PVS table. At 300mhz my voltage runs stock at 680mv which would indicate I have a PVS 13 CPU. However up at 2647mhz my voltage sits at 1110mv which correlates to a PVS 4 table. These numbers dont correlate with any known voltage table for the snapdragon 805. These are 100% stock voltages untouched by me. I'm running stock ROM with Franco r5 rooted with supersu

I don't know. Maybe Flar's code is wrong, I used his voltage control code to save me the trouble of implementing it. My voltage tables are stock though. I'll check his code
[Nexus 6  Original Android Development] franciscofranco:
If the device ship with these voltages then it's obviously safe...
[Nexus 6  Original Android Development] pinoyflayv:
Ok, thanks

Cool, thanks! Just making sure I wasn't cooking it...
[Nexus 6  Original Android Development] carlo1024:
Any idea guys when the franco kernel nougat for nexus 6 will come out? Thanks guys! =)
[Nexus 6  Original Android Development] zelendel:
Well considering that there is no source code for the the 7.0 nexus 6 kernel yet, I would say after it is uploaded.
[Nexus 6  Original Android Development] Sugarkryptonite:
Hi guys

Does this kernel solve the throttling below certain battery percentage that stock Marshmallow does?
[Nexus 6  Original Android Development] Neejay:
To a degree. It gives you the option to disable it, either by a kernel app or manually typing the command(s).

It's enabled by default. EDIT: it's "BCL"
[Nexus 6  Original Android Development] p34rp34r:
So I've been using FK for a while now, but I've had issues ever since r43 with what I think is related to memory. The issue doesn't occur on r43 and older, and occurs in every version afterwards, even the ones after the memory leak patch. However, no one else seems to be reporting anything like this, so I dunno.

Basically, once memory usage gets pretty high (only a few 100s of MB "free") stuff just stops working. Apps won't open or will crash endlessly and even some drivers fail to start. It usually hits YouTube first, whereby I'll watch a video and then the next video fails to play with an error message like "Playback failed, touch to retry." Rebooting will fix the issue for a while, until, of course, memory use gets too high. Clearing apps from recents or force stopping some apps has no effect. I have a logcat for the YouTube issue, but I was unable to get one for the apps crashing, since I couldn't open the Terminal app.
[Nexus 6  Original Android Development] deeppans:
FKU needs root access. Last few days people have raised concerns over SuperSU.

Considering all of this, which SU is safe to use?
[Nexus 6  Original Android Development] Shadow53:
I use this one:

http://xdaforums.com/nexus-6/general/root-t3231211/

It's open source and provides prebuilt binaries for Nexus devices here: https://github.com/seSuperuser/AOSP-SU-PATCH/tree/AOSP-N/bin
[Nexus 6  Original Android Development] westw:
Is it recomended to run Franco Kernel and Cyanogenmod 13 on Nexus6?

My Kernel now is 3.10.40-g2936e22 clyde@cyanogenmod
[Nexus 6  Original Android Development] macewank:
Is there something in this kernel that would be preventing me from writing to /system?

Have SuperSU 0.78 installed, trying to flash the Pixel Launcher stuff but when I try to copy the folder to /system/priv-app it's failing. I've double triple quadruple checked that root is on the phone and working......still can't get it to copy. Only thing I can think that I've changed beyond what I typically do is I am running Franco now.... I noticed after re-flashing root that FKU2 thinks I'm on r1 (despite being on r51)
[Nexus 6  Original Android Development] pkgnex:
Do you have enough free space on /system? It's a common problem to not have much headroom in that partition with the N6. Try deleting some system apps (slides, docs, sheets, foreign language keyboards are good candidates) if there's no space.
[Nexus 6  Original Android Development] macewank:
Good call. That was it.

Can't believe I missed that. Sorry!!!
[Nexus 6  Original Android Development] pkgnex:
NP.

Glad it was an easy fix!
[Nexus 6  Original Android Development] franciscofranco:
r52 is up and running, get it now https://plus.google.com/u/0/+FranciscoFranco1990/posts/XfnkL5LDhtT
[Nexus 6  Original Android Development] Stroky:
Great. Thanks for the update.

Would like to test this kernel again.

Let's see if this works with exodus.

Gesendet von meinem SGP511 mit Tapatalk
[Nexus 6  Original Android Development] TonikJDK:
Got it. So far good, but its only been a minute or so. Looking forward to the power saving profile changes as that is what I run.

FWIW, FKUpdater did not see an update available. So i grabbed the zip directly and flashed via recovery. But now FKUpdater says I am up to date and recognizes 52. Maybe I was too fast.