You are not logged in.

#1 2023-01-30 13:43:27

csihshf
Member
Registered: 2020-02-18
Posts: 20

hp laptop poor battery life

On arch idle power consumption is 4.5 watts on ubuntu 22.04 live it's 2.44 watts on idle. Using powertop i saw PKG never went past C3 (PC3) state on arch, when on ubuntu live it went to C8 (PC8) state. I have tried different power manager programs, nothing helps. Any suggestions?

EDIT: Kernel version 5.19.13 works great but next version 6.0 does not. It seems this problem is introduced in 6.0

Last edited by csihshf (2023-02-10 20:39:41)

Offline

#2 2023-01-30 14:33:06

d.ALT
Member
Registered: 2019-05-10
Posts: 914

Re: hp laptop poor battery life

csihshf wrote:

But on my HP laptop bios is locked down

<OT>
What did I miss all of these years? From when manufacturers are selling laptops with locked UEFI? Is this a thing? Are manufacturers going crazy or what?

hmm

But... Most importantly. why???
</OT>


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#3 2023-01-30 14:59:39

csihshf
Member
Registered: 2020-02-18
Posts: 20

Re: hp laptop poor battery life

d.ALT wrote:

What did I miss all of these years? From when manufacturers are selling laptops with locked UEFI? Is this a thing? Are manufacturers going crazy or what?

HP is known for having the worst bioses when it comes to having configuration options in bios. I can't disable intel RST VMD, i can't disable UEFI, can't even change iGPU allocated memory and other things which i can on many other laptops.

Last edited by csihshf (2023-02-10 20:41:30)

Offline

#4 2023-02-01 09:16:18

csihshf
Member
Registered: 2020-02-18
Posts: 20

Re: hp laptop poor battery life

Is anyone here?

Offline

#5 2023-02-01 10:14:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: hp laptop poor battery life

Don't do that: https://wiki.archlinux.org/title/Genera … es#Bumping

The biggest driving force here  is going to be the kernel, which kernel did you use on Ubuntu and can you try to match that more closely on Arch, e.g. test the LTS kernel or so.

Offline

#6 2023-02-05 07:19:29

csihshf
Member
Registered: 2020-02-18
Posts: 20

Re: hp laptop poor battery life

V1del wrote:

Don't do that: https://wiki.archlinux.org/title/Genera … es#Bumping

The biggest driving force here  is going to be the kernel, which kernel did you use on Ubuntu and can you try to match that more closely on Arch, e.g. test the LTS kernel or so.

So i tried linux-lts 5.15.91-1-lts kernel and idle power consumption dropped to around 3.1 watt. Still can't match ubuntu's 2.5 watt idle but still better then it was previously.

Now cpu package does go into C8 (pc8) state.

Last edited by csihshf (2023-02-10 20:42:20)

Offline

#7 2023-02-05 10:38:01

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: hp laptop poor battery life

csihshf wrote:

Why does older kernel on 2021 hardware work better then the newest one?

Sounds like the newer kernel might have suffered a regression. This happens when new features added to the kernel induce bugs with extant hardware support. That problem will eventually migrate to the LTS branch unless somebody notifies the kernel developers and helps them fix it.

Relevant: https://wiki.archlinux.org/title/Bisect … s_with_Git

Offline

#8 2023-02-07 07:50:43

csihshf
Member
Registered: 2020-02-18
Posts: 20

Re: hp laptop poor battery life

unfortunately sleep is not fixed even with this LTS kernel. It still lost 15% for 7 hours sleep time.

Last edited by csihshf (2023-02-10 20:40:54)

Offline

#9 2023-02-07 18:13:16

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: hp laptop poor battery life

So does /sys/power/mem_sleep show "deep"? Have you read https://wiki.archlinux.org/title/Power_ … wer_saving?

Offline

#10 2023-02-09 23:36:53

csihshf
Member
Registered: 2020-02-18
Posts: 20

Re: hp laptop poor battery life

Head_on_a_Stick wrote:

Sounds like the newer kernel might have suffered a regression. This happens when new features added to the kernel induce bugs with extant hardware support. That problem will eventually migrate to the LTS branch unless somebody notifies the kernel developers and helps them fix it.

on "linux-5.19.13.arch1-1-x86_64.pkg.tar.zst" version everything is ok and cpu goes to C8 (pc8) state after some seconds inactivity, but
on "linux-6.0.arch1-1-x86_64.pkg.tar.zst" version which is the next version for arch after 5.19.13 cpu does not go past C3 (pc3) state and power consumption jumped.

regression is somewhere here https://github.com/archlinux/linux/comp … 9.13-arch1

Last edited by csihshf (2023-02-10 20:40:25)

Offline

#11 2023-02-10 11:52:49

radiomike
Member
Registered: 2013-12-19
Posts: 73

Re: hp laptop poor battery life

Have been seeing a similar issue with not going below pc3 powerstate on my laptop and resulting increased battery usage.

Seems that using

pcie_aspm=force

  as a kernel parameter and then setting a powersave policy via

/sys/module/pcie_aspm/parameters/policy

