[PATCH] Check if the battery comes from bluetooth keyboard or mouse.
Shih-Yuan Lee (FourDollars)
fourdollars at gmail.com
Thu Aug 29 03:00:32 PDT 2013
Hi,
I'm sorry that previous output of "upowerd -v" is based on the latest
linux kernel (3.2.0-52-generic) on Ubuntu 12.04, and it seems not to
have much information.
So I collect other outputs of "upowerd -v" from 3.5.0-39-generic and
3.8.0-29-generic.
Regards,
$4
On Thu, Aug 29, 2013 at 4:23 PM, Shih-Yuan Lee (FourDollars)
<fourdollars at gmail.com> wrote:
> Hi,
>
> The output of "upowerd -v" (using the latest upstream upower
> version) is in the attachment.
>
> Regards,
> $4
>
> On Wed, Aug 28, 2013 at 8:09 PM, Peter Wu <lekensteyn at gmail.com> wrote:
>> On Wednesday 28 August 2013 10:48:13 Shih-Yuan Lee wrote:
>>> Thank you for your review.
>>>
>>> For https://bugs.launchpad.net/ubuntu/+source/upower/+bug/1153488.
>>> The code base is a little old, so I made two patches for it.
>>> One is
>>> https://launchpadlibrarian.net/146285357/02-try-to-work-out-if-the-device-i
>>> s-powering-the-system.patch to fix the power-supply as you mentioned.
>>> The other is
>>> https://bugs.launchpad.net/ubuntu/+source/upower/+bug/1153488/+attachment/3
>>> 755785/+files/03-detect-bluetooth-keyboard-mouse.patch to fix the type of
>>> battery.
>>>
>>> For this patch, it is only to fix the type of battery.
>>
>> Right, Ubuntu ships with an older version of UPower. As for your patch, have
>> you considered using some udev functions[1] instead? The bluetooth strstr
>> function can probably be replaced by
>> udev_device_get_parent_with_subsystem_devtype and similar for the
>> sysfs_resolve_link?
>>
>> As an alternative for checking for the bluetooth subsystem, what about testing
>> for the HID subsystem in the parents of a power_supply ("battery") device?
>>
>> Can you add output from "upowerd -v" (using the latest upstream upower
>> version)? I want to see which paths are hit.
>>
>> Regards,
>> Peter
>>
>> [1]: http://www.freedesktop.org/software/systemd/libudev/libudev-udev-device.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: upowerd.3.5.0-39-generic.log
Type: application/octet-stream
Size: 39661 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/devkit-devel/attachments/20130829/a7eedf3b/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: upowerd.3.8.0-29-generic.log
Type: application/octet-stream
Size: 35882 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/devkit-devel/attachments/20130829/a7eedf3b/attachment-0003.obj>
More information about the devkit-devel
mailing list