Mofo,
Thanks to cyanogenmod and the lg g3, I made way more headway on the lights situation. Its 90% fixed. We are going to build lights.msm8226.so from source from now on, and you will have to look through my device tree to catch the changes. Red, green, blue, purple and yellow notification and charging lights are working now on my cm11 build, and the only things not working with it right now is just pulsing like the stock rom does but im working on it.
Basically, you are gonna need to copy my liblight from my device tree in the 2nd post of the new cm11 rom thread i created. Also, in your Boardconfig.mk, add the following:
# Lights
TARGET_PROVIDES_LIBLIGHT := true
(not sure if its absolutely needed but it works so i wont question success.)
Also, in device_x5.mk, make sure there is only one reference to lights.msm8226, mine looks like the below:
# HAL
PRODUCT_PACKAGES += \
copybit.msm8226\
gralloc.msm8226 \
hwcomposer.msm8226 \
lights.msm8226 \
nfc.msm8226 \
memtrack.msm8226 \
power.msm8226
Go into vendor/lge/x5/x5-vendor-blobs.mk and remove the line:
vendor/lge/x5/proprietary/lib/hw/lights.msm8226.so:system/lib/hw/lights.msm8226.so \
which means we can just delete the lights.msm8226.so file out of the vendor tree completely also since we are building from source now. Dont forget to go into your out directory and delete lights.msm8226.so so we know for sure the one being built into the rom is correct.
And finally, in kernel/lge/msm8226/arch/arm/configs/cm11_x5_defconfig, this: CONFIG_LEDS_LP5521=y
That should get you notification lights on your lollipop roms, and put us a step further in getting finished roms out!
Edit so i dont forget, also you will need to enable the cyanogenmod led control in overlay/frameworks/base/core/res/res/values/config.xml. These are the relevant lines, hopefully by this point cm12 has gotten far enough to add it back into the lollipop source, if not no biggie because xposed and XLED module can be used to control lights:
<!-- Is the notification LED intrusive? Used to decide if there should be a disable option -->
<bool name="config_intrusiveNotificationLed">true</bool>
<!-- Is the battery LED intrusive? Used to decide if there should be a disable option -->
<bool name="config_intrusiveBatteryLed">true</bool>
<!-- Does the battery LED support multiple colors? Used to decide if the user can change the colors -->
<bool name="config_multiColorBatteryLed">true</bool>
<!-- Default LED on time for notification LED in milliseconds. -->
<integer name="config_defaultNotificationLedOn">1000</integer>
<!-- Default LED off time for notification LED in milliseconds. -->
<integer name="config_defaultNotificationLedOff">1000</integer>
Edit 2: I knew i was going to forget something in this crazy long ramble.
Basically when the device boots, somewhere in the init scripts in ramdisk it tells the emotional_led to trigger the constant led pattern that we know and hate (lol.) There is a script in my device tree also in prebuilt/etc/init.d/ called 10lightfixer that echoes 0 to that trigger to turn that led pattern off when init.d kicks in.
So i guess im saying make sure you have that in there too, and add the relevant line to device_x5.mk to copy it to the rom zip while building. (kind of like the old 10nfcchecker that quarx's w7 device tree had)