I have a new HP Victus laptop with Fedora 38 and Windows 11 installed.
In Windows, the battery lasts all day--8+ hours. In Linux, it lasts about 2.5-3 hours.
I installed TLP, which I remember from way back, although I don't know if that's what people do these days. In any case, it didn't help.
What else can I do to get Fedora not to eat up the battery life so fast?
Thanks, Matt
On Sun, Sep 10, 2023 at 3:17 PM old sixpack13 sixpack13@online.de wrote:
...
What else can I do to get Fedora not to eat up the battery life so fast?
one answer might be "powertop"; it's in the fedora repo's
Thank you--that was a great suggestion and seemed super promising, but when I ran it, it found almost nothing to change. Battery life is still really bad in Linux, fine in Windows. If anyone has any other suggestions, I sincerely appreciate it!
Thanks, Matt
On Thu, Sep 28, 2023 at 10:56:42AM -0400, Matt Morgan wrote:
On Sun, Sep 10, 2023 at 3:17 PM old sixpack13 sixpack13@online.de wrote:
...
What else can I do to get Fedora not to eat up the battery life so fast?
one answer might be "powertop"; it's in the fedora repo's
Thank you--that was a great suggestion and seemed super promising, but when I ran it, it found almost nothing to change. Battery life is still really bad in Linux, fine in Windows. If anyone has any other suggestions, I sincerely appreciate it!
IIRC powertop shows the current status of things. Perhaps your drain is intermittent.
I run Mate window manager. Mate's power manager app has a graph feature that among other things can show battery charge level. Likely other WM's have similar features available.
Perhaps leave the chart up and look for periods of rapid discharge vs a consistent steady discharge. If there are periods of rapid discharge you may be able to match their times and some activity.
On Thu, Sep 28, 2023 at 10:56:42AM -0400, Matt Morgan wrote:
IIRC powertop shows the current status of things.
- start powertop as root - use the TAB key/shift+TAB key to move to tab "Tunables" and/or "Wakeup" - use the cursor and enter key to switch the settings
cause the above setting will get lost after reboot I wrote script to generate a rc.local. the rc.local should be owned by root:
sudo chown root:root rc.local
and should have the rights 700 (needed: ?, I'm unsure, but it works with it):
sudo chmod 700 rc.local
the rc.local should be moved to "/etc/rc.d/" and the box should be rebooted afterwards. a "systemctl status rc-local.service" will then show the status or if the power setting are applied.
double check: sudo powertop and via TAB key to "Tunables": all should read "Good"
BE AWARE: mouse and keyboard might get stuttering, cause in power safe mode if so: comment out the power settings in the rc.local for both devices ! - the script excludes Logitech devices (Logitech mouse+keyboard) here -
the following script creates a file called "rc.local_<date-of-script-run>" and must be renamed to rc.local ==== #!/bin/bash
clear;
[ ${EUID} -gt "0" ] && echo -e "\n login as ROOT ! \n" && exit 13;
My_RC_LOCAL=rc.local_$(date +%F);
# clean up [ -e ${My_RC_LOCAL} ] && rm -rf ./${My_RC_LOCAL};
# build rc.local echo -e "\n generating NEW rc.local...\n";
cat << _EOF_ > ${My_RC_LOCAL} #!/bin/bash touch /var/lock/subsys/local
# created: 2023-09-28 #
_EOF_
echo -e " running Powertop, wait ...\n"; powertop --csv=tmp_$$;
# 1. search relevant lines # sed -i '/Runtime|Autosuspend/!d' tmp_$$; sed -i '/echo/!d' tmp_$$;
# 2. treat comment sign at the line beginning sed -i -e 's/^/# /g' tmp_$$;
# 3. exclude mouse, keyboard: # ...]; => ...];# sed -i -e '/Logitech/s/];/];### /g' tmp_$$; sed -i -e '/Keyboard/s/];/];### /g' tmp_$$;
# 4. split at ";", and insert empty lines cat tmp_$$ | tr ';' '\n' >> ${My_RC_LOCAL};
# for lines with "echo" at the beginning add a semicolon at the end sed -i -e '/echo/s/$/;/g' ${My_RC_LOCAL};
# mark excluded devices sed -i -e '/Logitech/s/^# /### /g' ${My_RC_LOCAL}; sed -i -e '/Keyboard/s/^# /### /g' ${My_RC_LOCAL};
echo -e "\n\nexit 0;" >> ${My_RC_LOCAL};
chown root.root ${My_RC_LOCAL}; chmod 700 ${My_RC_LOCAL};
[ -e tmp_$$ ] && rm -rf ./tmp_$$;
echo -e "\n+++ new ${My_RC_LOCAL} looks like this, press Enter +++ \n" && read;
more ${My_RC_LOCAL};
exit 0;
====
On Thu, Sep 28, 2023 at 5:23 PM old sixpack13 sixpack13@online.de wrote:
On Thu, Sep 28, 2023 at 10:56:42AM -0400, Matt Morgan wrote:
IIRC powertop shows the current status of things.
- start powertop as root
- use the TAB key/shift+TAB key to move to tab "Tunables" and/or "Wakeup"
- use the cursor and enter key to switch the settings
[trimmed a bit]
I really appreciate this. But when I run Powertop, almost everything is marked as good. The few that were marked bad all had to do with power to USB devices upon suspend, which sounds like it wouldn't be relevant while the computer is running. In any case, I changed everything I could, and still the battery runs down at about 1%/minute, i.e. it lasts about 100 minutes. In any case, I learned something from your replies, so even though it hasn't helped with the computer, I'm glad I asked!
So I think this is something else. I'll contact HP and see if they're willing to help.
Best, Matt
On Mon, 2023-10-09 at 11:06 -0400, Matt Morgan wrote:
I really appreciate this. But when I run Powertop, almost everything is marked as good. The few that were marked bad all had to do with power to USB devices upon suspend, which sounds like it wouldn't be relevant while the computer is running. In any case, I changed everything I could, and still the battery runs down at about 1%/minute, i.e. it lasts about 100 minutes. In any case, I learned something from your replies, so even though it hasn't helped with the computer, I'm glad I asked!
With a lot of devices battery life is extended by the OS switching off things, or putting them into low power: Monitoring the WiFi signal use, and reducing transmission power if it's not needed to blast out at full power. Putting the sound system into standby if it's not doing anything. Throttling the CPU back when idle. Reducing the screen brightness when idle, or all the time. Putting drives into low power mode, etc.
This all has consequences. It's judgement of how low it can turn the WiFi down may be wrong. You may miss the first second of everything going through the sound system (I have this, and it means system beeps and alerts aren't heard, and sound editing is messed up). Drives that keep going to sleep and waking up again every few seconds don't save power, and wear the drives out prematurely. Et cetera...
Individually, these things don't use a great deal of power, so things like powertop mayn't paint the full picture. But collectively, and continually, it adds up.
One of things that pained me when I got into Linux about 20 years ago was CUPS continually polling and logging something every few seconds. Certain services may do that, and some of them probably aren't needed on a laptop, particularly if you're not networking between things on a LAN.
On Tue, 2023-10-10 at 09:19 +1030, Tim via users wrote:
One of things that pained me when I got into Linux about 20 years ago was CUPS continually polling and logging something every few seconds.
FYI, the most recent update has finally fixed that:
https://bugzilla.redhat.com/show_bug.cgi?id=2233078
poc
...
So I think this is something else. I'll contact HP and see if they're willing to help.
yup, might be a bios update (if available) could help OR esp. in case it's an Intel CPU with Performance- and Efficient cores a newer kernel might help. IIRC, kernel developer have screwed at the power management, etc., esp. in kernel Versions 6.6.x, what means rawhide kernels in the fedora world care to test with one ?
on the other hand: is your "sudo journalctl -b0" free of errors ?
AFAIK, display and radio (wifi, bluetooth) are the main battery suckers.
I would search the internet, maybe "https://linux-hardware.org", for your device maybe one found a solution for your problem.
but I would first start with a rawhide (or fc40) kernel. https://koji.fedoraproject.org/koji/packageinfo?packageID=8
download for x86_64 at least: kernel-xyz kernel-core-xyz kernel-modules-xyz kernel-modules-core-xyz more ?
Be aware: rawhide kernels might contain bugs