Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: New ThinkPad battery life on Ubuntu
36 points by herodoturtle on Oct 16, 2023 | hide | past | favorite | 45 comments
Hi folks.

Earlier this year I ordered a new x13 laptop (core i7, 16gb ram, 1tb ssd).

Vanilla Ubuntu desktop (22.04) installed.

When I'm doing normal work on battery mode, I get around 4 to 6 hours out of it.

However if I hop onto a Google Meet, the battery gets rapidly depleted (lasts around 1 hour 20 minutes before it runs out).

Is this a known issue with Google Meet?

I seem to get similar rapidly decreasing battery life when watching 1080p movies on it.

It's virtually impossible to use this laptop on the move when I have online meetings.

By comparison, my wife's 10 year old Macbook still lasts 6+ hours when on the go, and that's irrespective of if she's on meetings or watching movies.

Is my x13's battery performance in Ubuntu normal?

Any advice on how to improve it (use it less)?

I've found that lowering the screen brightness helps a bit. Closing all other windows / applications makes a marginal difference.

Thanks.




For light usage my Thinkpad X1 Nano Gen 1 is about the same or a bit better than Windows (~6 hours usage) under Fedora with KDE, which has TLP-like optimizations baked in. It might not technically be as optimal for the hardware as Windows is but the system being much more "quiet" (Windows is always doing something in the background) likely makes up the difference.

I'm hoping that the next generation of AMD/Intel efficiency-focused laptop CPUs improve this dramatically though because it feels ridiculous that my M1 Max MBP gets better life not in power save mode while doing "real work" than I could ever get out of the Thinkpad with a light workload in power save mode. If this turns out to be true I'll be trading the Thinkpad in for a newer model.


Power management kinda doesn't work on Linux, outside of ACPI. There are very minimal rules once you disconnect from AC, and most of the time you'll switch into high-usage mode when it isn't needed. There's not a clean way to fix this, to my knowledge; the Linux scheduler stack is just kinda based around desktop and server hardware.

That being said, I also use Linux on my Thinkpad anyways. There are decent enough workarounds that I can keep my system up for 5-6 hours when away from AC:

