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

Christian Esken esken at kde.org
Tue Aug 2 21:23:04 UTC 2011


Am Samstag, 30. Juli 2011, 18:02:19 schrieb Kevin Ottens:
> On Friday 29 July 2011 20:39:30 Christian Esken wrote:
> 
> > 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.

More precisely the "parent subsystem" (pointing it out to avoid confusion).

> I'll 
> let Alex or Rafael pick it up from there, they definitely know this backend 
> better than me.

I checked this again and can confirm that the parent subsystem actually 
changes between plug/unplug: For "mixer3" there is exactly 1 "add" ACTION, and 
exactly 1 "remove" ACTION. There are more events on plugging for "mixer3", but 
don't carry an "ACTION" attribute.

 Christian


More information about the Kde-hardware-devel mailing list