1

I'd like to fully discharge my laptop battery (to comply with a vendor instruction to fully discharge after first full charge). What's a simple way to do this on Linux (that is, prevent the laptop from going into sleep/hibernation while maintaining processor load)?

  • 3
    Just go into power settings control panel and disable everything would work, but you didn't specify your distro for more detailed explanation. This doesn't address the fact of why you would do this, modern LiON batteries should not be discharged all the way if at all possible. – acejavelin Sep 8 '18 at 14:40
  • @acejavelin: 1. I wanted something distribution-neutral; perhaps I should say that. 2. I'm planning on getting a new Lenovo Thinkpad X201 battery and the vendor says to fully charge and discharge it twice or so before use. – einpoklum Sep 8 '18 at 20:14
  • 1
    Many battery supplier recommend an initial cycle of fully charging the battery, then running it down to 5%, or even 2-3%, before recharging. That's good for the battery. But taking it to 0 at any time can shorten the battery's life. If the vendor is recommending a full discharge, they're trying to sell more batteries by shortening the time until you need a replacement. In most distros, the power management function has "advanced" settings for defining the critical level at which the laptop will protect itself by shutting down. That often can't be set below about 5% as a safety precaution. – fixer1234 Sep 10 '18 at 6:26
  • @fixer1234: Consider making this an answer. – einpoklum Sep 10 '18 at 12:29
2

If the laptop will still try to turn on after the OS shuts it down for having a low battery (i.e. it's only the OS that turns it off, not the laptop's firmware/BIOS) then you could:

  1. Use the laptop normally (unplugged) until it shuts itself off.
  2. Turn it back on but immediately go straight to the firmware/BIOS settings, and leave it running there until the battery completely dies.

This would have the added benefit of not risking corruption of the OS / filesystems, since they shouldn't be mounted while in the firmware/BIOS settings. And you don't have to know/find/change any of the OS's settings.

1

Many battery suppliers recommend an initial cycle of fully charging the battery, then running it down to 5%, or even 2-3%, before recharging. That's good for the battery. But taking it to zero at any time can shorten the battery's life. If the vendor is recommending a full discharge, they're trying to sell more batteries by shortening the time until you need a replacement.

In most Linux distros, power management in the configuration settings has "advanced" settings for defining the critical level at which the laptop will protect itself by shutting down. That often can't be set below about 5% as a safety precaution.

So that's a place where it's simple to do this. At least for the initial cycle, set it to allow the battery to run down as far as it should. But it's bad for the battery to go below a few percent, so don't try to "game the system" and get the battery to fully discharge.

BTW, you can typically also set the action for when the battery is at the critical level. There are usually options to shut down or suspend. I've experience problems with suspending at the critical level, where laptops suspend and then resume on their own. Even if it doesn't resume, suspending still uses some current unless it's a true hibernation. So if you don't recharge within a reasonable time of suspending at the critical level, you can end up with a fully discharged battery. The safe setting is to have it shut down.

0

There are more sophisticated ways, but very simple and effective can be playing a movie in your favorite player(they should prevent sleep/hibernate), or better, stream a youtube mix. You can always set manually in every linux distro sleep and hibernation options to never.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.