may enable the lower power states. I've used TLP to make sure that gets set when automatically when on battery. From a quick google, it seems the ubuntu kernel may use some patches which enable aspm for vmd/rst devices by default, which is why they get better power usage. Unfortunately the patches haven't been accepted by upstream.

As far as your standby issues - I think the above will probably make a difference, though I haven't had a chance to test it properly myself. Unfortunately recent laptops now use "modern standby", which means that they don't go into S3(deep) sleep anymore. As a result they will use more battery on standby. Windows seems to default to a suspend-then-hibernate method to get better battery life. Unfortunately suspend-then-hibernate in linux was broken in recent systemd versions - it only hibernates when the battery is at 5%. That said, a recent patch to re-enable hibernate after a fixed time period seems to have been accepted, but I'm not sure if it has made it into arch yet.

Offline

#12 2023-02-10 17:44:36

csihshf
Member
Registered: 2020-02-18
Posts: 20

Re: hp laptop poor battery life

radiomike wrote:

Have been seeing a similar issue with not going below pc3 powerstate on my laptop and resulting increased battery usage.

Seems that using

pcie_aspm=force

  as a kernel parameter and then setting a powersave policy via

/sys/module/pcie_aspm/parameters/policy

may enable the lower power states. I've used TLP to make sure that gets set when automatically when on battery. From a quick google, it seems the ubuntu kernel may use some patches which enable aspm for vmd/rst devices by default, which is why they get better power usage. Unfortunately the patches haven't been accepted by upstream.

As far as your standby issues - I think the above will probably make a difference, though I haven't had a chance to test it properly myself. Unfortunately recent laptops now use "modern standby", which means that they don't go into S3(deep) sleep anymore. As a result they will use more battery on standby. Windows seems to default to a suspend-then-hibernate method to get better battery life. Unfortunately suspend-then-hibernate in linux was broken in recent systemd versions - it only hibernates when the battery is at 5%. That said, a recent patch to re-enable hibernate after a fixed time period seems to have been accepted, but I'm not sure if it has made it into arch yet.

I do have pcie_aspm=force in kernel parameters. TLP, laptop-mode and such programs did not help. As i described in my previous post the exact same settings with 2 different kernel versions one works and the other does not. To me it seems some change in kernel itself is at fault here.

Last edited by csihshf (2023-02-10 20:44:29)

Offline

#13 2023-02-10 18:32:43

radiomike
Member
Registered: 2013-12-19
Posts: 73

Re: hp laptop poor battery life

You can set it manually with

 sudo echo powersave > /sys/module/pcie_aspm/parameters/policy 

Do check the contents first to see what profiles are are available to you.
This isn't a default with TLP, you do have to configure it - probably the same with other tools too. Also, it requires the kernel parameter to work.

Offline

#14 2023-02-10 18:46:09

csihshf
Member
Registered: 2020-02-18
Posts: 20

Re: hp laptop poor battery life

radiomike wrote:

You can set it manually with

 sudo echo powersave > /sys/module/pcie_aspm/parameters/policy 

Do check the contents first to see what profiles are are available to you.
This isn't a default with TLP, you do have to configure it - probably the same with other tools too. Also, it requires the kernel parameter to work.

As i expected does not help. No way this is a setting problem. 5.19.13 version works 6.0 which is next update does not. Problem is in the kernel not the settings.

Offline

#15 2023-02-10 18:52:33

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: hp laptop poor battery life

csihshf wrote:

I just want to know how to dig further

With a git bisect, as per my supplied link.

csihshf wrote:

what exactly is it to report to kernel developers.

If you can't manage the bisect then tell them which kernel version last worked (ie, 5.19.13). Narrowing it down to a specific commit will make it much easier for them though.

Offline

#16 2023-02-10 19:38:11

csihshf
Member
Registered: 2020-02-18
Posts: 20

Re: hp laptop poor battery life

Head_on_a_Stick wrote:
csihshf wrote:

I just want to know how to dig further

With a git bisect, as per my supplied link.

csihshf wrote:

what exactly is it to report to kernel developers.

If you can't manage the bisect then tell them which kernel version last worked (ie, 5.19.13). Narrowing it down to a specific commit will make it much easier for them though.

Your link describes it for aur package which is easy to build by makepkg. Arch linux kernel is not in the aur. I'll try to build arch kernel for each commit between those 2 kernel versions.

Last edited by csihshf (2023-02-10 19:52:57)

Offline

#17 2023-02-10 19:55:15

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: hp laptop poor battery life

I think you can use the Arch Build System. Never tried it myself though. Search the boards, there are several threads by members bisecting kernel bugs, I think @loqs is the resident expert in this field.

Offline

#18 2023-02-14 05:41:01

csihshf
Member
Registered: 2020-02-18
Posts: 20

Re: hp laptop poor battery life

Head_on_a_Stick wrote:

So does /sys/power/mem_sleep show "deep"? Have you read https://wiki.archlinux.org/title/Power_ … wer_saving?

Today it lost 19% from 100 to 81 for 6 hours sleep. That file says [s2idle]

Last edited by csihshf (2023-02-14 05:41:31)

Offline

#19 2023-02-14 10:43:57

