yashsingh1/xdaforums huggingface dataset:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Cool. I'd use it in the office space only, but there I would find it quite useful as well.

While phone in pocket, it's indeed useless.

But that's three already who would use it, so we reached the critical mass in terms of HTC custom development requirements... Back in the days possibly a dozen would have had replied already cheering ??

I'll check this next. :good:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
So i've got it put together in my head :p it's going to be super super cool.

Kernel-Side AmbientDisplay :good::good:

User requirements:

- set phone to "Instant lock screen on Power off" and "Instant lock on screen timeout"

Functionality when it's enabled:

- phone screen will auto turn into "Peek mode" (like Squeeze to Peek) when notification is observed on kernel side,

---- in peek mode for 3 seconds (or time specified in squeeze-to-peek configs) you may check notification, then it auto turns off

- in this particular case one option to optionally disable:

---- disable Touchscreen input (virtual buttons and screen area)

- to keep screen on:

---- use Squeeze

---- use touching/tapping the fingerprint sensor

---- use the mechanical buttons on side

---- touch the screen (if not disabled, see previous point)

Et voila: ambientdisplay, no root, no custom rom functionality needed/stock base ok,

and no unintentional touch input
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tetrabyt:
Nice feature, but I'll pass on this one... :)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
I don't plan it to be default. But Im out of other ideas ATM so it's time for this :D
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Whiskey103:
Lol, hell of a workaround to "disable notification bar pull down on lockscreen" [emoji14] [emoji106]
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Heh, well I know you know these are quite different, this peek mode should only happen when the phone screen will turn on by itself at notification incoming event

User done screen on is a different story, but hmm I'll consider that as an option, but I find that one confusing, as it's impossible to know in kernel when Lock screen is unlocked.

If you tell me an intuitive sequence of user interaction when to remove touchscreen upper area sensitivity blocking I'll have a look.

But I gathered that this is already solved by [MENTION=398245]LeeDroid[/MENTION] ?
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Whiskey103:
Ohh, in that case I misinterpreted your last sentence "and no unintentional touch input"
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Hmm, that was for ambient display which I dislike by default because it is waking device fully on touch, pocket...
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
KAD - Kernel Ambient Display​

another debut of a new world-first feature :D

Set Security / screen lock as detailed in attachment

Also It only works if either led or vibration for notifications is on.

Not yet configurable. If you install this, KAD will be default ON with about 4 seconds of AmbientDisplay time...

Check demo...touchscreen input will be possible to be blocked (and is now blocked by default when KAD triggers), and fingerprint scanner/squeezing phone/volume/power buttons can keep the phone on...

Demo:

[youtube]fyJ8ncnHx_8[/youtube]

2.4.0 - Alpha1 Download:

https://www.androidfilehost.com/?fid=673791459329054510
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] cjrivera04:
Super nice!!!
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] sttw1fa:
KAD...very cool feature!

Can't wait to test it out after you tweak it....but...I know as soon as I DL the beta and get it installed, you'll have beta2...and when I get to that.... you'll have it stable.

I can't keep up DL'ing and flashing as fast as you and Leedroid are coding. I'm going to have to change my lurking to every other or few days.... LOL.

Thanks for the continued development!
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] The Great Dane:
Amen lol
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
but don't forget that I need unsuspecting testers! :D so guys, [MENTION=5834551]sttw1fa[/MENTION] [MENTION=2632943]Whiskey103[/MENTION] [MENTION=8395457]velimirchek[/MENTION] and all who is interested in the feature, flash away and report back...

This alpha is a kindof release candidate, i've tested it a few hours already, fixed a couple of issues before releasing the alpha 1. Apart from inability to switch it off, it is working as intended, except if there's bugs :highfive::good::good:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] velimirchek:
Unfortunately my U11 is discharged and no one from work wants to bring me charger in hospital and Note 8 charger doesn't want to charge U11 :(

Sorry mate
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
No worries, rest and get better soon!

Thanks for letting me know. :good:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Wow, so a note 8 as well, just realized. You don't let any manufacturers devs getting away without proper releases. Or is that on stock yet?
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] velimirchek:
It is on stock and will stay on stock. Don't want to trip KNOX or whatever as it is work phone I got for business use.

Great screen, pretty fast (I wasn't expected that) and good battery life.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] guidogsbn:
And a new feature every day, great! And I had them all,haha:laugh::cool:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] The Great Dane:
Lmfao:laugh:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] sttw1fa:
Twisted my arm....:D 2.4.0 installed on LD v62. Aleeady watched the light and screen show as emails came in this morning after DND expired. Will report back after a day's work of using.

As always, thanks for the continued awesomeness!
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] jelive:
Lee...can u add this update for future builds...appears not in r63 for CSlate. Thx
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Next steps for kernel ambient display development

- check Framebuffer:

--- possibility to lower brightness (needs check)

--- use KCal to set Saturation to 0 when KAD is active so we have Grayscale somewhat like normal AmbientDisplay (should be easy)

- add configration options (on/off, timeout)

Release beta

Test...and release stable :D
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Captain_Throwback:
So I flashed this kernel but I haven't seen any notifications come through yet - is this because I have DND enabled? I noticed at home it wasn't working, I assume because I had Smart Lock enabled, so the phone wouldn't lock. I'll have to figure out how to get this working properly.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
This works through kernel heuristics as I call it. :D

It only works if either led or vibration is on.

No other way in kernel to know notification happens

Indeed missed to mention this
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Captain_Throwback:
Hmm, that's a shame. One of the reasons I like Ambient Display is because I can have vibration off, and have my phone sitting face up on my desk and I'll notice when I get a notification without vibrating my entire desk. Guess I'll work with this until the userspace version is available.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
It's an or. Edit DND to let visible notifications aka leds.

You can even dim it with LeeDroid or exkm.

Only case where this fails is charging. There's no led notification then
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Captain_Throwback:
My DND already allows the LED to blink, but the screen wasn't coming on - only the LED was blinking.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Strange. Sorry will check then

Edit : works here, hangouts, Messenger [MENTION=1162986]Captain_Throwback[/MENTION]

Hmm.. Any special app for tweaking led?

Hmm do you have Bln?
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Ok, bug, I connected it with Bln unintentionally..

Will fix [MENTION=1162986]Captain_Throwback[/MENTION]
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
sorry I was wrong [MENTION=1162986]Captain_Throwback[/MENTION] ... if you could please capture a dmesg... i cannot reproduce yet.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Captain_Throwback:
I just noticed that BLN isn't working either. Maybe these things are connected?
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Yeah, something is acting weird.

Isn't there some left over from init.d scripts, since LeeDroid tweaks moved away from using init.d?

Can you check sys/class/leds/indicator/bln* values
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Captain_Throwback:
I think I understand the issue. I was expecting repeated blinking of the screen and for the BLN to continue, but it only seems to occur right after a notification is received, so if I miss it, the only indication I have left is the LED. I'm not running LeeDroid currently, so there can't be anything left over from it. I'm running the Magisk version of Bad Boyz ROM and using that Tweaks app to set the kernel options.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Bln continues here, but I'm still testing that.

As for repeated ambient display appearance, that's another thing I plan to check, but I was going for a start, so it works like on lineageos default, appearing once
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Captain_Throwback:
I didn't have BLN set to continue indefinitely. I do now, but I would like an option for the screen to come back on multiple times, in case I missed it on the initial instance. I don't know anything about Ambient display on LineageOS, but every implementation I've used had the screen coming on more than once. Guess they changed it.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
I'll have a look, sure. First I want this stable for one appearance then will check that as well
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Hard progress with the grayscale plan... 2am in the night finally arrived something stable and working..

Phew :good:

Off to sleep
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
KAD Alpha2 - Kernel Ambient Display​

Update: some fixes, and adding Grayscale/high contrast filter on ambient screen. Changing to 5 seconds of timeout

Set Security / screen lock as detailed in attachment

Also It only works if either led or vibration for notifications is on.

Not yet configurable. If you install this, KAD will be default ON with about 5 seconds of AmbientDisplay time...

Check demo...touchscreen input will be possible to be blocked (and is now blocked by default when KAD triggers), and fingerprint scanner/squeezing phone/volume/power buttons can keep the phone on...

Demo:

[youtube]ELfTEVxlRZA[/youtube]

2.4.0 - Alpha2 Download:

https://www.androidfilehost.com/?fid=673791459329054962
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] ausaras:
BLN does not seem to be working

I am new to U11. Just got it a week, ago.

I flashed the latest version of this kernel 2.3.1v2. It's work well so far. The only thing is that BLN does not seem to be working. The button lights do not light up when email or other notification is received.

I turned the options on in LeeDroid Tweaks. Do I need to do other setup to make it work?
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] doyou37:
:good::good:

Thanks for all the hard work brother
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
hmmm, is it set to BLN only when charging, or is it to BLN in all cases?

Also a bit stupid question, is your screen off, when you test it? It's only doing BLN when screen is off.

Also you testing it looking at it instantly at the notification time? it will stop blinking after 6 times.

You can change that setting to infinite as well. (0 in tweaks)

