yashsingh1/xdaforums huggingface dataset:
[Nexus 6  Original Android Development] andrewpmoore:
ok, I've been doing a quick catch up on the thread and looking at things.

Yes the key settings in lightflow for the nexus 6 are

direct mode (so it bypasses the android led standard control via notifications)

root mode

run every command as root.

Mixer helps with some color combinations that don't work otherwise, but isn't essential for basic colors

There's the option of run any command as root or install se linux changer and enable permissive mode (or just edit the file to change to permissive mode manually)

Here's a quick overview of what lightflow is doing.

It scans the sys directories on first startup to find the led drivers.

With root mode enabled it tries to "chmod" the brightness files to allow standard non-root users to control the leds.

If "run every command as root" is off, it'll issue something like

echo 0 > /sys/devices/leds-qpnp-f0067200/leds/red/brightness

echo 1 > /sys/devices/leds-qpnp-f0067400/leds/green/brightness

echo 0 > /sys/devices/leds-qpnp-f0067600/leds/blue/brightness

to switch on the green led (and switch off the red/blue if already on). These will just run as the standard shell user.

If "run every command as root" is on, it'll issue the same commands but as "su"

Using selinux changer to enable permissive mode allows the echo commands to run as the standard user, hence not requiring root (apart from for the initial chmod command). Up until kitkat typically run every command as root was only required on knox samsung phones (and that's where the lite version of lightflow is a little behind until I've got everything working well in lollipop for full version users). The lite version will only run as root on samsung phones.

It would be interesting with 1.9 for someone to manually try use adb shell and issue these commands as "su" and see what happens. From the zipped logs in the older thread the app looks to be issuing the "su" option correctly on both 1.8 and 1.9
[Nexus 6  Original Android Development] merouleau:
Given that we're generally all able to make Light Flow work with 1.9 as long as we uninstall / install / configure, I think the cause must be more subtle. What could account for the app's different behavior on LK v1.9 in these two scenarios?

1. Flash LK v1.8. Uninstall (if necessary) / Install / configure Light Flow. Flash LK v1.9. Confirm that Light Flow operates as expected with the exception that the LED never lights up.

2. Flash LK v1.9. Uninstall (if necessary) / Install / configure Light Flow. Confirm that Light Flow operates as expected.

It's as though Light Flow learns something about the system layout during installation on a device running LK v1.8. Depending on that information after the kernel is updated to 1.9 causes it to malfunction. Doing a fresh install and manual reconfiguration under 1.9 corrects the problem. What assumptions does Light Flow make at installation time that might be subject to unexpected change by a kernel update?

Incidentally, it works the other way too. If you install / configure under 1.9 and flash 1.8, Light Flow loses access to the LED.
[Nexus 6  Original Android Development] Cy_n_ic:
Just a shot in the dark but...could lk power saver be the cause of lightflow issues? Is it not working if power saver is enabled/disabled. Since its only happening to some, a toggleable variable just sprung to mind. And it wasn't in 1.8 and is in 1.9 correct?
[Nexus 6  Original Android Development] merouleau:
I tried choosing Performance in 1.9 lkconfig before I gave up on my 1.8-installed Light Flow - it did not fix the problem.
[Nexus 6  Original Android Development] andrewpmoore:
Does the led path change between versions? The app does store these off (as it wouldn't expect them to normally change and it takes a while to find them on the first run). That's the only thing I can think of that's stored off regarding the leds.
[Nexus 6  Original Android Development] GPS3:
Is it counter-productive to enable CPU BOOST and enable CPU SCHEDULER POWER SAVING MODE at the same time?

Should it be one or the other not both?
[Nexus 6  Original Android Development] Franzie3:
Reporting on battery life on 1.9 with power save enabled. i think it might be a slight bit worse. it seems other apps which normally arent chugging on my battery are now using a bit more juice. I havent done a full investigation yet but i see a lot of awake status in my battery opposed to SOT which is 50 minutes with 75% left since just after 8AM. facebook has been using a lot of juice based on GSAM but i dont remember being on it much. Unless it was still doing somethign rogue in the background. My top 10 wakes are as follows from lkconfig

54976 29024 smb135x_wake

42974 3868 msm_hsic_host

27776 1654 PowerManagerService.Wakelocks

25692 1685 PowerManagerService.Display

14371 2542 wlan_rx_wake

13357 1842 sensor_ind

4690 5 wlan_ctrl_wake

1894 1 msm_serial_hs_rx

1440 0 wlan_wake

1195 2 alarmtimer
[Nexus 6  Original Android Development] merouleau:
I have been wondering about smb135x_wake, which is high on my device also. Anyone know what it is?
[Nexus 6  Original Android Development] nobnut:
Your punctuation and grammar make your post useless.

Did you mean 'not' or 'now'. Completely different meanings.
[Nexus 6  Original Android Development] Franzie3:
yea sorry....and i'm assuming you are the grammar police or just being extra sarcastic??
[Nexus 6  Original Android Development] Cy_n_ic:
Actually i was wondering the same thing if asking nicely helps at all...
[Nexus 6  Original Android Development] Franzie3:
i corrected my post....but yea if someone just asks instead of waving their e-peen to be tough instead of civil it annoys me....anyway moving on
[Nexus 6  Original Android Development] Cy_n_ic:
Searching didnt yield much info for me. I suppose thats why you ask. Only thing relevant i found related to battery charging. Other than that somehow i was led to a site concerning "Diabetic cats in need"

So i wonder if it has to do with the screen always on while charging. Do you use that?
[Nexus 6  Original Android Development] Surge1223:
The address's won't stay consistent. I'd use a wildcard for the address (%* etc).

The reason I know they will change is because of how they are configured, https://github.com/Surge1223/android_kernel_moto_shamu/commits/master I just pushed two commits that enable the LEDs for charging by default (kernel managed) however fixing it entirely will take some work.
[Nexus 6  Original Android Development] merouleau:
I don't.

---------- Post added at 01:07 PM ---------- Previous post was at 01:03 PM ----------

As per Surge1223's posting today, it sounds like LED path does vary. I sense that we're close to a solution. :)
[Nexus 6  Original Android Development] Imoseyon:
Is that what's happening? [MENTION=220547]andrewpmoore[/MENTION] & [MENTION=4939386]Surge1223[/MENTION], can't you guys just use /sys/class/leds so you don't have to worry about changing paths, or am I missing something? Also I don't think we should ask users to put selinux in permissive mode to run just one app...

thanks
[Nexus 6  Original Android Development] Surge1223:
I suppose you can, I forgot that symlink exists, thought the values inside it depend on which are enabled in the kernel. Im not a big fan of having user space be in charge of LEDs, when its supposed to be done by the kernel (no offense to the app dev). Also I dont think you have to be Permissive to echo to values in sys dirs, because one way of setting selinux to permissive is to echo 0 to sys/fs/selinux/enforce anyways...

But yeah enabling all the LEDs to work the way they should (i.e green light when 100% charged, red when still charging, blinking notification etc) is a big PITA. Awsome job on your kernel BTW, big fan here.
[Nexus 6  Original Android Development] andrewpmoore:
The LG G3 works in a similar way so I've already got that rescanning on boot to find the directories each time so I'll look into doing the same on the nexus 6 or look at that other location.

Regarding the su access. I'd prefer not to have to run as root and if anyone can suggest a way to avoid it that would be great, but from the experiments I did it was the only way I could echo to those files but then again unlike the devs I'm ok with day-to-day linux but it's not my main area of knowledge so any suggestions would be great.

update:

ok, I've made the change to rescan the directories on boot.
[Nexus 6  Original Android Development] Imoseyon:
Nice, I was going to suggest exactly that. Or just have an option to allow user to rescan at will. That way you don't have to change too much code.

If you guys ever want to change it for good you can definitely use the symlinks. These are not going to change:

