I played around with several udev rules and inspected the upower source
code. It appears that the kernel (in my case 3.7.0-7-generic) reports
the device with the subsystem 'power_supply' with type 'Battery':
Dec 31 12:39:33 krijg kernel: [117903.350857] power_supply
hid-00:07:61:F7:60:01-battery: driver failed to report `capacity' property: -5
Dec 31 12:39:38 krijg kernel: [117908.343434] power_supply
hid-00:07:61:F7:60:01-battery: driver failed to report `capacity' property: -5
Dec 31 12:39:38 krijg kernel: [117908.364035] hid-generic 0005:046D:B309.0015:
unknown main item tag 0x0
Dec 31 12:39:38 krijg kernel: [117908.404078] input: Logitech diNovo Edge as
/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/bluetooth/hci0/hci0:35/input32
Dec 31 12:39:38 krijg kernel: [117908.404346] hid-generic 0005:046D:B309.0015:
input,hidraw0: BLUETOOTH HID v1.1b Mouse [Logitech diNovo Edge] on
C4:85:08:47:23:C6
Reading the source code for ./linux/up-device-supply.c, it seems that
upower doesn't expect CSR devices to be in the kernel, and therefore
setting the kind as UP_DEVICE_KIND_BATTERY.
A udev rule like the following doesn't convince upower otherwise:
KERNEL=="hid-00:07:61:F7:60:01-battery", SUBSYSTEM=="power_supply",
ENV{UPOWER_VENDOR}="Logitech, Inc.", ENV{UPOWER_PRODUCT}="diNovo Edge",
ENV{UPOWER_BATTERY_TYPE}="keyboard"
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1086746
Title:
Bluetooth keyboard battery interpreted as laptop battery
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/upower/+bug/1086746/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs