yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] hwies:
#150 stutters after some time. I faced also a connection issue first time (radio signal changed several times from zero bars to all bars or in between on my N4 at desk...faced not this situation before; came from #147... not sure if this problem was already there as phone was mostly with screen off). Have a rooted stock version.
[Nexus 4 Original Android Development] trailblazerz11:
That makes sense, didn't really look at touch core.The hotplug logic seemed right so was quite confused.

Thanks Franco! The new hotplug is incredibly smooth for me.
[Nexus 4 Original Android Development] noneabove:
Huh, weird! I didn't think the screen turned off, but it might have without me noticing O.o well, thanks anyways haha
[Nexus 4 Original Android Development] Cuzz1369:
Who can eat at a time like this?????

Carbonized and francofied N4
[Nexus 4 Original Android Development] franciscofranco:
ktime_get = kernel time since boot

ktime_to_ms = converts ktime_get to milliseconds.
[Nexus 4 Original Android Development] franciscofranco:
I can apparently :)
[Nexus 4 Original Android Development] Net.silb:
I got it now, this is the variable we are talking about:

unsigned long freq_boosted_time;

The problematic line of code is:

freq_boosted_time = ktime_to_us(ktime_get());

To fix the bug we need to change the variable to this:

unsigned u64 freq_boosted_time;

Am I right?

---------- Post added at 05:03 PM ---------- Previous post was at 05:00 PM ----------

So that probably gets huge, like you said...

Why not just reset freq_boosted_time every once in a while?
[Nexus 4 Original Android Development] noneabove:
Couple questions then... One, why does the hotplug driver care about time since boot? Or if it's the whole thing that cares, why are there no other bugs that come from that? And then, wouldn't this result in an integer overflow which would crash the system, or like, anything besides the hotplug routine :P
[Nexus 4 Original Android Development] Janne79:
Hello [MENTION=3292224]franciscofranco[/MENTION],

As mentioned before in this thread I am trying to create a Tasker homescreen widget to simply toggle the max cpu freq (1026 for browsing etc and 1512 for gaming).

With the help of [MENTION=4928198]Arstoien[/MENTION] I found three variables that change when I change max cpu freq in fku:

sys/devices/system/cpu0/cpufreq/cpuinfo_cur_freq

sys/devices/system/cpu0/cpufreq/scaling_cur_freq

sys/devices/system/cpu0/cpufreq/scaling_max_freq

They all change whenever I change the max freq. So created a task with the following shell commands (root enabled for tasker)

echo 1512000 sys/devices/system/cpu0/cpufreq/cpuinfo_cur_freq

echo 1512000 sys/devices/system/cpu0/cpufreq/scaling_cur_freq

echo 1512000 sys/devices/system/cpu0/cpufreq/scaling_max_freq

Problem is, it's simply not working. Max freq stays at 1026. Fku tells me that and I also checked the three said files after applying the task.

What am I doing wrong? Thank you so much in advance...

Edit : I tried running the said commands in terminal too. Didn't change the files too.
[Nexus 4 Original Android Development] blade_:
with 150 i have sometimes sim lock,so i have to insert pin again.im not sure if its kernel problem,but i havent notice it again,so i refer it..
[Nexus 4 Original Android Development] franciscofranco:
There were a couple of changes to prevent overflow:

unsigned int freq_boosted_time; to u64 freq_boosted_time;

Then instead of converting ktime_get() to us its now converting to ms. For example a second in us is 1000000 in ms is 1000. These two changes will prevent any overflow, 200% sure.

freq_boosted_time is reseted to a new ktime_get() on every touch input, but ktime_get() grows bigger every time, its the time since boot.

I need to have some sort of running timer to check for 1s after there is a touch input. Basic math is like this:

if time_now minus time_of_the_last_touch >= 1 second then warn the algorithm that we're not touching the screen anymore and normal Hotplug and cpufreq scaling resumes on cpu0. About the overflow check post above.

You only need this line: echo 1512000 sys/devices/system/cpu0/cpufreq/scaling_max_freq. For 1GHz its like this echo 1026000 sys/devices/system/cpu0/cpufreq/scaling_max_freq
[Nexus 4 Original Android Development] LibiSC:
Why don't you make the thread sleep? :eek:
[Nexus 4 Original Android Development] Net.silb:
Got it, is the ktime variable (wherever it is) also u64?

And is this more efficient than making your own timer that goes to 0 every time the screen is touched?
[Nexus 4 Original Android Development] Arstoien:
The thing is (I think) that that file has only read permissions so it can't be changed with simply

su

echo 1026000 sys/devices/system/cpu0/cpufreq/scaling_max_freq

It just doesn't change. How do we go about that?

Sent from my Nexus 4
[Nexus 4 Original Android Development] nachordez:
You miss the >

echo 102600 > /sys/devices.......

Ain't you?

Nexus 4, stock ROM, last Franco.kernel nightly, V4A sound
[Nexus 4 Original Android Development] Janne79:
Thank you, but this is what I get:

My Tasker task

Terminal

Result (both times)
[Nexus 4 Original Android Development] nachordez:
Look the post over yours. You lack the > symbol to overwrite file content.

Nexus 4, stock ROM, last Franco.kernel nightly, V4A sound
[Nexus 4 Original Android Development] franciscofranco:
What Thread? This is not Java, I can't just do Thread.sleep(1000); but I'm doing basically the same thing by returning early in the function if a second didn't pass since the last input touch.

ktime is type ktime. I don't know more of it, but its not relevant. Yes, its more efficient.
[Nexus 4 Original Android Development] baxtandroid:
r150 is extremely laggy for me...

Sent from France to XDA-developers using my Revolted Francofied NeXuS 4. Sorry for my English.
[Nexus 4 Original Android Development] Net.silb:
Reboot as a temporary fix, Franco will be releasing a new kernel any time soon which should fix the lag once and for all.
[Nexus 4 Original Android Development] Janne79:
Sorry, didn't see the post above mine because it didn't exist when I started writing my post:)

Even with the > it's not working.

[MENTION=4928198]Arstoien[/MENTION]: I also tried changing the permissions before applying the said command in the terminal... No success
[Nexus 4 Original Android Development] jarayn:
Once and for all....
[Nexus 4 Original Android Development] lorolouis:
Hi again

This forum gets very interesting and technical.

I like this :) ... it shows how every nanosecond' s click matters here :)

Kernel code doesn't wait ... someone else to run it.

I have a fuzzy feeling, it will take a while to clear new concept completely .... but I need to use my phone as ... a phone too and check some e-mails while I am on 3G.

So for now I'll stay on r140, which is pretty good for me. The good thing is that we have at least 100 perfectly working choices,

besides the M1 and M2 cutting edge r150 above.

Keep the good stuff guys. Report the things in details if you can, rather than offer code fixes :)

Regards.
[Nexus 4 Original Android Development] nachordez:
'Cause you also miss the / before sys, and so are referring to a non existent file

echo xxxxx > /sys....

;)

Nexus 4, stock ROM, last Franco.kernel nightly, V4A sound
[Nexus 4 Original Android Development] Janne79:
Oh yes, that was stupid, but...

I tried this command line now with and without >. With write access enabled. Always the same result. With > it gives me the above error message, without nothing happens.
[Nexus 4 Original Android Development] formicae:
Man, that one guy who woke up thinking 'I hope someone posts giant screenshots today, and others quote them, over and over'? That guy must feel like he won the lottery.
[Nexus 4 Original Android Development] LibiSC:
There is a sleep(milliseconds) in kernel level ... I assume that since we have multiprocessor device I wouldn't have completely blocked all the other processes but just the kernel thread... I'm not sure anyway
[Nexus 4 Original Android Development] manulemaboul:
[MENTION=470754]Franco[/MENTION] I really like your philosophy, simple solutions to simple problems :)

