Bug 453139 - Kubuntu 22.04, Battery widget shows laptop as connected to power source while running on battery
Summary: Kubuntu 22.04, Battery widget shows laptop as connected to power source while...
Status: RESOLVED DUPLICATE of bug 423556
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.24.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-28 13:00 UTC by Michael Braxner
Modified: 2022-05-03 15:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Braxner 2022-04-28 13:00:15 UTC
On a fresh install of Kubuntu 22.04, the battery widget shows my Dell XPS 9500 as connected to a power source while running on battery. 

Connecting to a power source changes the textual information on hovering over the widget, i.e. switches from 'Battery at xx%, plugged in but still discharging' to 'Battery at xx%, Charging'. Disconnecting the charger then switches back to 'Battery at xx%, plugged in but still discharging'.

After a clean reboot WITH THE CHARGER PLUGGED IN this behavior does NOT occur, i.e. the widget shows the proper information. 

After a Suspend, Hibernate, or Hybrid-Sleep, the behavior occurs as described.

A reboot on battery power ONLY leads to the described behavior.
 

STEPS TO REPRODUCE
1. Boot on Battery power ONLY
    OR: Suspend
    OR: Hibernate
    OR: Hybrid-Sleep


OBSERVED RESULT
Battery widget reports 'Battery at xx%, plugged in but still discharging' while running on battery power only.

EXPECTED RESULT
Battery widget reports  'Battery at xx%'.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 22.04
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.15.0.27-generic (64-bit)
Graphics Platform: X11
Comment 1 Michael Braxner 2022-04-28 13:46:08 UTC
... and forgot to attach the logs again ... duh

After boot on battery ONLY the widget works as it should. Logs BEFORE plugging in power supply:

4/28/22 9:32 AM	dbus-daemon	[system] Activating via systemd: service name='org.freedesktop.UPower' unit='upower.service' requested by ':1.28' (uid=0 pid=671 comm="/usr/sbin/thermald --systemd --dbus-enable --adapt" label="unconfined")
4/28/22 9:32 AM	systemd	Starting Daemon for power management...
4/28/22 9:32 AM	dbus-daemon	[system] Successfully activated service 'org.freedesktop.UPower'
4/28/22 9:32 AM	systemd	Started Daemon for power management.
4/28/22 9:32 AM	upower.service	treated changed event as add on /sys/devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:001
4/28/22 9:32 AM	upower.service	treated changed event as add on /sys/devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:002
4/28/22 9:32 AM	powertop	Leaving PowerTOP
4/28/22 9:32 AM	upower.service	treated changed event as add on /sys/devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:003
4/28/22 9:32 AM	systemd	Finished PowerTOP auto tune.
4/28/22 9:33 AM	dbus-daemon	[system] Activating service name='org.kde.powerdevil.discretegpuhelper' requested by ':1.59' (uid=1000 pid=1396 comm="/usr/lib/x86_64-linux-gnu/libexec/org_kde_powerdev" label="unconfined") (using servicehelper)
4/28/22 9:33 AM	dbus-daemon	[system] Successfully activated service 'org.kde.powerdevil.discretegpuhelper'
4/28/22 9:33 AM	dbus-daemon	[system] Activating service name='org.kde.powerdevil.chargethresholdhelper' requested by ':1.59' (uid=1000 pid=1396 comm="/usr/lib/x86_64-linux-gnu/libexec/org_kde_powerdev" label="unconfined") (using servicehelper)
4/28/22 9:33 AM	dbus-daemon	[system] Successfully activated service 'org.kde.powerdevil.chargethresholdhelper'
4/28/22 9:33 AM	dbus-daemon	[system] Activating service name='org.kde.powerdevil.backlighthelper' requested by ':1.59' (uid=1000 pid=1396 comm="/usr/lib/x86_64-linux-gnu/libexec/org_kde_powerdev" label="unconfined") (using servicehelper)
4/28/22 9:33 AM	dbus-daemon	[system] Successfully activated service 'org.kde.powerdevil.backlighthelper'
4/28/22 9:33 AM	dbus-daemon	[session uid=1000 pid=1073] Activating via systemd: service name='org.kde.KScreen' unit='plasma-kscreen.service' requested by ':1.27' (uid=1000 pid=1396 comm="/usr/lib/x86_64-linux-gnu/libexec/org_kde_powerdev" label="unconfined")


After plugging in power supply:

4/28/22 9:41 AM	dbus-daemon	[system] Activating service name='org.kde.powerdevil.backlighthelper' requested by ':1.59' (uid=1000 pid=1396 comm="/usr/lib/x86_64-linux-gnu/libexec/org_kde_powerdev" label="unconfined") (using servicehelper)
4/28/22 9:41 AM	dbus-daemon	[system] Successfully activated service 'org.kde.powerdevil.backlighthelper'


Battery widget reports charging accurately.

Now, after disconnecting the power supply, returning to battery only, NO further log messages occur, i.e. the system apparently did not recognize that the power supply was disconnected ... is this an ACPI problem?
Comment 2 Michael Braxner 2022-04-30 23:31:05 UTC
Just to clarify:

After a COLD boot WITH the power adapter plugged in, the described behaviour does NOT occur. A subsequent restart, suspend or hibernate, either with power supply plugged in or battery alone, does NOT lead to the behaviour described.

After a COLD boot ON BATTERY ALONE, the behaviour occurs invariably, and is subsequently NOT remedied by a RESTART WITH power adapter plugged in.
Comment 3 Nate Graham 2022-05-03 15:17:46 UTC
It's a bug in the kernel itself. See the discussion and links in Bug 423556.

*** This bug has been marked as a duplicate of bug 423556 ***