This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Power controls broken on wakeup from suspend

Tags: None
(comma "," separated)
kde-deshmukh
Registered Member
Posts
184
Karma
0
KDE4.13 on Kubuntu14.04 on an Asus Laptop.

1. Laptop runnig on AC power. Systray shows battery conncted to AC power. Tooltip shows battery level. On click, shows display brightness, etc. correctly
2. Close the laptop lid. Laptop suspends.
3. Switch off the AC power
4. Open the laptop lid. It wakes up. But now, systray shows the same icon --- battery connected to AC power! Tooltip and on-click display shows the correct status i.e. disconnectod from AC power battery.

Worse still, there are no warnings on Low Power, etc.

If I interchange steps 2 and 3 i.e. switch the AC power off BEFORE closing the laptop lid, on wakeup, all is well. The systray icon shows discharging battery, etc.

What is missing? How do I set it right?


--
Manjaro KDE. Kernel 4.19.244-1-MANJARO. 64-bit. Plasma 5.24.5. KDE Frameworks 5.94.0. Qt 5.15.4. 8GB RAM and more than 100GB free on the hard disk.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Please provide the output of "upower -d" of a freshly booted, as well as incorrectly behaving system. It sounds like a firmware / hardware controller problem. Does your system not react to lid open/close events as well once it has entered this state by any chance?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
kde-deshmukh
Registered Member
Posts
184
Karma
0
Here is the output of upower -d on a freshly rebooted system:

Code: Select all
Device: /org/freedesktop/UPower/devices/battery_BAT1
  native-path:          BAT1
  vendor:               ASUSTEK
  model:                PA3533U
  serial:               41167
  power supply:         yes
  updated:              Wednesday 14 May 2014 02:28:53 PM IST (21092 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               fully-charged
    energy:              45.6516 Wh
    energy-empty:        0 Wh
    energy-full:         45.6516 Wh
    energy-full-design:  56.16 Wh
    energy-rate:         0.0108 W
    voltage:             12.363 V
    percentage:          100%
    capacity:            81.2885%
    technology:          lithium-ion

Device: /org/freedesktop/UPower/devices/line_power_ACAD
  native-path:          ACAD
  power supply:         yes
  updated:              Wednesday 14 May 2014 02:28:47 PM IST (21098 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    online:             yes

Daemon:
  daemon-version:  0.9.23
  can-suspend:     yes
  can-hibernate:   no
  on-battery:      no
  on-low-battery:  no
  lid-is-closed:   no
  lid-is-present:  yes
  is-docked:       no


About your other questions, let me clarify. The core problem is if I switch off the power supply when the PC is suspended, on wake, the battery icon in the system tray shows that the battery is connected! It does not show warnings on reaching low and critical levels. None of the settings in 'On Battery' tab in power settings apply. It behaves as if it is connected to power.

The tooltip on hover and the data on clicking the icon shows the battery is not connected.

However, if I switch the power off when the PC is not suspended, everything works as expected.


--
Manjaro KDE. Kernel 4.19.244-1-MANJARO. 64-bit. Plasma 5.24.5. KDE Frameworks 5.94.0. Qt 5.15.4. 8GB RAM and more than 100GB free on the hard disk.
luebking
Karma
0
Ben wanted to know whether the book still goes to STR when closing the lid *after* triggering the false state condition (it's a matter of on which level the issue is located: hardware -> kernel -> upower -> libsolid -> powerdevil)
The upower dump on the problematic state will also help on this question.
kde-deshmukh
Registered Member
Posts
184
Karma
0
luebking wrote:Ben wanted to know whether the book still goes to STR when closing the lid *after* triggering the false state condition (it's a matter of on which level the issue is located: hardware -> kernel -> upower -> libsolid -> powerdevil)
The upower dump on the problematic state will also help on this question.


I think I do not get what information is needed.

Suspend -> Switch off power -> wake-up this routine leads to the behaviour I have mentioned.

If I do not pay attention to the power level, laptop does not suspend. It just shuts down when the battery completely drains. There are no warnings either.

The upower -d output I have provided is when the laptop was restarted with AC power connected.

Do you need the upower -d output AFTER suspend -> Switch off power -> wake-up routine?


--
Manjaro KDE. Kernel 4.19.244-1-MANJARO. 64-bit. Plasma 5.24.5. KDE Frameworks 5.94.0. Qt 5.15.4. 8GB RAM and more than 100GB free on the hard disk.
luebking
Karma
0
"upower -d" for good AND bad state are required for a comparism.

The other question was, whether closing the lid does still suspend the notebook once the broken state is entered, or whether this is broken as well.
kde-deshmukh
Registered Member
Posts
184
Karma
0
OK. On closing the lid, the laptop suspends --- in both conditions.

The output of upower -d when there was a problem is:

Code: Select all
Device: /org/freedesktop/UPower/devices/line_power_ACAD
  native-path:          ACAD
  power supply:         yes
  updated:              Wednesday 28 May 2014 11:50:33 AM IST (80822 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    online:             yes

Device: /org/freedesktop/UPower/devices/battery_BAT1
  native-path:          BAT1
  vendor:               ASUSTEK
  model:                PA3533U
  serial:               41167
  power supply:         yes
  updated:              Thursday 29 May 2014 10:17:33 AM IST (2 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    energy:              24.8724 Wh
    energy-empty:        0 Wh
    energy-full:         41.4828 Wh
    energy-full-design:  56.16 Wh
    energy-rate:         14.202 W
    voltage:             10.935 V
    time to empty:       1.8 hours
    percentage:          59%
    capacity:            73.8654%
    technology:          lithium-ion
  History (charge):
    1401338853   59.000   discharging
    1401338818   60.000   discharging
    1401338818   0.000   unknown
  History (rate):
    1401338853   14.202   discharging
    1401338823   7.765   discharging
    1401338821   5.843   discharging
    1401338818   3.294   discharging
    1401338818   0.000   unknown

Daemon:
  daemon-version:  0.9.23
  can-suspend:     yes
  can-hibernate:   no
  on-battery:      no
  on-low-battery:  no
  lid-is-closed:   no
  lid-is-present:  yes
  is-docked:       no


Please let me know if more information is needed.


--
Manjaro KDE. Kernel 4.19.244-1-MANJARO. 64-bit. Plasma 5.24.5. KDE Frameworks 5.94.0. Qt 5.15.4. 8GB RAM and more than 100GB free on the hard disk.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Code: Select all
  line-power
    online:             yes


This is the source of the problem. As far as the system is concerned - it is receiving AC power. Can you please check the files under /sys/class/power_supply/ to see if the kernel believes the same thing?

The content of /sys/class/power_supply/ACAD/online or /sys/class/power_supply/AC0/online is probably what is relevant here. It will be "1" if it believes the charger is connected, or "0" if not.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
kde-deshmukh
Registered Member
Posts
184
Karma
0
bcooksley wrote:
Code: Select all
  line-power
    online:             yes


This is the source of the problem. As far as the system is concerned - it is receiving AC power. Can you please check the files under /sys/class/power_supply/ to see if the kernel believes the same thing?

The content of /sys/class/power_supply/ACAD/online or /sys/class/power_supply/AC0/online is probably what is relevant here. It will be "1" if it believes the charger is connected, or "0" if not.


Yes. /sys/class/power_supply/ACAD/online did contain "1" even when it was not connected to AC power.

How do I set this right?


--
Manjaro KDE. Kernel 4.19.244-1-MANJARO. 64-bit. Plasma 5.24.5. KDE Frameworks 5.94.0. Qt 5.15.4. 8GB RAM and more than 100GB free on the hard disk.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
This means you are experiencing either a hardware level or kernel bug. I'm afraid i'm not sure how to investigate either scenario.
The UPower developers would likely have an idea where to begin looking though.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar