yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] dcop7:
SOT for it self doesn't mean much. That depends on what you do with your phone. If you play a lot, if you have wifi/bluetooth/mobile data/sync/GPS/... active...
[Nexus 4 Original Android Development] MachineZZ:
I'm not going to say anything here some pics :D http://imgur.com/a/7OBF3

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

I don't know i have this phone for around 4 days :D
[Nexus 4 Original Android Development] stratosk:
In this new test version I changed a little bit the dynamic hotplug driver in order to include in decision algorithm the utilization threshold of cores.

As I mentioned in a previous post there is a new tunable util_thres in the CPU policy (for each core).

The default util_thres is 25 and the test version works (it should) exactly the same way as the 3.0.2 version (and 3.0.3).

There are 2 options now:

- Set the same util_thres for all cores. The hotplug driver will take offline the core with the minimum current frequency.

- Set different util_thres. For example: 25, 30, 35, 40 for cores 0, 1, 2, 3 respectively. The hotplug driver will take offline first core 3 then 2, 1. Generally it will take offline the core with the greater util threshold.

Doing this you may achieve non linear behavior of CPU. In the above example the hotplug driver will easily put online core 1 but it will need more load to put online cores 2 and 3.

There is no meaning, but you can set the util thresholds non ordered. For example you may set 25, 40, 35, 30. Driver will use the same logic.

Thanks to [MENTION=3675426]ihancioglu[/MENTION] for his idea about this.
[Nexus 4 Original Android Development] HiM@L:
...this is what I understood.

Awesomeness begins here..... :)
[Nexus 4 Original Android Development] vampire36:
Awesome work as always :)

Did you test it with specific values...can you suggest us optimal values for this param...;)
[Nexus 4 Original Android Development] ihancioglu:
Hi [MENTION=3750240]stratosk[/MENTION],

First of all I would like to thank you for such a great project - Semaphore growing up day by day.

I would like ask you about calculation util_thres. For example If we have two core online(cpu0,cpu1) and third core(cpu2) getting online which util_thres uses? It should be cpu1's util_thres as cpu2 is still offline, right? Another question is while get offline cpu2, cpu2's util_thres uses , not cpu1 anymore. Is this information are correct?

So while getting online a core previous util_thres used , getting offline a core, same util_thres used which core will get offline..

Thanks,
[Nexus 4 Original Android Development] stratosk:
Thanks, my friend!

I didn't test it extensively, but you could try 25, 30, 35, 40 and see how it goes...

Thank you, my friend!

Yes, you are correct. Hotplug driver calculates the average utilization of online cores.

So, if cores 0 and 1 are online, cpufreq driver calculates the accumulated utilization (using the util_thres) of cores 0 and 1. Hotplug will calculate the average of core 0 and core1, and it will decide if core3 must be online or not.

If cores 0-2 are online it will average the accumulated utilization (using util_thres) of cores 0, 1, 2.

I will try to write a mini how-to about the algorithm from all our posts.
[Nexus 4 Original Android Development] ihancioglu:
I am using util_thres are 20,50,80,95

up_threshold for hotplug is 55

Min_online 1

Down_timer_cnt 6

Ondemand up_threshold 100

Ondemand touch_load 75

It looks very conservative but works okay for me.

Thanks.
[Nexus 4 Original Android Development] jer_ying_fd:
Thx for your values, they are good starting points for my settings. I'm changing them so that it will be more balanced :)
[Nexus 4 Original Android Development] Cem0:
android 5.1 build with 5.0.1 blobs and semaphore running great

View attachment 3207888
[Nexus 4 Original Android Development] manjee:
Hi, last version is definitely smoother with your recommended values (25,30,35,40).

I can't see a negative impact on battery life for now.

