yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] franciscofranco:
No, I don't like it.
[Nexus 4 Original Android Development] Sim-1:
I have 2 questions: how come in the Governor settings even if I choose Performance, from the general menu I still read Interactive? When I click on the options I see that Performance is selected.

Also shoud I tick the box next to Apply CPU settings and Apply Governor on start?

Thank you and Merry Christmas to you all!
[Nexus 4 Original Android Development] jak3z:
So far R20 is like mixing the battery life of R18/19 and the performance of R14/15. I'm in love with this kernel right now. Anything I can test to try and get panics Franco? Just to see if it's stable.
[Nexus 4 Original Android Development] Nark.GA60:
Unfortunately, I still find the kinetic scrolling to feel a bit unnatural. Like there is a slight lag that makes me have to compensate when I fling.

I'm not sure how better to describe it for you, Francisco.
[Nexus 4 Original Android Development] elk2210:
May I ask why you not like it? Does it come with any downsides?
[Nexus 4 Original Android Development] doree:
The franco.Kernel is generally meant as a Kernel that's "as stock" as possible. Adding more Features as usually meant for could lead into way more Problems as we already have. And this simple fact unleashes the true power of our devices. ;)

Gesendet von meinem Nexus 4 mit Tapatalk 2
[Nexus 4 Original Android Development] elk2210:
Yes, I understand this point. But there are some "non-stock" things, like faster charging via USB, that can be toggled by the Franco-app. I would be happy to have this thing the same way :)
[Nexus 4 Original Android Development] estallings15:
I've had sweep to wake on another device. My phone liked to wake itself up in my pocket. Not to mention it was bad on battery life.
[Nexus 4 Original Android Development] mosd:
20 is fast! Like it very much. But my battery stats don't seems to reset it says it has been on for like 3 days!
[Nexus 4 Original Android Development] zephiK:
Im not sure how sweep2wake is implemented but the galaxy Nexus for Franco kernel had the pgm kernel module which used very minimal battery life.

I think the guy mentioning Franco kernel staying close to stock makes no sense. No kernel can be represented as close to stock.
[Nexus 4 Original Android Development] leets4uc3:
+1.

I back up whatever Francisco does. He is a god and knows a lot moar then I ever will about phones.
[Nexus 4 Original Android Development] sixdaysandy:
Is it a complete coincidence or maybe my Christmas Day hang over, but is colour and auto brightness just superb on R20?
[Nexus 4 Original Android Development] doree:
What I actually meant was, that this kernel isn't bloated with stuff not everyone has a usage for. Exactly the same meaning as franco himself has stated in his first post! ;)

Gesendet von meinem Nexus 4 mit Tapatalk 2
[Nexus 4 Original Android Development] franciscofranco:
The diff:

diff --git a/arch/arm/kernel/mako_hotplug.c b/arch/arm/kernel/mako_hotplug.c
index a53d186..662ec0d 100644
--- a/arch/arm/kernel/mako_hotplug.c
+++ b/arch/arm/kernel/mako_hotplug.c
@@ -20,10 +20,10 @@

/* threshold for comparing time diffs is 2 seconds */
#define SEC_THRESHOLD 2000
-#define HISTORY_SIZE 10
+#define HISTORY_SIZE 5
#define DEFAULT_FIRST_LEVEL 80
-#define DEFAULT_SECOND_LEVEL 25
-#define DEFAULT_THIRD_LEVEL 50
+#define DEFAULT_SECOND_LEVEL 50
+#define DEFAULT_THIRD_LEVEL 25
#define DEFAULT_SUSPEND_FREQ 702000

struct cpu_stats
@@ -174,7 +174,7 @@ static void decide_hotplug_func(struct work_struct *work)
pr_info("THIRD: %d\n", third_level);
pr_info("COUNTER: %d\n", counter);
*/
-
+
if (load >= first_level)
{
first_level_work_check(SEC_THRESHOLD, now);
@@ -183,7 +183,7 @@ static void decide_hotplug_func(struct work_struct *work)
}

