Summary: | Powerdevil sometimes does not notice that my laptop has been cut from the power supply and runs on battery | ||
---|---|---|---|
Product: | [Plasma] Powerdevil | Reporter: | postix <postix> |
Component: | general | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | meven29, nate, nicolas.fella, postix, saipavanchitta1998 |
Priority: | NOR | ||
Version: | 5.22.4 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
udevadm monitor -k
udevadm monitor -k |
Description
postix
2021-08-04 20:40:48 UTC
I have tried to trigger it again and watched journalctl's output, maybe it gives a clue: ``` --> Unplug No log. Displays "on Battery" ----------------------------------------------------------------------------------------- --> Plug in Aug 05 16:21:12 fedora kernel: ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-95) Displays "AC power connected" ----------------------------------------------------------------------------------------- --> Unplug No log. Displays "on Battery" ----------------------------------------------------------------------------------------- --> Plug in Aug 05 16:22:35 fedora systemd[1]: Started dbus-:1.10-org.kde.powerdevil.backlighthelper@9.service. Aug 05 16:22:35 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.10-org.kde.powerdevil.backlighthelper@9 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' Aug 05 16:22:36 fedora kernel: ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-95) Aug 05 16:22:45 fedora systemd[1]: dbus-:1.10-org.kde.powerdevil.backlighthelper@9.service: Deactivated successfully. Aug 05 16:22:45 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.10-org.kde.powerdevil.backlighthelper@9 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' Displays "AC power connected" ----------------------------------------------------------------------------------------- --> Unplug Aug 05 16:24:30 fedora kernel: ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-95) Displays "AC power connected" --> AFTER A MINUTE Aug 05 16:25:07 fedora kwin_x11[3102]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 65032, resource id: 85983243, major code: 18 (ChangeProperty), minor code: 0 Aug 05 16:25:51 fedora systemd[1]: Started dbus-:1.10-org.kde.powerdevil.backlighthelper@12.service. Aug 05 16:25:51 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.10-org.kde.powerdevil.backlighthelper@12 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' Aug 05 16:26:00 fedora systemd[1]: dbus-:1.10-org.kde.powerdevil.backlighthelper@12.service: Deactivated successfully. Aug 05 16:26:00 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.10-org.kde.powerdevil.backlighthelper@12 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' Aug 05 16:26:06 fedora systemd[1]: Started dbus-:1.10-org.kde.powerdevil.backlighthelper@13.service. Aug 05 16:26:06 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.10-org.kde.powerdevil.backlighthelper@13 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' Aug 05 16:26:15 fedora systemd[1]: dbus-:1.10-org.kde.powerdevil.backlighthelper@13.service: Deactivated successfully. Aug 05 16:26:15 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.10-org.kde.powerdevil.backlighthelper@13 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' Aug 05 16:26:21 fedora systemd[1]: Started dbus-:1.10-org.kde.powerdevil.backlighthelper@14.service. Aug 05 16:26:21 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.10-org.kde.powerdevil.backlighthelper@14 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' Aug 05 16:26:30 fedora systemd[1]: dbus-:1.10-org.kde.powerdevil.backlighthelper@14.service: Deactivated successfully. Aug 05 16:26:30 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.10-org.kde.powerdevil.backlighthelper@14 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' Aug 05 16:26:38 fedora systemd[1]: Started dbus-:1.10-org.kde.powerdevil.backlighthelper@15.service. Aug 05 16:26:38 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.10-org.kde.powerdevil.backlighthelper@15 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' Aug 05 16:26:48 fedora systemd[1]: dbus-:1.10-org.kde.powerdevil.backlighthelper@15.service: Deactivated successfully. Aug 05 16:26:48 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dbus-:1.10-org.kde.powerdevil.backlighthelper@15 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' ---> Displays "On Battery" ``` Is it 100% reproducible when you unplug your laptop while it's asleep/suspended? If so, then it's a kernel bug: https://bugzilla.kernel.org/show_bug.cgi?id=210425 (In reply to Nate Graham from comment #2) > Is it 100% reproducible when you unplug your laptop while it's > asleep/suspended? If so, then it's a kernel bug: > https://bugzilla.kernel.org/show_bug.cgi?id=210425 Nope, it happens too, when it's suspended, but it's not 100% reproducible unfortunately. You mean, it also happens then it's *not* suspended as well? (In reply to Nate Graham from comment #4) > You mean, it also happens then it's *not* suspended as well? Right! It also happens while I am working or the system is idling but not suspended. (Sorry, I wish I could edit messages here as sometimes something comes to my mind a moment later after I have posted already.) Nonetheless, I feel you may be right and it's likely to be a Kernel bug and Plasma/powerdevil cannot do anything about it. I may report it at bugzilla.kernel.org too. Created attachment 140547 [details]
udevadm monitor -k
The Kernel is obviously always notified about changes to the power supply, even when the bug happens.
Created attachment 140548 [details]
udevadm monitor -k
Thanks for the info. I'm a bit out of my depth here, but does that mean that you think the kernel and udev are doing their part and the problem is in powerdevil? (In reply to Nate Graham from comment #9) > Thanks for the info. I'm a bit out of my depth here, Unfortunately, me too at the moment! > but does that mean that > you think the kernel and udev are doing their part and the problem is in powerdevil? Could be, but I will have to investigate more in depth next month, when I have more leisure time. Anyway, I will come back to it and adjust the bug report accordingly. Powerdevil does not handle directly battery state monitoring and relies on upower to do that. You can compare your results with "upower -d" and "upower -m" (monitor), and probably can report a bug there. https://gitlab.freedesktop.org/upower/upower/-/issues/22 seems like a good candidate. For reference we had a similar bug considered to be an upstream bug. https://bugs.kde.org/show_bug.cgi?id=423556 But it seems upstream upower could benefit from your help in diagnosing the bug. (In reply to Méven Car from comment #11) > Powerdevil does not handle directly battery state monitoring and relies on > upower to do that. > > You can compare your results with "upower -d" and "upower -m" (monitor), and > probably can report a bug there. > > https://gitlab.freedesktop.org/upower/upower/-/issues/22 seems like a good > candidate. https://gitlab.freedesktop.org/upower/upower/-/issues/126 is a better issue to work with. Git commit 01df6cf933c1a48928ff72af7cb520183130ff05 by Méven Car. Committed on 20/10/2021 at 09:47. Pushed by meven into branch 'master'. Applet batteryMonitor: Hide applet only when Fully charged and plugged in M +1 -1 applets/batterymonitor/package/contents/ui/batterymonitor.qml https://invent.kde.org/plasma/plasma-workspace/commit/01df6cf933c1a48928ff72af7cb520183130ff05 Comment at is most relevant. https://gitlab.freedesktop.org/upower/upower/-/issues/126#note_696455 Thank you Méven, I will look into the upstream discussions on freedesktop.org. *** This bug has been marked as a duplicate of bug 423556 *** Is this issue resolved? I still face this bug, and it makes it difficult as now the laptop does not suspend when I close the lid as it thinks it is plugged in. Could anyone please comment on whether this is resolved Thanks! It's the same issue as Bug 423556, which is an upstream issue. See https://gitlab.freedesktop.org/upower/upower/-/issues/126. See also https://community.kde.org/Get_Involved/Issue_Reporting#Understand_what_the_resolution_statuses_mean *** This bug has been marked as a duplicate of bug 423556 *** |