Page MenuHomeSolus

Sudden shutdown without battery warning
Closed, InvalidPublic


I just had Solus shut down on me abruptly due to a dead battery. There was no warning, whereas it would have been nice to know that I had, say, only 10% battery left. (You could also issue an alert with maybe 10 minutes remaining, but this would be a misleading practice, due to the impossibility of calibrating remaining charge to remaining time.)

Maybe you already have a battery alert in Solus, but I didn't make it far enough to find out :)

One thing that's potentially even more interesting is what happened after I rebooted. First of all, there was no obvious attempt to run fsck listed in dmesg. I would have expected that pursuant to an improper shutdown. Maybe this is as it's supposed to be with a journalling file system like EXT4, or maybe it doesn't print to dmesg, but I'm just pointing it out.

Secondly I noticed a 3 logged machine checks in dmesg, which suggests to me that I experienced some catastrophic memory error prior to the shutdown. However, such an event normally wouldn't result in a spontaneous poweroff, so it may not be relevant. And the very fact that they appear in dmesg suggests to me that the system had had time to flush them to storage prior to poweroff, reinforcing the possibility of coincidence instead of causality.

Finally and most importantly, I lost 2 of the the files I was editing. Both of them came back up truncated, as though they had been only partially synced to disk. I find this odd, because I wouldn't think that more than one file would be in the process of being written at any given time. So in other words, I should have lost either one file, or none. I wonder if this is because syncing is somehow very delayed. Another possibility is that they shared the same physical harddrive block despite having different logical inodes, and that block didn't flush from the harddrive's internal cache before poweroff.

It's possible that this is all my bad hardware problem, but it's so odd that I thought I should report it, so triage away...

Event Timeline

This happened again, but in a different way. I did actually get a "battery critical low" message this time, but at the time, the battery still had either 2 bars, or had just gotten down to 1 bar. Seems a little premature for that message, which in most cases occurs with 10 minutes or less remaining. Maybe this is inevitable because my battery interface provides only this large granularity information. (I probably had 30 minutes left.) In any case, it would be worth sitting around and letting a battery die to see how it all behaves, and in particular to identify what's going on with lost file blocks that should have been written long before poweroff. (I plugged in this time, so lost nothing.)

I figured I'd help out by trying this on a completely different laptop. The one described above has continued to shut down without warning when the battery gets down to less than half, more or less. Out of about 10 times, it only gave a battery warning once. Most of the other times, it could actually be restarted successfully while still on battery. The machine check errors have never reappeared, so I don't know what to make of this. It could well be a hardware or firmware problem.

On this newer laptop, the behavior is more reasonable. At 13 minutes remaining, I get a battery low warning. The screen starts dimming aggressively, even though dimming is actually disabled in Power settings. (This seems sensible, under the circumstances.) At 5 minutes, I get a critical low warning. The notification bubble flashes on and off for a few seconds and sputters the speakers for attention. It says that the computer will hibernate imminently unless AC power is restored, which is wrong because hibernation is disabled. Finally, about 10 minutes later, the machine simply dies.

This looks like the sort of thing that's dependent on platform firmware, and is therefore not easily standardized. I'm just reporting this because it's a pain to test, and maybe you want to change the behavior going forward or test on a wider variety of systems.

I repeated the experiment on the newer machine. This time, I got the low battery warning with 12 minutes left. But then, a few minutes later, it lost power without ever hitting the critical warning. It's as though the alerts are triggered based on estimated time remaining, instead of percentage remaining. I doubt that's the case, as of course it's pretty much impossible to predict time remaining. In any event, something is causing this variable behavior from run to run and machine to machine.

JoshStrobl closed this task as Invalid.Nov 23 2016, 3:14 AM
JoshStrobl added a subscriber: JoshStrobl.

I would suggest filing this on Budgie's issue tracker: