When phone is warm it dies (abrupt power off) when charging cable is unplugged
This is for Librem 5 Evergreen running PureOS Byzantium.
When the phone is warm, like after 20 minutes doing something CPU-intensive, disconnecting the charging cable often results in the phone suddenly turning off, seems like it just abruptly loses power.
First this seemed random but now I found it is actually reproducible, the trick is just to make sure to run something that makes it warm first, then unplugging the charging cable makes it turn off.
Steps to reproduce:
- In power settings, select to never turn the screen off (so that we see if the phone dies)
- Reboot the phone while the charging cable is connected
- Leave it at the lock screen, no need to unlock it
- Start the command
stress-ng --cpu 4 --timeout 1800s(or something else CPU-intensive) via ssh over wifi
- Let the above command run for about 20 minutes so that the phone starts to get warm
- Unplug charging cable, then wait for a few seconds
- Plug charging cable in again, then wait for a few seconds
- Unplug charging cable a second time --> now the phone turns itself off, screen goes black
The log from
sudo journalctl does not show anything indicating that the kernel decided to shut down.
Sometimes, but not always, there is an error message like this shortly before the phone dies:
Jun 26 00:13:52 pureos kernel: tps6598x 0-003f: tps6598x_interrupt: failed to read events
which seems to come from this place in the code: https://source.puri.sm/Librem5/linux-next/-/blob/pureos/byzantium/drivers/usb/typec/tps6598x.c#L600
Could that kind of error lead to the phone losing power?
What could be done to debug this?
Is there some particular part of the kernel source code that would be involved if power is suddenly lost? Could some kind of extra debug output be enabled to see that happening?