Uselessly complicated things brings troubles with them.

Envoyé depuis mon Nexus 4
[Nexus 4 Original Android Development] Janne79:
Yes, that's how I feel right now. I am sorry, I tried solving this via PM but we couldn't find a solution so I thought it was time to ask here. As you can see, it was not so bad to post screens as otherwise the missing / would still be the problem. I did not intend to blow up this thread, sorry.
[Nexus 4 Original Android Development] Arstoien:
Yes, in the hurry I wrote the wrong command too, but even corrected, as the guys said, it gives me the same error. It works fine with all the other files.

Sent from my Nexus 4
[Nexus 4 Original Android Development] franciscofranco:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

If I do a msleep there that'll sleep the entire governor operation for a whole second. What happens if I click the screen while playing a game and the game suddenly needs more cpu frequency, then whats up? Thats really wrong in the context we're talking about. My solution works fine, I just had a problem of variable type on r150.
[Nexus 4 Original Android Development] nachordez:
Now you are missing cpu folder before cpu0... ;)

/sys/devices/system/cpu/cpu0/...

EDIT: i always prefer to use tab to autocomplete routes like this... You see immediately mistakes like that :) (I use Linux as my main OS since 12 years ago, so I'm used to bash and terminal...)

Nexus 4, stock ROM, last Franco.kernel nightly, V4A sound
[Nexus 4 Original Android Development] formicae:
No worries, chief, I was teasing.
[Nexus 4 Original Android Development] Net.silb:
I say: screw battery! me wanx oolll da pawa!!!

We dump the gov and hotplug and use only thermal considerations and have all four cores at maximum frequency all the time!!! :silly:

;)
[Nexus 4 Original Android Development] LibiSC:
Just brainstorming I haven't seen the code.. I thought you were talking about code in the hotplug.... If you wouldn't have wanted to do anything else but check after a second... But anyway maybe a counter that big it's no very efficient at kernel level
[Nexus 4 Original Android Development] Janne79:
Damn! You're right.

It's working.

Setting permissions to r--rw-r-- and using the RIGHT command line with the > works. Thank you so much.
[Nexus 4 Original Android Development] franciscofranco:
I pushed the code, you can take a looksie ;) IT doesn't check every second, it only checks if the is_touching is true, which only happens when there is UI interaction.
[Nexus 4 Original Android Development] Tarun95:
Is it only me or even others find m1 way way way faster than m

2 ? Like scrolling n all is way smoother on m1. Even the apps open much quicker.
[Nexus 4 Original Android Development] italia0101:
Was that when mp decision was enabled?
[Nexus 4 Original Android Development] kelah:
There is us in ondemand:

if (ktime_to_us(ktime_get()) - freq_boosted_time >= 1000000)
[Nexus 4 Original Android Development] franciscofranco:
Ups, good find, thanks!
[Nexus 4 Original Android Development] lonoguge:
It's definitely a game issue. I had the same problem with Trinity kernel
[Nexus 4 Original Android Development] Tarun95:
Yeah.
[Nexus 4 Original Android Development] italia0101:
That would be why then, it's just horrible on battery and heat imo
[Nexus 4 Original Android Development] franciscofranco:
r151:

* Fix a bug from r150 that made the device stuttery after a few hours of usage

* Improve performance on light games

