Q: Is there a way to stop the blinking white LED?

Q: Is there a way to stop the blinking white LED, that flashes if the battery is full charged?
Phones are Xperia 10, one single SIM/SFOS and one double SIM/SFOS

If I connect the phone to the charger in the evening, after battery is full charged (or already while loading) it begins to blink and this is disturbing in the sleeping room!

Is there a way to stop this by some modification of a config or system file?

You can disable led indication for battery full via executing (root not required):

mcetool --disable-led-pattern=PatternBatteryFull

To undo, execute:

mcetool --enable-led-pattern=PatternBatteryFull

The tool can be installed via (root required):

pkcon refresh
pkcon install mce-tools

Another alternative is to override default led patterns via installing custom mce config files. The default values and short explanation about format can be found from /etc/mce/20hybris-led.ini.

Note: There is no need to edit existing files. Creating a new file - with higher two digit number in front - can be used to override values defined in already existing files. That is both easier to undo and your modifications will not be lost on the next upgrade.

For example: (without affecting other uses for led) when battery gets full, led blinks red for one minute (root required)

printf "[LEDPatternHybris]\nPatternBatteryFull=40;4;60;500;2500;ff0000\n" > /etc/mce/90-battery-full-hack.ini
systemctl restart mce

And to undo:

rm /etc/mce/90-battery-full-hack.ini
systemctl restart mce

Perfectly explained above.

Here is my config, imitating N900 behaviour (amber blinking while charging, green steady when 100%):


7f7f00 = Amber


007f00 = DarkGreen

Best to be done via ssh so mistakes could be easily redone as wrongly editing mce.ini had (still has on SFOS?) possibility to cause some problems.


AFAIK the led patterns for old Nokia devices such as N900 (which would be in [LEDPatternLystiRX51] section) contain binary data that is fed as-is to led controller…

The “hybris” led patterns in [LEDPatternHybris] section (originally Jolla1 led was controlled via libhybris and android led hal, and the name got locked in) are more abstract and thus safer to edit / preferably override. At least I’m not aware of any problems of “device got bricked” level - or how such thing could even be possible.

But do note that this might not apply to all settings, for example lower level led back-end configuration in [LEDConfigHybris] section - if present - is a different ball game -> at minimum: after modifying mce configuration, be prepared to restore original state and do not reboot the device until you have checked that the service restart succeeds (e.g. if display blank/unblank with power key works, mce is up and running).


I did the first option with mce-tools, refresh, install and then run the command you described at first. Result is, after reaching 100% the LED does not blink any more but still lights constant white.

edit: therefore I did the 2nd step (printf…, systemctl…). Result is: after reaching 100%, LED blinks red for a minute, then stops blinking and changes to constant white.

That is PatternBatteryCharging which is active whenever device is charging. Differentiating between battery full is done via battery full pattern having higher priority than charging pattern. Which basically means that when battery full pattern is disabled / timeout expires -> charging pattern resurfaces. (not sure if it makes sense, just the way it has always been…)

If you disable blinking, then it is possible to define RGB intensity values too, so something like this should make battery full = lowest possible intensity red:

printf "[LEDPatternHybris]\nPatternBatteryFull=40;4;0;0;0;010000\n" > /etc/mce/90-battery-full-hack.ini
systemctl restart mce

Aha, duration infinite and brightness r=1 of 255 , g + b = 0…

It works!!! only a very little red glowing is visible in the dark, this is OK.

Thank you so much!


Toying around with this, on Xperia10 the blinking OnPeriod and OnPeriod settings do not seem to change anything except turning blinking on or off. The frequency of blinking does not really change.

Anyone else seeing this as well?

Example, the following two both do turn on yellow blinking, but look the same:



These “hybris led patterns” can be used to define behaviour that is roughly compatible with android lights hal (ref: https://source.android.com/reference/hal/structlight__state__t). How that then behaves in practice varies from one device to another. For example RGB colour definition is usable as-is only in devices which actually have a RGB led and some sort of mapping needs to be performed in devices with red-green, amber-green, white, etc leds. In case of Xperia 10: it has rgb led, with hw assited soft blink, which has fixed period -> on/off timings in pattern configuration are used only for enabling the soft blinking - what the values are does not matter as long as both of them are non-zero.

1 Like

Perfect answer, thank you.

It there a way to adjust control the blinking frequency globally in some way?
I tried poking around in /sys/class/led/foo but didn’t find anything useful.