yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] stratosk:
Check your CPU freq when your device is idling. Maybe an app causes this.

You may check processes in terminal emulator:

top -m 10

What is the process with the highest CPU utilization? (how much?)
[Nexus 4 Original Android Development] rodeo_calling:
Will do soon. Thanks.
[Nexus 4 Original Android Development] rodeo_calling:
Pretty much yeah.
[Nexus 4 Original Android Development] Qwerty123 \m/:
https://docs.google.com/spreadsheet/ccc?key=0AoDp2qRui0u0dGE4T2gtSDBTRHVFSldPS2RrX1Rya0E#gid=6

How exactly do i set the gamma colours in the semaphore app ?

Theres only 4 profiles on the colour chart. and so many sets of values in the Semaphore app
[Nexus 4 Original Android Development] stratosk:
OK, now we are sure that a process keeps your CPU busy.

You may use top command to find out.
[Nexus 4 Original Android Development] MuertoKo:
Tried the command to test, stuck running with no output... What am I doing wrong this time? :P

Enviado desde mi Nexus 4 usando Tapatalk
[Nexus 4 Original Android Development] stratosk:
I don't know. :) I suppose you have busybox properly installed.

I use:

top -m 10

to get the first 10 more CPU consuming processes every (it runs continuously every some seconds).
[Nexus 4 Original Android Development] rodeo_calling:
OK I don't know what's going on but after that hard reboot, I don't seem to be getting the thermal led on whole charging anymore. I'm typing this right now on your 1.6.5 kernel right now connected to the charger with only the battery led on... I'd love to help and hate to get the issue again but whatever it is I'll be sure to report. Thanks.
[Nexus 4 Original Android Development] meangreenie:
Had this phone since last November and haven't seen one benchmark or test that shows any significant improvements by oc'ing the GPU.
[Nexus 4 Original Android Development] barome:
Forgot benchmarks (or maybe try 3d mark) I tested with games.
[Nexus 4 Original Android Development] gianton:
1st full charge, really impressed! Great work Strato!!

CM-10.1 Linaro build with Semaphore v0.4.0 default settings.

View attachment 1906997 View attachment 1906998 View attachment 1906999
[Nexus 4 Original Android Development] Fabio3105:
wow, this is amazing...

I saw that you used more wifi connection... with data activated probably the autonomy is lower, I think, but I'm very happy to have this kernel:laugh:
[Nexus 4 Original Android Development] Bluewall:
Just a bit curious, can you explain us how works "Gradient up threshold" ? What does it changes exactly and how to tweak it ? :D

If I understood, the higher grad_up_threshold is, the higher the load should be to increase the CPU freq ?

Off Topic : Damn, just noticed you're greek ! I love that country ! Been in Greece two times and I've traveled in a lot :)

I know a bit of old greek, I have a "phi" tattoo on my arm, I love your Karelias cigarette and the Mythos beer :D
[Nexus 4 Original Android Development] stratosk:
Ondemand governor checks the absolute system load every sampling period (every 0.02 secs in Semaphore) and if the load is greater than up_threshold (85%) then the CPU goes to max frequency.

With early demand the governor tries to predict the forthcoming load earlier. It checks the gradient of the load and if it's too steep (over grad_up_threshold) then increases to max frequency.

For example, consider the samples below:

Sample 1 (time 0)

load: 3%

Sample 2 (time 0.02 sec)

load 60%

Sample 3 (time 0.04 sec)

load 90%

Without early_demand enabled, at time 0.02, CPU will remain at the same frequency because the load is lower than 85% (up_threshold). The CPU will go to max at time 0.04.

With early_demand enabled, at time 0.02, CPU will go to max frequency because the grad of load (60 - 3 = 57) is greater than 50 (default grad_up_threshold).
[Nexus 4 Original Android Development] Bluewall:
Excellent an clear explanation, thank you Sir, well appreciated :)
[Nexus 4 Original Android Development] stratosk:
You welcome. :)

O.T. Greece is nice, but only for vacations. :) Phi for what? Golden ratio?
[Nexus 4 Original Android Development] Bluewall:
For the Golden ratio exactly :D. You're smart. Not much people found why by themself ! and (at least here) it's common to use it as a symbolo/logo for Philosophy :p
[Nexus 4 Original Android Development] playya:
Question - I would assume this is not suppose to be like this but I will ask. I am running your latest kernel with LiquidSmooth and it seems that it run the min cpu at 1026 all the time. No matter if I use the Performance settings in the stock rom or any other app I can't get it to stay at 384. I have not read anyone else having this issue so I was just asking if anyone else with the same setup can just do a quick check to tell me what there min cpu setting is.

thanks
[Nexus 4 Original Android Development] a g bell:
Well if you are using mpdecision then yes it will be like that you can disable it with trickster app

:)
[Nexus 4 Original Android Development] playya:
I was not but I will reload kernel and app to check it out again...

Edit: fyi - I get the same result with or without the app.. I also never touched mpdecision(but I see its on by default)
[Nexus 4 Original Android Development] a g bell:
You have trickster.apk on your phone ?if not download it for play store look for mpdecision disable it,its enabled by default with most kernels then check speeds

Also Google mpdecision

What kernel were you using before?
[Nexus 4 Original Android Development] gialakias:
Semaphore app with nexus 4 support is up, check it out.
[Nexus 4 Original Android Development] playya:
yea I got it... this is only the second kernel I actually flashed for my phone and the other had it disabled by default. I got it now and lesson learned....:good:
[Nexus 4 Original Android Development] pitjago74:
With 0.4.0:D

Enviado desde mi Nexus 4 usando Tapatalk 2
[Nexus 4 Original Android Development] a g bell:
Nice:confused:
[Nexus 4 Original Android Development] eep2378:
What would be the benefit/cost of adjusting the default grad_up_threshold from 50? I'm assuming 50 is the "sweet spot".

Sent from the Nodes of Ranvier
[Nexus 4 Original Android Development] stratosk:
I believe that 50 is a good value. You will have more aggressive behavior as you decrease the value.

Increasing grad_up_threshold, governor will be less aggressive and eventually with almost the same value as up_threshold you will eliminate early_demand.
[Nexus 4 Original Android Development] ceejay83:
Has module support been added? Only asking so I can ask the touch control dev to add
[Nexus 4 Original Android Development] alen1901:
I know that feeling. With every device i had/have i reached maximum 500 hours of uptime, one time only, then i flash something. Its in the blood, nexus got into there really quick. Lets see where i can get with n4 :D

Thanks stratosk for this great kernel. I would be glad if i could donate a beer, black one, but my country sucks in internet eurocurrency so i cant do anything. Just to let you know, one day when i buy n5, i hope you will be there with your kernel too. :)
[Nexus 4 Original Android Development] stratosk:
Thank you, my friend!

I really appreciate your intention for the beer! :)

I don't think, I will follow to N5 forums. It's too soon for me for a new device.
[Nexus 4 Original Android Development] rodeo_calling:
Me too :). Happy with the N4 for now.

Oh, everything was running alright when I had a random reboot.

http://db.tt/VGSvt0z0

I just had the torch function on when it happened.

Guess if I'm the only one with the issues, I'll go back to 1.6.0 coz that was pretty rock solid for me.

Thanks.
[Nexus 4 Original Android Development] alen1901:
No problem. ;) well, i dont plan to buy n5 anytime soon, to expensive here for my student budget (and for a regular worker budget). So, in a year or two maybe. :p
[Nexus 4 Original Android Development] stratosk:
This was a hardware reset.

You may only achieve a hw_reset doing this (not recommended):

su

echo Y > /sys/module/lge_panic_handler/parameters/gen_hw_reset

I think this is the only way to get a hw_reset. This means (IMO) that a userspace driver (maybe thermald) do this to protect your device.

Taking into consideration your previous post, do you overheat your device? Torch is causing also much heat.

Did you disable thermald? Please note that other kernels disable it. You need to dirty flash your ROM if you are coming from other kernel and the flash Semaphore, to be sure that thermald is running properly. If this is not the case then please check if a process keeps your CPU busy.

Please use 'top' command or System Monitor and check that your CPU is idling when you don't touch the screen.

Just some thoughts...
[Nexus 4 Original Android Development] lalo20:
ramdom reboot here with 1.6.0 and PA 3.99.1, no uv.

https://www.dropbox.com/s/64hprayhbt2mc2m/kmsg.txt
[Nexus 4 Original Android Development] stratosk:
Could you please also post last_kmsg?
[Nexus 4 Original Android Development] Fenvarien:
Semaphore is running rockstable here together with Purity ROM (jwr). I used my phone the whole day quite intensive and have still 1/3 of my battery left. Awesome kernel! :D

Gesendet von meinem Nexus 4 mit Tapatalk 4
[Nexus 4 Original Android Development] lalo20:
https://www.dropbox.com/s/qd9ttpoywbha52e/2013-09-17_17.56.zip
[Nexus 4 Original Android Development] PRGUY85:
Testing V1.6 with PureSpeed V6. Getting abnormal awake time. What do you guys think?
[Nexus 4 Original Android Development] stratosk:
Thanks for logs, but I can't help.

Your last_kmsg simply shows that you rebooted from recovery.

I need the last_kmsg right after the first hardware reboot.
[Nexus 4 Original Android Development] szucsgf:
First thing I would try is reboot the phone and see if the wakelocks continue, if you haven't done that already.

RILJ has to do with your radio. Maybe try flashing a different one?

Nlp is "network Location provider". Try unchecking "Location Reporting" in Google settings - Location, if you haven't already.
[Nexus 4 Original Android Development] PRGUY85:
I will reboot and check. Would turning Location Reporting off mean I won't get location based Google Now notifications?

Also, I emulated your kernel setup but couldn't get as good a battery life as you did. Why do you change the TCP/IP configurations (cubic to reno for example)? Also, do you leave Boost Voltage Off and apply your past said values to UV?
[Nexus 4 Original Android Development] andr0id_xda:
Crt off doesn't work no more.could it be kernel related or rom?i use v 1.60 kernel and latest purity rom.i didn't modified nothing
[Nexus 4 Original Android Development] szucsgf:
You'll still get Location based Google Now notifications with Location Reporting turned off. For example I still get notices of bus schedules for nearby bus stops, showtimes for nearby theatres, and weather for whatever city I'm in. Of course if you disable Location Reporting and find you're not getting the notifications you expect it's very easy to enable again.

My battery results were in optimal conditions, specifically at or near home where I have an excellent wifi connection and very good LTE reception. This is as opposed to at work where I have crappy wifi and not so good LTE. At work my battery drains faster. This plus wakelocks will have the biggest effect on your battery life.

I changed tcp to reno simply because it gave me consistently better results on the speed test app. Now that Westwood is available I have to test again.

I turn boost voltage off. But undervolt settings is really something you need to test yourself and not emulate others. I probably could undervolt more but I don't bother. About 100mV is enough.

I hope my response is helpful!
[Nexus 4 Original Android Development] ciprianruse88:
Did you went to rom settings/display and checked if crt off animation is turned on?
[Nexus 4 Original Android Development] andr0id_xda:
It is turned on
[Nexus 4 Original Android Development] ciprianruse88:
Then reboot and see if it comes back.I am on semaphore and Purity for some time and didn't experienced this issue and also I am reading semaphore and purity thread everyday and no one has this issue.Read screenshot and see if you followed the proper steps for instalation.If you want to discuss more please post on Purity thread and provide more info and logs :thumbup:
[Nexus 4 Original Android Development] PRGUY85:
This was after reboot.
[Nexus 4 Original Android Development] szucsgf:
Yeah being awake 52 minutes with less than 10 minutes screen on seems a bit much. Nlp shows up in your partial wakelocks, and I mentioned something that may help there. Do you have a screen of your kernel wakelocks?
[Nexus 4 Original Android Development] PRGUY85:
Don't have them but they are similar to my previous post. Power Manager services among others.
[Nexus 4 Original Android Development] PRGUY85:
What is your higher frequency threshold on UV parameters? I understand you have lower UV at 100 and higher at 87.5 right?
[Nexus 4 Original Android Development] aLPaSLaN07:
I got a reboot while charging from usb cable connected to my computer. The battery was +80% but suddenly it became 0 and phone rebooted.. Will check if this will happen again. When it does, what kind of log do I have to collect??
[Nexus 4 Original Android Development] stratosk:
Debugging in the kernel is a difficult process, especially when I have to find something made in stock drivers.

I will need (to have a chance to find something):

1) kmsg

2) last_kmsg

3) Info about your ROM, settings, kernel settings, maybe steps to reproduce the issue, or what was your last actions before the incident.

Then, maybe, I could find something.
[Nexus 4 Original Android Development] MuertoKo:
[MENTION=3750240]stratosk[/MENTION] I managed to make the top -m 10 work finally, was trying to run it using System Tuner and it wasn't showing... when you said it would continuously reload... I thought it was app problem (static output), tried the command in terminal emulator and got the proper output ^^ Nothing interesting in it as I had no issues, but at least now I know how to check CPU usad per-app, something I wanted for long (so used to check it on Windows every time it lags anymore than usual :P)

Thanks for that, and 1.6.5 running flawless on stock JWR, not a single reboot, hickup or whatever worth mentioning :D
[Nexus 4 Original Android Development] szucsgf:
That's correct.
[Nexus 4 Original Android Development] stark_br:
Hi Stratosk.

Just had a reboot while phone was in my pocket, listening to music.

I'm using PA 3.99 with your latest kernel.

No uv, just the max freq to 1026 mhz.

Tks

http://db.tt/msOxNPDO - last_kmsg
[Nexus 4 Original Android Development] kandarpck:
NLP wakelock is caused when your Location Reporting is turned on and the phone can't point your location. It'll drain your battery like crazy. Disable Location Reporting in GNow.

On a side note, are you connected to a bad WiFi? Like a college WiFi? Congestion there may keep your device awake.
[Nexus 4 Original Android Development] stratosk:
Hi,

The only thing I can see is that the device booted into recovery.

Did you do this? I need the last_kmsg right after the reboot.
[Nexus 4 Original Android Development] Skkip:
You are right with my changes you will have to change the current up_threshold and maybe down_threshold in hotplug driver. My current values on Nexus 7 are 75 up and 25 down. With your Method though, a cpu will be far longer online than it has to be i think. suppose an average of 50 after running some cpu intensive task it will take atleast (i'm not sure if your down_threshold was 15) 35 * 20ms = 600ms with load below 25% which is unlikely. On the other hand onlineing of cpu's will be a bit slow. Of course you don't want to jump online and offline all the time on load spikes. but averaging the load of the cpu and averaging the load accross all online cpus should easily be able to handle that.

void cpufreq_notify_utilization(struct cpufreq_policy *policy,
unsigned int util)
{
if (policy)
policy->util = (policy->util + util) / 2;
}

Thx for discussing and improving with me :)
[Nexus 4 Original Android Development] ultrapirate:
Mad props Stratosk Mad props.

This is one of the slickest kernels i have ever used. :thumbup:

That's only my 2nd day with this kernel, my nexus feels fresher than ever, the stock settings with the semaphore manager are giving me at least 4 hours of sot even with the first cycle!

Is there any kind of a tweak would allow us to get some more extra juice out of the battery?
[Nexus 4 Original Android Development] stark_br:
Hi,

thats really weird, cos as I said, the phone was in my pocket and I was listening to music when it stopped.

When I picked up it, was rebooting.

As matter of fact, this is the last_kmsg after the reboot.... :(

Well, thanks anyway and keep up with your good work.:good:
[Nexus 4 Original Android Development] stratosk:
I think I'm a little bit confused with your calculations.

The point is that my goal was/is to offline CPUs only when the system has pretty low load.

I want the CPU to be online with medium to high loads. The method I use seems to behave well enough and achieve this goal.

BTW, I guess you saw it that I used your idea to select the CPU with the lower load. :)

Thank YOU for this! :)
[Nexus 4 Original Android Development] stratosk:
Yes, this is really weird. In fact I saw 1 similar last_kmsg from other user.

You may see in the 3rd line that this is not my kernel. I guess it's the TWRP kernel.

Also, you may see (in the last line) that something in your ROM caused a reboot to recovery.

[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] [COLOR="red"]Linux version 3.4.0-Bricked-TWRP-Edition-ge64003f-00963-g0d8a3e7 (showp1984@jarvis) [/COLOR](gcc version 4.7.2 20120910 (prerelease) (Linaro GCC 4.7-2012.09) ) #3 SMP PREEMPT Sun Feb 24 03:23:20 CET 2013
[ 0.000000] CPU: ARMv7 Processor [510f06f2] revision 2 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] Machine: QCT APQ8064 MAKO
[ 0.000000] Truncating memory at 0xc0000000 to fit in 32-bit physical address space
[ 0.000000] memory pool 3 (start fe9ff000 size 1600000) initialized
[ 0.000000] Initialized persistent memory from 88700000-887fffff
[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
[ 0.000000] socinfo_init: v6, id=109, ver=1.1, raw_id=1817, raw_ver=1817, hw_plat=8, hw_plat_ver=65536
[ 0.000000] accessory_chip=0 hw_plat_subtype=1
[ 0.000000] allocating 21626880 bytes at c26bb000 (828bb000 physical) for fb
[ 0.000000] PERCPU: Embedded 9 pages/cpu [MENTION=3825209]c3b[/MENTION]5e000 s15744 r8192 d12928 u36864
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 488963
[ 0.000000] Kernel command line: console=ttyHSL0,115200,n8 androidboot.hardware=mako lpj=67677 uart_console=enable lcd_maker_id=primary lge.hreset=off lge.reset=mode_reset gpt=enable lge.kcal=0|0|0|x lge.rev=rev_11 androidboot.emmc=true androidboot.serialno=01896b151613c94a androidboot.bootloader=MAKOZ20i androidboot.baseband=mdm [COLOR="Red"]bootreason=recovery[/COLOR]
[Nexus 4 Original Android Development] stark_br:
Thank you, man.

I updated my TWRP to last version, lets see how it will behave now.

Is this from my last_kmsg? Because I dont remember to use Bricked kernel.... :what:
[Nexus 4 Original Android Development] stratosk:
Yes, I guess TWRP uses bricked kernel.

But, I don't think your issue is TWRP.
[Nexus 4 Original Android Development] Franklin Bernard:
Hi,

I got the similar issue,in fact same issue in bcm and faux kernel 025u..and there was a line 'bricked' in the log. I have enabled sleep2wake for both kernels that time...after I disabled it, the reboots stopped..not sure if this will help coz semaphore has only touch control and not sleep2wake..
[Nexus 4 Original Android Development] stratosk:
Hi,

Semaphore does not have touch control.

Semaphore has implemented touchwake. It's totally different.

Yes, you are right. You have to disable touchcontrol and test again. :)
[Nexus 4 Original Android Development] stark_br:
Installed CWM for testing and now on last_kmsg shows that its booting up your kernel.

http://db.tt/msOxNPDO

Lets see if the weird issue comes back.

I'll keep you posted, thanks again.

:good:
[Nexus 4 Original Android Development] Bladyle:
Hello, I like this kernel and I use it with your Semaphore manager app but can I ask you to make a something like a manual with detail explainations for options you import :) Thanks!
[Nexus 4 Original Android Development] cmajetic:
hi thanks for your kernel. got the phone yesterday and this is my first kernel.

installed with twrp and worked fine.

what is touch to wake? tried to wake my phone touching it everywhere after activating it but nothing happens. I'm on latest stock 4.3

Gesendet von meinem Nexus 4 mit Tapatalk 4
[Nexus 4 Original Android Development] stratosk:
In my TODO to enrich my website with a new Howto.

I have already write most of it. But always something new comes out.

- SGS (and family) users wait for a new kernel release.

- WIP for the new version of Semaphore Manager (hope to release it today)

Fortunately, I upgraded without issues my virtual server Ubuntu that hosts semaphore.gr and the CMS to the latest version.

I also had to do some clean up in my workstation (went back to gnome environment long time).

Anyway, I'm working on it... :)
[Nexus 4 Original Android Development] stratosk:
Touchwake will work only if you leave the screen to switch off due to inactivity (not by pressing power button).

You can wake your phone within the period you specified.
[Nexus 4 Original Android Development] Fenvarien:
You're a really hardworking developer!

I know how tricky the upgrade of a server can get... and I'm excited about the new version of Semaphore Manager. Have some cool beer on me to relax :cool: :good:

(156273730B441803K)
[Nexus 4 Original Android Development] stratosk:
Thanks so much, my friend! I really appreciate your cool beer! :)

Fortunately, upgrade went smoothly. Otherwise, I had to start from scratch (it's a virtual server in Germany, I had to do it remotely). :)
[Nexus 4 Original Android Development] twowheeler:
What is your favorite beer stratosk?

BTW, for battery what should be better. Interactive or ondemand? I need to learn how to setup conservative for my needs :p
[Nexus 4 Original Android Development] Andre_Vitto:
hi.. Just installed this kernel.. games running smoothly till now.. installed the SP Manager app and playing with it..

Saw this question already asked but not replied till.. someone pls...

Also possible to increase temp limit for thermal throttle.. via the app?
[Nexus 4 Original Android Development] stratosk:
Both governors could be tweaked for better battery. I always prefer Linux default ondemand.

Actually, I'm not big fan of beer. When I can afford, I like more whiskey, wine or ouzo. :)

mms trigger turns on LEDs when there is activiry on mmc controller - read or write. (like the HDD LED in your PC or your laptop).

No, you can't use Semaphore Manager to change thermald parameters.
[Nexus 4 Original Android Development] PetritH:
What is touch wake feature guys?
[Nexus 4 Original Android Development] -iNSiGhT-:
When your screen switch off due to inactivity, just touch the screen and it goes back to life...

You just have to activate it and choose the delay during which it will work before going to deep sleep state. (with Semaphore manager app)

Paranoid mako
[Nexus 4 Original Android Development] cmajetic:
touch to wake works great.

sometimes my LED is red which shows Thermal - what does it mean?

would be awesome if you could explain all the LED trigger options ;)

at least i don't know what DC and thermal is.

thanks

Gesendet von meinem Nexus 4 mit Tapatalk 4
[Nexus 4 Original Android Development] stonebear:
Ooh, new update, thank you. Btw for people wondering about logs, just get "syslog" app form Play Store. Makes it easy.
[Nexus 4 Original Android Development] PRGUY85:
My test for the day after turning off Location Reporting (not Location History). Still getting high awake times...