[Kde-hardware-devel] Re: Not receiving Solid::DeviceNotifier deviceRemoved() SIGNAL

Kevin Ottens ervin at kde.org
Sat Jul 30 18:02:19 CEST 2011


On Friday 29 July 2011 20:39:30 Christian Esken wrote:
> Am Donnerstag, 7. Juli 2011, 23:37:34 schrieb Kevin Ottens:
> > Hello,
> > 
> > Hm, apparently no one picked up that thread...
> > 
> > On Saturday 18 June 2011 17:48:27 Christian Esken wrote:
> > > If somebody can give me a hint where to start I can try to
> > > investigate.
> > > I am quite in a hurry, because I would like to see it fixed in
> > > KDE4.7.
> > 
> > You should try by checking if UDevManager::slotDeviceRemoved() is hit
> > (gdb, breakpoint, etc.) as your device should be handled by the UDev
> > backend now.
> Thanks Kevin. This helped a lot to get me going. I found the source of the
> problem in "d->isOfInterest(device)", and am wondering how and where it can
> be fixed.

Glad it helped! :-)

> UDevManager::slotDeviceRemoved() is hit, but d->isOfInterest(device) doesn't
> fire in slotDeviceRemoved() - while in slotDeviceAdded() it works.
> 
> I dug deeper, and found that the condition in isOfInterest() does not work,
> as the parent subsystem differs. I extended the DETAILED_OUTPUT by showing
> the device.parent().subsystem():
> 
> plug:
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> Path:
> "/sys/devices/pci0000:00/0000:00:13.0/usb5/5-4/5-4:1.0/sound/card3/mixer3"
> Properties: ("UDEV_LOG", "ACTION", "DEVPATH", "SUBSYSTEM", "DEVNAME",
> "SEQNUM", "MAJOR", "MINOR", "TAGS")
>          "UDEV_LOG" : "3"
>          "ACTION" : "add"
>          "DEVPATH" :
> "/devices/pci0000:00/0000:00:13.0/usb5/5-4/5-4:1.0/sound/card3/mixer3"
>          "SUBSYSTEM" : "sound"
>          "DEVNAME" : "/dev/mixer3"
>          "SEQNUM" : "2256"
>          "MAJOR" : "14"
>          "MINOR" : "48"
>          "TAGS" : ":udev-acl:"
> Driver: ""
> Subsystem: "sound"
> Parent Subsystem: "sound"
> 
> 
> Unplug:
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> Path:
> "/sys/devices/pci0000:00/0000:00:13.0/usb5/5-4/5-4:1.0/sound/card3/mixer3"
> Properties: ("UDEV_LOG", "ACTION", "DEVPATH", "SUBSYSTEM", "DEVNAME",
> "SEQNUM", "MAJOR", "MINOR", "TAGS")
>          "UDEV_LOG" : "3"
>          "ACTION" : "remove"
>          "DEVPATH" :
> "/devices/pci0000:00/0000:00:13.0/usb5/5-4/5-4:1.0/sound/card3/mixer3"
>          "SUBSYSTEM" : "sound"
>          "DEVNAME" : "/dev/mixer3"
>          "SEQNUM" : "2232"
>          "MAJOR" : "14"
>          "MINOR" : "48"
>          "TAGS" : ":udev-acl:"
> Driver: ""
> Subsystem: "sound"
> Parent Subsystem: "usb"
> 
> 
> On unplug the parent Subsystem is "usb", while on plug it is "sound".
> Is that a bug, or must the condition be changed?

It's kinda weird that the subsystem changed between plug and unplug... that 
info we get straight from UDev, so I'm not sure if it can be fixed there. I'll 
let Alex or Rafael pick it up from there, they definitely know this backend 
better than me.
 
> PS: I sent this mail a week ago, but have notseen it popping up on the
> mailing list, so I am resnding it.

Yeah, indeed I didn't get the previous one either.

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud patron of KDE, http://www.kdab.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20110730/6d882bdf/attachment.sig 


More information about the Kde-hardware-devel mailing list