Bug 1398826 - System does not recognize it's on battery, laptop lid close action not triggered, upower "on-battery: no" even though it's on battery
Summary: System does not recognize it's on battery, laptop lid close action not trigge...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: kdeplasmoids
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Orphan Owner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-26 13:35 UTC by Basic Six
Modified: 2017-12-12 10:16 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:16:14 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
FreeDesktop.org 99172 0 None None None 2017-01-03 20:25:22 UTC

Description Basic Six 2016-11-26 13:35:08 UTC
Description of problem:

KDE thinks the laptop is still on AC power and triggers the laptop lid close action for AC power, not for battery, when the power cable is not connected. When hovering over the battery icon in the tray, it says "98%. Plugged in" (when it may have said "Charging" earlier), even though it's not plugged in. When clicking on the battery icon, the "Battery and Brightness" dropdown dialog correctly says "Discharging".

This means that setting "When laptop lid closed" to "Suspend" (KDE Settings, Power Management, Energy Saving) under "On Battery" has no effect. The configured action under "On AC Power" (e.g., "Lock screen") is triggered instead, even when the laptop is actually running on battery power.



Version-Release number of selected component (if applicable):

Fedora 24.

plasmashell 5.7.5

UPower client version 0.99.4
UPower daemon version 0.99.4



How reproducible:

100%.



Steps to Reproduce:
1. Disconnect power cable.
2. Close laptop lid.
3. Laptop won't suspend because it thinks it's still "plugged in".



Actual results:

After disconnecting power, it still claims to be plugged in and will not suspend as configured.



Expected results:

It should not say "plugged in" when it's not plugged in. And it should suspend as configured.



Additional info:

Battery model: VAIO VJ8BPS37

When the laptop lid is closed while on battery, it simply locks the screen, as configured under "On AC Power". When that setting is changed to "Suspend", it will suspend.

After disconnecting the power cable, upower -d still says "on-battery: no" in the "Daemon" section:
Daemon:
  daemon-version:  0.99.4
  on-battery:      no
  lid-is-closed:   no
  lid-is-present:  yes
  critical-action: HybridSleep

Comment 1 Basic Six 2016-12-20 18:26:40 UTC
After upgrading to Fedora 25, it looks like the bug has been fixed:

$ upower -d | grep on-battery
  on-battery:      yes

$ plasmashell --version
plasmashell 5.8.4

$ upower --version
UPower client version 0.99.4
UPower daemon version 0.99.4

$ cat /etc/fedora-release 
Fedora release 25 (Twenty Five)

$ uname -sr
Linux 4.8.8-200.fc24.x86_64

The tlp package has also been installed.

# rpm -qa | grep tlp
tlp-rdw-0.9-1.fc25.noarch
tlp-0.9-1.fc25.noarch

# tlp stat
--- TLP 0.9 --------------------------------------------
...
+++ TLP Status
State          = enabled
Last run       = 12:15:41 PM,    295 sec(s) ago
Mode           = battery
Power source   = battery
...

Comment 2 Basic Six 2016-12-22 01:11:36 UTC
Correction. Please ignore the last comment - the bug has not been fixed. However, it seems to work when the power cable is disconnected while booting. In this case, upower will report that it's running on battery. As soon as the cable is connected, upower says that it's not running on battery anymore and KDE also recognizes the change and turns the screen brightness up (if configured).

If the laptop is connected to a power source while booting, the system won't recognize when it's disconnected - as described in this bug report.

Current kernel:
Linux 4.8.13-300.fc25.x86_64

Comment 3 Alan Jenkins 2017-08-23 09:22:48 UTC
Although UPower relays the power status, this sounds more like a hardware-specific problem which would need to be solved in the Linux kernel.

You can test whether the kernel thinks the mains supply is plugged in, by copying+pasting the following command into a terminal:

for i in /sys/class/power_supply/*/; do (cd "$i"; [ $(cat type) = "Mains" ] && echo "online=$(cat online)"); done

Comment 4 Basic Six 2017-09-05 10:17:44 UTC
Sorry, I can't test anything, I got rid of the laptop.

Comment 5 Alan Jenkins 2017-09-05 13:21:07 UTC
Thanks for the reply :).  There's probably not much we can do to track this issue then.

You can close this bug if you like (I don't have the access).  It'll save you getting mailed about it, when Fedora 25 goes end-of-life and the mass closure bots get here.

Comment 6 Fedora End Of Life 2017-11-16 19:04:46 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2017-12-12 10:16:14 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.