Kudos and big thanks [MENTION=3750240]stratosk[/MENTION]
[Nexus 4 Original Android Development] MtG92:
Hi [MENTION=3750240]stratosk[/MENTION], will we see the new tunable on Semaphore Manager soon? :)
[Nexus 4 Original Android Development] ihancioglu:
Hi [MENTION=3750240]stratosk[/MENTION], freq distribution on low loads is act a bit different in these days maybe because of my hotplug&ondemand parameters but 486Mhz inuse more than 384Mhz.

I am using min 1 core maybe this is the reason. I want to try with low load threshold to 10 with ondemand.

I will compile with it on Monday and let you know.

Thanks,
[Nexus 4 Original Android Development] stratosk:
Hi,

Yes, I will try to release it soon. :)

Hi,

Yes, I guess this is the reason.

Using min 1 core and with your conservative settings in util_thres, makes that single core to work on higher freqs.
[Nexus 4 Original Android Development] NooBs7yL3:
what app are you using to set this values?

Can't find this options on semaphore kernel manager
[Nexus 4 Original Android Development] Midomad:
Semaphore Manager haven't been updated yet to support the Values.

So wait for the update or use Terminal.
[Nexus 4 Original Android Development] NooBs7yL3:
Could someone show me how to change the values through the terminal?
[Nexus 4 Original Android Development] jer_ying_fd:
Just refer to the post when stratosk first introduced the util_threshold.
[Nexus 4 Original Android Development] nemanja066:
su <ENTER>

echo XXXX > /sys/.... (path of file, i dont use semaphore for now, because dont knw) <ENTER>

*XXXX is value

-review:

cat /sys/.....
[Nexus 4 Original Android Development] jer_ying_fd:
Enter this:

su

echo *util_threshold value* > /sys/devices/system/cpu/cpu*0-3*/cpufreq/util_threshold
[Nexus 4 Original Android Development] Sblast:
Will there be a CM version?
[Nexus 4 Original Android Development] vampire36:
Use jolie kernel for that :)
[Nexus 4 Original Android Development] poondog:
edit: didn't realise I had this tab open for 10 mins of being ninja'd by a vampire :D
[Nexus 4 Original Android Development] vampire36:
That makes me feel proud ;)
[Nexus 4 Original Android Development] ihancioglu:
Hi [MENTION=3750240]stratosk[/MENTION], I am using Semaphore with all default values but still 486Mhz is inuse at least 384Mhz sometimes more often on default homescreen without touch.

So would you please expose down threshold value for ondemand to sysfs? I would like to set it 10. Hopefully will use 384Mhz more often on idle cases.

Thanks in advance,
[Nexus 4 Original Android Development] M@rs:
Anyone testet cf.lumen with semaphore?

It want to install a driver and im not sure if it Work well with semaphore color controll
[Nexus 4 Original Android Development] xenyz:
Yes it works fine. cf lumen uses a shared lib not a kernel module, and doesn't change gamma, only colour temperature. It should work with any kernel, it just requires root to load that lib.
[Nexus 4 Original Android Development] stratosk:
New version 3.0.5

- cpufreq: new per cpu tunable util_threshold (default 25)

- Dynamic hotplug: Change algorithm. If CPUs have different util_threshold, the CPU with the greater one will be chosen

- ondemand: new tunable down_threshold. If load below this threshold lowest frequency will be used
[Nexus 4 Original Android Development] stratosk:
Semaphore Manager 4.4.0 (available soon on Google Play)

- Per CPU tunables support (scaling min freq, scaling max freq, utilization threshold, governor)

- Add down threshold tunable to ondemand governor

- Updated translations
[Nexus 4 Original Android Development] jer_ying_fd:
How is the down_threshold calculated? I saw the default is 5 but I do not quite understand how it works. Can you explain it in laymen's term? :P Thx.

And semaphore manager is up, yay!
[Nexus 4 Original Android Development] kokiss:
Can i use this kernell with cm12?
[Nexus 4 Original Android Development] stratosk:
down_threshold is not calculated.

Ondemand governor calculates the load of CPU.

If load is below touch_load (user defined) and you touch the screen the calculated load is replaced with touch_load.

If it's above up_threshold (user defined) then it selects the highest frequency.

If it finds below down_threshold (user defined) then it selects the lowest frequency.

Else it calculates the frequency proportional to load.
[Nexus 4 Original Android Development] stratosk:
Just for your information, I opened a new thread for my new app:

http://xdaforums.com/general/paid-software/app-drive-syncrypt-t3062388

Thanks!
[Nexus 4 Original Android Development] icu64:
I'm confused, how does this work with the new option to set this per core

Edit: OK I think I get it. The per settings per core allow you to pock what order they come on it. The other setting is the usage as a whole and that's what controls of a core comes online in the first place. Do I have the correct understanding?
[Nexus 4 Original Android Development] icu64:
Can anyone explain how to apply the screen settings from here? I want to use kel ghu, the 3rd color profile he made
[Nexus 4 Original Android Development] icu64:
So here are my settings if anyone wants to try them. The settings for individual CPUs are set to recommended values.I did ubdervolt and will share if interestedView attachment 3226995View attachment 3226996
[Nexus 4 Original Android Development] HdSht:
If by how to etc etc you mean the init settings here you go :) :

echo 0 64 255 1 255 0 206 97 1 > /sys/devices/virtual/misc/gamma_control/gamma_b

echo 0 64 255 1 255 0 206 97 1 > /sys/devices/virtual/misc/gamma_control/gamma_g

echo 0 64 255 1 255 0 206 97 1 > /sys/devices/virtual/misc/gamma_control/gamma_r

replace that string of numbers with your preferred..the actual is the kel ghu's last rgb profile (I think so at least :D).
[Nexus 4 Original Android Development] icu64:
That's not what I was talking about but thanks lol
[Nexus 4 Original Android Development] icu64:
Does this kernel ship with the recommended settings?
[Nexus 4 Original Android Development] poondog:
Pretty much, for best balance. There are some details on tuning on the last few pages (for the new tunables in the hotplug driver/governor) if you are interested.. otherwise it runs very well
[Nexus 4 Original Android Development] oxxshadow:
Can we use this with 5.1?
[Nexus 4 Original Android Development] MtG92:
At the moment yes, because the 5.1 blobs still haven't been released for mako, so any 5.1 ROM you use has 5.0.1 blobs. However, once official 5.1 comes out for the N4 you'll have to wait for stratosk to update the kernel.
[Nexus 4 Original Android Development] jer_ying_fd:
Hi stratosk, wonder if you are gonna try out Hyper toolchain or uber toolchain? Do you think they can sort of replace Linaro?
[Nexus 4 Original Android Development] stratosk:
Hi,

No, I don't think that I'll leave Linaro.
[Nexus 4 Original Android Development] icu64:
Hi [MENTION=3750240]stratosk[/MENTION] just wondering if we could use deep idle or is that the same as deep sleep and we already have it? That and how does exponential brightness work while auto brightness is on
[Nexus 4 Original Android Development] stratosk:
Hi,

N4 CPU already have lower consumption states implemented.

Exponential brightness work similar to linear except that the sensor needs much more ambient light to increase display brighness.
[Nexus 4 Original Android Development] icu64:
Thanks bro but there's still just one thing that I don't understand. Does it still work with auto brightness turned on?
[Nexus 4 Original Android Development] stratosk:
Yes, it works with auto brightness.
[Nexus 4 Original Android Development] svnhvn:
Excuse me but does anyone have obsanity color profile for Semaphore?
[Nexus 4 Original Android Development] eurochild:
255 255 255

0 119 119 1 23 0 119 103 1
[Nexus 4 Original Android Development] svnhvn:
Thank you very much sir!!
[Nexus 4 Original Android Development] icu64:
You're everywhere I go ._.
[Nexus 4 Original Android Development] svnhvn:
Weird, i just thought the same about you, LOL
[Nexus 4 Original Android Development] HdSht:
Hi guys :) . Does anybody know where the vdd_table is located :confused:.

Ty in advance.
[Nexus 4 Original Android Development] ihancioglu:
Please refer second post of the Semaphore thread on following link

http://xdaforums.com/showpost.php?p=40243825&postcount=2
[Nexus 4 Original Android Development] Fenvarien:
I've not my N4 with me, but iirc it's
[Nexus 4 Original Android Development] HdSht:
Must have miss that..Thanks a lot :).
[Nexus 4 Original Android Development] icu64:
Anyone have settings for accuracy filter or would like to explain the settings for it?
[Nexus 4 Original Android Development] icu64:
I'm starting to see my logcats get raped by touch boost again, what happened to the work around?
[Nexus 4 Original Android Development] ihancioglu:
Maybe one of root/busybox is not installed after rom update. Both needed for that workaround.
[Nexus 4 Original Android Development] icu64:
I have the stock ROM and installed both myself. I know busy box is working because the kernel manager wouldn't work without it and superSU is working fine as well. Anything else?
[Nexus 4 Original Android Development] stratosk:
Please make sure that you installed Semaphore over the stock kernel.

Installation script must find the stock initramfs to patch it properly.
[Nexus 4 Original Android Development] icu64:
I'm on stock ROM, it was flashed over stock kernel

---------- Post added at 03:20 PM ---------- Previous post was at 03:03 PM ----------

Just reflashed the stock ROM and installed the kernel over it and still got the same thing
[Nexus 4 Original Android Development] stratosk:
Could you please mention the version of the ROM and the Semaphore version?
[Nexus 4 Original Android Development] icu64:
It was stock and you're 3.0.5 but I changed to chroma and it stopped... I don't think its your kernel

---------- Post added at 06:30 PM ---------- Previous post was at 06:26 PM ----------

I did notice that the kernel will work with auto brightness but won't go past a certain level for some reason
[Nexus 4 Original Android Development] :
[MENTION=3750240]stratosk[/MENTION].. Just wanna say your kernel works really with Chroma ROM Android 5.1. Thanks a lot for sharing your awesome work.
[Nexus 4 Original Android Development] stratosk:
Thanks a lot for your comments, my friend!
[Nexus 4 Original Android Development] haelmchen:
Just noticed your changelog says, version 3.0.5 is from 22/05/2015. Are you bringing us Android 5.1 from the future? I'm so done with waiting :(
[Nexus 4 Original Android Development] dcop7:
If it happens, it will only happens when google releases 5.1 for our mako.
[Nexus 4 Original Android Development] Midomad:
I think it's just a typo
[Nexus 4 Original Android Development] poondog:
This explains why all [MENTION=3750240]stratosk[/MENTION] work is so advanced :)
[Nexus 4 Original Android Development] stratosk:
Typo corrected! :)
[Nexus 4 Original Android Development] soumoks:
[MENTION=3750240]stratosk[/MENTION] , just got a random reboot.

Running semaphore 3.0.5

Attached last_kmsg

https://copy.com/HE7zRzR9wRkxwqsU
[Nexus 4 Original Android Development] dcop7:
What ROM? Those "5.1" ROM's for our mako uses 5.0.1 blobs, that could cause random reboots.
[Nexus 4 Original Android Development] stratosk:
I think I there was a problem with the modem and the driver caused the reboot:

[379603.801685] mdm_power_down_common: MDM2AP_STATUS never went low. Doing a hard reset

[379605.323431] msm_ipc_router_create: Do not have permissions

[379607.098496] healthd: battery l=64 v=3850 t=39.9 h=2 st=3 c=490 chg=

[379607.981908] mipi_lgit_lcd_shutdown finished

[379607.982030] Restarting system with command ''.

[379607.982183] Going down for restart now

No errors detected

Boot info:

Last boot reason: reboot

I 've never touched this code and unfortunately I don't know the cause of this and how to fix it.
[Nexus 4 Original Android Development] soumoks:
Running a 5.0 rom only.

That was a rare event I guess as I've an uptime of nearly 300 hours and this was the first time it happened.

Thanks again for the work you do for our device :)
[Nexus 4 Original Android Development] svnhvn:
One reboot in 300 hours? I still call that a rock solid one.
[Nexus 4 Original Android Development] stratosk:
It's Linux kernel. The uptime should be forever... :)
[Nexus 4 Original Android Development] leninke:
[emoji6]
[Nexus 4 Original Android Development] dragos281993:
[MENTION=3750240]stratosk[/MENTION] I saw that your latest kernel is made for 5.0.x lollipop. Is this for stock Android only, if I may ask? I flashed it on cm12 and I got those funny colors letting me know that there's a compatibility issue between rom and kernel.
[Nexus 4 Original Android Development] monza1412:
For CM12 compatibility you need to flash the jolie kernel version.

http://xdaforums.com/nexus-4/development/kernel-jolie-kernel-mako-2-2-2-t2547149
[Nexus 4 Original Android Development] dragos281993:
Thanks buddy !!! I really appreciate it.
[Nexus 4 Original Android Development] mdaamir1989:
[MENTION=3750240]stratosk[/MENTION] - I hope the kernel sources are available here.

http://www.androidpolice.com/2015/0...-build-lmy47o-for-nexus-4-is-rolling-out-now/
[Nexus 4 Original Android Development] Midomad:
Kernel is up:

https://android.googlesource.com/kernel/msm/+/android-msm-mako-3.4-lollipop-mr1
[Nexus 4 Original Android Development] stratosk:
New (test) version 3.1.0

- Merge Android-5.1.0_r0.9 changes

Tested on Android 5.0.1 and not in 5.1.0.

Maybe there are changes in 5.1.0 initramfs that may cause issues to kernel installer. Maybe not... :)
[Nexus 4 Original Android Development] icu64:
Think you will ever default to no hot plug like the nexus 6? And if not why? Just wondering what you opinion on this is
[Nexus 4 Original Android Development] jer_ying_fd:
Ahh, I read from franco that the no hotplug thing is only for nexus 6 because only s805 has the specific hardware that can save battery when 4 cores are all online.
[Nexus 4 Original Android Development] franciscofranco:
Thats not what I said. I said the arch specific power management on the N4 is very old and flawed and it doesn't use the power states properly to provide the power savings needed to run all cores online without a greater power consumption regression. The N5 is better, but still old. All the 801 or newer can run with all cores online and they'll scale between the appropriate power states.
[Nexus 4 Original Android Development] jer_ying_fd:
Okay sorry :(
[Nexus 4 Original Android Development] vampire36:
Yet only thing I would say if that was true wouldn't google have stuck to mpd for N4 and N5...if they have gone all core online approach it is because in their extensive testing this was better or tradeoff must be negligible...whatever I remember when trinity was around it had similar approach and its battery if not better was on par with kernels having hotplugging...so I guess its more of a matter of choice now more than anything
[Nexus 4 Original Android Development] stratosk:
Although, I don't know about N5 and N6, I agree with franciscofranco that there is a hardware limitation in N4.

But, in the past I did some tests and without hotplug driver and the power regression was not so much.

In any case you can easily disable dynamic hotplug drive, have all cores online and check if it fit your needs.
[Nexus 4 Original Android Development] stratosk:
Anybody tested the new 3.1.0 in 5.1.0?

Please for your feedback.
[Nexus 4 Original Android Development] eurochild:
Works great and smooth as always, some reboots when an app fcs but other than that its great
[Nexus 4 Original Android Development] stratosk:
Thanks!

Reboots? This should not happen.

Could you please send last_kmg after a reboot?
[Nexus 4 Original Android Development] socialdistortion:
I'm testing the 3.1.0 5.1 kernel on the latest Chroma Build (Android 5.1 with latest binaries).

It's been a couple of hours and the phone's been solid. No reboots or mischief so far. And camera works well too.

Will provide another report after 24hrs.
[Nexus 4 Original Android Development] Fenvarien:
The new kernel version is running here perfectly well and stable. I'm using the latest Chroma build too. Thanks for your work and support [MENTION=3750240]stratosk[/MENTION] :)
[Nexus 4 Original Android Development] eurochild:
i'll try to have one for you later today
[Nexus 4 Original Android Development] icu64:
Ooooh that makes sense now lol ok

---------- Post added at 03:00 PM ---------- Previous post was at 02:59 PM ----------

Yes it worked fine but I'm back on Franco now lol
[Nexus 4 Original Android Development] stratosk:
Suit yourself... :)
[Nexus 4 Original Android Development] stratosk:
I flashed 5.1 and Semaphore 3.1.0.

No issues so far.

So, I officially announce the 3.1.0 version. :)

(Users that have already flashed it, no need to download and flash it again)
[Nexus 4 Original Android Development] arvindgr:
I'm moving from Unleashed kernel to semaphore, while everything's perfect I learnt this doesn't have OTG implementation. Even in previous comments, many people have requested the same. Would be nice, if dev considers including OTG with semaphore...
[Nexus 4 Original Android Development] mdaamir1989:
Setting Color Profile

Could anyone please explain how to set the below color profile

255 255 255

0 119 119 1 23 0 119 103 1

Semaphore Manager shows a lot of values under RGB under Gamma control as shown in the below screenshot.

I don't quite understand which value above corresponds to which number in the screenshot.

View attachment 3265716
[Nexus 4 Original Android Development] Gu$houn*:
Post #8317 maybe?

P.

[sntfrmnxs4]
[Nexus 4 Original Android Development] mdaamir1989:
Although i stole :P the color profile from the same post , i overlooked the attachment . Just set the values , and the colors look great :)

One quick question , does the color calibration stick on boot ?
[Nexus 4 Original Android Development] Gu$houn*:
I thought so.;)

Yeah, the profile sticks, at least with semaphore manager, don't know with others. It just needs about minute after start up to set the values as you can see on the toast message that appears ...

P.

[sntfrmnxs4]
[Nexus 4 Original Android Development] icu64:
By the way, I switch between the two a lot. Hope I didn't sound like a jerk ._.

---------- Post added at 08:08 PM ---------- Previous post was at 08:02 PM ----------

Wait just thought about it if I understand what you're saying correctly all of the cores have the issue with the sleep states, if that's the case wouldn't it be bad to leave two cores on? I don't get it [emoji28]
[Nexus 4 Original Android Development] stratosk:
Not at all. It's your device, your decision what to flash and how to use it. Thanks for using (even partially) Semaphore.

It's not exactly and "issue".

All modern CPU support different C states (different states of power consumption).

"Deeper" C states mean lower consumption but more time to go out of this state.

The deeper C state in our CPU can be achieved with only 1 core online. Other C states work if the some cores are offline.

For example if 2 cores are always online (default in Semaphore), you will never have the deeper C state. But other C states will work.

More modern CPU support deeper C states without the need of taking offline it.
[Nexus 4 Original Android Development] ihancioglu:
I was looked for sleep states in the past for N4. Let me share my findings.

N4 SoC is very buggy about power states.

C0 WFI - all cores are enter this mode more often. Only this state works well without limitation.(enabled for default)

C1 RETENTION - Happens a lot of screen flickering If this enabled. Also should applied a few kernel patches to activate this sleep state.(disabled for default)

C2 STANDALONE POWER COLLAPSE - This state disabled by Google as causes sleep of death. Device does not wake sometime. I found that CPU0 is cause this problem and I activated it for CPU1-2-3 for both idle and suspend state.. No problem for me.

C3 POWER COLLAPSE - Only CPU0 could enter this state If all other cores offline.

IMHO If you would test your devices with four core always active, enable C2 Power State for CPU1-2-3 not CPU0.