News for hackers. Stuff that matters.

Ask HN: New ThinkPad battery life on Ubuntu

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.

( 45 comments | 8 points | on HN )
Re:Ask HN: New ThinkPad battery life on Ubuntu by gymbeaux on Monday October 16, 2023 @02:41PM (#37904215)
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!

Re:Ask HN: New ThinkPad battery life on Ubuntu by jwells89 on Monday October 16, 2023 @02:46PM (#37904270)
> 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.

Re:Ask HN: New ThinkPad battery life on Ubuntu by izacus on Monday October 16, 2023 @02:57PM (#37904471)
They're great, but not magical. 10 year old macbooks never did 10 hours, even when new, much less with degraded battery.
Re:Ask HN: New ThinkPad battery life on Ubuntu by ta1243 on Monday October 16, 2023 @03:13PM (#37904759)
I don't recall 5 hours from my 2013 tiny macbook air. It certainly doesn't last that long now - maybe an hour.
Re:Ask HN: New ThinkPad battery life on Ubuntu by somehnguy on Monday October 16, 2023 @03:09PM (#37904670)
4-6 hours, not 10
Re:Ask HN: New ThinkPad battery life on Ubuntu by izacus on Monday October 16, 2023 @06:15PM (#37907419)
Even that was a stretch I never got in any of them.
Re:Ask HN: New ThinkPad battery life on Ubuntu by seec on Monday October 16, 2023 @10:45PM (#37909898)
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...
Re:Ask HN: New ThinkPad battery life on Ubuntu by jwells89 on Monday October 16, 2023 @02:34PM (#37904100)
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.

Re:Ask HN: New ThinkPad battery life on Ubuntu by kshmir on Monday October 16, 2023 @02:40PM (#37904198)
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.

Re:Ask HN: New ThinkPad battery life on Ubuntu by gcr on Monday October 16, 2023 @03:01PM (#37904547)
Google Meet lasts about 1h 20min on my 2021 M1 MacBook Pro, so it seems about right
Re:Ask HN: New ThinkPad battery life on Ubuntu by jwells89 on Monday October 16, 2023 @03:15PM (#37904787)
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.
Re:Ask HN: New ThinkPad battery life on Ubuntu by herodoturtle on Monday October 16, 2023 @03:26PM (#37904966)
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.

Re:Ask HN: New ThinkPad battery life on Ubuntu by jwells89 on Monday October 16, 2023 @03:29PM (#37905049)
Not sure. There’s extensions that force YouTube to serve h.264 so it seems like something similar should be possible with Meet.
Re:Ask HN: New ThinkPad battery life on Ubuntu by sgt on Monday October 16, 2023 @03:44PM (#37905308)
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
Re:Ask HN: New ThinkPad battery life on Ubuntu by 1970-01-01 on Monday October 16, 2023 @03:04PM (#37904579)
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."

Re:Ask HN: New ThinkPad battery life on Ubuntu by jamespo on Monday October 16, 2023 @03:07PM (#37904628)
So does the power point that 95% of laptops are plugged into and they don't charge $200 for 8gb of memory either.
Re:Ask HN: New ThinkPad battery life on Ubuntu by potwinkle on Monday October 16, 2023 @02:31PM (#37904063)
You have to turn on video acceleration, install vaapi and make sure your browser is using it
Re:Ask HN: New ThinkPad battery life on Ubuntu by blae on Monday October 16, 2023 @02:27PM (#37904007)
You need to make sure your browser uses video acceleration.
Re:Ask HN: New ThinkPad battery life on Ubuntu by jitl on Monday October 16, 2023 @02:33PM (#37904096)
+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.
Re:Ask HN: New ThinkPad battery life on Ubuntu by kcb on Monday October 16, 2023 @03:06PM (#37904612)
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.

Re:Ask HN: New ThinkPad battery life on Ubuntu by abrouwers on Monday October 16, 2023 @03:31PM (#37905087)
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.
Re:Ask HN: New ThinkPad battery life on Ubuntu by znpy on Monday October 16, 2023 @02:41PM (#37904214)
> 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.

Re:Ask HN: New ThinkPad battery life on Ubuntu by burkaman on Monday October 16, 2023 @02:31PM (#37904061)
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.
Re:Ask HN: New ThinkPad battery life on Ubuntu by gigatexal on Monday October 16, 2023 @02:15PM (#37903845)
I used this for my work issued thinkpad and it was awesome: https://linrunner.de/tlp/index.html
Re:Ask HN: New ThinkPad battery life on Ubuntu by abdullahkhalids on Monday October 16, 2023 @03:45PM (#37905328)
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.

Re:Ask HN: New ThinkPad battery life on Ubuntu by smoldesu on Monday October 16, 2023 @02:02PM (#37903678)
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".

Re:Ask HN: New ThinkPad battery life on Ubuntu by herodoturtle on Monday October 16, 2023 @02:10PM (#37903787)
Thank you, these are really helpful tips - will try them out.
Re:Ask HN: New ThinkPad battery life on Ubuntu by jruohonen on Monday October 16, 2023 @02:33PM (#37904093)
Check e.g. powertop.
Re:Ask HN: New ThinkPad battery life on Ubuntu by ramesh31 on Monday October 16, 2023 @02:43PM (#37904238)
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.
Re:Ask HN: New ThinkPad battery life on Ubuntu by 1970-01-01 on Monday October 16, 2023 @02:51PM (#37904348)
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.
Re:Ask HN: New ThinkPad battery life on Ubuntu by megous on Monday October 16, 2023 @02:58PM (#37904488)
power management is a central core component managed by the kernel
Re:Ask HN: New ThinkPad battery life on Ubuntu by theodric on Monday October 16, 2023 @02:55PM (#37904434)
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.
Re:Ask HN: New ThinkPad battery life on Ubuntu by jwells89 on Monday October 16, 2023 @03:09PM (#37904682)
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.

Re:Ask HN: New ThinkPad battery life on Ubuntu by nntwozz on Monday October 16, 2023 @04:03PM (#37905677)
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.
Re:Ask HN: New ThinkPad battery life on Ubuntu by codemac on Monday October 16, 2023 @02:44PM (#37904244)
The video + meet thing sounds like you're not using the GPU very well.
Re:Ask HN: New ThinkPad battery life on Ubuntu by krunck on Monday October 16, 2023 @03:32PM (#37905101)
Is your machine using the best driver for the video hardware of the laptop? The right video driver will save tons of power.
Re:Ask HN: New ThinkPad battery life on Ubuntu by mattlondon on Monday October 16, 2023 @03:51PM (#37905441)
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

Re:Ask HN: New ThinkPad battery life on Ubuntu by lucb1e on Monday October 16, 2023 @04:01PM (#37905633)
What power saving features would one use while actively in a video call? I doubt this is OP's problem
Re:Ask HN: New ThinkPad battery life on Ubuntu by seabrookmx on Monday October 16, 2023 @04:13PM (#37905836)
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.

Re:Ask HN: New ThinkPad battery life on Ubuntu by CharlesW on Monday October 16, 2023 @04:04PM (#37905686)
One example would be hardware video encode/decode.
Re:Ask HN: New ThinkPad battery life on Ubuntu by jwells89 on Monday October 16, 2023 @04:05PM (#37905710)
> 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.

Re:Ask HN: New ThinkPad battery life on Ubuntu by ASalazarMX on Tuesday October 17, 2023 @02:53PM (#37919829)
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

Re:Ask HN: New ThinkPad battery life on Ubuntu by Izkata on Monday October 16, 2023 @04:12PM (#37905823)
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.
Re:Ask HN: New ThinkPad battery life on Ubuntu by unregistereddev on Monday October 16, 2023 @04:17PM (#37905895)
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...

Re:Ask HN: New ThinkPad battery life on Ubuntu by pacifika on Monday October 16, 2023 @04:34PM (#37906157)
Good feedback perhaps it takes a bit of effort of laptop makers pushing Linux making these contributions to make it better for everyone.