manjaro-pinephone / phosh

Manjaro Phosh
164 stars 20 forks source link

Indicator LED max_brightness is wrong #36

Open har7an opened 2 years ago

har7an commented 2 years ago

Hi,

I've noticed that the LEDs on my pinephone don't blink as regularly as they are supposed to. I did some research and it turns out that feedbackd uses the pattern sysfs entry to control the blinking. Note that pattern by default performs gradual dimming between the provided brightness settings. feedbackd will read the max_brightness for the indicator LEDs from sysfs, finding that in fact the sysfs pretends the indicators are dimmable (Because the value of /sys/class/leds/<color>:indicator/max_brightness is 255) whereas in reality they aren't.

This leads to the very curious blinking patterns where the LED is on most of the time and just shortly blinks to "off": It will dimm from 0 to 255, where any value >0 means "turn the LED on". Obviously it will remain on most of the time... This likely needs fixing in the kernel. I think that the max_brightness (being read-only, unfortunately) is set by the LED drivers. For the pinephone, that is likely gpio-leds. But I'm not sure about that.