https://bugs.kde.org/show_bug.cgi?id=472657

            Bug ID: 472657
           Summary: Battery widget shows charging icon, and computer will
                    not sleep, even though AC is disconnected
    Classification: Plasma
           Product: Powerdevil
           Version: 5.27.6
          Platform: Neon
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: plasma-b...@kde.org
          Reporter: o...@geek.co.il
                CC: m...@ratijas.tk, natalie_clar...@yahoo.de
  Target Milestone: ---

SUMMARY

The problem manifests on a Dell Precision 5570 - it didn't happen on my
previous system which was a Dell Precision 5520 - if I disconnect the AC
adapter, the battery icon in the power widget still shows that the computer is
connected and with the default energy saving settings - which is to not sleep
when AC is connected and closing the lid (which is how I like it) - the
computer will not sleep when closing the lid after disconnecting AC power.

STEPS TO REPRODUCE
1. Disconnect AC power
2. close lid

OBSERVED RESULT
Computer does not sleep

EXPECTED RESULT
Computer should sleep

SOFTWARE/OS VERSIONS
Operating System: KDE neon Testing Edition
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Kernel Version: 6.2.0-26-generic (64-bit)
Graphics Platform: offscreen
Processors: 20 × 12th Gen Intel® Core™ i7-12700H
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® Graphics

ADDITIONAL INFORMATION
There are several interesting things going on - first, the system tray is
configured for the battery widget to be "shown when relevant", and when I
connect the AC - the battery widget goes to the overflow menu, which is the
behavior I'd expect if the system knows that it is connected to the AC.

Secondly, UPower shows that it knows that AC is offline:

$ upower -d
Device: /org/freedesktop/UPower/devices/line_power_AC
  native-path:          AC
  power supply:         yes
  updated:              Wed 26 Jul 2023 14:36:16 (21 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    warning-level:       none
    online:              no
    icon-name:          'ac-adapter-symbolic'

so I'd expect powerdevil to also know what is going on. The full upower output
is attached below, and there are some weird things in it that may be confusing
powerdevil:

---8<---
Device: /org/freedesktop/UPower/devices/line_power_AC
  native-path:          AC
  power supply:         yes
  updated:              Wed 26 Jul 2023 14:36:16 (21 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    warning-level:       none
    online:              no
    icon-name:          'ac-adapter-symbolic'

Device: /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               SMP
  model:                DELL P8P1P95
  serial:               2242
  power supply:         yes
  updated:              Wed 26 Jul 2023 14:36:21 (16 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    energy:              53.5458 Wh
    energy-empty:        0 Wh
    energy-full:         54.891 Wh
    energy-full-design:  54.891 Wh
    energy-rate:         40.356 W
    voltage:             11.999 V
    charge-cycles:       N/A
    time to empty:       1.3 hours
    percentage:          97%
    temperature:         28.9 degrees C
    capacity:            100%
    technology:          lithium-polymer
    icon-name:          'battery-full-symbolic'
  History (charge):
    1690371376  97.000  discharging
  History (rate):
    1690371381  40.356  discharging
    1690371380  41.348  discharging
    1690371378  15.698  discharging
    1690371377  11.617  discharging

Device: /org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o001
  native-path:          ucsi-source-psy-USBC000:001
  power supply:         yes
  updated:              Wed 26 Jul 2023 14:10:43 (1554 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    warning-level:       none
    online:              yes
    icon-name:          'ac-adapter-symbolic'

Device: /org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o002
  native-path:          ucsi-source-psy-USBC000:002
  power supply:         yes
  updated:              Wed 26 Jul 2023 14:10:43 (1554 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    warning-level:       none
    online:              no
    icon-name:          'ac-adapter-symbolic'

Device: /org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o003
  native-path:          ucsi-source-psy-USBC000:003
  power supply:         yes
  updated:              Wed 26 Jul 2023 14:10:44 (1553 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    warning-level:       none
    online:              no
    icon-name:          'ac-adapter-symbolic'

Device: /org/freedesktop/UPower/devices/DisplayDevice
  power supply:         yes
  updated:              Wed 26 Jul 2023 14:36:21 (16 seconds ago)
  has history:          no
  has statistics:       no
  battery
    present:             yes
    state:               discharging
    warning-level:       none
    energy:              53.5458 Wh
    energy-full:         54.891 Wh
    energy-rate:         40.356 W
    charge-cycles:       N/A
    time to empty:       1.3 hours
    percentage:          97%
    icon-name:          'battery-full-symbolic'

Daemon:
  daemon-version:  0.99.20
  on-battery:      no
  lid-is-closed:   no
  lid-is-present:  yes
  critical-action: HybridSleep
---8<---

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to