I’ve installed TLP on my Lenovo ThinkBook laptop and was wondering if there are additional steps I can take to extend the battery life when using the laptop unplugged.

Could you please share more tips and tricks for maximizing battery life on Linux laptops?

31 points

powertop is a cool tool that can analyze your machine and provide a list of suggested power optimizations

permalink
report
reply
6 points

This is the way. You need to check whether CPU and package are mostly in the highest C-states they can be. If not, you’ve got a task or IO device causing a lot of wasted power.

permalink
report
parent
reply
1 point

Ok mandalorian

permalink
report
parent
reply
6 points

Power…top… of course

permalink
report
parent
reply
4 points

Fancy. TIL, thanks!

permalink
report
parent
reply
22 points
*

not related to longer battery life per se, but suspend-then-hibernate is the number one improvement to my daily use. the laptop suspends normally and if not woken in an hour, it suspends to disk. upon wake it restores from the swap file/partition. zero battery drain when off, resume from hibernate is faster than cold boot. I can go days without a charger; the other day I’ve “woken” it after like 10 days and did a full system upgrade - the battery and everything else was how I left it. after I was done, just closed it and left it.

my laptop is my secondary workstation and it’s not rare that I don’t touch it for days. it sucks major balls when I have to urgently leave and find out it’s depleted.

with systemd-boot and a fast and seamless boot process, this is as close as it gets to stuff Macbooks had more than 10 years ago.

permalink
report
reply
3 points

I’ve never had a laptop that hibernates correctly with Linux. Is it something I can achieve with more research or some laptops won’t hibernate anyway? I routinely have that shitty experience when I pick up my laptop to see it has no juice left although I didn’t use it and it was apparently asleep.

permalink
report
parent
reply
7 points
*

it is insanely cumbersome to achieve this, but it is doable and once set up, it runs like a dream. I’ve got it on a T480s (F40), T420s (Arch), MBP 2010 (Debian 12) and MBPr 2012 (F39), all with encrypted LVM + btrfs, some with a swap subvolume, some with a separate swap partition outside of LVM (waaay faster boot, no decrypt prompt - dreamboat!)

basically you have to allocate a swap file, subvolume, or partition that’s RAM * 1.5 (on account of zram) but don’t add it to fstab. then you have to dick around with systemd scripts that turn off zram and activate swap on suspend and do the reverse on resume. then, dracut or mkinitcpio have to be set up to use the resume funcionality (when coldbooting it looks for the resume swap file and if present restores this instead of booting). also, there’s adding kernel switches to systemd-boot or GRUB to utilise resume.

edit: oh yeah, also taming selinux to allow you to write to said swap.

now that would be just enabling hibernation, but I don’t like explicitly activating suspend or hibernate, I wan’t it to hibernate after I’ve left it in suspend for a while; I’ve set it to 60 mins. that way I don’t have to think about it, just use my laptop like it’s actually 2024.

also, since you’re now coldbooting several times per day, it’s essential that this process is as fast and jerkless as possible, hence systemd-boot with all pauses and timeouts set to zero.

the steps involved depend on your distro, I’ve made it work with Fedora, Arch and Debian. Here’s a good primer so take it from there and use the arch wiki and experiment.

permalink
report
parent
reply
3 points

I’m moderately capable but a bit of a noob and oddly enough have a t480 with Debian and been trying to get hibernate to work. Did you figure this out yourself or was there a guide you followed that you might be able to point me to?

permalink
report
parent
reply
21 points

If you’re running AMD, TLP won’t help as much as running a 6.6+ kernel with the proper amd-pstate kernel module running. 6.8 takes it even further.

permalink
report
reply
3 points

Pstate driver on guided mode has been pretty sexy

permalink
report
parent
reply
2 points

Damn, I looked at this thread hoping to optimize my server idle power draw.

AMD 2700X, and Debian Bookworm kernel back ports just got to 6.6. Hopefully this doesn’t break my ZFS 😅

permalink
report
parent
reply
2 points

I too wanted to rock Debian with ZFS. Had to go Ubuntu due to better ZFS support.

permalink
report
parent
reply
1 point

To be fair, of you just wait until the ZFS package is released with the corresponding kernel, everything works great. Just no unattended upgrades to the kernel on the back ports channel and you are golden!

permalink
report
parent
reply
19 points

I once just needed to take notes in a lecture so I didn’t start my X server and just wrote in vim in TTY.

permalink
report
reply
14 points

For more power savings, you can undervolt your CPU if it supports it. On some CPUs, it can result in significant power savings.

Undervolting requires a lot of testing to make sure each core is stable under all conditions. There is no guarantee that a CPU will undervolt well though. Two identical CPUs can have significantly different results.

permalink
report
reply
4 points

undervolting can also improve performance, depending on boost behaviour. it feels like you got a better binned chip.

permalink
report
parent
reply
-1 points

I don’t see how undervolting would result in power savings on modern CPUs if you’re not up against clock limits as the CPU would simply boost higher.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 7.9K

    Monthly active users

  • 6.4K

    Posts

  • 175K

    Comments