Led notification colors?

Search This thread

pmzqla

Member
Dec 24, 2013
17
9
Did anyone tried the commands of my previous post? I'm really curious to know whether that additional config was added by mistake (some remainance of the pre-production code) or there are actually some devices with an RGB LED and Motorola stealthily added the code for it.

FYI I'm not even using KK right now, so it's possible that the path I wrote is wrong or doesn't exist.

That does indeed turn on the LED during charging. Thanks for that!
Out of curiosity. What happens exactly? You executed the command and then the LED turned on when you plugged in the device, only when the battery was fully charged or what? Did you just do what I wrote?

I'm asking because as far as I know the command I posted should just turn on the LED immediately. On my device device the "trigger" of "charging" is set to "none", so nothing should happen automatically. Also, the path to that LED is not specified in any binary (JB at least), so I'm a bit confused about what happened.
 
Last edited:

pmzqla

Member
Dec 24, 2013
17
9
In my app, i enabled the LED charging and only white is handled right now.
When the device is plugged, the LED will light until you either stop charging or the phone is fully charged.
Try it here and don't forget to hit the Thanks button:
MotoGuide 1.0.6 - Collection of small hacks for the Moto-G - http://xdaforums.com/showthread.php?t=2596525

I can see that you are changing the trigger of "charging", I suspect this is what jmoore4294 did and should answer my question. One mistery solved.

Let's move to the second mistery, "rgb". Since no one replied, I decided to take a better look at the code.
What I discovered is that the "brightness" file of "rgb" is disabled, it does nothing. The LED should be turned on directly by "control" if I'm not wrong.
"control" is there to control multi-colored LED with one command by simply writing the color you want. Normally you have to specify the intensity of each fundamental color manually.

The problem here is that blink_cnt, a module param which keeps count of the number of LEDs (or colors) available, is set to 1 (and hence can be modified, but I suspect that would cause a NULL pointer dereferences when "control" is used), so basically whatever you do, "white" only (blink_array[0]) will be used.

I still find interesting the presence of this "rgb" combo LED, even if it's actually not doing anything useful as of now.
 
  • Like
Reactions: ManBearrrPig

S0bes

Senior Member
Jan 1, 2012
870
969
EDIT:
You can maybe try different colors replacing EE0000 in the command above with another hex value.
hex combination EE0000 (red) turns led immediately with white color
and when I try to replace EE0000 with 00EE00 (green) or whatever hex code color I tried the led just turns off
 

pmzqla

Member
Dec 24, 2013
17
9
hex combination EE0000 (red) turns led immediately with white color
and when I try to replace EE0000 with 00EE00 (green) or whatever hex code color I tried the led just turns off

Yeah, that's exactly what I wrote in my previous post.

Basically the hex value written is splitted in different parts depending on the number of colors available. Because of the current configuration, what is supposed to control the red channel, controls the white LED, while everything else is basically ignored.

Practically we are controlling the same LED in a different way from a different place.
 
Last edited:
  • Like
Reactions: S0bes

pmzqla

Member
Dec 24, 2013
17
9
is there any possibility in the future to get some other color except white?

If there are actually some devices with an RGB LED, the kernel must be correctly configured to support it. With no kernel modifications, this is not possible. From a quick look at the sources, there are no hints on what we need to do exactly, so someone should do some trial and error.

However I doubt this mystic RGB LED exist now. Normally each color is controlled by a pwm channel. We have a single channel and that's controlling a white LED.
 

surajkala

Senior Member
May 9, 2012
239
77
Guwahati
twitter.com
On executing following cmd.. LED indeed turns on while charging.. but doesn't work if the cell is switched off or restarted

PHP:
echo 255 > /sys/class/leds/rgb/brightness
 

T3h vICE

Member
May 7, 2011
47
4
nothing new here? still the charging light will not do what i want. maybe it should blink every 5 sec while charging and stay active when it's fully charged.
 

T3h vICE

Member
May 7, 2011
47
4
But maybe the LED can at least do some tripple short or long blinks when it's fully charged. As it is for now, i never know when it's fully charged untill i turn the screen on. Very annoying. Nobody else with the same opinion?
 

rogeriorp

Senior Member
Dec 11, 2013
541
146
But maybe the LED can at least do some tripple short or long blinks when it's fully charged. As it is for now, i never know when it's fully charged untill i turn the screen on. Very annoying. Nobody else with the same opinion?

Perhaps there's an xposed module to do that? I'd like to know too.
 

robin0800

Senior Member
Jan 22, 2012
606
397
70
Brighton
Google Pixel 7a
But maybe the LED can at least do some tripple short or long blinks when it's fully charged. As it is for now, i never know when it's fully charged untill i turn the screen on. Very annoying. Nobody else with the same opinion?
Light Manager app can do that I have it set for fast flash low battery,,slow flash charging and continuously lit for charged.
You may need root for it to work properly
 

jdegreef

Senior Member
Oct 24, 2013
520
165
Brussels
Light Manager app can do that I have it set for fast flash low battery,,slow flash charging and continuously lit for charged.
You may need root for it to work properly
Tested with Moto G 4G (peregrine, xt1039)
Only blinking works, in white.
That should confirm that we don't have a rgb led or that the led is blocked to use only white.
 

matmutant

Senior Member
Mar 17, 2011
3,395
4,743
~/
andrux-and-me.blogspot.com
Moto G
Moto E
Looks like this thread is now solved ;)

I've just found this thread digging for more infos about the LEDs to complete my researches ... Looks like i didn't search properly at the very begging, you guys had already done part of my work :p

But, the following is the result of further work and should answer some questions that remained opened here ;)

http://www.xda-developers.com/android/moto-g-moto-e-control-both-led/
 
  • Like
Reactions: mattheoh

eddydc1

Senior Member
Nov 6, 2010
861
146
It seems that there are two different drivers enabled:
Code:
CONFIG_LEDS_QPNP=y
CONFIG_LEDS_QPNP_RGB=y
As the name of the second config suggests, that's for an RGB LED.
There are some chances that Motorola is shipping some devices with an RGB LED, but is forcing them to stay white in order to make all the devices look equal.

Maybe something like this could help
Code:
find /sys | grep leds-qpnp
If in the list you should get there's "leds-qpnp-rgb", then you have an RGB LED.

I'm actually not sure of this, I don't even have the device and I just quickly looked at the sources. In any case, looking in /sys could easily solve "the problem".

ok so i did that command " find /sys | grep leds-qpnp "

and heres what i got

Code:
1|u0_a58@falcon_umts:/ $ find /sys | grep leds-qpnp
find: /sys/fs/cgroup: Permission denied
/sys/bus/spmi/devices/leds-qpnp-rgb-e4a32800
/sys/bus/spmi/devices/leds-qpnp-e4a32400
/sys/bus/spmi/devices/leds-qpnp-e4a32600
/sys/bus/spmi/devices/leds-qpnp-e4a33a00
/sys/bus/spmi/devices/leds-qpnp-e4a33c00
/sys/bus/spmi/devices/leds-qpnp-e4a34c00
/sys/bus/spmi/drivers/qcom,leds-qpnp
/sys/bus/spmi/drivers/qcom,leds-qpnp/bind
/sys/bus/spmi/drivers/qcom,leds-qpnp/uevent
/sys/bus/spmi/drivers/qcom,leds-qpnp/unbind
/sys/bus/spmi/drivers/qcom,leds-qpnp/leds-qpnp-e4a33a00
/sys/bus/spmi/drivers/qcom,leds-qpnp/leds-qpnp-e4a33c00
/sys/bus/spmi/drivers/qcom,leds-qpnp/leds-qpnp-e4a34c00
/sys/bus/spmi/drivers/qcom,leds-qpnp-rgb
/sys/bus/spmi/drivers/qcom,leds-qpnp-rgb/bind
/sys/bus/spmi/drivers/qcom,leds-qpnp-rgb/leds-qpnp-rgb-e4a32800
/sys/bus/spmi/drivers/qcom,leds-qpnp-rgb/uevent
/sys/bus/spmi/drivers/qcom,leds-qpnp-rgb/unbind
/sys/devices/leds-qpnp-rgb-e4a32800
/sys/devices/leds-qpnp-rgb-e4a32800/leds
/sys/devices/leds-qpnp-rgb-e4a32800/leds/rgb
/sys/devices/leds-qpnp-rgb-e4a32800/leds/rgb/control
/sys/devices/leds-qpnp-rgb-e4a32800/leds/rgb/brightness
/sys/devices/leds-qpnp-rgb-e4a32800/leds/rgb/power
/sys/devices/leds-qpnp-rgb-e4a32800/leds/rgb/power/control
/sys/devices/leds-qpnp-rgb-e4a32800/leds/rgb/power/runtime_active_time
/sys/devices/leds-qpnp-rgb-e4a32800/leds/rgb/power/autosuspend_delay_ms
/sys/devices/leds-qpnp-rgb-e4a32800/leds/rgb/power/runtime_status
/sys/devices/leds-qpnp-rgb-e4a32800/leds/rgb/power/runtime_suspended_time
/sys/devices/leds-qpnp-rgb-e4a32800/leds/rgb/max_brightness
/sys/devices/leds-qpnp-rgb-e4a32800/leds/rgb/device
/sys/devices/leds-qpnp-rgb-e4a32800/leds/rgb/subsystem
/sys/devices/leds-qpnp-rgb-e4a32800/leds/rgb/trigger
/sys/devices/leds-qpnp-rgb-e4a32800/leds/rgb/uevent
/sys/devices/leds-qpnp-rgb-e4a32800/leds/white
/sys/devices/leds-qpnp-rgb-e4a32800/leds/white/brightness
/sys/devices/leds-qpnp-rgb-e4a32800/leds/white/power
/sys/devices/leds-qpnp-rgb-e4a32800/leds/white/power/control/sys/devices/leds-qpnp-rgb-e4a32800/leds/white/power/runtime_active_time
/sys/devices/leds-qpnp-rgb-e4a32800/leds/white/power/autosuspend_delay_ms
/sys/devices/leds-qpnp-rgb-e4a32800/leds/white/power/runtime_status
/sys/devices/leds-qpnp-rgb-e4a32800/leds/white/power/runtime_suspended_time
/sys/devices/leds-qpnp-rgb-e4a32800/leds/white/max_brightness
/sys/devices/leds-qpnp-rgb-e4a32800/leds/white/device
/sys/devices/leds-qpnp-rgb-e4a32800/leds/white/subsystem
/sys/devices/leds-qpnp-rgb-e4a32800/leds/white/trigger
/sys/devices/leds-qpnp-rgb-e4a32800/leds/white/uevent
/sys/devices/leds-qpnp-rgb-e4a32800/power
/sys/devices/leds-qpnp-rgb-e4a32800/power/control
/sys/devices/leds-qpnp-rgb-e4a32800/power/runtime_active_time
/sys/devices/leds-qpnp-rgb-e4a32800/power/autosuspend_delay_ms
/sys/devices/leds-qpnp-rgb-e4a32800/power/runtime_status
/sys/devices/leds-qpnp-rgb-e4a32800/power/runtime_suspended_time
/sys/devices/leds-qpnp-rgb-e4a32800/driver
/sys/devices/leds-qpnp-rgb-e4a32800/subsystem
/sys/devices/leds-qpnp-rgb-e4a32800/uevent
/sys/devices/leds-qpnp-e4a32400
/sys/devices/leds-qpnp-e4a32400/power
/sys/devices/leds-qpnp-e4a32400/power/control
/sys/devices/leds-qpnp-e4a32400/power/runtime_active_time
/sys/devices/leds-qpnp-e4a32400/power/autosuspend_delay_ms
/sys/devices/leds-qpnp-e4a32400/power/runtime_status
/sys/devices/leds-qpnp-e4a32400/power/runtime_suspended_time/sys/devices/leds-qpnp-e4a32400/subsystem
/sys/devices/leds-qpnp-e4a32400/uevent
/sys/devices/leds-qpnp-e4a32600
/sys/devices/leds-qpnp-e4a32600/power
/sys/devices/leds-qpnp-e4a32600/power/control
/sys/devices/leds-qpnp-e4a32600/power/runtime_active_time
/sys/devices/leds-qpnp-e4a32600/power/autosuspend_delay_ms
/sys/devices/leds-qpnp-e4a32600/power/runtime_status
/sys/devices/leds-qpnp-e4a32600/power/runtime_suspended_time/sys/devices/leds-qpnp-e4a32600/subsystem
/sys/devices/leds-qpnp-e4a32600/uevent
/sys/devices/leds-qpnp-e4a33a00
/sys/devices/leds-qpnp-e4a33a00/leds
/sys/devices/leds-qpnp-e4a33a00/leds/charging
/sys/devices/leds-qpnp-e4a33a00/leds/charging/brightness
/sys/devices/leds-qpnp-e4a33a00/leds/charging/power
/sys/devices/leds-qpnp-e4a33a00/leds/charging/power/control
/sys/devices/leds-qpnp-e4a33a00/leds/charging/power/runtime_active_time
/sys/devices/leds-qpnp-e4a33a00/leds/charging/power/autosuspend_delay_ms
/sys/devices/leds-qpnp-e4a33a00/leds/charging/power/runtime_status
/sys/devices/leds-qpnp-e4a33a00/leds/charging/power/runtime_suspended_time
/sys/devices/leds-qpnp-e4a33a00/leds/charging/max_brightness/sys/devices/leds-qpnp-e4a33a00/leds/charging/device
/sys/devices/leds-qpnp-e4a33a00/leds/charging/subsystem
/sys/devices/leds-qpnp-e4a33a00/leds/charging/trigger
/sys/devices/leds-qpnp-e4a33a00/leds/charging/uevent
/sys/devices/leds-qpnp-e4a33a00/power
/sys/devices/leds-qpnp-e4a33a00/power/control
/sys/devices/leds-qpnp-e4a33a00/power/runtime_active_time
/sys/devices/leds-qpnp-e4a33a00/power/autosuspend_delay_ms
/sys/devices/leds-qpnp-e4a33a00/power/runtime_status
/sys/devices/leds-qpnp-e4a33a00/power/runtime_suspended_time/sys/devices/leds-qpnp-e4a33a00/driver
/sys/devices/leds-qpnp-e4a33a00/subsystem
/sys/devices/leds-qpnp-e4a33a00/uevent
/sys/devices/leds-qpnp-e4a33c00
/sys/devices/leds-qpnp-e4a33c00/leds
/sys/devices/leds-qpnp-e4a33c00/leds/wled:backlight
/sys/devices/leds-qpnp-e4a33c00/leds/wled:backlight/brightness
/sys/devices/leds-qpnp-e4a33c00/leds/wled:backlight/power
/sys/devices/leds-qpnp-e4a33c00/leds/wled:backlight/power/control
/sys/devices/leds-qpnp-e4a33c00/leds/wled:backlight/power/runtime_active_time
/sys/devices/leds-qpnp-e4a33c00/leds/wled:backlight/power/autosuspend_delay_ms
/sys/devices/leds-qpnp-e4a33c00/leds/wled:backlight/power/runtime_status
/sys/devices/leds-qpnp-e4a33c00/leds/wled:backlight/power/runtime_suspended_time
/sys/devices/leds-qpnp-e4a33c00/leds/wled:backlight/max_brightness
/sys/devices/leds-qpnp-e4a33c00/leds/wled:backlight/device
/sys/devices/leds-qpnp-e4a33c00/leds/wled:backlight/subsystem
/sys/devices/leds-qpnp-e4a33c00/leds/wled:backlight/trigger
/sys/devices/leds-qpnp-e4a33c00/leds/wled:backlight/uevent
/sys/devices/leds-qpnp-e4a33c00/power
/sys/devices/leds-qpnp-e4a33c00/power/control
/sys/devices/leds-qpnp-e4a33c00/power/runtime_active_time
/sys/devices/leds-qpnp-e4a33c00/power/autosuspend_delay_ms
/sys/devices/leds-qpnp-e4a33c00/power/runtime_status
/sys/devices/leds-qpnp-e4a33c00/power/runtime_suspended_time/sys/devices/leds-qpnp-e4a33c00/driver
/sys/devices/leds-qpnp-e4a33c00/subsystem
/sys/devices/leds-qpnp-e4a33c00/uevent
/sys/devices/leds-qpnp-e4a34c00
/sys/devices/leds-qpnp-e4a34c00/leds
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch/brightness
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch/power
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch/power/control
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch/power/runtime_active_time
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch/power/autosuspend_delay_ms
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch/power/runtime_status
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch/power/runtime_suspended_time
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch/led_mode
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch/max_brightness
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch/device
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch/subsystem
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch/trigger/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch/strobe
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_torch/uevent
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0/brightness
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0/power
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0/power/control
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0/power/runtime_active_time
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0/power/autosuspend_delay_ms
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0/power/runtime_status
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0/power/runtime_suspended_time
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0/led_mode
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0/max_brightness
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0/device
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0/subsystem
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0/trigger
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0/strobe
/sys/devices/leds-qpnp-e4a34c00/leds/led:flash_0/uevent
/sys/devices/leds-qpnp-e4a34c00/power
/sys/devices/leds-qpnp-e4a34c00/power/control
/sys/devices/leds-qpnp-e4a34c00/power/runtime_active_time
/sys/devices/leds-qpnp-e4a34c00/power/autosuspend_delay_ms
/sys/devices/leds-qpnp-e4a34c00/power/runtime_status
/sys/devices/leds-qpnp-e4a34c00/power/runtime_suspended_time/sys/devices/leds-qpnp-e4a34c00/driver
/sys/devices/leds-qpnp-e4a34c00/subsystem
/sys/devices/leds-qpnp-e4a34c00/uevent
u0_a58@falcon_umts:/ $

There is quite many RGB things.. I have RGB led on my moto?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    It seems that there are two different drivers enabled:
    Code:
    CONFIG_LEDS_QPNP=y
    CONFIG_LEDS_QPNP_RGB=y
    As the name of the second config suggests, that's for an RGB LED.
    There are some chances that Motorola is shipping some devices with an RGB LED, but is forcing them to stay white in order to make all the devices look equal.

    Maybe something like this could help
    Code:
    find /sys | grep leds-qpnp
    If in the list you should get there's "leds-qpnp-rgb", then you have an RGB LED.

    I'm actually not sure of this, I don't even have the device and I just quickly looked at the sources. In any case, looking in /sys could easily solve "the problem".
    1
    Maybe they will release a patch on 25th dec which enables the rgb in led....surprise surprise

    Sent from xda app-developers app
    1
    Well the only LED colour referred to in /sys is white, so no surprises there.

    u0_a124@falcon_umts:/ $ find /sys -type d|grep leds-qpnp|egrep -v 'power|charging'
    find: /sys/kernel/debug/tracing: Permission denied
    /sys/bus/spmi/drivers/qcom,leds-qpnp
    /sys/bus/spmi/drivers/qcom,leds-qpnp-rgb
    /sys/devices/leds-qpnp-rgb-e4a17c00
    /sys/devices/leds-qpnp-rgb-e4a17c00/leds
    /sys/devices/leds-qpnp-rgb-e4a17c00/leds/white
    /sys/devices/leds-qpnp-e4a17800
    /sys/devices/leds-qpnp-e4a17a00
    /sys/devices/leds-qpnp-e4a1b000
    /sys/devices/leds-qpnp-e4a1b000/leds
    /sys/devices/leds-qpnp-e4a1b000/leds/wled:backlight
    /sys/devices/leds-qpnp-e4a1c000
    /sys/devices/leds-qpnp-e4a1c000/leds
    /sys/devices/leds-qpnp-e4a1c000/leds/led:flash_torch
    /sys/devices/leds-qpnp-e4a1c000/leds/led:flash_0
    /sys/devices/leds-qpnp-e4a1c000/leds/led:flash_1
    /sys/devices/leds-qpnp-e4a1ae00
    1
    In my app, i enabled the LED charging and only white is handled right now.
    When the device is plugged, the LED will light until you either stop charging or the phone is fully charged.
    Try it here and don't forget to hit the Thanks button:
    MotoGuide 1.0.6 - Collection of small hacks for the Moto-G - http://xdaforums.com/showthread.php?t=2596525

    I can see that you are changing the trigger of "charging", I suspect this is what jmoore4294 did and should answer my question. One mistery solved.

    Let's move to the second mistery, "rgb". Since no one replied, I decided to take a better look at the code.
    What I discovered is that the "brightness" file of "rgb" is disabled, it does nothing. The LED should be turned on directly by "control" if I'm not wrong.
    "control" is there to control multi-colored LED with one command by simply writing the color you want. Normally you have to specify the intensity of each fundamental color manually.

    The problem here is that blink_cnt, a module param which keeps count of the number of LEDs (or colors) available, is set to 1 (and hence can be modified, but I suspect that would cause a NULL pointer dereferences when "control" is used), so basically whatever you do, "white" only (blink_array[0]) will be used.

    I still find interesting the presence of this "rgb" combo LED, even if it's actually not doing anything useful as of now.
    1
    hex combination EE0000 (red) turns led immediately with white color
    and when I try to replace EE0000 with 00EE00 (green) or whatever hex code color I tried the led just turns off

    Yeah, that's exactly what I wrote in my previous post.

    Basically the hex value written is splitted in different parts depending on the number of colors available. Because of the current configuration, what is supposed to control the red channel, controls the white LED, while everything else is basically ignored.

    Practically we are controlling the same LED in a different way from a different place.