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

Christian Esken esken at kde.org
Fri Jul 29 20:39:30 CEST 2011


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.

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?

Best regards,
     Christian

PS: I sent this mail a week ago, but have notseen it popping up on the mailing 
list, so I am resnding it.


More information about the Kde-hardware-devel mailing list