Also are you testing while charging, and is your notifications with vibrations? If charging only notifications with double vibration pattern will do BLN
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
It's a pleasure, if somewhat tiring...

It's a pleasure 'cause I start to like this feature now that it works the way I prefer :D like touchscreen won't accidentally act up in pocket, because it's set to disable by default. That's my biggest issue with what I have seen on AOSP roms and custom ROMs as AmbientDisplay feature.

Now that it's starting to be quite stable, next to look at with Kernel Ambient Display:

- color hues (like red/blue/green) when Ambient screen is coming up. It's going to be fun!

- repetition of the ambient display until user input (what [MENTION=1162986]Captain_Throwback[/MENTION] mentioned)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] ausaras:
I set it to BLN in all case.

I have several email accounts. I emailed from one account on my computer to another account on my phone to test BLN. I also changed BLN to blind infinitely.

I only have notification with sounds, no vibration. I just tried turning on vibration for notifications in Gmail and BLN worked. Thank you for the clarification. Actually, before you answered, there were a few times where BLN worked without vibration but it was hit-and-miss.

Normally, I do not like vibration. Is it possible to have BLN without vibration?

Thank you!
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Thing is, on kernel only the event when the Led is activated triggers bln, which is not happening on each notification necessarily.

And that behavior I cannot change.

You can try to switch off notification booster to have low intensity.

But I'm not sure then that all your notifications will trigger vibration either , as it's not happening for each notification either. Many times a facebook notification won't vibrate or blink because after two unread notifications the application stops actively to vibrate or blink, -- this depends on the application.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Captain_Throwback:
[MENTION=3088420]tbalden[/MENTION]

Once the KAD feature is implemented and fully working, would it be possible to use the grayscale options for the squeeze2peek as well? I think that would be kind of cool...
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Yep, it occurred to me as well that it could be there. :good:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tetrabyt:
Can it be tied into a "only while charging" switch...?
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
I like the idea. Note taken! thx
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
kad - just ironed out a last major bug. on my list (two very close notification causes a double power press simulated and switching off the screen in half sec :p) , now seems quite stable..

- now adding/ testing repetition...

EDIT: repetition added...testing.. also added [MENTION=1162986]Captain_Throwback[/MENTION] 's idea for Grayscale on Squeeze2Peek as an option, and also [MENTION=3031788]tetrabyt[/MENTION] 's idea for Kernel Ambient Display upon Charging only option.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
... last bits in the plan of KAD

it will be off default but a screen off double press volume up down for Full light/ vibration mode will switch it on for easy access...

You'll be able to set it through sysfs as an alternative...

Tomorrow I'm going to add color tone to the grayscale as an option, then first beta release...

Maybe stable this weekend :)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Countdown to stable 2.4.0 ...

Skipping beta as this looks okay after two alpha versions and fixing it up yesterday and today

Seems addition of the switch of kad to High light and vibration mode went smoother than I thought. By default if you switch KAD on like that, the squeeze peek mode will appear with grayscale as well next time so it's easier to know it's on.

Fixed one insisting bug just now...

I'll skip coloring of the ambient display, grayscale high contrast is enough for now...

Tons of configuration options already. :good:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] LeeDroid:
KAD is sooooo frikkin cool:cool::cool:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Freak07:
I absolutely agree on that.

Huge thanks to [MENTION=3088420]tbalden[/MENTION]
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Question: is there a way on Rom level to know that phone is in pocket?

We could use a rom auto set sysfs when proximity sensor is covered, and then kernel could behave differently, like KAD wouldn't trigger

In kernel I couldn't find a way looking several hours

Best would be a magisk module that does this
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] The Great Dane:
Tik tak tik tak........:highfive:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] LeeDroid:
Isn't proximity sensor available at kernel level? Not sure if we can check it at ROM level, but I can do some digging
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Since nanohub this is a pain. The driver is now only there to load rom side firmware that controls this, it is a kind-of micro controller for sensors. (This is to spare battery of CPU for such low energy stuff like some sensor IRQs that could go right to the userspace if necessary)

So now it's not built in kernel anymore, no control.

I've looked hard since months.

Also I'm sure framework power manager and gesture binding is aware, that's how proximity works for calls and such.

Thanks Lee
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
- Update 2.4.0 stable -​

Kernel Ambient Display - in-kernel awesomeness

This is to provide something similar to Google's AmbientDisplay feature but in kernel side.

You need instant power locking and instant locking on screen timeout to use this feature properly!

You NEED vibrating Call notifications, otherwise you'll get problems with taking calls!

You can customize it many ways, using greyscale coloring (kcal), specify length of appearance, repetition delay, number of repetitions.

Squeeze2Peek has been updated to use greyscale coloring if you enable that with sysfs switch.

parameters:

/sys/fpf/kad_on 1/0 ( default 0) kad on or off at all? (This is overridden if you use High light/vibration mode (by double pressing volUp/Dn while screen is off))

/sys/fpf/kad_only_on_charger 1/0 (0) Should KAD happen only if phone is on charger?

/sys/fpf/kad_disable_touch_input 1/0 (1) Should touch input be disabled when AmbientDisplay is going on? Still tapping/pressing fingerprint or a short squeeze or pressing volume will keep screen on.

/sys/fpf/kad_repeat_period_sec 4-20 (8) delay time between first and second repetition, and if multiplication set (see multiply_period param), this will be added newly to lengthen delay upon each repetition.

/sys/fpf/kad_repeat_times 1-10 (4) How many times to repeat the display

/sys/fpf/kad_halfseconds 5-20 (10) How long the display should show

/sys/fpf/kad_repeat_multiply_period 1/0 (1) Should the repeat period lengthened upon each repetition?

/sys/fpf/kad_kcal 1/0 (1) Should the grayscale high contrast coloring be applied when AmbientDisplay comes on?

/sys/fpf/squeeze_peek_kcal 1/0 (0) Should grayscale coloring be applied when squeeze peek (short squeeze gesture) happens? Will auto activate if high brightness vibration mode is on and kad_kcal is on

High brightness/vibration switch update:

That mode from now on will automatically enable Kernel Ambient Display, so just double press volup/dn while screen off to activate it.

Notification Booster feature for Vibration update:

boosted voltage set to maximum possible.

Download:

https://www.androidfilehost.com/?fid=889964283620760178

Demo video:

[youtube]ELfTEVxlRZA[/youtube]
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] luigic81:
Digging this kernel on 1.8 Viper, sprint variant.

Question on your new release, What exactly does KAD do? I watched the video but I still dont get it...

Thanks
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] android_patrizian:
Works great. Thanks a lot for the continuing developed and innovations. :)

From my personal perspective the standard setting is a bit 'too much': I would prefer vibrations only when the U11 is in the pocket and a longer interval between the screen notifications although the later can be configured easily.

Otherwise an incoming message is like my boss: can't be ignored when showing up. ;)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
it's something similar to AmbientDisplay on Pixel devices or AMOLED devices, where you can read in a black and white screen the incoming notification without turning the phone on.

This is useful when I have it laying on the table, and I'm too lazy to switch the screen on manually... a quick glance reveals what the notification is about, and then can be ignored or checked further ...
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
We're on the same page. I was trying to get hold of the Pocket detection...but I just couldn't find any way to do it in kernel...

I'm much hoping that from rom/framework level it can be checked and granted a kernel callback that I can add, then this could be done, although with a custom ROM only, or probably a magisk module.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] LibertyMonger:
Wow you are amazing Sir. Cannot wait till I get my U11 back.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] yosmar537:
Question... How to enable/customize KAD? Do I need an app for it? If so, which one?
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] grega_slo:
If someone would find this it would be awsome.

Then we cloud also limit FP scanner in pocket :)

You know, my bounty from a long time ago :)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] sasa.kljucaric@yahoo.de:
I don't know how to customize KAD. I've installed EXKM but I can't set start scripts. It's to complicated for me?. Can someone please explain how to do that. Thank you.....
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] velimirchek:
In exkm go to tools -> user settings and add bellow paths one by one according to your taste
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] sasa.kljucaric@yahoo.de:
Thank you very much. It's working fine. Now I understand it. I'm learning. What a wonderful future...
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
[MENTION=8395457]velimirchek[/MENTION] your bug reported crawled back piggy backing the KAD.

Last time I could work it around but now I'll find the root cause, I took an oath ??

It's Rgb led blink stops occasionally together with Bln. I'm on track... Happens only if KAD and Bln used 2 out of 10 times
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] velimirchek:
I am not crazy, I am not crazy :laugh:

(though still in hospital)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
In turn I'm going crazy over this driver... :eek::laugh:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] alexchin91:
hi just a quick question. will the ambient display consume more battery juice as htc u11 isn't amoled screen?
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Definitely. More than what amoled ambient display adds to battery drain.

So if you'd want more juice use it moderately. Adds the same amount as the normal sot
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tetrabyt:
Can anyone else recreate this... With KAD on charge only,while not charging, full bright/vibration. Bln doesn't blink? Maybe my settings..

Also, with KAD set to off, KAD still comes on..