yashsingh1/xdaforums huggingface dataset:
[HD2 Android NAND Development] ayyu3m:
Okay. So i had a go at cmylxgo's rom and he is using rafpigna's 1.9 non-GB kernel

and the file is lights.qsd8k and the size of this file is 9600 bytes

contrary to the attachment you have provided in ur last post the file size is 9756 bytes

Well, the file size says something right. and yep both LED notifications and auto brightness works and also manual brightness too...
[HD2 Android NAND Development] pyrorob:
yeah that reminds me, i had a conversation with cmylxgo once about the lights issue, he had found that the lights .so file from one of dungphp roms (i think, it was awhile ago) fixed it, that where he pulled it from..
[HD2 Android NAND Development] Screemi:
i tested what you asked for. i have amber flashing light when i receive email and sms, screen is getting brighter when pointing a light at the lumi-sensor but the screen doesn't dimm when it turn off automatically. i am using the crt-animation for screen off. but without it doesn't dimm either.

i am using:

typhoon cm7 nightly 01.09.2011 clk

tytung r12
[HD2 Android NAND Development] ph03n!x:
Devs - If both lights.qsd8k.so and lights.htcleo.so exists, which one gets used?

Can you post this file please?
[HD2 Android NAND Development] dermann:
I don't know much if anything when it comes to developing, but I open these two files with notepad++ and a hex editor, and from what i could tell their is no reference to screen dim/dimmer. Like there is for the led notifications and lcd backlight brightness. Maybe this is something that needs to be added into one of the files as well in the /sys folder somewhere.

Or... maybe it's their hiding in the /sys/devices/platform area and theirs a string somewhere in one of these files that's not pointing to it.

sorry I'm no help, just trying to offer an opinion and option. Would be cool if this does get fixed. :)
[HD2 Android NAND Development] ayyu3m:
Oh my God! So thats why when i tried replacing and even after deleting the lights.xxx.so files i STILL got notifications and screen brightness working.

That is one good find. Whew!
[HD2 Android NAND Development] ayyu3m:
Of coz ma man. Happy screwing around :)

And as per your above question. I think there is something else which handles the leds and brightness IF m not mistaken.
[HD2 Android NAND Development] ph03n!x:
No, what I meant was this - the lights.htcleo.so is known to give LED notifications and Autobrightness. The lishgts.qsd8k.so is know to give working autobrightness and custom autobrightness levels, but not LED notifications. So if both are present, which one will the Kernel use?

I'll try playing with the file you attached.

All - I am updating the first post for more clarity. I am was not clear about the issue before..
[HD2 Android NAND Development] pyrorob:
ok, i think it was tytung who stated that whatever is set under ro.board.platform= in the build prop is what is used in lib/hw, but, if you dont have a file that matches it, theres also what is stated in the kernel as "htcleo" so im thinking that if you dont have one that matches the build.prop and you dont have one that has htcleo, then default would be used..

for example,

in my build.prop it has "ro.board.platform=qsd8k" so in lib/hw any file thats named xxx.qsd8k.so is used first, if not that then i believe any with xxx.htcleo.so is used followed by xxx.default.so.

and i have tested this by removing any non qsd8k labeled files in my lib/hw and my hd2 works fine, so i know what im saying to be true.

also, check this out: [MOD/FIX] Enable all light sensor levels in Sense Kernels and Frameworks thats from the desire development forum, im sure it could be of some use here...
[HD2 Android NAND Development] nieves53:
Im trying this one out on Lang's miui v30 saturated. I can see the difference right away, the sensor responses to light are very quick. Plus it also dims then it turns the screen off

Edit: OK after more testing LED notifications, when the screen is sleeping the LED is solid green then when I wake up the screen the notification light disappeared. Make it sleep then solid green light again
[HD2 Android NAND Development] ph03n!x:
The .so you have posted too is a version created by GPC (not sure about the file size). Here is how we differentiate - GPC's light library has flashing LED notifications and auto-brightness, but custom levels do not work. The logcat will show several entries like this:

The description looks interesting - not sure if this is enabled in our kernels (couldn't find a mention on Tytung's or Rafpigna's changelog - highly unlikely as the thread was created only on 26th Sep 2011).

Looks like this may improve auto-brightness levels even without messing with custom settings. From what little I can see, the modified settings seem to have 10 distinct levels of brightness settings, while the stock settings have 7 and then 0 - hope @Tytung / kernel devs can see if this will work for us/ worth the effort.

If the light DIMs out/ LED notifications do not flash, then you can have custom autobrightness settings - not sure how the config of MIUI for that works though. On the other hand, can you try one of the HeirOS kernels please, without changing anything else, to see if the lights start flashing? - I used 1.7.5, start from there if you can do this :)
[HD2 Android NAND Development] :
Got here another lights.qsd8k.so.. Its 13.932 bytes.. Extracted from a Sense rom. Works perfect here.. But still no flashing LED.. Dunno what the difference is between this one and the 9000bytes one.
[HD2 Android NAND Development] ph03n!x:
Check this post: http://xdaforums.com/showthread.php?p=18118676#post18118676

One of the two drain the battery (also explains the ridiculous drain I get at times). All the more reason to try and fix it.

Like I have been telling repeatedly, HeirOS' kernel seem to flash the LED for notifications even with the custom backlight autobrightness library. Lets hope a Dev can find how he did it...!
[HD2 Android NAND Development] nieves53:
OK so I flashed heirOs 1.8.1 btfix mag. Then I injected the lights.os, now with this kernel I get no screen dim and the LED problem is still here
[HD2 Android NAND Development] tytung:
The light sensor driver of our HD2 kernel is different from the post you mentioned.

[MOD/FIX] Enable all light sensor levels in Sense Kernels and Frameworks

We cannot find any corresponding file path in HD2.
[HD2 Android NAND Development] geenyous:
AmeriCanAndroid

I only recently came to NAND and was using AmeriCanAndroid before and the devs had figured out a workaround there.

The LED was not flashing in amber but stayed solid green whenever a notification occured. Although this might have been out of necessity, as they were not able to make it work with amber LED, it was much better anyway. Because when you had your phone charged, you could immediately see if you missed something because the LED was green and you knew that the phone couldn't be fully charged yet. Now I always have to turn on the screen to check when leaving the room for a bit.

And auto brighntess was working perfectly, I had my 5 profiles running smooth.

It was not kernel related, as I alsways used tytungs kernels while on ACA build, without the intrid.gz though (no idea if that makes a difference).

Here an excerpt of their changelog with the relevant info:

08.12.11 - UPDATE
adjusted lcd auto backlight levels
adjusted light sensor lux levels
adjusted some notification led settings in the build

061011b - Update
...
-work on our implementation of the notification led code

It would be really cool if you could ask copenhagen and warrenb213 how the did it, as far as I am concerned they have the perfect fix.
[HD2 Android NAND Development] ph03n!x:
Just to reconfirm, I flashed back to HeirOS 1.7.5 with bt fix - and sure enough my LED notification lights flash AND I have working custom auto brightness library. The difference between the way this kernel flashes LED and our normal flashing LED notification library is that the LED will flash in orange-green-pause-orange-green-pause and so on instead of the orange flash that we get with the flashing LED library.

For anyone who wants to try this kernel, I am attaching it here. I am also attaching the version of working custom autobrightness library from CM7 nightlies released by @arif-ali.

The kernel is a Magldr ClockWorkMod package, it can be flashed straight on to your phone - I tested it on Typhoon 3.6.8 today. For using this kernel with cLK, follow the "Installation for other ROMs" part of the first post of Tytung's kernel thread.

The lights.htcleo.so file needs to be extracted and pushed to /system/lib/hw - if you use Root Explorer, please set RW-R--R-- permissions.

EDIT: I also tried HeirOS 1.7.2 and 1.7.4 - the LED notification lights DID NOT flash with the working custom autobrightness library. Testing 1.8.1 bt fix now...

EDIT 2: Tested 1.8.1 bt fix - and yes, the results are same as what @nieves53 has posted. No flashing LED notification with the custom autobrightness library.
[HD2 Android NAND Development] :
Going to try that kernel.. With CLK.

Edit: Flashed everything. Now giving the two-color lights. Working great here :)
[HD2 Android NAND Development] Screemi:
we where talking about diming backlight a couple of days ago. today i saw my backlight dim before the screen went dark. it seems to be working with a manually set brightness level but not with autobacklight. just wanted to mention that.

rom typhoon 3.6.4-clk

tytung 2.6.32.15 r12
[HD2 Android NAND Development] wheeliemonster:
Hi ph03n!x/everyone,

Firstly, thanks to ph03n!x for chasing this issue down. It's one that's been bugging me for ages.

I've just flashed the HierOS 1.7.5 kernel and am very pleased to see my screen beautifully dim!

I also use TyphooN and have regularly replaced the lights.htcleo.so with the lights.qsd8k.so to have the dimmed screen (although I stopped recently and got my LEDs back!)

I haven't as yet received an SMS, etc. to test the LEDs on HierOS 1.7.5 kernel but I have noticed that the native USB tether is not working with this kernel, whilst it is working in Tytung R12.4 (default for TyphooN 3.6.8)

Just my two cents and it doesn't bother me that much as native Wifi tethering is working perfectly well!

Thanks again guys - happy to test any kernels/lights libs that come along!
[HD2 Android NAND Development] wheeliemonster:
OK - just tested the LED but mine doesn't flash. It stays solid green just like it did previously with the lights lib that allows for custom brightness.

I'm configuring the LED notifications using: CM settings...interface...LED notifications

I presume that's the right place to configure? Is there somewhere else to configure the LED notifications?

Edit: I'm using both files from here: http://xdaforums.com/showpost.php?p=18133333&postcount=48

Cheers
[HD2 Android NAND Development] themadproducer:
Always been that way for me too...I can confirm.
[HD2 Android NAND Development] geenyous:
Wait a minute, so you are saying that there is a lib that will give a solid green LED when there is a notification, go away once you clear it and reappear with a new notification AND you can have your custom brightness levels while on tytungs kernel?

If there is, please point me to that specific file and for me this issue can be marked as fixed. Who cares what colour the LED is as long as it is lighting up when something happened? A few months ago we had no light at all, that was bad, but please don't tell me the issue is to change the LED from solid green to some flashing amber to differ between a missed call and a new sms...

If not, please precise "previously" :D
[HD2 Android NAND Development] ayyu3m:
as wheeliemonster has mentioned, i have the same case. the led stays lit green when a new notification comes and goes away when i check the notification. + i can set custom brightness levels.

the file is from PRJ's Clean Desire ROM. Kernel is marked as PRJ's

i attached the file.
[HD2 Android NAND Development] ph03n!x:
That is really interesting. What ROM are you using? And do you have an app or something to do with LED (LED me know)?

You experience is interesting for two reasons - one is the green, non-flashing notification: It was always orange non-flashing for me (and others too?). Second reason is, I am on Typhoon 3.6.8, and without having to mess with any of the default LED notification settings, if I flash 1.7.5 and use the lights library (custom autobrightness - with all other kernel this will give a non-flashing orange LED light) I had attached, my LED Notifications flash...
[HD2 Android NAND Development] wheeliemonster:
I'm using exactly the same ROM as you - TyphooN 3.6.8 :)

I may have changed the LED notification settings previously, so not sure what the default is exactly! I did use LED me know previously but disabled it to test this..

The LED settings in TyphooN 3.6.8 are in Settings ... CM Settings ... Interface ... LED notifications and you can add apps to categories, then select a colour of LED for that category. I added Messaging to a category, then chose green for the LED colour...

I'll remove the settings and see what happens!!

Edit: Removed the Messaging app from the category and removed the category. Now I just get a solid amber LED. I have reverted back to Tytung r12.4 kernel though as I had a few issues with HierOS 1.7.5.

Edit 2: Threw the HierOS 1.7.5 kernel back on for some more testing and still get a solid amber notification LED, still no amber or green flash.
[HD2 Android NAND Development] geenyous:
I consider it fixed!

I used your file, renamed it to lights.htcleo.so, and am very happy!

Custom brightness works and I get a solid amber LED whenever there is a notification (tested email and missed call)!

I would prefer a green one but not that much to invest any more time and dig around further.

Thx a lot for this thread and the solution, another step to perfection! :D
[HD2 Android NAND Development] Looki75:
Well the fact that you got solid LED notification together with auto-brightness is something that always worked in CM7 ROMs through CM7 settings as wheeliemonster mentionned (almost always worked: there was some nightlies back in July with which it was not working but the recent ones are ok).

I don't know about the other ROMs (MIUI, Sense...) but CM7 was just the way ph03n!x wrote in the OP:

On the contrary, the point of this thread is to have flashing (i.e. blinking) LED light!

So - no, it is not fixed!

Now in today's situation, I'm like you, I prefer solid LED and autobrightness (best compromise) than blinking LED without autobrightness. :)

The compromise is probably enough for most people, hence a lack of commitment among DEVs to solve this issue IMHO.

By the way, the so-called "No Sound bug" tagged "FIXED" is not fixed either in my opinion: the solution that was found is also a compromise: no bug, but no call record either!

But there also, I choose the "no bug" as I am not using the call record function...

Cheers!
[HD2 Android NAND Development] geenyous:
@ Looki75

I almost thought so, but this appeared so stupid to me (I don't want to appear offensive, but thats just how this feels to me) that I was ashamed there for a second that the above came to mind.

Turns out, at least according to you, that it really is an issue to get the flashing LED :eek:

Why on earth someone would want to spend a second of his time on that is an absolute mystery to me, it really is.

Being on TyphooN the way it was out of the box, flashing LED but no auto-brightness, I thought that it was no LED and auto brightness or LED and no auto brightness. As for you, for me it is way better to have solid LED and auto brightness than the other option, can one really care that much if his LED is flashing? I just don't get it... :confused:
[HD2 Android NAND Development] Looki75:
Yep, we are on the same line! :)
[HD2 Android NAND Development] Screemi:
for me blinking leds draw my attention faster than solid glowing ones. the problem for me is that 8sec between each blink is way to long.
[HD2 Android NAND Development] ph03n!x:
I have heard that solid LED *may* lead to excessive battery drain at times. I have experienced excessive battery drains before, but never related to the solid LED before. I have check this out later...
[HD2 Android NAND Development] themadproducer:
In principal alone, you would expect a Solid led would consume significantly more juice than a pulsing Led...unless the act of pulsing it wastes energy.
[HD2 Android NAND Development] wheeliemonster:
Ok. I got the amber then green pulse yesterday. This was caused (I think) by the low battery warning. This is on HierOS 1.7.5. Still get solid amber for notifications.

Does anyone know how to turn this activity off? Seems a bit counter-intuitive to me. Low battery? Ok, I'll use up a bit more energy by lighting up the LED!
[HD2 Android NAND Development] geenyous:
I will keep an eye on that. However, I have checked shortly after install by letting the notification being present for 5min and then check CW log, no drain for either email or missed call.

If I am not mistaken, as with all light sources (don't know about the new energy-saving bulbs though), a pulsing will use less current, the on and off procedure does not use more current and as the light is off half the time you can expect half the drain. Unlike with your car for example, when you only stand for 2-5mins its better to let the motor running as the start of the engine will consume more gasoline.

BUT, I believe this LED is such a small drainer, that unless you are in airplane mode and maybe even then, there is always seomthing going on that consumes much more battery...
[HD2 Android NAND Development] Looki75:
Re drain of pulsing LED

It all depends on how it is programmed in the kernel/rom. When I programmed it myself with tasker, I could see that blinking was using far more battery than solid!

Why? Because to program the blinking function, the program goes and write a value in a file each (let's say) 500ms. Whereas with the solid function, out goes write into this file just once.

So from a global standpoint (by opposition to a LED-only standpoint) blinking was more consuming...

Now I expect the kernel/rom to be more clever in the programming than I was... But...

Bottom line: you need to test to be sure which one is more draining...
[HD2 Android NAND Development] ogonzuhnina:
guys, blinking will be eating your battery when it will be switched on and off manually (by a programm or whatever).

Leo does have a dedicated microcontroller which is able to controll the blinking at vely low energy cost.

That whas what guys tried to implement back 2 years ago (Letama, Markinus...)

you need to search for a solution to suscesfully control both backight and led notification via on board microcontroller rather than by polling or your battery will drain as fast as you charge :/

good luck
[HD2 Android NAND Development] ayyu3m:
i agree with Looki75 in stand-alone programming concept.

but when it comes to heavy kernels and cpu/battery management, the programming is written in a more clever manner to handle read write concept

take it like this. when you get an sms or miss call, the kernel assigns a single write instruction to the kernel UNTIL that message or sms is checked.

now the clever part. once the kernel signal an I/O instruction for the led to go into pulse mode, the kernel transfers its controls to notification management unit which controls sms/calls/emails. thus kernel does not need to monitor this process until it is called upon

thus the monitoring block say a 'software' which monitors whether a new notification has been checked or not. when it is checked the 'software' throws a signal to the kernel.

the kernel wakes up about this event. and instructs led pulses to stop.

thus in whole, you can see the kernel does not need to throw led pulse instruction for the whole of notification. this concept is logical.

because, the kernel can never be expected to keep on throwing I/O signals jus for maybe a notification which has NEVER been checked for a long time or even further from 24hrs.

and now coming to the light of this topic. this problem and other problems can never be solved unless we have proper source codes to the hardware of the HD2 which is made for the windows mobile platform.

the windows mobile source code or the actual hardware source code can then be modified accordingly to the way android handles its operations.

unfortunately htc would never bother to code the hd2 hardware to android again, and so you can see how hard many members from THIS forum and even outside are still working hard.

and again, most members have a life outside of this forum dedicated to their living.
[HD2 Android NAND Development] wheeliemonster:
I'm still confused though.

Clearly the code to control the microcontroller which makes the LED blink is somewhere in the kernel, as we do have a lights library which can successfully blink the LEDs. It's just that this lights library breaks the custom brightness levels.

I'm no coder, so I could be speaking out of turn, but surely by going through the code in the two lights libraries, there must be a way of determining which pieces of code relate to flashing the LEDs and which refer to controlling the custom brightness levels and make the two work together, rather than being mutually exclusive!

Please shoot me down if I'm wrong! :)
[HD2 Android NAND Development] ayyu3m:
Haha. Unfortunately i have run out of bullets.

currently i know only c/c++ and it was interesting to see one member had presented the code which used the loop concept for brightness levels.

but this isnt enough for me to determine the cause of the conflict between two individual functions.

if only android/htc had made two different files or drivers to control both individual functions.

my guess is some smart a$$es at htc tried to reduce the number of driver files, by implementing two hardware functions in one driver file.

they didnt guess we would be porting ultimately the same drivers in the long run and thus the problem.

news to the members: currently m messing with lots of light.xxx.so files trying to figure out what are the changes in those file.

hope to present some kind of feedback, which may help to solve the prob to an extent
[HD2 Android NAND Development] wheeliemonster:
Hehe. Good to know someone's having a look at things for us. Thanks for your efforts. Hope you have some luck. :)

Sent from my HD2
[HD2 Android NAND Development] ph03n!x:
@ayyu3m- thanks for checking this one out for us, hope you get this fixed :)

Some interesting discussion on current drain vs. LED notification here. I recently switched to flashing notification LED, giving up on custom brightness. What I see is that if I have an event where LED flashes, I see ~9mA drain as against 1~4mA drain. Also, flashing LED spews a lot of errors in logcat (which I had posted earlier). I'll confirm the drain once more to be sure its not something else.

Swyped from my HTC HD2 running CM7 (Gingerbread 2.3.7)
[HD2 Android NAND Development] corrsea:
Don't know if i've got it right but the issue is to have custom auto brightness + flashing leds? If that is the case then I already have both. I'm on tytungs nexus hd2 ROM with v 12.4 kernel so have the flashing led notification. I'm also using juice defender ultimate beta which has a setting that allows full control of the brightness response curve, the range of brightness and the sensitivity of the sensor. Its incredibly effective.

from the documentation in the app it is able to do this by installing Android helper (comes with lots of dire warnings of how this may kill the firmware and makes you do a nandroid backup before you instal it, however it installed without issue).

Hope this information helps
[HD2 Android NAND Development] ayyu3m:
Good find bro. I wasnt paying attention to any logs or CurrentWidget. Will test battery drain and lights vs brightness concurrently so i dont need to do double work again.

and you "Swyped" from my HTC HD2 running CM7 (Gingerbread 2.3.7) ????

haha. nice one. so you have the swype keyboard then. :D