Laptop powers off while there is plenty of battery left

10 replies [Last post]
Avron

I am a translator!

Offline
Joined: 08/18/2020

In the MATE power settings, my laptop is configured to go to sleep if inactive for 10 minutes and to switch off if the battery level is critical. After having left it unattended for a while (like 1 or 2 hours) it was off. I switched it on, the battery is about 75% full, so I don't understand why the laptop went off.

Are there some other settings somewhere else?

Avron

I am a translator!

Offline
Joined: 08/18/2020

I just found out that actually, the laptop went to hibernate, not to sleep, but I can't find anywhere in MATE settings where this is configured.

prospero
Offline
Joined: 05/20/2022

This issue report has a possible explanation, and a workaround:

https://github.com/mate-desktop/mate-power-manager/issues/183#issuecomment-348662692

The default gsettings value for action-sleep-type-battery is indeed set to 'hibernate', but this does not get properly reflected in the power settings GUI. You can set it to 'suspend' through the dconf editor, or by running the gsettings command mentioned in the above comment:

gsettings set org.mate.power-manager action-sleep-type-battery 'suspend'

UPDATE: it is working here, except that the advertised 10-minute delay is actually closer to a 15-minute delay.

Both 'hibernate' (suspend-to-disk) and 'suspend' (suspend-to-RAM) are usually referred to as "sleep states", so it is not clear from the wording in the MATE Power Manager GUI which one is going to be used. What is more, the default idle behavior is not the same on power supply: action-sleep-type-ac is set to 'suspend'. These are not uncommon settings for a laptop, but you would expect to be able to modify them through the power manager GUI.

Avron

I am a translator!

Offline
Joined: 08/18/2020

Thanks for the findings.

That said, I can confirm that wake-up from hibernate tend to have problems with my laptop on Trisquel, like going to lightdm as if no session was started, or resuming the session but with a number of strange behaviours that I did not write down fully.

On parabola with another laptop, I have no problem at all with hibernate.

prospero
Offline
Joined: 05/20/2022

This sounds like the odds of having a problem with hibernate.

I have no problem hibernating Trisquel Aramo on one machine, while Trisquel Mini would not boot any more on another (older) laptop after I enabled hibernate. I had to tweak grub to skip some never-ending tests.

I myself always found it difficult to wake up after hibernating. I had to tweak the coffee machine and change some settings.

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

We wrote https://trisquel.info/en/wiki/hibernation-aka-suspend-disk to help hibernating creatures.

Avron

I am a translator!

Offline
Joined: 08/18/2020

Thanks. This is the recipe I used, it goes to hibernate easily then at wake-up, it says "resuming from ..." after entering the encryption passphrase but then goes to the lightdm greeter. I checked from a console, the mate session is not running, so the resume does not work.

However, I am impressed that I started writing this message in abrowser and when I launch it and click on the button to resume the previous session, I guess this message exactly where it was when I went to hibernate.

prospero
Offline
Joined: 05/20/2022

The disclaimer you promised to insert about hibernation being known to not work reliably is still missing.

I am now having sleeping disorders at the idea of yetis getting into hibernation, never to wake up again.

Avron

I am a translator!

Offline
Joined: 08/18/2020

I added a disclaimer now.

prospero
Offline
Joined: 05/20/2022

Well done!

eliotime3000
Offline
Joined: 06/05/2016

In case that you set-up a swapfile and/or a swap partition, Parabola brings you a hibernate option according to the DE that you installed. I installed Parabola without Swap partition in my netbook due to the SATA SSD that I have (and having a Swap partition on it may decrease the lifespan of that storage device).