[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221029075832.GA8790@elementary>
Date: Sat, 29 Oct 2022 09:58:32 +0200
From: José Expósito <jose.exposito89@...il.com>
To: Mia Kanashi <chad@...pilled.dev>
Cc: jikos@...nel.org, benjamin.tissoires@...hat.com, spbnick@...il.com,
pobrn@...tonmail.com, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org,
Andreas Grosse <andig.mail@...nline.de>
Subject: Re: [PATCH v2] HID: uclogic: Add support for XP-PEN Deco LW
Hi Mia,
Thanks for testing :D
On Sat, Oct 29, 2022 at 03:28:10AM +0300, Mia Kanashi wrote:
> Hello!
>
> Before device sends a battery report, you can notice garbage values in a power supply capacity.
>
> You can see this by running
> `watch -n0.1 cat /sys/class/power_supply/hid-28bd-935-battery/uevent`
> and then connecting the tablet.
>
> You can set it to a value here, but i think this is a problem in the global hid driver?
That shouldn't be problematic, because the charging status should be
initially set to unknown and change to charging/discharging [1] once
the device sends the first report.
Your desktop environment shouldn't display the battery percentage
while the status is unknown, so the initial values are ignored.
Here is my output of my XP-Pen Deco SW before receiving the battery
percentage:
POWER_SUPPLY_NAME=hid-28bd-933-battery
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_MODEL_NAME=UGTABLET Deco Pro SW
POWER_SUPPLY_SCOPE=Device
And after:
POWER_SUPPLY_NAME=hid-28bd-933-battery
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_CAPACITY=99
POWER_SUPPLY_MODEL_NAME=UGTABLET Deco Pro SW
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_SCOPE=Device
Jose
[1] Actually it should be set to discharging until this gets merged:
https://lore.kernel.org/linux-input/20221028181849.23157-1-jose.exposito89@gmail.com/T/
Powered by blists - more mailing lists