Sometimes, when I know I won’t move the L5 for days but I still want the L5 ON, I remove the battery (to preserve it) and keep the power supply connected.
Consequence : The top right led is blinking red forever and ever and beyond
Question : Is there a way to disable temporarly the red blinking only ? I still want the blue led to warn for new notifications
The blinking red led it telling that the battery is missing or dead.
Why are you doing that bad thing removing the Bat and leave connected without Battery for long?
Booting without a battery it is just for a special dedicated things.
Power Delivery take care the health of the battery do not need remove it.
You might be able to override it using the /sys/class/leds subsystem. I think the one you want is under /sys/class/leds/chg_en but it might also be under /sys/class/leds/red:status too. I’d have to play around with it to be sure. I don’t know the potential risk of messing something up so proceed at your own caution.
Side note: I’m able to make the LED yellow while charging by running the command $ echo 255 > /sys/class/leds/green\:status/brightness and was able to undo it with $ echo 0 > /sys/class/leds/green\:status/brightness.
The idea behind the notification LED is the same as what mobile phones, like the Librem 5, have: an LED to signal something while the display is off or something else is occupying the display, so that the user can see that something tries to get her or his attention. We have implemented this for the Librem 5 already and this will then also work on the Librem 14!
Nice ! thanks @gondolyr, I’ll take a look at those ressources !
Yeah, I know and that’s a very good thing the L5 is warning the user, but now that I’m warned I want to disable it temporarly
AFAIK Li-ion batteries are best preserved working between 20% and 80% charge
The taking care, you are speaking of, is only lowering power after 80% with a nice curve and cutting power at 100%
That’s why I do that very good thing : removing the battery when in between
Update: If someone wants to take care off writing an article we’d all be very thankful ! All the developers are very helpful with explaining missing stuff when it comes to filling the gaps in a new piece of documentation. Just get on the matrix channel about the librem5 (msg me to get an invitation) and start writing and ask for the missing information.
Correct. Therefore and although cannot proof this (actually do not know) as “hardware” behavior but still allow myself to recognize this end/stop at 4.20V of internal charging, of Librem 5 battery, as fourth HKS :
The red LED is connected to both SoC (which can be controlled via /sys/class/leds) and to BQ25895’s (charging controller’s) STAT pin; it works in an “OR” fashion. Currently our software does not try to drive the red LED in any way, so all you see is the result of STAT pin activity.
STAT pin can be disabled by setting bit 6 (STAT_DIS) of register 07 to 1:
Just receiving SMS might trigger this (probably), as I guess that modem card relies on inserted battery heavily (in not exclusively). Therefore turn off related HKS to test further.
EDIT: Well, I just realized and admit now that I misunderstood you completely, but never-mind. My thought was related to same usage of 5V only power bank (but red LED blinking would persist, on and on as well).
It is probably safer that customers cut-and-paste shell commands from @dos than attempt to read the Datasheet and come up with their own I2C commands.
Perfect ! Thanks @dos ! That’s exactly this kind of thing I was thinking of
I’ve looked at the bq25895 I2C datasheet and in the section “Pin configuration” I see that the pin STAT is N°4, but in your command, you use ‘3’ in the ic2bus parameter, I can assume there is a shift between those ?
pin 1 => ic2bus 0
pin 2 => ic2bus 1
pin 3 => ic2bus 2
pin 4 => ic2bus 3
…
Sorry guys you missed one of my prerequisites : I need to see the blue LED for new notification
Try again
I think sharing is a good thing, whatever you do (completely fail, or completely succeed) you will learn something valuable.
Warning about the dangers is also good (which @dos did), some kind of warning frame would be a good idea (like the spoiler alert frame for exemple, where you have to click to show)
How can one learn something like this if it’s not shared in public ?
Do you think @dos should have PM me about this ?
Or maybe I should have sent an email to the support ?
I think it’s best to talk about it publicly in the forum, so everyone can give its advice, or warning, or share its own experience about it, and someone with the same kind of problem would find the answer in this topic
And with that, knowing that it’s working only by setting a bit, I can now script this behavior without writing those commands manually every time I need it
The command is targeting the STAT_DIS bit, which controls whether the STAT pin operates at all. The documentation confirms which register that bit is in (7), which bit it is (6) and the bus address (6A hex).
So I have no idea how the bus number ends up as 3.
That’s bus parameter. bq25895 sits at address 0x6a on bus i2c-3 (as described here). The first command is reading the value of register 0x07 (which turns out to be 0x8d), and the second command sets that register to 0xcd, which is 0x8d with bit 6 (STAT_DIS) set to 1.
There’s little point in gatekeeping knowledge, especially when it’s already available publicly if you look hard enough. I had to learn this stuff myself at some point too.
Just remember that if you fiddle with charging controller in a wrong way and break your phone in the process, it’s your own fault
The battery blinking in addition to maybe indicating battery dead, or missing more generally just indicates it isnt charging the battery, so battery is actually discharging while plugged in.
This happens to me all the time, typically when thermal readings are exceeded for safe battery charging. So charging stops. At 100% typically while plugged in i still get a solid red when using or not using the phone and nominal battery temperature. So i assume it is always charging/topping off all the time.
What might be nice is once 100% is reached it stops charging (could turn off led at that time) until battery reaches say 80%, then starts charging again when phone isnt used.