/* load is medium-high so online only one core at a time */
- else if (load >= second_level)
+ else if ((load >= third_level && stats.online_cpus < 2) || load >= second_level)
{
/* feed it 2 times the seconds threshold because when this is called
there is a check inside that onlines cpu1 bypassing the time_diff
@@ -197,6 +197,17 @@ static void decide_hotplug_func(struct work_struct *work)
return;
}

+ /* if two cpus are online while the load is just above the low zone
+ then its most than likely that the user is interacting with the UI
+ so instead of onling/offlining cpu1 every now and then lets keep it
+ online until the user is not interacting anymore. This should save
+ some resources that are ineherent to the hotplugging routines */
+ else if (load >= DEFAULT_THIRD_LEVEL && stats.online_cpus == 2)
+ {
+ queue_delayed_work_on(0, wq, &decide_hotplug, msecs_to_jiffies(HZ));
+ return;
+ }
+
/* low load obliterate the cpus to death */
else if (load <= third_level && stats.online_cpus > 1)
{

I haven't reviewed the code throughly yet. Nothing too fancy, but its effective as far as I can see.
[Nexus 4 Original Android Development] Redneck Trash:
So the kernel got smarter again?
[Nexus 4 Original Android Development] ksilver89:
In this case, there is no intercept when load >= DEFAULT_THIRD_LEVEL and online cpus = 3, at this load level it is needed to offline 1 core, your thought?

EDIT: Another situation is when third_level is set higher than DEFAULT_THIRD_LEVEL (example: 35), when load = 30 && online cpu = 3, it will offline all cores and cause a load spike on cpu0.
[Nexus 4 Original Android Development] pikachukaki:
Im wondering why when i have a great battery life but at the moment im starting using my device the battery drops from a cliff...and also 10-15minutes after i remove the phone from charger after a overnight charging it drops like hell...
[Nexus 4 Original Android Development] Goku80:
use franco's profile in color settings...best in my opinion:)
[Nexus 4 Original Android Development] immature:
Fku keeps resetting my Governor to Conservative - isn't it supposed to default to Interactive now?

Running r134 but this has been happening since before m2 :( Have tried clearing app data and rebooting, clearing app data and reflashing, but it keeps sticking to Conservative. The app let's me change to Interactive, but next time I go into Frequencies and Voltages, it's back to Conservative!

Is anyone else having this problem? Maybe it's a permissions issue on the file - where is the file that controls the Governor, and what permissions should it have?
[Nexus 4 Original Android Development] Arstoien:
This can only happen if you've got another app resetting the governor.

Sent from my Nexus 4
[Nexus 4 Original Android Development] Foxnov1990:
Just a long shot here but are you clearing app data from the app or settings -> apps?

Try clearing app data from settings -> apps and reboot... it should work like that

(clearing data from app didnt work for me)
[Nexus 4 Original Android Development] franciscofranco:
Not so sure about that. Im not too fussed about having 3 cpus online though, rather have 4 than 3 for example.
[Nexus 4 Original Android Development] immature:
I totally didn't think of that! Was clearing data from the app.

Tried clearing data from the launcher and rebooting.. Didn't work :( Also tried uninstalling and reinstalling the app, but still not sticking to Interactive...

So maybe permissions on the file? Which file controls the Governor?

I don't have any other apps setting the Governor apart from fku...
[Nexus 4 Original Android Development] re4lsk:
What rom do you have? Maybe you changed it in ROM settings>performance

Enviado desde mi Nexus 4 usando Tapatalk
[Nexus 4 Original Android Development] immature:
Using stock ROM, so don't think there is anything like that...
[Nexus 4 Original Android Development] Net.silb:
Hey Franco, if I suggest a different logic to hotplugging, would you consider using it instead of the current one?

(If you think it's better of course...)
[Nexus 4 Original Android Development] Godaemon:
Hello guys could you tell me if these are the default in M2? Thanks

Via NeXuS 4 / xda-developers app
[Nexus 4 Original Android Development] steviewevie:
Are your superuser app permissions ok with the FKU app?

Sent from my Nexus 4
[Nexus 4 Original Android Development] 3dupunk:
Thinkingbridge (I believe that's the name) ROM, it's been my daily driver since i found it and I don't see me flashing anything else. It's fast stable and extremely customizable, add franco kernel to the mix and I'm good. I'm a flash-a-holic btw, I just love the combo
[Nexus 4 Original Android Development] franciscofranco:
I want feedback, so yes, I consider good ideas!
[Nexus 4 Original Android Development] Net.silb:
Ok, great!

I'm working on it...

Will let you know when I'm done! :)
[Nexus 4 Original Android Development] franciscofranco:
Post it here so that everybody can see it.
[Nexus 4 Original Android Development] immature:
Should be, everything else seems to be sticking (colour settings, max freq, IO scheduler etc). I'm out of ideas guys :(
[Nexus 4 Original Android Development] hospital349:
When all else fails... Full Wipe FTW! - I know it's a little over the top for something so minuscule. It's just that in the time it's taken you to figure this out (without such luck, may I add), you could've fully wiped your device and restored it back to its former state. :)
[Nexus 4 Original Android Development] steviewevie:
Have you tried removing and reinstalling FKU?

Sent from my Nexus 4
[Nexus 4 Original Android Development] thuynh022:
[MENTION=3292224]franciscofranco[/MENTION]

Random reboot earlier browsing the web.

Running 134 on paranoid android Apr 26

http://db.tt/74UxkQWN
[Nexus 4 Original Android Development] liviugreuu:
As the first post in this topic, I want to hello! everyone and thank Franco for you work.

I installed Kerner stable than it was a problem. in AnTuTu range from 8000-16000. The stock was at 18000. AnTuTu is an error or Kerner goes well on my device? It can be a erroare installation?

I have not changed anything in the kernel, no voltage or guverdador
[Nexus 4 Original Android Development] 75markus:
hello, too :)

don´t trust any benchmark, is your phone running fine or does it lag ?

antutu results can differ a lot, so better check your individual feeling with the kernel ...
[Nexus 4 Original Android Development] Josuhu:
Kernel runs fine. you will get greate performance in real life and amazing battery life compared to stock. Don´t care about benchmarks because the scores wont run your phone smoothly or save your battery. Benchmarks are also optimized for different hardware and coding and you might get bullcrap numbers with a space rocket but the guy next to you kicks your but with a Lada.

Stock may give you a better benchmark score but it will kill your battery for sure. You will be happy with Franco for sure.
[Nexus 4 Original Android Development] eths83600:
Hi guys, I'm a freshly new user of the nexus 4. Coming from s2.

I've directly unlocked and rooted it.

Followed by flashing this kernel.

I bought the app too, loving the increased sound feature.

Everything is smooth.

I don't feel any need for tweaking it.

Thanks!
[Nexus 4 Original Android Development] immature:
I did remove / reboot / reinstall app, but no luck.. Might have to try full wipe, but kind of wanted to avoid that :)
[Nexus 4 Original Android Development] paaaulo:
Make sure you are using latest 9.3.1. Clear app data.
[Nexus 4 Original Android Development] cool.darshak:
Hey I gave an idea too... Few posts back... See if u like it :)
[Nexus 4 Original Android Development] franciscofranco:
Re-paste please.
[Nexus 4 Original Android Development] immature:
Fixed it! Set permissions of the file to 666 and the app changes are sticking now. Not sure why but they were on 444 before :confused:

File path is /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor btw.

Franco, is it possible for you to reset the permissions on these files when flashing the kernel through the app? :)
[Nexus 4 Original Android Development] nellisere:
When setting headphone gain do I need to reboot? As I''m not noticing any difference when changing it and starting music.
[Nexus 4 Original Android Development] nexusmaniac:
I don't think you need to reboot but try it anyway, I also don't notice any difference when changing headphone gain, I'm pretty sure it depends on how high quality the headphones are e.g. if you have really good ones it wont make much of a difference but if your using cheap ones it will :)
[Nexus 4 Original Android Development] cool.darshak:
how about introducing the time and frequency factor also...

