yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Original Android Development] Martin-Doc:
Today I went jogging and I experienced a really heavy audio lag when playing music and screen off. The audio coach from the Runtastic app also suffered from this. It was so annoying that during workout I tried to set up the per app mode for the music player to a high frequency, but without any effect. I ended up forcing the screen to be on for the whole time, as this was the only thing that worked.

Could somebody suggest me what to change in the kernel settings so that this won't occur again?
[Nexus 5 Original Android Development] omvir:
I don't use those apps but I also have never experienced what you have.. I would try increasing min speed until it stops. And try to drop first_level to 0 under hot plug controls. That will make it run on 4 cores.
[Nexus 5 Original Android Development] Martin-Doc:
It was the first time after a long time period that this audio issue occurred to me. Thanks for the ideas.
[Nexus 5 Original Android Development] JNewms:
Ok guys, so I may or may not have had quite a few drinks last night and forgot to plug my Nexus in.. Here's the results I've had so far. What do you think?
[Nexus 5 Original Android Development] :
Is this ment to be good? I'm currently at 1d 10h 48m with 3h 10m SOT and did non of this crazy kernel settings. Flashed R27 and R28 on the same cycle.

Not bragging but just wondering.

EDIT: 8% left.
[Nexus 5 Original Android Development] JNewms:
I'm happy with it so far, but there's more I need to tweak. I stopped my tinkering short due to work, then going out for new years. I'm still experimenting to so see how conservative I can go without losing smoothness in the UI. I'm hoping to be extremely conservative with normal tasks, and then have per app modes for games and things that'll need a boost. It's definitely a process.
[Nexus 5 Original Android Development] dmmarck:
I prefer using the regular app because of System Monitor. Such a great feature!
[Nexus 5 Original Android Development] Bei60:
sorry, new around here. Won't happen again.
[Nexus 5 Original Android Development] JCreazy:
I had the weirdest thing happen, last night I flashed test image 8 before i went to bed and I checked in about phone to make sure it flashed. I woke up this morning and it said it was on test image 7, I am so confused. Regardless, I flashed test image 8 again and everything seems to be doing ok.
[Nexus 5 Original Android Development] zephiK:
Maybe you were dreaming about flashing a Franco Kernel :laugh: (sarcasm of course)
[Nexus 5 Original Android Development] PeQuEsan:
Only explanation I can think of: you fastboot boot boot.img instead of fastboot flash boot boot.img, so you temporary started with boot8... Then, during night, you and some soft reboot or similar, which reverted you back to flashed boot7.... ¿?
[Nexus 5 Original Android Development] sordna:
Latest N4 kernel is the glorious r193
[Nexus 5 Original Android Development] franciscofranco:
It changes when your thermal throttled - but that is agnostic to FKU.

Flash test8, don't boot it, flash it.

No :eek:

No, there is not.

Watchdog was triggered, no idea why.

Some app must've kept using your Wi-Fi. Turn off the always scanning option, should help tons.

Simple, if you have scanning option on Wi-Fi enabled and GPS and then if you have some app making use of your location you can kiss goodbye to your battery.

Fantastic!

Simple, if you have scanning option on Wi-Fi enabled and GPS and then if you have some app making use of your location you can kiss goodbye to your battery.

Call your carrier!
[Nexus 5 Original Android Development] franciscofranco:
I'm so happy with r193 :) Can't wait for N4's 4.4 source to hit to merge it all together!
[Nexus 5 Original Android Development] noneabove:
Hell, the galaxy nexus is up at 392.. Development forever

---------- Post added at 12:28 PM ---------- Previous post was at 12:26 PM ----------

Only reason I'm sad I sold my nexus 4 was how mature your kernel was on it, but I'm sure I'll be happier here soon enough ;)
[Nexus 5 Original Android Development] KoRRo89:
i've done a quick search inside the thread, but i wasn't able to find a full list of the features of this kernel. it would be nice to have the full list on the op...
[Nexus 5 Original Android Development] marco.roman89:
I am running it as well and found this fix for me. All works well now.

1- Settings -> Apps -> Hangouts -> Wipe Cache and Data -> Force Stop

