Bug 1643990

Summary: /sys/class/pwer_supply/BAT0 not kept up to date.
Product: [Fedora] Fedora Reporter: guilde.nt
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: airlied, bskeggs, ewk, hdegoede, ichavero, itamar, jarodwilson, jcline, jglisse, john.j5live, jonathan, josef, kernel-maint, linville, mchehab, mjg59, steved
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 10:44:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description guilde.nt 2018-10-29 16:51:40 UTC
Description of problem:

The files in /sys/class/power_supply/BAT0 used to provide meaningful information. Now, "capacity" constantly reads 100, which is used by the XFCE Battery Monitor to display a battery level always full.

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

Kernel : 4.18.16-200.fc28.x86_64
Hardware : Asus EeePC.

How reproducible:

Always.

Steps to Reproduce:
1. cat /sys/class/power_supply/BAT0/uevent
2.
3.

Actual results:
POWER_SUPPLY_NAME=BAT0
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=14032000
POWER_SUPPLY_VOLTAGE_NOW=65535000
POWER_SUPPLY_CURRENT_NOW=1000
POWER_SUPPLY_CHARGE_FULL_DESIGN=4300000
POWER_SUPPLY_CHARGE_FULL=4200000
POWER_SUPPLY_CHARGE_NOW=4200000             <=== never change
POWER_SUPPLY_CAPACITY=100                   <=== never change
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_MODEL_NAME=1015PE
POWER_SUPPLY_MANUFACTURER=ASUS
POWER_SUPPLY_SERIAL_NUMBER=

Expected results:


Additional info:

Comment 1 Jeremy Cline 2018-10-29 20:32:28 UTC
What was the first kernel version this stopped working? Was it a minor update (4.18.z to 4.18.z+1) or a major one (4.17 to 4.18)? If you're not sure, old kernels can be installed from builds at https://koji.fedoraproject.org/koji/packageinfo?packageID=8

Please also attach the output of "journalctl -k --no-hostname".

Comment 2 Hans de Goede 2018-10-29 21:15:51 UTC
I think this may have the same root cause as:
https://bugzilla.kernel.org/show_bug.cgi?id=201351

That bug has a workaround hack / patch, but no real fix yet. Perhaps you can build a kernel with that patch added to confirm that it is the same issue?

Comment 3 guilde.nt 2018-10-30 10:11:37 UTC
(In reply to Jeremy Cline from comment #1)
> What was the first kernel version this stopped working? Was it a minor
> update (4.18.z to 4.18.z+1) or a major one (4.17 to 4.18)? If you're not
> sure, old kernels can be installed from builds at
> https://koji.fedoraproject.org/koji/packageinfo?packageID=8

Hans de Goede points to this bug as being the original (mine being a duplicate) :

https://bugzilla.kernel.org/show_bug.cgi?id=201351

I have both problems (lid and battery) on the same hardware (Asus EeePC 1015PX).
The original poster has this to say :

<< After some helpful suggestions from others, I bisected the kernel to try to 
   isolate the trouble. According to the bisection:

   5a8361f7ecceaed64b4064000d16cb703462be49 is the first bad commit >>


  Thank you.

Comment 4 Hans de Goede 2018-10-30 10:44:41 UTC
(In reply to nt.guilde from comment #3)
> I have both problems (lid and battery) on the same hardware (Asus EeePC
> 1015PX).

Ok, so this is a duplicate of bug 1629479 then. Lets continue tracking this issue in the bugzilla.kernel.org bug.

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