Sudden battery drain despite thermald

I have EOS installed on a Lenovo Ideapad 330. From a full charge to a level of 40% power usage seems normal. When I finish using my computer I put it in hibernation.

When I reactivate it, after having hibernated it at a level of 40%, it shows power is down to zero.

I have Thermald installed.

May need to replace battery? :wink:
Otherwise, are you sure it is really hibernating?

Highly unlikely as I have hardly used this computer ever since I bought it.

How can I check that?

If it does not hibernate, the 40% is a wrong level indication, or,
if it does hibernate, then either the 40% indication is wrong or something strange happens when it reaches that level and suddenly “turbo-drains”.

Logs (journals) should show if it is hibernating. Run
eos-log-tool -j
and show the returned URL here.

https://0x0.st/o7MJ.txt

Journal shows problems with your hourly snapshots, disk space runs out.

But hibernation looks like working. Note that I can’t compare the log with my machine since I’m not using hibernation. Hopefully some who uses hibernation can compare and report if anything suspicious is detected.

In Timeshift I have the snapshots set at Daily, so I don’t understand why it does hourly ones.
In any case, perhaps I should set them to weekly?

Maybe it is set in file /etc/cron.hourly?

Or, it tries it more often than daily because it fails due to disk space problem?

Here is what is in /etc/cron.hourly:

#!/bin/sh
# Check whether 0anacron was run today already
if test -r /var/spool/anacron/cron.daily; then
    day=`cat /var/spool/anacron/cron.daily`
fi
if [ `date +%Y%m%d` = "$day" ]; then
    exit 0
fi

# Do not run jobs when on battery power
online=1
for psupply in /sys/class/power_supply/* ; do
    if [ `cat "$psupply/type" 2>/dev/null`x = Mainsx ] && [ -f "$psupply/online" ]; then
        if [ `cat "$psupply/online" 2>/dev/null`x = 1x ]; then
            online=1
            break
        else
            online=0
        fi
    fi
done
if [ $online = 0 ]; then
    exit 0
fi
/usr/sbin/anacron -s

As far as I can tell there is no hourly command.

It’s funny, but when I was using Mint I did not manage to run Timeshift properly, now it is the same. I have disabled the snapshots.

OK, maybe it was trying daily snapshot again in an hour after failure.
But I guess you should check why the disk space is running out.

It was set to keep 5 versions, which means 6 in total with the original version.
The 5 versions currently all date to Nov 2022.

What I have done is to delete them all except the original, and set the number to keep to 2, and set the frequency to daily.

Let’s see what happens. If the drain still persists I will my oracle Manuel again, if you don’t mind :grinning:

Interesting to see if that helps.
But I assume others will help too, with different and possibly better perspective.

The latest experience (last Summer) I’ve had with battery drain was when my laptop’s battery was already showing lots of signs of wearing out. And one day it refused to charge, so I had to buy a new one.

Nevertheless, it seems your new battery is in a bad shape…

condition: 34.8/45.0 Wh (77.4%)

From the journal, it seems hibernation works fine, unless any jobs during sleep are not logged, but I am not sure this can happen.

One thing that is clearly an issue is a bad udev rule, that you should correct or disable/delete.

Process ‘/bin/chgrp video /sys/class/backlight/intel_backlight/brightness’ failed with exit code 1.

This task is trying to run for (assuming) every event of the system, or something horribly similar.
I suggest you grep/find the relevant file and disable/remove it. This may create an unmetered workload, that might possibly relate to your battery drainage.

grep intel_backlight /usr/lib/udev/rules.d/*.rules
grep intel_backlight /etc/udev/rules.d/*.rules

OTOH, have you checked XFCE power/battery info?

Have you intentionally set cinnamon screensaver, or maybe it conflicts? You might find it in /etc/xdg/autostart/, or ~/.config/autostart, or even as a user service.

Thermald isn’t used for throttling the cpu when it’s past 90C?
Install auto-cpufreq, it should help with battery life. You can also configure it to disable turbo on battery

1 Like

Thanks for pointing that out.

The name Thermald has “temperature” in it, so it was stupid of me to mention that. I also have auto-cpufreq installed for months, but it does not seem to have prevented this sudden drain.

Did you enable the service?

I thought so, but I did systemctl enable auto-cpufreq in the terminal again.

OK, that is now the 2nd Lenovo PC I bought with a crappy battery life, and there are 5 years between them. I am through with Lenovo. Don’t ever buy a Lenovo, if for no other reason.

The bad udev rule rings a bell because I struggled with the backlight just after I had installed EOS.
So, should I run the 2 grep commands you indicated?

No, I have not.

If the OS drains the battery because of misconfiguration, would it be wise to blame the HW vendor? I would first find the cause of the excessive battery drainage, and accuse the vendor later. Lenovo is the No1 PC manufacturer globally. :person_shrugging:

They are tips on how you might find the file with relevant contents. Use them, or use something else, or open each .rules file one-by-one. Mainly, read about rules.

That is not fair. It strikes me, though, that on my previous Lenovo my battery went down the drain pretty quickly too when I only had Windows on it, before I installed Linux.
Still, you are right to point this out; I would be fooling myself if it was the OS indeed.

From the 2 commands you suggested I got output from the 2nd one only:

grep intel_backlight /etc/udev/rules.d/*.rules
# RUN+="/bin/chgrp video /sys/class/backlight/intel_backlight/brightness"
# RUN+="/bin/chmod g+w /sys/class/backlight/intel_backlight/brightness"

I added the hashes in front in order to disable the backlight.

Furthermore, in /etc/xdg/autostart/ I did this:

[Desktop Entry]
Type=Application
Name=Cinnamon Settings Daemon - screensaver-proxy
Exec=csd-screensaver-proxy
OnlyShowIn=X-Cinnamon;
NoDisplay=true
# X-GNOME-Autostart-Phase=Initialization /* PB commented out */
X-GNOME-Autostart-Notify=false /* PB changed from true */
X-GNOME-AutoRestart=false /* PB changed from true */

The last 3 lines are mine.

Incidentally, I am currently running KDE Plasma, and the battery info tells me to replace the battery since its health is at only 47%.