We have moved to a new Sailfish OS Forum. Please start new discussions there.
0

The led cannot be disable.

asked 2019-09-22 22:18:35 +0200

Chris_ gravatar image

updated 2019-09-23 23:13:23 +0200

Hi,

I cannot turn off the diode when the battery is full, adding the "PatternBatteryFull" entry in the 20hybris-led ball instead of LEDPatternsDisabled also does not work by the mcetool command. When I change it, the LED is on all the time.

I noticed that PatternDeviceOn also does not work, this LED is lit during system startup. So this is probably a bug?

edit retag flag offensive close delete

Comments

1 Answer

Sort by » oldest newest most voted
3

answered 2019-09-23 12:29:22 +0200

spiiroin gravatar image

What I suspect you are describing is: When charger is connected and battery is full, both PatternBatteryCharging and PatternBatteryFull are active. The "full" pattern ends up being used because it has higher priority than the "charging" one. Now, if the "full" pattern is disabled (via mcetool / config file tweaks), it just means the "charging" pattern ends up being used also in battery full situations i.e. the led still stays on despite disabling the full pattern.

You could either disable both charging and full patterns (no root privileges needed, but also charging indication is lost)

mcetool --disable-led-pattern=PatternBatteryCharging --disable-led-pattern=PatternBatteryFull

(to undo)

mcetool --enable-led-pattern=PatternBatteryCharging --enable-led-pattern=PatternBatteryFull

Or override battery full pattern config so that activating it actually turns the led off

devel-su
printf '[LEDPatternHybris]\nPatternBatteryFull=40;4;0;0;0;000000\n' > /etc/mce/90-no-battery-full-led.ini
systemctl restart mce

(to undo)

devel-su
rm /etc/mce/90-no-battery-full-led.ini
systemctl restart mce
edit flag offensive delete publish link more

Comments

Thanks good man. That's exactly what I meant - turn off the diode at 100% battery

With the command I tried as root before writing this topic (I didn't think that maybe a user too) and it didn't work for me, it just stopped winking and shone mcetool --disable-led-pattern=PatternBatteryFull

The second option worked, i.e. adding an entry with a new file :) But does this option actually turn off, stop flashing? I am asking because these zeros mean black PatternBatteryFull=40;4;0;0;0;000000

Chris_ ( 2019-09-23 23:38:59 +0200 )edit

@Chris_ Well, it was not meant to be used like this. But ...

Basically the "color" field defines brightness values for red, green and blue led - which are then modulated via multiplication based on light sensor / whatnot -> zero value stays zero -> writing zero to brightness control file in sysfs turns the led off -> using "black color" value turns all leds off.

And flashing/breathing oscillates/animates brightness of each of the red/green/blue channels between maximum/configured and zero value in pace defined in the config (500 ms on, 2500 ms off for battery full). If brightness of some channel is zero -> flashing is not done -> that change to 0 ms on - 0 ms off period is kind of redundant - except that battery full is handled as a special case that utilizes breathing instead of flashing whenever possible -> using 0-0 period disables breathing -> allows device to suspend in battery full (if kernel side charging control supports such thing).

spiiroin ( 2019-09-24 09:55:19 +0200 )edit

thanks for the clarification :)

Chris_ ( 2019-10-10 17:44:57 +0200 )edit
Login/Signup to Answer

Question tools

Follow
4 followers

Stats

Asked: 2019-09-22 22:18:35 +0200

Seen: 388 times

Last updated: Sep 23 '19