...just psuedo code...m sure there might be problems in below code...may be franco can work on it...

freqhigh = 1350 Mhz

freqmed = 1242 Mhz

freqlow = 1024 Mhz

highload = 90

lowload = 60

mediumload = 25

timehigh = 10 secs

timemed = 5 secs

loop

if load <= mediumload and flag = 0 then

only one core online

scale core = freqlow

else if load < lowload and flag = 0 then

one more core online

flag = 1

scale online cores = freqmed

else if load < lowload and flag = 1 then

one more core online

flag = 0

scale online cores = freqhigh

else if load > highload then

all core online

scale all cores = freqhigh

else

flag = 0

end if

loop

if x > timehigh secs

flag = 1

online core = freqlow

else if x < timemed secs

flag = 0

online core = freqhigh

else

flag = 0

online core = freqmed

end if

end loop

end loop
[Nexus 4 Original Android Development] mountainloafers:
Here are my color settings. I was going for the most realistic colors for photography. Overall, I feel these settings are the best for my screen. True, bright whites, visible grays that are nicely separated from deep blacks and great color representation (not overly saturated). Give them a try and see what you think.
[Nexus 4 Original Android Development] germanj:
I guess it's not apparent if you don't text fast enough. For me the letters lag behind and when I'm done typing the phone is still writing the message.

I've reverted to 127 and SwiftKey seems fine now, which is odd considering both hotplug routines are very similar.
[Nexus 4 Original Android Development] yokuyuki:
I can't find the stock voltage table, but for nominal, your starting voltage is a lot higher than the other bins. Binning isn't exactly accurate though so although yours was binned as nominal, it could perform like a fast or fastest allowing you to undervolt a lot more than those on better bins.

Uh no, there's no correlation between bin and UV performance if you're going to be talking about relative voltage decrease because the better bins are already running on a lower stock voltage. Now if you were talking about absolute voltage, then yes, the best bins will have the lower voltages.

I feel like I need to draw a finite state automata to keep track of all the possible states and make sure all the input transitions are taken care of.
[Nexus 4 Original Android Development] martinsxz:
I'm using Franco's since I've bought my Nexus4 but the last 3 or 4 updates seems to drain my battery too fast. In r111 it was 20h+ with 4-5h SOT with only WiFi on. Now on r134 or m2 it's about 12-13h with 3h SO, only wifi. I've tried undervolting and conservative profile, but with no success. Anyone having the same issue? Any suggestions tought?

Btw, I'm at PA 26/04.
[Nexus 4 Original Android Development] yokuyuki:
Fixed with 100% awesome indentation.
[Nexus 4 Original Android Development] Net.silb:
Try making the hotplug values the following:

high load threshold - 90

medium load threshold - 50

low load threshold - 30
[Nexus 4 Original Android Development] CrimsonSmear:
The reason 90,25,50 was so popular and accepted was due to easy cpu onlining, which alleviated lag/stutter.

If the intention is to adapt 85,40,25 (or the like), an idea to introduce a minimum core (cpu_min) variable to the hotplug driver might be warranted.

This would offer the options for single-core, dual-core and quad-core (even tri-core, if so desired), the ability for the driver to skip over portions of hotplug code, also eliminate the need for the easy cpu onlining and further dual/quad-core requests.

Have you tried enabling input_boost? (it was recently disabled)
[Nexus 4 Original Android Development] drawde40599:
I no u said works with 127 but have u tried backing up SwiftKey and wiping swiftkey data./reboot? If problem still there u can just restore.... Its worth a try :D
[Nexus 4 Original Android Development] Andyh2285:
While on 134 I was facing problems with my WLAN.

First of all the signal was extremly poor. The second thing was, that after beeing in in another network my N4 couldn't even find my WLAN at home when returning. (Distance at home: about 1-2m)

After reverting to 127 the issues where solved.
[Nexus 4 Original Android Development] Bobtehblob:
No need to reboot. Just pause your media playback, change value. Wait a few seconds, then resume playback.
[Nexus 4 Original Android Development] ksilver89:
I have this hotplug idea keep ringing in my head, so bad that I couldn't sleep until I get it out of my head.

The idea is simply introduce a variable threshold to allow user adjustable range, in order to create a green zone where the kernel should keep the current core configuration until load drop below the green_threshold, which is calculated based on factor of current core, in order to prevent load spike due to core goes offline too aggressively and cause stutter/lag. (And it is quite similar to lulzactive's up down threshold)

Imagine this scenario, Online core = 1, this is basically the same with current hotplug for single core scenario, nothing new here. When the load passed the cold_threshold (or third_level), second core goes online. (Sorry, in franco kernel is based on second_level.) If the load higher than hot_threshold (or first_level), all cores go online. Simple.

In this case, we have Online core = 2, this is where we see the green zone come into work. The variable threshold is basically the second_level, which allow online 1 extra core instead of going full power to 4 cores when load only goes up slightly.

The green_threshold can be calculated based on formula below:

green_threshold = variable_threshold * (online_core - 1) / online_core - down_differential

For example:

cold_threshold = 20

variable_threshold = 60

online_core = 2

down_differential = 5

the calculated green_threshold is 25, which mean in between load 25 - 60, the second core will remain, anything lower will go back to 1 core, and only plug in third core when goes above 60.

And IT SCALES....

when online_core = 3, the green_threshold will become 35.

when online_core = 4 , the green_threshold will become 40.

when online_core = 5, the green_threshold will become 43.

.... and when online_core = 15.....ok ok you got it.

so in conclusion, when more cores go online, the green zone simply become narrower to allow more aggressive offline while maintaining the load across cpus.

I hope this can sparks something for you thinkers, cheers!

Disclaimer: Any value given above is to provide example rather an actual suggestions, optimal value should be obtained through actual calculations and experiments. I don't mind if you boil this thing entirely down to nothing, I just need a good night sleep that's all. ;)
[Nexus 4 Original Android Development] leets4uc3:
**** is about to get weird :)
[Nexus 4 Original Android Development] Bobtehblob:
My exact thought!
[Nexus 4 Original Android Development] Net.silb:
My suggestion is very similar to yours:

very_low_load = cold_threshold

low_load = green_threshold

medium_load = variable_threshold

high_load = hot_threshold

The difference between my way and yours is that I also consider touch events.

I want to see what Franco has to say about our suggestions... :cowboy:
[Nexus 4 Original Android Development] Stylez Ray.:
So glad to see a real discussion and professional talk and not just "I want this and that" or "When will you implement xxx" or "Fix this or I will change to xxx". A rarity these days.
[Nexus 4 Original Android Development] republitarian:
So do fast and faster bin CPU's start at a lower voltage than mine?

Mine started at +200 more across the board. So the 384=900mv and 1512= 1200mv

Now I'm at 384=700mv and 1512= 1000mv
[Nexus 4 Original Android Development] formicae:
My faster was 850-1150, currently running the same values as you are.
[Nexus 4 Original Android Development] republitarian:
Okay this makes sense now. Have you tried going another -25 across? I finally crashed at 675 - 975
[Nexus 4 Original Android Development] Dan53:
Mix them both, I think we want scaling because it'll stay on 4 cores to much if low_load is too low. Of course touch events are important too, I don't think we need two cores on a touch event though, if we check a message we'd have 2 cores come online... Not sure about efficiently there?

Also I noticed the history_size is decreased, it means we are more prone to load spikes, on my phone so i cant look at the code, when is each load taken?
[Nexus 4 Original Android Development] Net.silb:
In terms of touch events, there are two values that can be tuned to a user's liking:

touch_event - Can be set to either "None", "Touch", or "Swipe".

"None" - Don't do any special hotplugging because of user interaction with the screen.

"Touch" - Hotplug according to cores_on_touch_event value anytime the screen is touched.

"Swipe" - Hotplug according to cores_on_touch_event value anytime the screen is swiped.

cores_on_touch_event - Minimum number of cores that should be online during touch_event, if touch_event = "None", this value doesn't matter.

Get it?
[Nexus 4 Original Android Development] martinsxz:


Other than that, my wakelocks and apps seems to be fine too. Any other possible solution?
[Nexus 4 Original Android Development] Dan53:
Yeah I see now, that sounds good. Set defaults at:

Cores_on_touch_event set to 2

Touch_event set to swipe

That would solve most issues with not wanting 2 cores to be on for simple things
[Nexus 4 Original Android Development] franciscofranco:
I don't know how it would work just by reading pseudo-code. I'll code that and try. Here's r666 with my last changes.
[Nexus 4 Original Android Development] Net.silb:
This r666 is with the changes I suggested?
[Nexus 4 Original Android Development] Jsparta26:
Oh **** Franco is the devil lmao just kidding. Are these changes suppose to improve the hotplug driver?
[Nexus 4 Original Android Development] franciscofranco:
No, I didn't have any time for that yet. Its with the changes I diffed few pages back.
[Nexus 4 Original Android Development] Net.silb:
K, thanks.

Let me know if there is anything in what I suggested that isn't clear or anything like that.
[Nexus 4 Original Android Development] formicae:
I once went lower, but would get intermittent reboots and decided I didn't have the time to tune each freq. -150 across the board is fine by me, things stay nice and cool.
[Nexus 4 Original Android Development] franciscofranco:
If anyone tries this r666 clear apps data because I changed the load thresholds.
[Nexus 4 Original Android Development] 3dawg:
Clear the kernel updater app data?
[Nexus 4 Original Android Development] RiThBo:
I think the changes are good performance wise (yes I know its a bit early :) ). I've previously had lag when scrolling the the widgets section of the app drawer, now its virtually gone - a little bit left here and there! Thanks
[Nexus 4 Original Android Development] Underground_XI:
Can somebody tell me what settings are good for the sound control boost/gain?
[Nexus 4 Original Android Development] nachordez:
#666 seems as smooth as previous builds for me. That's good.

Let's see battery in more time

Nexus 4, stock kernel, last Franco.kernel nightly
[Nexus 4 Original Android Development] paaaulo:
Boost +2, gain -6.
[Nexus 4 Original Android Development] tlf55:
R666 seems smother for me let's see the battery .. But I've a question .. Is that normal that I don't have fsync in the option anymore ? I cleared app and reboot too ..
[Nexus 4 Original Android Development] franciscofranco:
Yes, I was doing some code changes and forgot to re-apply it.
[Nexus 4 Original Android Development] Stylez Ray.:
80/50/25 ?

Gesendet von meinem Nexus 4 mit Tapatalk 2