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

Bug#1109344: /boot/vmlinuz-6.12.35+deb13-amd64: uevent field power_supply/BAT1/uevent:POWER_SUPPLY_CURRENT_NOW now -ve



Hi Bastian, hi Ian,

On Thu, Jul 17, 2025 at 10:35:39PM +0200, Bastian Blank wrote:
> Control: tags -1 wontfix
> Control: close -1
> 
> On Tue, Jul 15, 2025 at 02:36:57PM +0100, Ian Jackson wrote:
> > Note that the previous value was positive, and the new value is
> > negative.  In both cases the laptop was not charging.
> > The negative value makes semantic sense, but I wonder if this change
> > was deliberate.  It seems like precisely the kind of bug-for-bug
> > compatibility thing that Linux normally tries to retain.
> 
> The documentation of Linux specifies the allowed values as:
> 
> | Valid values: Represented in microamps. Negative values are used for
> | discharging batteries, positive values for charging batteries and for
> | USB IBUS current.
> 
> Implementations for other power supplies, current macs for example,
> implement this correctly with negative values for discharging.  So the
> kernel already returns positive or negative numbers depending on the
> exact hardware used.
> 
> After careful consideration, I'm closing this as not a bug.

While preparing the 6.12.39 import (for a future trixie upload) I
noticed that there was a revert of that commit now in 6.12.39, with
the following explanation:

    Revert commit 234f71555019 ("ACPI: battery: negate current when
    discharging") breaks not one but several userspace implementations
    of battery monitoring: Steam and MangoHud. Perhaps it breaks more,
    but those are the two that have been tested.

So apparently more were affected :-/

Regards,
Salvatore


Reply to: