Re: HID battery strength does not emit power_suppy udev events

2 messages, 2 authors, 2013-01-01 · open the first message on its own page

Re: HID battery strength does not emit power_suppy udev events

From: Daniel Nicoletti <hidden>
Date: 2012-12-28 00:22:26

Hi, I've sent this message a while ago but forgot to add
linux-input, I'm really willing to give it a final fix to the issue
but I need directions, I really can't see what's wrong with
the udev thing, so again (with linux-input):

The problem is that when a HID device that has a battery
is added to the system it doesn't emit the udev events
for the battery added or removed, which breaks upower..

I reviewed all my previous patch, looked at input-wacom
to see if they did it differently for the battery issue, but
I couldn't find any problem, since I don't have a wacom
tablet maybe it also has the udev bug.

Well I looked through a lots of kernel code paths,
but the best I could find was:

"int kobject_uevent(struct kobject *kobj, enum kobject_action action);

Use the KOBJ_ADD action for when the kobject is first added to the kernel.
This should be done only after any attributes or children of the kobject
have been initialized properly, as userspace will instantly start to look
for them when this call happens."

Which might mean that a call like
kobject_uevent(&dev->kobj, KOBJ_ADD);
that I could only find in base/core.c is called
before the hid power_supply is registered,
I'm not a kernel dev so I might be totally wrong,
I also don't know the exact code path when the
device is added, could someone please give me
a hand on this?

Thanks,

--
Daniel Nicoletti

KDE Developer - http://dantti.wordpress.com

Re: HID battery strength does not emit power_suppy udev events

From: Przemo Firszt <hidden>
Date: 2013-01-01 20:34:05

Dnia 2012-12-27, czw o godzinie 22:16 -0200, Daniel Nicoletti pisze:
Hi, I've sent this message a while ago but forgot to add
linux-input, I'm really willing to give it a final fix to the issue
but I need directions, I really can't see what's wrong with
the udev thing, so again (with linux-input):

The problem is that when a HID device that has a battery
is added to the system it doesn't emit the udev events
for the battery added or removed, which breaks upower..s
Hi Daniel,
I have a wacom device with battery. A "udevadm monitor" report when
connecting Intuos4 Wireless over bluetooth: http://pastebin.com/zyaXeqcS

Battery state is only updated when the tablet is in use. 

What kind of problems you have? Intuos4 Wireless battery reporting seems
to be working fine (except wrong name, but that's a gnome issue) 
-- 
Kind regards,
Przemo Firszt

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help