I attached the boot.img and zip here in case the server gets hammered. As I said previously the server will upgraded in 10 days to a better service to prevent "hammerage".
[Nexus 4 Original Android Development] Savant:
Thanks Franco, for all the hard work you do.
[Nexus 4 Original Android Development] kyokeun1234:
Same as 1111? Sorry if this was asked before. Didn't find it
[Nexus 4 Original Android Development] eezak:
Not the same
[Nexus 4 Original Android Development] Taxiback:
Hey Franco, when you enable fast USB charge there is no icon at the top of the phone any more, was this changed or does it not work any more?
[Nexus 4 Original Android Development] kyokeun1234:
Thanks.
[Nexus 4 Original Android Development] franciscofranco:
Removed long ago, some users cried about it and I had 0 patience to hear to complains and removed it.
[Nexus 4 Original Android Development] lordvj:
Thanks franco. I'll wait for feedback before I try this. Till then r146 it is. and btw do other governors have hotplugging support on this one?
[Nexus 4 Original Android Development] Taxiback:
That's fine, so long as it still works. ;)
[Nexus 4 Original Android Development] franciscofranco:
All governors, expect Performance for obvious reasons, have the needed logic to work together with my Hotplug algorithm.
[Nexus 4 Original Android Development] Mauijpm:
Thank you so much for all your hard work Franco! My goodness. I'm so glad I bought the app. Supporting devs like you is what makes owning a Nexus fun. :thumbup::thumbup::thumbup:
[Nexus 4 Original Android Development] Nocturnal86:
Jeez let the man eat he needs his energy to do his work. RUDE! I hope you were joking.
[Nexus 4 Original Android Development] kara mustafa:
Is interactive still default? Franco do you recommend use ondemand or not?
[Nexus 4 Original Android Development] resynx:
Awesome!! :good: Performance is already noticeably much better in My Boy! (GBA emulator). The battery on r150 was great for me so I hope it stays that way on r151! :)
[Nexus 4 Original Android Development] sam razzy:
I had a dream that Franco as released new kernel, I was very happy and I got up. I realised it was a dream, huh but when I login to xda, I was astonished to see my dream come true.. Thank you Franco.
[Nexus 4 Original Android Development] mohitgalaxy3:
LOL, that's hilarious, don't tell us what were you doing in your dream.

[MENTION=1539151]fransico[/MENTION] ur kernel got a new gf :D
[Nexus 4 Original Android Development] franciscofranco:
Interactive is the default and its the one I recommend. After that you can use whatever you feel works best for you.
[Nexus 4 Original Android Development] franciscofranco:
Should be just the same, core functionality is the same as r150, just fixed bugs.
[Nexus 4 Original Android Development] resynx:
Nice! Just gets better and better :cowboy:
[Nexus 4 Original Android Development] Danny.ns:
Just some feedback on light gaming (temple run 2 in particular):

150: Massive stutter, and so unresponsive that even tilting the device left or right didnt register 70% of the time.

151: Massive improvement here! Game runs "fluid enough", but some "skips" here and there (every 5-10 seconds, very minor skips). This is with the games visuals at max settings.

Dont actually play this game, just some feedback that indeed 151 did help alot in regards to light gaming.
[Nexus 4 Original Android Development] sam razzy:
Heheheh...

[MENTION=470754]Franco[/MENTION] : if I buy your Franco kernel updater, do I need to buy Nexus color control app ? I really enjoying your default setup which comes with the kernel, so I need to try your app for myself.. Help me.. And thank you a lot for your expanded communication with us.. ;) I know u may don't rembr me. But I rembr you wen u had optimus one.. :D
[Nexus 4 Original Android Development] franciscofranco:
Main app contains all features of the color app. The color app is aimed for users who do not wish to pay 5 bucks for the main app and only want color interface.
[Nexus 4 Original Android Development] drawde40599:
Nope, FKU dose it all
[Nexus 4 Original Android Development] gee2012:
Color control is allready built in the Kernel Updater :)
[Nexus 4 Original Android Development] LaboDJ:
[MENTION=3292224]franciscofranco[/MENTION] ?

:angel: please :angel:
[Nexus 4 Original Android Development] andyli1985:
I just realized people keep on mentioning the wrong franco(s) in their posts. lol
[Nexus 4 Original Android Development] Cuzz1369:
Obviously

Carbonized and francofied N4
[Nexus 4 Original Android Development] mohitgalaxy3:
[MENTION=470754]Franco[/MENTION]

I am working on a new color profile.

When I select auto-brightness I found the brightness a bit low.

How can I set/change the minimum value for auto brightness.
[Nexus 4 Original Android Development] franciscofranco:
1 - SWAP is enabled, but nothing is being swapped because there is no swap file unless user sets it.

2 - No idea, probably can go off

3 - No idea, but I rather not mess with MSM stuff

4 - I think that is not used on our board

5 - Probably can be set to off yes

6 - DNOTIFY is obsolete by INOTIFY

7 - Doesn't really hurt to be on, but yeah can be off no problem

8 - CIFS is old and buggy, its a no-go for me

9 - FRAME_POINTER gives me better crash info if theres a Kernel panic.

10 - Hmm I'll check that undefined BITS PER LONG. I don't remember seeing that on my build log

I don't give a ****, I don't receive a single notification even if its the correct name lol.
[Nexus 4 Original Android Development] franciscofranco:
Rom.
[Nexus 4 Original Android Development] mohitgalaxy3:
okay, do you know which file I need to edit.

I am on Stock ROM
[Nexus 4 Original Android Development] ki2luminati:
R151 is awesome great work franco
[Nexus 4 Original Android Development] lordvj:
google it bro much easier.
[Nexus 4 Original Android Development] mohitgalaxy3:
yeah okay I will.
[Nexus 4 Original Android Development] nadavar:
151 is amazingly smooth. Great work.
[Nexus 4 Original Android Development] ChaosChris:
[MENTION=3292224]franciscofranco[/MENTION] is it possible to make an anykernel ZIP or can you make your Kernel compatible with miui? Becouse i am on miui and want to enjoy your awesome Kernel.

Gesendet von meinem Nexus 4 mit Tapatalk 2
[Nexus 4 Original Android Development] Net.silb:
CM lets you adjust the auto-brightness and also if you search LUX in the play store you will find some good apps that do that.
[Nexus 4 Original Android Development] lordvj:
conservative is totally messed up. its somehow linked to interactives inputboost setting. back to 146 again.
[Nexus 4 Original Android Development] franciscofranco:
No, I don't support MIUI.
[Nexus 4 Original Android Development] franciscofranco:
No its not messed. No its not linked to interactive.
[Nexus 4 Original Android Development] italia0101:
Btw for anyone that wants very smooth animations change input boost freq to 1.3...., it's butter
[Nexus 4 Original Android Development] dusk1911:
Very nice indeed
[Nexus 4 Original Android Development] Net.silb:
What's that? Do I smell M3 right around the corner? :D

Really happy with this release!!! Great job Francisco!

Unless the lagging bug comes back or anything like that, even though I'm convinced you fixed it, I think r151 should be considered M3.
[Nexus 4 Original Android Development] lordvj:
its obeying interactives inputboost freq setting. i cleared app data so many times and also dalvik cache. something just doesnt seem right. 146 is perfect for me. ill stick to that .
[Nexus 4 Original Android Development] franciscofranco:
What doesn't seem right? Input boost is handled on the touch driver directly. Independently of the governor I want everyone to feel as it being a pleasant experience. Without that freq boost on touch you'll have lag eventually.
[Nexus 4 Original Android Development] lordvj:
conservative din scale frequencies slowly , the way i set it to. it was either min , touchboostfreq or max :| 146 is fine nevermind
[Nexus 4 Original Android Development] G4neStarT:
How do you do that please?
[Nexus 4 Original Android Development] Net.silb:
Maybe you should move that setting out of the interactive governor settings?

Another section under Frequencies/Voltages > Controls maybe?

Touch Event Control - How your device will behave when you interact with the screen.

Cores online on touch input - ...

Cores online on touch input length - How long to keep the extra cores online after a touch.