radiomike
Member
Registered: 2013-12-19
Posts: 73

Re: hp laptop poor battery life

This is probably because of Windows modern standby.
You can check your bios to see if there's any compatibility mode for Linux in there to enable s3 or deep sleep, but as it's an hp, that's very unlikely. There's also a few guides around for trying to enable s3 sleep, you're welcome to try those, but as it's an hp and I think it's a tiger lake based machine, it's unlikely they'll work.
Your best bet is simply to make sure that hibernation is set up and works. Then you can use that when you know that you aren't going to use your machine for a while. Also, once systemd releases the fix to suspend-then-hibernate, you'll be able to take advantage of that.

Last edited by radiomike (2023-02-14 10:45:10)

Offline

#20 2023-02-14 12:13:57

csihshf
Member
Registered: 2020-02-18
Posts: 20

Re: hp laptop poor battery life

radiomike wrote:

This is probably because of Windows modern standby.
You can check your bios to see if there's any compatibility mode for Linux in there to enable s3 or deep sleep, but as it's an hp, that's very unlikely. There's also a few guides around for trying to enable s3 sleep, you're welcome to try those, but as it's an hp and I think it's a tiger lake based machine, it's unlikely they'll work.
Your best bet is simply to make sure that hibernation is set up and works. Then you can use that when you know that you aren't going to use your machine for a while. Also, once systemd releases the fix to suspend-then-hibernate, you'll be able to take advantage of that.

Currently i have 32 GB RAM and usualy use at least half of it. I close lid whenever i want some rest from work or hobby IOT stuff. If i use hibernate it will write whole RAM to my SSD every time wearing it down much faster. No thanks. I have not used hibernate since i switched from HDD to SSD. I also do not use swap partition or swap file to not wear down SSD. I use zram as my swap device instead, because CPU is pretty fast and compression/decompression is fast enough. I have tested it at 40-42 GB RAM usage with zram and laptop still was responsive.

To me It seems if you want to use hardware with full capability on linux you have to buy 5-6 year old hardware. Even then full support is not guaranteed. That sucks.

I'll just switch to windows 11 + arch linux as WSL i heard WSL2 is much better and it also can open linux programs in windows from linux.

Last edited by csihshf (2023-02-14 12:15:37)

Offline

#21 2023-02-14 15:24:31

radiomike
Member
Registered: 2013-12-19
Posts: 73

Re: hp laptop poor battery life

csihshf wrote:

Currently i have 32 GB RAM and usualy use at least half of it. I close lid whenever i want some rest from work or hobby IOT stuff. If i use hibernate it will write whole RAM to my SSD every time wearing it down much faster.

You only need to hibernate when you know that you will be away from your machine for a while. You can just suspend otherwise. Suspend-then-hibernate is the ideal solution here, IE when you close the lid it suspends, then after a time, say 1-2hrs, it hibernates. In my experience, this is the method that windows defaults to - be aware of that if you are worried about SSD wear. Unfortunately, as mentioned before, It's broken on linux at the moment, but should be fixed in a systemd update soon.
It's good to be aware of your disk lifetime, but it's unlikely that hibernating will have a huge impact on a modern SSD. As far as I am aware, it only writes what is in use, not every byte. You can also control the size of this, so presumably there's some compression/compaction involved.
As far as device support goes, I think you should be laying the blame with microsoft for modern standby - it's their thing - and hp for not testing or supporting these devices under linux.

Offline

#22 2023-02-27 07:28:22

csihshf
Member
Registered: 2020-02-18
Posts: 20

Re: hp laptop poor battery life

That's it, they bumped LTS version to 6.1.14 and now it drains battery like crazy on LTS kernel too. Last known working kernel is  5.19.13 version 6.0 brought this problem.

Does this problem only affect me?

Offline

#23 2023-03-05 18:41:05

thg
Member
Registered: 2023-03-05
Posts: 1

Re: hp laptop poor battery life

Hello,

I bought a new HP EliteBook 840 G9 with Intel i7 1260P.
With Arch Linux (Kernel 6.2.2) I have very bad battery performance. Even in suspend mode I lose 4% in one hour.
I installed Ubuntu 22.04 LTS with Kernel 5.19.x and battery performance drastically improved. In 4h suspend mode I lost about 2%.
These are not very scientific measurements, I know.

To answer your question. No, you're not alone.

Offline

#24 2023-03-16 19:14:05

c0da
Member
Registered: 2009-08-24
Posts: 11

Re: hp laptop poor battery life

The very same issue is on the old Dell Vostro 5470 (Intel) and the new Lenovo IdeaPad 14 (AMD) notebooks. Lenovo machine looses a lot of battery charge even when it is completely off. In the BIOS settings power saving is enabled and usb-charging in low power states is disabled. On the both machines on the Linux side the powersave cpufreq governor is selected and the GPU power profile is set to low. Despite that both machines drain battery like crazies even during simple text editing in ViM.

I've noticed that very strange change in behavior after upgrade to the 6.2.x kernel.

Last edited by c0da (2023-03-16 19:28:06)

Offline

Board footer

Powered by FluxBB