2 - Settings -> Mobile Networks -> Network Operators -> Select Choose Automatic Network(Even is it's already shown by your carrier, do it again.)

3 - Then in TWRP/Clockwork just wipe cache and Dalvik cache -> Reboot and success!
[Nexus 5 Original Android Development] franciscofranco:
I don't post changelog/feature lists in the OP, I don't like to advertise Kernel features. You can either follow up the changelogs that I push when I release a new Kernel and search for them, or you can read my github repo commit history. This is a developers forum and I'm very careful when writing commit messages so that anyone can follow up easily, I'm sure you'll get around to it easily.
[Nexus 5 Original Android Development] dazz87:
Thats the thing those setting were all turned off last night. I just flashed 8 this morning. Will check tomorrow if the issue is there again. Maybe there a app thats killing the battery while its in sleep
[Nexus 5 Original Android Development] foueddyf:
For peeps that have trouble flashing Franco's boot imgs, if you have Franco's beta FKU Pringles, you can just move the img file to its kernel_backups folder and then do a restore from the app.

Not sure why nobody mentioned it. It seemed common practice with Franco's N4 test kernels.
[Nexus 5 Original Android Development] franciscofranco:
I can't really advertise my paid app anymore or I'll face some nice warnings and possibly a short ban in the future, but yes, thats possible using the latest beta version of Pringles - now renamed to FKU as its leaving alpha state soon!!
[Nexus 5 Original Android Development] ChazzMatt:
We didn't mention it because that function did NOT work until like yesterday. Has been mentioned and Franco said it did NOT work. He had not re-written it to function properly, so we were having to use Flashify

It works now, with the newer version of Pringles.

see? From a couple of days ago? Didn't work.

Now it does work.
[Nexus 5 Original Android Development] Batfink33:
100% A lot of devs like to shout about their 'snake oil' in their kernels when they're not very good. It attracts a lot of people but means nothing!

Sent From My Nexus 5 Powered By Franco Kernel
[Nexus 5 Original Android Development] foueddyf:
Glad to hear!

Yep, sorry about that. It sure works now :)
[Nexus 5 Original Android Development] tr1cky1:
But why does it throttle after 10secs of cpu stress to 1267 MHz and at just 33°c battery temp?

Gesendet von meinem Nexus 5 mit Tapatalk
[Nexus 5 Original Android Development] dandwhelan:
Why do I have to apply the Kernels settings after every boot? Using Pringle BTW :)
[Nexus 5 Original Android Development] franciscofranco:
Happy new year everyone.

There is no "franco documentation". There are Kernel documentation docs:

https://github.com/franciscofranco/....4-kk-r1/Documentation/cpu-freq/governors.txt

I don't know what you're up to, but two things:

1 - Wi-Fi drivers are 100% stock

2 - FKU has nothing to do with Wi-Fi nor is it related to it by anything.

What what issues might those be? I just changed my min freq and its working fine,

Weird, but I just reproduced it. Its on the Kernel side, not app, Thank you! :)

Sorry I dunno, there are obviously no BT changes on the Kernel. I'll buy sixaxis app and try to reproduce this by hooking my DualShock 3 and see if it happens.

No.

2 things:

1 - That patch is in the rom side

2 - There is a Kernel patch for that feature, but it has not been yet approved by CM team and even if I merge it afterwards it needs rom support.

No, its dumb as fúck if you do that.

Weird, but I just reproduced it. Its on the Kernel side, not app, Thank you! :)

No idea, can't reproduce. Can I ask you to increase min freq with a per-app mode just for that app and let me know what happens? Thanks.
[Nexus 5 Original Android Development] JNewms:
Mine is still over 40%. I definitely think I'm going in the right direction with this. My battery is definitely showing improvement.
[Nexus 5 Original Android Development] Martin-Doc:
During the jog I increased the minfreq with per app mode to 883 with no effort, next time I will try higher and report.
[Nexus 5 Original Android Development] franciscofranco:
I bought sixaxis controller app, hooked my ps3 controller to my N5, played Beach Buggy for 15m, finished the round, disconnected the controller and boom, kernel_panic. I'm gonna try to understand why, but I'm glad I could reproduce it :)
[Nexus 5 Original Android Development] roilosh11:
Just what I reported earlier.. glad I'm not the only one :)

Hope you can fix it.
[Nexus 5 Original Android Development] franciscofranco:
Yeah think I fixed it, I was destroying the workqueue on input_disconnect, I just thought the API meant something else with "input_disconnect", so with the workqueue destroyed the Kernel hit a null pointer exception. I'll test a couple more times, but it didn't crash again since I fixed it.
[Nexus 5 Original Android Development] roilosh11:
Nice, waiting patiently for the boot img. :thumbup::thumbup:
[Nexus 5 Original Android Development] ZacksBuilds:
Glad I don't use OTG, glad you can reproduce! :D

Device: Nexus 5 16gb Black

ROM: AOSPA 4.0BETA w/ Franco r27
[Nexus 5 Original Android Development] Enddo:
me too. here's to hoping the min/max frequency setting bug can get fixed in that update :victory:

keep up the great work franco
[Nexus 5 Original Android Development] :
Ups, sorry I missed that. I thought you gonna post the screenshots before charging it so I didn't look at the batt %. Sorry^^
[Nexus 5 Original Android Development] franciscofranco:
Fixed too :)
[Nexus 5 Original Android Development] franciscofranco:
I was reading about the governor tunables and it got me thinking, if anyone has that music skips during screen off you change timer_slack to -1 and see what happens? You can use my app, trickster, or terminal command echo -1 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack

Thank you!
[Nexus 5 Original Android Development] nad4321:
How can we change when the other 2 cores are activated? Any way of having always 3 at least instead of 2? Also what settings for voltage do you recommend for max battery life?
[Nexus 5 Original Android Development] TrenchKato:
Three cores and max battery life are kind of contradictory...
[Nexus 5 Original Android Development] franciscofranco:
I'll be waiting for someone that qualifies to try this before I push r29.
[Nexus 5 Original Android Development] nad4321:
Its just to experiment... Battery life in terms of voltage though not speed
[Nexus 5 Original Android Development] franciscofranco:
You cannot set 3 online cores with FK, its either 2 always online or 4 always online by changing the tunable to 0.
[Nexus 5 Original Android Development] Enddo:
undervolting doesn't really have an effect on battery life too much. depending on usage, we're talking about an extra 10 - 30 minutes of usage
[Nexus 5 Original Android Development] bigbear6708:
Franco.. Do I qualify to test? Lol. BTW, how do u stay so content on a stock ROM... I'm trying.. But the flash big is killing me.. Been too long since I been on nexus! Lol
[Nexus 5 Original Android Development] kilometers4:
Download Xposed framework and the gravitybox module. It has many features of custom roms.
[Nexus 5 Original Android Development] fbf2201:
Just to tell you that xposed framework is not the reason for your battery drain.

5 h+ sot with UV 50 (300 MHz at 700 mV), input_boost_freq at 1190400, rest default. Don't know whether changes take effect anyway. ;)

Auto brightness, wifi always on, Google maps greenified - otherwise no magic.

Reading is not even from 100% because of flashing r27 and a drop with flashing r28.
[Nexus 5 Original Android Development] big_adventure:
Battery life has been spectacular with r27.

12h on battery, 49% left, 3h47 SoT. Consists of email, WhatsApp, texts and reading for a while.

Forgot to mention, this was on LTE all day.
[Nexus 5 Original Android Development] Ben36:
Please don't add a charging led into the kernel, there are plenty of apps that can do it for people
[Nexus 5 Original Android Development] Enddo:
i love how you undervolt, underclock, tweak kernel settings AND greenify your apps. yet that is your proof that xposed doesn't eat battery.

undervolt, underclock, tweak kernel settings and greenify apps on a custom rom with features you need from xposed/gravity box and i bet you'll get even better battery results

i recommend cataclysm for those who want a near stock rom :good:

---------- Post added at 05:41 PM ---------- Previous post was at 05:41 PM ----------

i have to agree. no bloat
[Nexus 5 Original Android Development] :
+1
[Nexus 5 Original Android Development] donwhall70:
Xposed doesn't eat battery.
[Nexus 5 Original Android Development] thesebastian:
Hey franco, the other day i was worried because my device shut down while i was driving (using maps navigation/GPS + the sun overheating the N5 ). This was because of extremely high temperature.

After that, i needed to wait a few minutes to be able to turn on the phone.

Maybe it's a problem with my N5 or maybe it was the r26 kernel ( i read that you fixed something on r27 ).

Anyway...I'm posting the last_ksmg just in case it's useful.
[Nexus 5 Original Android Development] :
Would you mind stop slandering xposed framework? Until you post a proof it's just disrespectful to claim the framework.
[Nexus 5 Original Android Development] Pete182:
I had this too and my phone went into a boot loop. I was using earlier releases of the franco kernel as well so it's been around for a while. Hoping this gets fixed somehow.
[Nexus 5 Original Android Development] thesebastian:
Glad to hear my N5 is not the only one. Anyway the phone was boiling because of the sun (and its a black phone). I put it in the AC (conditioned air) vent to cool it.

Maybe the same thing can happen with stock kernel.

Sent from my Nexus 5
[Nexus 5 Original Android Development] Enddo:
xposed is a person? :cyclops::eek:
[Nexus 5 Original Android Development] Aerowinder:
Xposed has caused issues in the past. Mostly with performance. Maybe the battery also, but I couldn't stomach the performance hit long enough to test it thoroughly.

That doesn't happen anymore. Your information is outdated and no longer accurate.
[Nexus 5 Original Android Development] vomer:
Thanks Franco I will try this tomorrow morning and report back. Music stutter happened to me when the phone switches network towers or connects to wifi

Could you please explain what this setting does?

Sent from my Nexus 7
[Nexus 5 Original Android Development] franciscofranco:
Basically during idle the governor is sleeping but if the device wakes up governor starts working again, even during screen off, and all the governor rules still apply. timer_rate is how often the governor checks for load during non-idle times, but during screen off Todd Poynor (interactive's main maintainer) thinks that we may want bigger load polls to "save" the device from ramping up like it would do if the screen was on. So for that he added that tunable which if its set to non -1 it adds up to the timer_rate during screen off. So basically its like this:

timer_rate = 30000

timer_slack = 4 x timer_rate = 120000

screen on: load is polled every 30000

screen off but device is awake: load is polled every timer_rate + timer_slack = 150000

So basically if the device REALLY needs higher freqs during awaken screen off times then its going to take a LONG time to evaluate the load + ramp up if needed. In theory this is a good idea, but I guess that 120000 timer_slack is huge and can cause that audio stutter. Changing to -1 disables the feature completely, but I'm aiming to change it to 70000 or something if this is actually the problem of audio stutter. Since I cannot really reproduce it myself I'm sure someone will test it for me ASAP. In the mean time I can release r29 with lowered timer_slack to get faster feedback.
[Nexus 5 Original Android Development] PetritH:
K, Happy new year folks, last night was too drunk and somehow lost my N5 :(, the one who found it was really lucky.. he had franco installed there.. so he probably will like it even more.. whatever.. new one in the way.. if any of u found it I will not ask u to bring it back to me.. just plz delete some pics in there lol
[Nexus 5 Original Android Development] UnknownzD:
You can use the Android Device Manager to force wipe and track its location.
[Nexus 5 Original Android Development] PetritH:
Yeah, but I disabled it to save battery, hahahha, thanks for the tip though
[Nexus 5 Original Android Development] Red5:
I found it and looking through the pictures, I'm just guessing it's really cold at the time of you taking pictures. :D:D:D
[Nexus 5 Original Android Development] PetritH:
LoL, good one, Red :p
[Nexus 5 Original Android Development] imablackhat:
Love this kernel. Thanks Franco for your efforts and constant updates. Purchased app via playstore!
[Nexus 5 Original Android Development] vomer:
Excellent, thanks for taking the time for writing this explanation :good:

I decided to do some tests so here is the result:

Note: same song was used for all tests.

Switching WiFi Test:

- I played a song with wifi turned off using headphones

- Turned wifi on and within seconds turned off screen

Settings tested: both -1 and 70,000

Result: Poweamp: music stutters as the phone attempts to connect to wifi :(

Result: Tunester: no lag!! :good:

Result: Play Music: had micro second skips/lags once or twice! Much better than before. :good:

Network Test:

- Drove around with music playing via headphones

Settings tested: both -1 and 70,000

Result: Poweamp: music stutters as the phone attempts to connect to wifi :(

Result: Tunester: no lag!! :good:

Result: Play Music: had micro second skips/lags once or twice! Much better than before. :svetius:

Overall:

Poweramp was the worst in the test for lag / tunester was perfect in all tests / play music was usable too

My suspicion is also towards the equalizers - they might be adding to this issue from the app side of things. Conincidentally tunester does not some with an equalizer...

70,000 seems to keep it lag free so it is a good setting to default to for the next release.
[Nexus 5 Original Android Development] franciscofranco:
Very nice, thank you. I'll try to reproduce it the same way as you did. Can you test it with interactive + max 2265 & min 2265? Because even with those freqs if it still derps then I'll email Todd because I have no clue, maybe something in interactive's idle routine is borked... dunno really, but this timer_slack thingy is a good lead, for now.
[Nexus 5 Original Android Development] vomer:
Sure, btw I was using interactive before too as it is default:

Power amp: significantly less lag - only had one micro lag which seems to happen right when network connects or wifi connects!! Much much better than before. This is now like play music lag.

Play Music: no lag

Tunester: no lag
[Nexus 5 Original Android Development] franciscofranco:
Ok now do the same, but with Performance governor.

Thanks by the way.
[Nexus 5 Original Android Development] Exostenza:
Running 27 and then 28 today I wanted to see how long my phone would last with your kernel. I have stock kernel settings except - 50mv and 675mv [MENTION=1785406]300m[/MENTION]hz. Everything else is left on and nothing greenified... I am almost at 2 days of medium use and still have 24% left. This is just insane...
[Nexus 5 Original Android Development] ashwin988:
Unjust started to undervolt as well. I am 625 on the 300 setting and - 75 on the rest. This is the lowest I can go without reboots. Will see how it goes on medium usage and report back. So far, I can see some difference :)
[Nexus 5 Original Android Development] vomer:
No problem! I am glad to help if it can solve this issue for everyone :good:

Result:

Performance w/ min/max set to 2265:

Poweramp strangely has more frequent lags/stutters :eek: Definitely not micro lags anymore - interactive was better!

Tunester: No issues

Play Music: One micro lag

Edit: I did some googling and it looks like a lot of people (regardless of kernel) are having this type of issue. Interesting...
[Nexus 5 Original Android Development] franciscofranco:
Are you playing FLAC?
[Nexus 5 Original Android Development] vomer:
Nope, MP3 (~320 Kbps)

Interactive definitely performs better for me in all these tests with min/max on 2265... weird because I would expect the opposite. The intensity of thr lag seems to be less on interactive.

Also it seems that more "intensive" apps like Poweamp and Play Music seem to be causing the problem. Tunester which is more bare bones seems to be fine.
[Nexus 5 Original Android Development] franciscofranco:
Yeah indeed. I'm gonna think, but I doubt I can do much.
[Nexus 5 Original Android Development] vomer:
I still think setting the timer_slack to 70,000 in the next release will help many people. At least the ones using more bare bones types of music players.

Looks like the issue stems from a combination of things like app resource use, equalizer, cpu power and timer slack :confused:
[Nexus 5 Original Android Development] franciscofranco:
I'm sure it would help if a second core would kick in if needed. Can you get in hangouts so that I can send you a boot.img for you to test that theory?
[Nexus 5 Original Android Development] vomer:
sure, I will message you soon

Edit: message sent
[Nexus 5 Original Android Development] franciscofranco:
Whats your name? I have too many requests... :/
[Nexus 5 Original Android Development] vomer:
Major Breakthrough!

After thorough testing [MENTION=3292224]franciscofranco[/MENTION] has finally resolved the music lag/stutter issue that some of us were facing.

Basically the issue was with the second core not coming online when screen was turned off which was causing that lag problem. After francos fix the issue is non existent on any music player I tested even at low max cpu like 1036

Franco is wrapping up the next release so just letting everyone know to expect this fix next! :)

Sent from my Nexus 7
[Nexus 5 Original Android Development] Savant:
Thanks for the breakthrough vomer and glad your keeping everyone up to date. I need to add Franco on hangouts since I already have him on the ps4.
[Nexus 5 Original Android Development] vomer:
He is a busy guy :) I was just helping out since I have had that issue for the longest time lol. I am glad it all worked out at the end - all our ears will be saved!

BTW I should add before someone asks: francos fix will have no negative effects on battery life.

Sent from my Nexus 7
[Nexus 5 Original Android Development] Visa Declined:
I'm on r28 and haven't had any bluetooth music playback issues with All Access. I'm using a little hmdx jam speaker as I write this.
[Nexus 5 Original Android Development] IAreKyleW00t:
Does anyone else get typing lag in Hangouts sometimes? I've gotten it a few times these evening, using the default settings on r28. Not sure if it's a kernel issue or ROM issue though and I'm not sure how to reproduce.

Any advice?
[Nexus 5 Original Android Development] Red5:
It's a hangouts issue. That's why I don't even use it, I use 8sms instead.
[Nexus 5 Original Android Development] franciscofranco:
Pushed r29:

* Definitely fix the BT disconnect kernel panic!

* Fix a bug introduced with r28 where if max freq was lower than 1,5GHz min freq would be janked

* Fix a bug that made audio stutter during screen off if the device had other work at the same time, eg: network state change, Wi-Fi connection/disconnection etc

* Add Multicast support

Enjoy!
[Nexus 5 Original Android Development] 1stx2:
You the man Franco!

Sent from my AMAZING nexus 5 that dicecuber/trolls like to hate on.
[Nexus 5 Original Android Development] IAreKyleW00t:
I'll give 8sms a try and see if It still happens. Thanks.
[Nexus 5 Original Android Development] blueren:
Otg support not available? :(