Re: linux-next-20180723: battery status funny after bootup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2018-07-24 at 10:56 +0200, Pavel Machek wrote:
> On Tue 2018-07-24 10:39:23, Lucas Rangit Magasweran wrote:
> > 
> > (limit CC to linux-acpi for now)
> > 
> > On Mon, 2018-07-23 at 23:49 +0200, Pavel Machek wrote:
> > > 
> > > pavel@amd:~$ cat /proc/acpi/battery/BAT0/state
> > > present:                 yes
> > > capacity state:          ok
> > > charging state:          charged
> > > present rate:            0 mW
> > > remaining capacity:      0 mWh
> > > present voltage:         0 mV
> > > pavel@amd:~$ uname -a
> > > Linux amd 4.18.0-rc6-next-20180723+ #141 SMP Mon Jul 23 22:11:47 CEST
> > > 2018 i686 GNU/Linux
> > > 
> > > It will correct itself if I unplug/replug the AC adapter, I
> > > believe. Gnome2 battery monitor also looks confused.
> Have you tested your patches? If so, on what hardware? Does
> /proc/acpi/battery work for you after bootup?

I tested both sysfs and procfs on a Skylake system. But I missed this test case :( Thank you for
reporting and testing it.

> > 1. What is the system's DMI info (sudo dmidecode -s system-manufacturer; sudo dmidecode -s
> > system-
> > product-name)? Some hardware quirks exists.
> Thinkpad X60.
> 
> > 2. Do the sysfs /sys/class/power_supply/BAT0/* attributes work? The /procfs interface is
> > deprecated.
> You still can't break them.

Sorry didn't mean to imply that. I asked just to help isolate where the issue was.

> > 4. Does the battery status update when you either disconnect or connect the charger? The ACPI
> > firmware should send a notify event to the kernel to update the battery tables.
> You know, looking at your patches, it seems pretty clear how they
> could break stuff. Let me just revert them.

Can you help me understand how? On acpi_battery_add() and acpi_battery_update() the battery state is
updated. My 706ac4aa536f change was to use the parameter cache_time, instead of battery-
>update_time, before evaluating time_before() and should not prevent a state update on start-up.

Thanks

Lucas
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux