https://bugs.kde.org/show_bug.cgi?id=387454

--- Comment #30 from Stephan Wezel <s.we...@web.de> ---
Hmm something is strange.
The properties reported by udevadm monitor -p when i pluggin the device differs
for the add and bind Action.

For this test I have reverted my workaround.
Here the output for those events

UDEV  [1721.426090] add      /devices/pci0000:00/0000:00:14.0/usb3/3-12 (usb)
ACTION=add
BUSNUM=003
DEVLINKS=/dev/libmtp-3-12
DEVNAME=/dev/bus/usb/003/010
DEVNUM=010
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-12
DEVTYPE=usb_device
DRIVER=usb
ID_BUS=usb
ID_FOR_SEAT=usb-pci-0000_00_14_0-usb-0_12
ID_MEDIA_PLAYER=1
ID_MODEL=Xperia_Z3C
ID_MODEL_ENC=Xperia\x20Z3C
ID_MODEL_FROM_DATABASE=D5803 [Xperia Z3 Compact] (MTP mode)
ID_MODEL_ID=01bb
ID_MTP_DEVICE=1
ID_PATH=pci-0000:00:14.0-usb-0:12
ID_PATH_TAG=pci-0000_00_14_0-usb-0_12
ID_REVISION=0232
ID_SERIAL=Sony_Xperia_Z3C_YT911AT36D
ID_SERIAL_SHORT=YT911AT36D
ID_USB_INTERFACES=:ffff00:
ID_VENDOR=Sony
ID_VENDOR_ENC=Sony
ID_VENDOR_FROM_DATABASE=Sony Ericsson Mobile Communications AB
ID_VENDOR_ID=0fce
MAJOR=189
MINOR=265
PRODUCT=fce/1bb/232
SEQNUM=2495
SUBSYSTEM=usb
TAGS=:seat:uaccess:
TYPE=0/0/0
USEC_INITIALIZED=1721409960


UDEV  [1721.437162] bind     /devices/pci0000:00/0000:00:14.0/usb3/3-12 (usb)
ACTION=bind
BUSNUM=003
DEVNAME=/dev/bus/usb/003/010
DEVNUM=010
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-12
DEVTYPE=usb_device
DRIVER=usb
ID_BUS=usb
ID_MODEL=Xperia_Z3C
ID_MODEL_ENC=Xperia\x20Z3C
ID_MODEL_FROM_DATABASE=D5803 [Xperia Z3 Compact] (MTP mode)
ID_MODEL_ID=01bb
ID_REVISION=0232
ID_SERIAL=Sony_Xperia_Z3C_YT911AT36D
ID_SERIAL_SHORT=YT911AT36D
ID_USB_INTERFACES=:ffff00:
ID_VENDOR=Sony
ID_VENDOR_ENC=Sony
ID_VENDOR_FROM_DATABASE=Sony Ericsson Mobile Communications AB
ID_VENDOR_ID=0fce
MAJOR=189
MINOR=265
PRODUCT=fce/1bb/232
SEQNUM=2497
SUBSYSTEM=usb
TYPE=0/0/0
USEC_INITIALIZED=1721409960

For the "add" action the DEVLINKS and the ID_MTP_DEVICE and ID_MEDIA_PLAYER are
properly setup up

But for the "bind" action those properties are missing.
It seems that solid reacts on the "bind" action with the same (or similar)
logic as the "add" action.
Maybe it updates the stored properties for the plugged in device when the
"bind" action event occures. Through this update the properties DEVLINKS,
ID_MTP_DEVICE and ID_MEDIA_PLAYER gets removed.

Otherwise I cannot understand why the "bind" action has an effect on how the
newly plugged device is seen by solid

Due my workaround those properties are also set for the "bind" action and so
any update done to stored properties doesn't change anything.

But it is also strange that the symlink (defined in the "add" action) is also
not visible.
AFAIK udev itself creates such symlinks when a rules specifies "SYMLINK+="
So it seems that udev self might remove the stored information about e.g.
ID_MTP_DEVICE and also the symlink when the "bind" action occures when the
properties differs from the "add" action

It seems to be an udev/eudev bug. It handles the "bind" action as an
"add/update" action
For udev (under systemd umbrella) I found this bugreport:
https://github.com/systemd/systemd/issues/8221

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to