Touch boost frequency - ...

Touch boost frequency length - How long to keep the frequency at the touch boost frequency after a touch.
[Nexus 4 Original Android Development] franciscofranco:
If you think its derped I want to hear more about it.
[Nexus 4 Original Android Development] Net.silb:
On another note Franco, I see that in the Ondemand governor, sampling_rate is 10000. Isn't that really low?

---------- Post added at 09:49 PM ---------- Previous post was at 09:47 PM ----------

I'm also getting a force close when trying to enter governor settings when using Conservative governor...
[Nexus 4 Original Android Development] italia0101:
In Franco's app go to governor control and it's in there
[Nexus 4 Original Android Development] lordvj:
ill test it a little more later and let you know.

thanks franco :good:

---------- Post added at 02:23 AM ---------- Previous post was at 02:20 AM ----------

10000 is in useconds. the governor samples once in 10000 us which is faster than other governors.
[Nexus 4 Original Android Development] manulemaboul:
I'm gonna have to revert, can't play my 2d game with 151, it runs too smooth and fast now, I'm loosing because of that, thanks Franco !

Lol, just kidding :p

Never saw that game running that smooth and fast, not a single micro stutter or slowdown :).

It do is harder now lol, got to get used to its new speed :p.

Is it me, or does it also impact UI smoothness in a good way ?

Envoyé depuis mon Nexus 4
[Nexus 4 Original Android Development] Net.silb:
It does. When you touch the screen, it will have two cores online and boost cpu0 freq to touch boost freq.
[Nexus 4 Original Android Development] manulemaboul:
Making also apps opening faster, brillant :)

Envoyé depuis mon Nexus 4
[Nexus 4 Original Android Development] kara mustafa:
151 looks good for me
[Nexus 4 Original Android Development] Arstoien:
If you touch the screen, it'll boost the cpu0 to touch boost freq. If you drag your finger, it will, in addition to the boost, online cpu1. That's how it behaves with me.

Sent from my Nexus 4
[Nexus 4 Original Android Development] Francesco46:
I'm on r151: browsing, animations and all other things are really smooth as never before.

The problem which i found is a continuous lag playing temple run Oz (the only game I play) -but maybe even in other games-. Lag there isn't when I touch screen (i think because input_bost_freq is perfect) but when game proceeds without touching the screen it lag so much (probably low CPU/GPU frequency?).

Also smartphone is hotter than 148 and I UV -100.

I hope for a reply more sensibile than my deductions :p
[Nexus 4 Original Android Development] PetritH:
I also have a problem with r150.. my phone turned off when the battery was 0%
[Nexus 4 Original Android Development] Net.silb:
Nope, that was the old way... Now it does both on touch, trust me.
[Nexus 4 Original Android Development] Arstoien:
You may be right. The way I test is with System Monitor with refresh rate of 1 sec. I touch and hold (to wait for the update) and I see the freq of cpu0 but cpu1 is off. If I drag slowly, it boosts cpu0 and onlines cpu1. Maybe the onlining of cpu1 on touch (not drag) is too short for the app to detect it. That's why I'm waiting so anxiously for that update with short refresh rate :)

Sent from my Nexus 4
[Nexus 4 Original Android Development] Net.silb:
You are probably watching the writing on the bottom of system monitor which doesn't update as frequently... Watch the big four squares and you will see clearly that cpu1 onlines on touch.

Another way I know that this is the current behaviour is by reading the code.

Hope this helps :)
[Nexus 4 Original Android Development] alanwyl:
r151 makes facebook smooth like stock:good:

I saw it using 2 cores, 1@1.5GHz and 1@702MHz

r150 was using like 2 cores 1.5GHz and still not smooth.

What virus is that Franco.
[Nexus 4 Original Android Development] xdviper:
Don't know if it's the kernel or rom (Purity) but I've been dropping data today, and only a reboot solves it. Anyone else? On 150.