- Switching into battery-saver mode will keep clock speeds down, which generally reduces power usage (as long as you aren't slamming the cores)

- tlp can help if your hardware has power-draining characteristics (I don't use it, my defaults are good enough)

- Using an auto-nicer can keep your system feeling responsive in low-resource environments: https://github.com/pop-os/system76-scheduler

So... caveat emptor, YMMV. Linux is far from the most efficient OS away from the wall, but with a little bit of configuration I feel like my system does indeed work as a "normal laptop".


Thank you, these are really helpful tips - will try them out.


Check e.g. powertop.


You have to turn on video acceleration, install vaapi and make sure your browser is using it


Classic Linux driver issues. None of the power saving or advanced hardware features get used most of the time. I've had the same with Dell and Lenovo Linux machines - CPU never throttles down and is at full-chat 100% of the time. You'll probably also find out that one or more of the following will also not work properly: Bluetooth, sleep, wake from sleep, fingerprint readers, audio.

I'd recommend installing windows 11 if battery life is important (not trolling - windows just works with this sort of thing, Linux never does in my experience). Use WSL or docker to run Linux if you need it for development


What power saving features would one use while actively in a video call? I doubt this is OP's problem


The ones that interact with the GPU / hardware video decode blocks.

That's assuming their device is even using hardware accelerated video (many distros don't by default) but even with it enabled on my Framework 13 I still see the same behavior as OP. About 90minutes in Google meet, 4hrs in VSCode and more vanilla browsing. 6hrs easily in Windows.


One example would be hardware video encode/decode.


> You'll probably also find out that one or more of the following will also not work properly: Bluetooth, sleep, wake from sleep, fingerprint readers, audio.

YMMV but in my experience this comes down to the quality of components used in the laptop. I've never had trouble out of Intel networking (ethernet, wifi, and bluetooth) under Linux for example, but anything else is hit or miss. It's not a perfect rule but the nicer laptops (Thinkpad X1 series for example) tend to be the ones that get components with good Linux compatibility… midrange and below by contrast is a minefield.


Ubuntu has a certified laptop list, practically everything just works with the defaults. Never got the fingerprint reader to work on my laptop, though.

https://ubuntu.com/certified/laptops


You need to make sure your browser uses video acceleration.


+1, if your software stack decides to use CPU for video things, you’re going to have a hot lap and a drained battery. Sometimes your browser can already be using GPU for web page rendering but still uses CPU for video encode and decode.


Hardware video acceleration in a browser is somehow still a mess on Linux.

I've spent hours trying every unholy combination of browser/version/Wayland/x11/flags/command line arguments and still can't hardware decode a YouTube video on a pretty standard Intel igpu laptop. Something that should really just work out of the box.


Strange - for me, installing intel-media-driver & setting the vaapi config option in about:config (for firefox) is sufficient. I gave up trying to get it to work in Chrom{e,ium}, though.


> Is this a known issue with Google Meet?

it's a mix of things.

from what i remember (when i used to use google meet for work):

- meet seems to work worse on firefox than on google chrome

- if you're doing any kind of video, you need to make sure hardware encoding is enabled and being used by firefox. otherwise all video stuff will be done on the cpu (slower and uses more power). look into the vaapi configuration and intel-gpu-tools

hardware-assisted encoding/decoding can do a lot of difference on cpu usage and battery life.


So long as power management is not a central core component managed by the kernel, this will continue to be a problem on Linux. Apple hardware is untouchable for battery life precisely for this reason; they don't use bigger batteries or have a significantly lower TDP than anything else. It's just tons and tons of clever little hacks implemented at every layer of the OS that sum up to a seamless experience while maintaining optimal power usage.


It's been this way forever, don't expect a fix. Battery management, sleep, suspend, monitor wake, and even CPU throttle is fundamentally broken compared to Windows or Mac. Hours of time can be invested to make it work, but then it will just break again randomly.


The Apple M1 etc. chips are actually one of the main reasons why they now have such a huge lead in battery life. It's not all deeply integrated software, back in the Intel days macOS still had great battery life but the new chips took it to the next level.


Look, I'm not saying you're wrong, I'm just saying I get 4 hours of web browsing out of my M1 air with 83% battery health so it must go deeper, like Firefox is deoptimized or something. It's about on par with my ThinkPad E14, and worse than my 2017 i7 MacBook Air, disappointingly.


Generally both Chrome and Firefox are significantly worse for battery life under macOS than Safari is.

I think the main thing is that standalone browser vendors aren’t incentivized to care all that much about being efficient; for them acing speed benchmarks and gee-whiz bells and whistles seems to be what sells better. By contrast OS vendors want battery life figures to look great because that sells laptops. This is why pre-Chromium MS Edge bested Chrome and Firefox for battery life on Windows and why Safari does the same on macOS today.


power management is a central core component managed by the kernel


I used this for my work issued thinkpad and it was awesome: https://linrunner.de/tlp/index.html


Please use TLP if you are using linux on thinkpads. You will have to set some options, but you will get a huge boost in battery life.

Even on my old T440s, for several years, I could eek out over 12 hours of work on a single charge.


I’m skeptical that a 10-year-old MacBook is pulling 4-6 hours with the original battery.

Your experience sounds par for the course!


> I’m skeptical that a 10-year-old MacBook is pulling 4-6 hours with the original battery.

It's more possible than one might think assuming usage of Safari with an adblocker installed and few or no electron apps running in the background. MacBook battery life for light usage has been great for a long time; where it fell short prior to the ARM transition was for heavier use cases.


They're great, but not magical. 10 year old macbooks never did 10 hours, even when new, much less with degraded battery.


I don't recall 5 hours from my 2013 tiny macbook air. It certainly doesn't last that long now - maybe an hour.


4-6 hours, not 10


Even that was a stretch I never got in any of them.


Yeah in general a macbook from 10 years ago would have a max autonomy of 9h if you get a dGPU. But in practice if you got 5h of use that was decent. Nowadays they last about 3H max in the best case...


Since you single out Google Meet, have you tried updating Firefox? There was a recent bugfix -- I think on the Google side -- that improved performance and unlocked a number of broken features for Firefox users.

https://www.howtogeek.com/google-meet-is-finally-being-fixed...


The video + meet thing sounds like you're not using the GPU very well.


Be it Google Meet or Zoom (though Meet is worse), on my Dell (with Ubuntu 20.04) I have to throttle the CPU so I don't burn myself. What's sad is here's no video or audio degradation when I do this.


What browser are you using? I'm on Windows, but I have to use Chrome for Google Meet and Drive because they perform so poorly in other browsers. I use Firefox for everything else.


15 years later, and Linux Power management still doesn't work on laptops, among many other things, that's why I switched to mac.

U can still run linux in the cloud, where it works well.


Google Meet lasts about 1h 20min on my 2021 M1 MacBook Pro, so it seems about right


Doesn't seem right. I used Google Meet for a few hours the other day and it was still at 93%. This is a MacBook Pro M2


If this is using Chrome it’s likely because Meet uses non-hardware accelerated codecs there. Under Safari it’ll use accelerated h.264 and be much easier on battery.


This comment caught my eye - because I'm using Chrome too.

Is there a way to enable hardware accelerated codecs in Chrome + Meet?

(I have no idea what that means, I'm just quoting you)

I checked my Chrome settings and "Use hardware acceleration when available" is enabled for what that's worth.


Not sure. There’s extensions that force YouTube to serve h.264 so it seems like something similar should be possible with Meet.


Not sure why you were downvoted, as this is Ask HN, and you replied with a fact. Power management is my GOTO retort when I meet a Linux fanboy:

"Linux runs the US nuclear submarine fleet!"

"Of course it can run there, they have unlimited power available."


So does the power point that 95% of laptops are plugged into and they don't charge $200 for 8gb of memory either.


Good feedback perhaps it takes a bit of effort of laptop makers pushing Linux making these contributions to make it better for everyone.


Is your machine using the best driver for the video hardware of the laptop? The right video driver will save tons of power.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: