Bluetooth keyboard battery interpreted as laptop battery
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upower (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
My Logitech DiNovo Edge keyboard's internal battery status is available in:
/sys/class/
for the first time ever in Ubuntu 12.10. This would seem like a good thing, except that upower indicator reports it as a regular laptop/system battery, and even proposing to power off my desktop system if the keyboard battery happens to drain completely. That is unacceptable behaviour. I rectified it by manually editing settings-daemon power settings with dconf-editor, so the critical action was set to "nothing". (The regular power system settings GUI would NOT let me select this value, which is pretty strange.)
Here's what upower says:
$ upower -d
Device: /org/freedeskto
native-path: /sys/devices/
model: Logitech diNovo Edge
power supply: no
updated: Wed Dec 5 12:15:38 2012 (27 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: discharging
energy: 0 Wh
energy-empty: 0 Wh
energy-full: 0 Wh
energy-
energy-rate: 0 W
percentage: 35%
capacity: 100%
Daemon:
daemon-version: 0.9.17
can-suspend: yes
can-hibernate no
on-battery: no
on-low-battery: no
lid-is-closed: no
lid-is-present: no
is-docked: no
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: upower 0.9.17-1build1
ProcVersionSign
Uname: Linux 3.5.0-19-generic x86_64
NonfreeKernelMo
ApportVersion: 2.6.1-0ubuntu8
Architecture: amd64
Date: Wed Dec 5 11:55:30 2012
InstallationDate: Installed on 2012-06-02 (185 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
SourcePackage: upower
UpgradeStatus: Upgraded to quantal on 2012-12-04 (0 days ago)
tags: | added: blocks-hwcert-enablement |
While having apport collection info about upower, it made the kernel crash with nullpointer deref in kernel proc khidpd. Reboot failed, kernel was semi-hung afterwords. I suspect the crash might be triggered by reading/probing stuff about bluetooth or whatever. I have no time at the moment to report this as a separate bug, sorry. Traces appended below.
[ 1053.449584] ------------[ cut here ]------------ buildd/ linux-3. 5.0/fs/ sysfs/dir. c:529 sysfs_add_ one+0xca/ 0x100() pci0000: 00/0000: 00:1d.2/ usb8/8- 1/8-1.1/ 8-1.1:1. 0/bluetooth/ hci0/hci0: 11' codec_realtek snd_seq_midi serio_raw snd_rawmidi mceusb rc_core lpc_ich snd_seq_midi_event snd_seq asus_atk0110 snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_device snd_timer mac_hid shpchp snd coretemp soundcore snd_page_alloc x38_edac edac_core lp parport hid_generic firewire_ohci firewire_core usbhid crc_itu_t hid pata_marvell sky2 usb_storage c1f>] warn_slowpath_ common+ 0x7f/0xc0 d16>] warn_slowpath_ fmt+0x46/ 0x50 baa>] sysfs_add_ one+0xca/ 0x100 dd8>] create_ dir+0x78/ 0xd0 166>] sysfs_create_ dir+0x86/ 0xe0 14c>] kobject_ add_internal+ 0x9c/0x220 2c1>] ? vsnprintf+ 0x461/0x600 116>] ? update_ group_power+ 0x26/0x1c0 607>] kobject_ add+0x67/ 0xc0 c66>] device_ add+0x106/ 0x6c0 4b1>] ? dev_set_ name+0x41/ 0x50 465>] hci_conn_ add_sysfs+ 0x45/0x80 [bluetooth] 550>] hci_conn_ complete_ evt.isra. 47+0xd0/ 0x390 [bluetooth] 1e0>] hci_event_ packet+ 0x1720/ 0x2580 [bluetooth] a39>] ? default_ spin_lock_ flags+0x9/ 0x10 84b>] hci_rx_ work+0x1bb/ 0x310 [bluetooth] 0ae>] ? _raw_spin_ lock+0xe/ 0x20 86a>] process_ one_work+ 0x12a/0x420 690>] ? hci_send_ frame+0x90/ 0x90 [bluetooth] 40e>] worker_ thread+ 0x12e/0x2f0 2e0>] ? manage_ workers. isra.26+ 0x200/0x200 f03>] kthread+0x93/0xa0 624>] kernel_ thread_ helper+ 0x4/0x10 e70>] ? kthread_ freezable_ should_ stop+0x70/ 0x70 620>] ? gs_change+0x13/0x13 buildd/ linux-3. 5.0/lib/ kobject. c:19...
[ 1053.449593] WARNING: at /build/
[ 1053.449595] Hardware name: P5E WS Pro
[ 1053.449596] sysfs: cannot create duplicate filename '/devices/
[ 1053.449598] Modules linked in: joydev hidp parport_pc ppdev rfcomm bnep dm_crypt snd_hda_codec_hdmi kvm_intel kvm gpio_ich btusb microcode bluetooth nvidia(PO) snd_hda_
[ 1053.449640] Pid: 62, comm: kworker/u:5 Tainted: P O 3.5.0-19-generic #30-Ubuntu
[ 1053.449642] Call Trace:
[ 1053.449648] [<ffffffff81051
[ 1053.449651] [<ffffffff81051
[ 1053.449655] [<ffffffff811f2
[ 1053.449658] [<ffffffff811f2
[ 1053.449661] [<ffffffff811f3
[ 1053.449665] [<ffffffff8132b
[ 1053.449668] [<ffffffff81334
[ 1053.449672] [<ffffffff8108e
[ 1053.449675] [<ffffffff8132b
[ 1053.449680] [<ffffffff8141c
[ 1053.449683] [<ffffffff8141b
[ 1053.449694] [<ffffffffa0bb4
[ 1053.449702] [<ffffffffa0ba7
[ 1053.449709] [<ffffffffa0baa
[ 1053.449713] [<ffffffff8103f
[ 1053.449719] [<ffffffffa0b9e
[ 1053.449724] [<ffffffff81683
[ 1053.449727] [<ffffffff81070
[ 1053.449733] [<ffffffffa0b9e
[ 1053.449736] [<ffffffff81071
[ 1053.449739] [<ffffffff81071
[ 1053.449742] [<ffffffff81075
[ 1053.449746] [<ffffffff8168c
[ 1053.449749] [<ffffffff81075
[ 1053.449752] [<ffffffff8168c
[ 1053.449754] ---[ end trace 9e712b7e826b5280 ]---
[ 1053.449756] ------------[ cut here ]------------
[ 1053.449760] WARNING: at /build/