root@shamu:/ # ls -l /sys/class/leds
lrwxrwxrwx root root 2015-01-23 16:38 blue -> ../../devices/leds-qpnp-f0049e00/leds/blue
lrwxrwxrwx root root 2015-01-23 16:38 charging -> ../../devices/leds-qpnp-f0049800/leds/charging
lrwxrwxrwx root root 2015-01-23 16:38 green -> ../../devices/leds-qpnp-f0049c00/leds/green
lrwxrwxrwx root root 2015-01-23 16:38 lcd-backlight -> ../../devices/fd900000.qcom,mdss_mdp/qcom,mdss_fb_primary.164/leds/lcd-backlight
lrwxrwxrwx root root 2015-01-23 16:38 mmc0:: -> ../../devices/msm_sdcc.1/leds/mmc0::
lrwxrwxrwx root root 2015-01-23 16:38 red -> ../../devices/leds-qpnp-f0049a00/leds/red
[Nexus 6  Original Android Development] andrewpmoore:
Thanks for that
[Nexus 6  Original Android Development] wrongway213:
So instead of acting like I understand issuing shell commands on a practical basis I'm just gonna come right out and ask if I'm understanding this conversation correctly or not: does it appear that finding these paths and commands is getting us one step closer to being able to enable the LED natively on a device without a third party app? If not I don't really understand what's being discussed here and I'm fine with that, but if this is a discussion that's relating to actually being able to enable LED on your device without an app, I would definitely like to understand it.
[Nexus 6  Original Android Development] poczynek:
Some roms have it enabled natively already so maybe look at what they're doing?
[Nexus 6  Original Android Development] Imoseyon:
I'm still at work (and i'm hard at work too except for the occasional glimpse at xda lol) so I haven't been able to confirm whether the root cause is the sysfs node file paths or not, but if it is the issue most likely they're already using the symlinks.
[Nexus 6  Original Android Development] wrongway213:
Yeah I understand merging commits can and hasenabled LED, I don't build and don't intend to start though.. if I could I imagine I'd understand this conversation a little better without having to ask noob style :p However, if running commands/scripts/what have you could possibly get this feature to work without needing management from an outside app on any and all ROMs I'd be a happy guy as I don't like ambient display at all and I don't think anyone likes setting up Light Flow every time I flash a ROM or kernel, the dirtier the flash the better when you're a flashaholic.

As for your response, Imoseyon, you are just too smart for me, haha.. still don't quite understand this conversation but will be watching to see where that goes and hopefully change that
[Nexus 6  Original Android Development] Surge1223:
yep, if it was me I'd do something like this

u0_a85@shamu:/ $ su
root@shamu:/ # red=$(find /sys/class/leds -name "red")
root@shamu:/ # blue=$(find /sys/class/leds -name "blue")
root@shamu:/ # green=$(find /sys/class/leds -name "green")
root@shamu:/ # ls $red
/sys/class/leds/red
root@shamu:/ # ls -l $red
lrwxrwxrwx root root 2015-01-22 14:07 red -> ../../devices/leds-qpnp-f0069600/leds/red
root@shamu:/ # echo "20">$red/brightness && sync
root@shamu:/ #
[Nexus 6  Original Android Development] Mocheen:
delete
[Nexus 6  Original Android Development] beyeond:
Lately I've been having a delay when pressing power button to wake up the phone. It happens every now and then. I just disabled the powersave in lkconfig to see if it still happens at all. No idea if it's related to it or not.

Has anyone else had this happen? Its not really an issue since it doesn't really bother me, but just curious if anyone else has seen it. Would this be more likely to be a Rom or kernel issue?
[Nexus 6  Original Android Development] flyinj54:
I only saw that issue on stock 5.0.1 ROM and kernel. Once I switched to lk never had the problem again
[Nexus 6  Original Android Development] beyeond:
Just happened for the first time in the last few days. I think I was only on stock for like 3 hours when I first got the phone, so no I have no idea about that. Been on lk since 1.1.
[Nexus 6  Original Android Development] Smallsmx3:
I've been having issues waking the phone... It's been happening since I switched ROMs about twice a day. Like almost a SOD but wakes after a couple of presses.
[Nexus 6  Original Android Development] anuragvivek93:
Getting max 3.5hr of SOT. On slim rom... What to do?
[Nexus 6  Original Android Development] itsmikeramsay:
Man it's good to see you here Imo! I'm still a month out from getting mines, but nonetheless I'll be joining the Nexus 6 revolution lol
[Nexus 6  Original Android Development] estallings15:
Man, you're cooking!
[Nexus 6  Original Android Development] zephiK:
We must be having a xda Thanksgiving ourselves :D
[Nexus 6  Original Android Development] warrenis1234:
neither app seems to keep my choice in speed from changing. every time I open the app it goes back to default. any reason why?
[Nexus 6  Original Android Development] simms22:
disable mpdecision or itll always change back. in a terminal emulator..

su(press enter)

stop mpdecision(press enter)
[Nexus 6  Original Android Development] estallings15:
No kidding. The Devs are on fire around here. We have options and everything.

No issues yet with Beta1, OP. InteractiveX is running nicely. Thanks again. [emoji106]
[Nexus 6  Original Android Development] Xileforce:
Also make sure you have the latest SuperSU. That was my issue
[Nexus 6  Original Android Development] g00s3y:
Wow, seeing your name and this kernel brings back memories of my HTC Thunderbolt...
[Nexus 6  Original Android Development] Xileforce:
Good memories? O_o DAT thunderbolt
[Nexus 6  Original Android Development] simms22:
rastapop with lean kernel at 2880mhz..
[Nexus 6  Original Android Development] g00s3y:
Yeah, I knew about the battery life being horrible and all the other "shortcomings" of the phone. It wasn't amazing stock, but after developers got their hands on it, and I had the extended battery. The phone was a joy to have, living in Jersey, right across the bridge from NY had LTE the day it went live with VZW.
[Nexus 6  Original Android Development] Xileforce:
Wow! That's amazing. I'm getting 50850 on stock with this kernel unencrypted. At stock frequencies. Are you encrypted still?
[Nexus 6  Original Android Development] ChrisJ951:
I was going to look into building an android kernel for the first time and trying to figure out how to make the screen less warm for myself.

I've been trying to look through the source code to figure out where the values are loaded from but am not entirely sure which are used.

I was thinking it is one of the files in /drivers/video/backlight. Any tips on which one it may be?
[Nexus 6  Original Android Development] simms22:
one more, at 2880mhz. yes, still encrypted. but that just messes with the speed of reading/writing your storage.
[Nexus 6  Original Android Development] Steve Lazarus:
Keeping the Note, or moving on? Myself, just got Noted out...Time for some change:thumbup:

Sent from my Nexus 6
[Nexus 6  Original Android Development] Imoseyon:
These are pretty good numbers right?
[Nexus 6  Original Android Development] Xileforce:
Yes that looks like my unencrypted numbers. I achieved my highest androbench scores with a buffer of 1024.

---------- Post added at 11:01 AM ---------- Previous post was at 11:00 AM ----------

Wow that's great. I figured the increased read and write would boost the I/O portion of antutu even more.
[Nexus 6  Original Android Development] simms22:
i always bench with the top cpu speed set as minimum and maximum. itll give you more accurate results this way, without as much variance. otherwise, itll chose to test any speed below max, and you dont really know what speed its actually testing.
[Nexus 6  Original Android Development] Imoseyon:
Good - just wanted to make sure that I'm not making it worse. lol. :good:
[Nexus 6  Original Android Development] hsj1906:
I'm on beta 1 and it appears that turbo charging is no longer working. Is that kernel related?
[Nexus 6  Original Android Development] ScumDroid:
Try another ROM? I get 6 to 7 hours screen time with heavy use on this kernel with stock ROM.
[Nexus 6  Original Android Development] saj2001ind:
6 to 7 hrs screen on time ? Don't u have any WiFi 3g etc running
[Nexus 6  Original Android Development] New Rising:
I've been using kernel this with power savings mode on chroma and have been getting great battery life. Better than Franco for me so far. Both are great kernels though.
[Nexus 6  Original Android Development] old_fart:
One of the settings in lkconfig will show the wake-locks.

And I have been running the euphoria rom and the lk1.9 ( for a week now ? ) in the battery saving mode and am getting very good times.
[Nexus 6  Original Android Development] ScumDroid:
WiFi on the whole time. Very little LTE and no bluetooth or NFC. No S2W or DT2W or any unneeded features. No undervolting. Stock LK config in powersave mode with stock MPDecision, interactiveX governor with noop I/O scheduler. Mostly phone calls, messaging, twitter and emails with some gaming, browsing and youtube. Depending on gaming i range anywhere from 5 hours to 6.5 hours screen time. I have seen 7 hours a few times with no gaming.
[Nexus 6  Original Android Development] Imoseyon:
yeah check your battery stats, wakelocks, etc. There may be a misbehaving app that's preventing your phone from going into sleep.
[Nexus 6  Original Android Development] Franzie3:
Say you figure out a rogue wakelock or something. How do you tell what app it is too?? If I use lkconfig it tell me the top 10 but how do you figure out what it is?
[Nexus 6  Original Android Development] Imoseyon:
So the list of kernel wakelocks will not tell you which app is draining your battery. It is limited in that it can only show you which kernel wakelocks were being held the most. You want to look at two things first: battery stats (in your setting) and the duration of your deep sleep (use an app like trickster or kernel tweaker). I'm sure there will be tons of tips from other users as well. :)

Here's a good trick actually. Your phone after you turn off screen should go into sleep within 10sec or so (unless you're running something in the background on purpose). So run say kernel tweaker, look at your deep sleep counter, and memorize it. Turn off screen, wait a min, turn the screen back on, and then look at the sleep counter again. Does it increase? If not, then you got an app or something that's preventing your phone from going into sleep.
[Nexus 6  Original Android Development] old_fart:
WLD -> WakeLock Detector shows you a list.

hth.
[Nexus 6  Original Android Development] Franzie3:
Thanks. I'm gonna try that out and see. So far it does look like its going into deep sleep just fine. I'll monitor it.

Thanks i got that as well hopefully that helps.
[Nexus 6  Original Android Development] Imoseyon:
Another test build!

If you guys are bored, please test v1.9.4 in the test folder.

This fixes a bug (also present in stock kernel) that allegedly causes cpu cores to be unclocked. Just want to make sure that the fix doesn't cause any regressions in terms of power efficiency and stability. Thanks.
[Nexus 6  Original Android Development] Cy_n_ic:
Can do. Will report back later
[Nexus 6  Original Android Development] garyd9:
"unclocked"? I don't think I've ever heard that term before. My first impression is that an "unclocked" CPU is going to sleep... Or is more like a band with no beat? ;)
[Nexus 6  Original Android Development] Imoseyon:
Heh my exact thoughts when I saw the description of the fix myself. :)
[Nexus 6  Original Android Development] shelooga:
dl now...

update: up and running. passed all the initial tests and stresses.
[Nexus 6  Original Android Development] TheAnarchist1:
Hey [MENTION=3357040]Imoseyon[/MENTION]

By unclocked, do you mean the inability for the user set minimum and maximum values to be set in whatever kernel app that they were using? Something related to boost or whatnot?

Just curious
[Nexus 6  Original Android Development] Imoseyon:
So to go into a bit more detail. Stock kernel allegedly (i say this because that's what the fix description claims) has a bug that prevents cpu in low powered state from getting its clock set, thus encountering an error state. This fix apparently fix that condition - not sure how often it occurs.
[Nexus 6  Original Android Development] TheAnarchist1:
Hmm....thanks for the info. Peculiar....

Ha....I wonder if it could have any issue with progressive slow down on this device, especially after resuming from sleep? Choppy animations, a lot of lag here and there and whatnot. I have noticed that pretty much all kernels on here seem to have that quirk, no matter the tweaking, even with fsync disabled and everything cranked up.
[Nexus 6  Original Android Development] magnum870:
I have a bit of a weird question. Is it at all possible to add a way to disable the magnet sensor that puts the phone to sleep?

Back when I used a belt holster I would have paid money to have this feature built in on my GNex and such, but now I do not use a holster and have magnetic mounts in my car and around the apartment. If I misalign my phone with the magnet the phone sleeps and I'm unable to use it until I reposition (this is most annoying while driving...).

I just kind of assume that this is in the kernel (I'm still stock rom, and it happens on stock kernel too), but if I'm wrong and there is something to do in user-space to disable this then I'd be fine with that too.
[Nexus 6  Original Android Development] beyeond:
Anyone familiar with smb135x_wake? It's my number one WL in lkconfig..
[Nexus 6  Original Android Development] spinkick:
Same for me, do you use activesync? (exchange)
[Nexus 6  Original Android Development] tom.lockhart:
I will be unlocking, rooting and flashing leankernel this evening.

My phone is still encrypted and I've seen conflicting things on whether flashing leankernel will turn encryption off. I want encryption to be off, but need to know if that will happen automatically or if there will be another step to do that.

Thank you very much in advance.
[Nexus 6  Original Android Development] fitz420:
I do not and its pretty high on my wakelock list too
[Nexus 6  Original Android Development] jbbuie:
Been using LK ever since I got the 6 and been loving. I have had something wonky going on the last week though with CPU 2 (#'ing according to system monitor), it seems that the lowest frequency it will go is 1.5hz. CPU 3 &4 offline like they are supposed to and CPU1 settles down to 300hz but 2 stays at 1.5. I am on stock rom and I also re-flashed stock kernel and it idles at 300hz just fine. Any thoughts. Thanks