[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: battery.el broken?
From: |
T.V Raman |
Subject: |
Re: battery.el broken? |
Date: |
Fri, 11 Jun 2021 07:30:09 -0700 |
yes, looks like some upower dbus bug; separatley, for the longest
time the dbus api has been reporting AC power connect/disconnect
*much* after the event.
It's pretty broken, and not Emacs' fault.
the upower commandline utility gives the right value by the way
Basil L. Contovounesios writes:
> "T.V Raman" <raman@google.com> writes:
>
> > I am mostly convinced this is a dbus/upower bug since I too checked and
> > nothing has changed on the Emacs side on the machine, still running
> > Emacs from Github@HEAD.
> >
> > Will now try some of the other status functions, I think the output
> > stopped telling me time left likely a couple of days ago.
> >
> > Typing this with the machine fully charged and not plugged into the AC
> > jack, but the upower output shown below appears to think it's on AC
> > Power.
> >
> > battery-status-function == battery-upower
> >
> > (mapcar #'battery--upower-device-properties
> > (battery--upower-devices)
> > )
> >
> > ((("NativePath" . "AC") ("Vendor" . "") ("Model" . "") ("Serial" . "")
> > ("UpdateTime" . 1622943939) ("Type" . 1) ("PowerSupply" . t) ("HasHistory")
> > ("HasStatistics") ("Online") ("Energy" . 0.0) ("EnergyEmpty" . 0.0) ...)
> > (("NativePath" . "BAT0") ("Vendor" . "SMP") ("Model" . "01AV431") ("Serial"
> > . "5195") ("UpdateTime" . 1622944181) ("Type" . 2) ("PowerSupply" . t)
> > ("HasHistory" . t) ("HasStatistics" . t) ("Online") ("Energy" . 51.36)
> > ("EnergyEmpty" . 0.0) ...) (("NativePath" . "ucsi-source-psy-USBC000:001")
> > ("Vendor" . "") ("Model" . "") ("Serial" . "") ("UpdateTime" . 1622943939)
> > ("Type" . 1) ("PowerSupply" . t) ("HasHistory") ("HasStatistics")
> > ("Online" . t)
> > ("Energy" . 0.0) ("EnergyEmpty" . 0.0) ...) (("NativePath"
> > . "ucsi-source-psy-USBC000:002") ("Vendor" . "") ("Model" . "") ("Serial"
> > . "")
> > ("UpdateTime" . 1622943940) ("Type" . 1) ("PowerSupply" . t) ("HasHistory")
> > ("HasStatistics") ("Online") ("Energy" . 0.0) ("EnergyEmpty" . 0.0) ...))
>
> Hm, did you always have those ucsi-source-psy entries? Searching for
> them online led me to the following relatively recent discussions on
> USB-C power sources, UPower, and Linux:
>
> https://forum.manjaro.org/t/upowerd-not-recognising-usb-c-path-charger-is-usb-c
> https://gitlab.freedesktop.org/upower/upower/-/issues/126
> https://bugs.launchpad.net/ubuntu/+source/upower/+bug/1891799
>
> In particular I notice that the first of the two ucsi-source-psy entries
> says ("Online" . t), which seems contradictory and is probably what
> throws battery-upower off.
>
> --
> Basil
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
Re: battery.el broken?, T.V Raman, 2021/06/25