16

My Lenovo T460s has two batteries. When one of them is empty the laptop does an emergency shutdown which basically makes the 2nd battery obsolete.

I already set org.gnome.settings-daemon.plugins.power use-time-for-policy false as recommended on the few posts around the web I found but this did not help.

I'm currently running Ubuntu 17.04 with the upstream kernel 4.11.12-041112-generic (due to trouble with DP). I have tlp and the resp. dkms package installed. Any pointers as to what to try to make the batteries work as intended is much appreciated.


New information:

By now I'm running 17.10 ... still no solution :-(

SDsolar
  • 3,169
  • (comment only) i have a x86_64 tablet with two batteries that had that issue, but was too long ago for me to remember what I did. I don't recall playing with settings; but believe I changed the desktop power.manager (xfce4 & mate power managers are running I note; currently I'm logged into mate) – guiverc Oct 02 '17 at 08:58
  • 1
    One workaround is to set the action to blank, but of course when the sencond battery is over it may cause data loss and hardware damage. – user334639 Oct 02 '17 at 09:06
  • Make the 2nd act as the 1st? Ubuntu wont see it go down til the 1st one is down. – Rinzwind Jan 11 '18 at 17:10
  • By now I'm running 17.10 ... still no solution :-( – Christoph Grimmer Feb 11 '18 at 12:34
  • 3
    @user334639 With a heavy heart I set the critical-battery-action to 'nothing'. It really sucks that I'm forced to take this step due to a many years old bug... – Christoph Grimmer Feb 11 '18 at 12:42
  • 1
    aaaand... Didn't work. Just this morning my laptop killed itself again while the primary battery was at 39% :-(.

    gsettings get org.gnome.settings-daemon.plugins.power critical-battery-action

    'nothing'

    – Christoph Grimmer Mar 02 '18 at 07:21
  • 1
    Is there any other power management software turning the system off, even with gnome power set to do nothing? I mean, if you can fix that, you can get a simple script to run to turn the machine off safely before the battery dies. – AlwaysTalkingAboutMyDog Mar 17 '18 at 10:19

2 Answers2

1

My laptop has a single battery so I can't test this. I found on Lenovo support forum someone who has a problem like yours.

Basically the problem was UPower causing the laptop to shut down. One user solved the problem by removing upower:

sudo apt remove upower

If this doesn't solve the problem and/or you suffer adverse side-effects you can reinstall using:

sudo apt install upower
  • What will happen if I remove UPower? Or better: What will stop working. I'm currently reading up on UPower and unsure whether things like Suspend etc. will keep working. – Christoph Grimmer Mar 18 '18 at 08:53
  • @ChristophGrimmer-Dietrich I'm unsure as to all the potential side effects which is why I put in the instructions to reinstall it. I know there are many ways a system can suspend which is why we sometimes run into problems and have to tell one system (like systemd) to ignore suspend so that others like gsettings' org.gnome.settings-daemon.plugins.power has full control. According to the link the one user did not state side effects of removing UPower other than system kept running when one battery died. My concern would be what happens when second battery dies, will it gracefully shut down? – WinEunuuchs2Unix Mar 18 '18 at 15:58
  • For me, I would try to remove 750 MB of packages like gdm3 gnome-power-manager gnome-session-bin gnome-startup-applications nautilus-share ubuntu-desktop ubuntu-desktop-minimal ubuntu-session upower webex, so that's not an option! – wittich Nov 09 '22 at 08:32
1

I had this same problem with my laptop shutdown when switching from empty Battery 1 to fully charged Battery 2.

I was able to fix this by changing the two Power functions in the BIOS to Maximize for performance instead of optimize and balanced.