[Bug 1753145] [NEW] udevadm info prints unuseful property names
david braun
1753145 at bugs.launchpad.net
Sat Mar 3 18:42:08 UTC 2018
Public bug reported:
udevadm info prints properties with names that aren't recognized in udev
rules files. This makes it difficult to write rules using this
information. For instance, to print infomation fo a particular serial
device one might do the following
udevadm info /dev/ttySCM0
producing
P: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/tty/ttyACM0
N: ttyACM0
S: serial/by-id/usb-Seeed__www.seeed.cc__Seeeduino_v4_95635333131351F0A1B2-if00
S: serial/by-path/pci-0000:00:1a.0-usb-0:1.3:1.0
S: ttyARD1
E: DEVLINKS=/dev/serial/by-id/usb-Seeed__www.seeed.cc__Seeeduino_v4_95635333131351F0A1B2-if00 /dev/serial/by-path/pci-0000:00:1a.0-usb-0:1.3:1.0 /dev/ttyARD1
E: DEVNAME=/dev/ttyACM0
E: DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/tty/ttyACM0
E: ID_BUS=usb
E: ID_MM_CANDIDATE=1
E: ID_MODEL=Seeeduino_v4
E: ID_MODEL_ENC=Seeeduino\x20v4
E: ID_MODEL_FROM_DATABASE=6 Series/C200 Series Chipset Family USB Enhanced Host Controller
E: ID_MODEL_ID=0004
E: ID_PATH=pci-0000:00:1a.0-usb-0:1.3:1.0
E: ID_PATH_TAG=pci-0000_00_1a_0-usb-0_1_3_1_0
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
E: ID_PCI_INTERFACE_FROM_DATABASE=EHCI
E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
E: ID_REVISION=0001
E: ID_SERIAL=Seeed__www.seeed.cc__Seeeduino_v4_95635333131351F0A1B2
E: ID_SERIAL_SHORT=95635333131351F0A1B2
E: ID_TYPE=generic
E: ID_USB_CLASS_FROM_DATABASE=Communications
E: ID_USB_DRIVER=cdc_acm
E: ID_USB_INTERFACES=:020201:0a0000:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=Seeed__www.seeed.cc_
E: ID_VENDOR_ENC=Seeed\x20\x28www.seeed.cc\x29
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
E: ID_VENDOR_ID=2886
E: MAJOR=166
E: MINOR=0
E: SUBSYSTEM=tty
E: TAGS=:systemd:
E: USEC_INITIALIZED=64897955420
The properties that are needed to write a rule for this device to create
a stable symbolic link are
E: ID_MODEL_ID=0004
E: ID_SERIAL_SHORT=95635333131351F0A1B2
E: ID_VENDOR_ID=2886
To use these in a udev rule one needs to write
SUBSYSTEM=="tty", ATTRS{idVendor}=="2886", ATTRS{idProduct}=="0004",
ATTRS{serial}=="95635333131351F0A1B2", SYMLINK+="ttyARD0"
If one enters
udevadm info -a /dev/ttyACM0
one gets the whole tree of devices from /dev/ttyACM0 to the PCI device
for the USB host controller (more that 150 lines of babble for 7
devices). These parameter/property names are all printed in rules file
format (e.g. ATTRS{serial}="95635333131351F0A1B2") but it's impossible
to know which are the correct ones.
In fact if one tries to filter just the parameters needed for the rule
with
udevadm info -a /dev/ttyACM0 | grep -e vendor -e product -e serial
you get
ATTRS{product}=="Seeeduino v4"
ATTRS{serial}=="95635333131351F0A1B2"
ATTRS{product}=="EHCI Host Controller"
ATTRS{serial}=="0000:00:1a.0"
ATTRS{subsystem_vendor}=="0x1028"
ATTRS{vendor}=="0x8086"
which doesn't even list the values needed for the rule: idVendor
(corresponding to ID_VENDOR_ID) is missing as is idProduct
(corresponding to ID_MODEL_ID) and there are multiple "serial"
parameters.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: udev 229-4ubuntu21.1
ProcVersionSignature: Ubuntu 4.13.0-36.40~16.04.1-generic 4.13.13
Uname: Linux 4.13.0-36-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: amd64
CurrentDesktop: Unity
CustomUdevRuleFiles: 56-hpmud.rules 60-vboxdrv.rules .swp 99-usb-serial.rules
Date: Sat Mar 3 13:14:52 2018
EcryptfsInUse: Yes
InstallationDate: Installed on 2018-01-30 (31 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
MachineType: Dell Inc. OptiPlex 790
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.13.0-36-generic root=UUID=c43d6f43-8845-4b4c-9311-3826e5aae32e ro quiet splash vt.handoff=7
SourcePackage: systemd
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 05/28/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A05
dmi.board.name: 0HY9JP
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 6
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA05:bd05/28/2011:svnDellInc.:pnOptiPlex790:pvr01:rvnDellInc.:rn0HY9JP:rvrA00:cvnDellInc.:ct6:cvr:
dmi.product.name: OptiPlex 790
dmi.product.version: 01
dmi.sys.vendor: Dell Inc.
** Affects: systemd (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug xenial
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1753145
Title:
udevadm info prints unuseful property names
Status in systemd package in Ubuntu:
New
Bug description:
udevadm info prints properties with names that aren't recognized in
udev rules files. This makes it difficult to write rules using this
information. For instance, to print infomation fo a particular serial
device one might do the following
udevadm info /dev/ttySCM0
producing
P: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/tty/ttyACM0
N: ttyACM0
S: serial/by-id/usb-Seeed__www.seeed.cc__Seeeduino_v4_95635333131351F0A1B2-if00
S: serial/by-path/pci-0000:00:1a.0-usb-0:1.3:1.0
S: ttyARD1
E: DEVLINKS=/dev/serial/by-id/usb-Seeed__www.seeed.cc__Seeeduino_v4_95635333131351F0A1B2-if00 /dev/serial/by-path/pci-0000:00:1a.0-usb-0:1.3:1.0 /dev/ttyARD1
E: DEVNAME=/dev/ttyACM0
E: DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/tty/ttyACM0
E: ID_BUS=usb
E: ID_MM_CANDIDATE=1
E: ID_MODEL=Seeeduino_v4
E: ID_MODEL_ENC=Seeeduino\x20v4
E: ID_MODEL_FROM_DATABASE=6 Series/C200 Series Chipset Family USB Enhanced Host Controller
E: ID_MODEL_ID=0004
E: ID_PATH=pci-0000:00:1a.0-usb-0:1.3:1.0
E: ID_PATH_TAG=pci-0000_00_1a_0-usb-0_1_3_1_0
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
E: ID_PCI_INTERFACE_FROM_DATABASE=EHCI
E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
E: ID_REVISION=0001
E: ID_SERIAL=Seeed__www.seeed.cc__Seeeduino_v4_95635333131351F0A1B2
E: ID_SERIAL_SHORT=95635333131351F0A1B2
E: ID_TYPE=generic
E: ID_USB_CLASS_FROM_DATABASE=Communications
E: ID_USB_DRIVER=cdc_acm
E: ID_USB_INTERFACES=:020201:0a0000:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=Seeed__www.seeed.cc_
E: ID_VENDOR_ENC=Seeed\x20\x28www.seeed.cc\x29
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
E: ID_VENDOR_ID=2886
E: MAJOR=166
E: MINOR=0
E: SUBSYSTEM=tty
E: TAGS=:systemd:
E: USEC_INITIALIZED=64897955420
The properties that are needed to write a rule for this device to
create a stable symbolic link are
E: ID_MODEL_ID=0004
E: ID_SERIAL_SHORT=95635333131351F0A1B2
E: ID_VENDOR_ID=2886
To use these in a udev rule one needs to write
SUBSYSTEM=="tty", ATTRS{idVendor}=="2886", ATTRS{idProduct}=="0004",
ATTRS{serial}=="95635333131351F0A1B2", SYMLINK+="ttyARD0"
If one enters
udevadm info -a /dev/ttyACM0
one gets the whole tree of devices from /dev/ttyACM0 to the PCI device
for the USB host controller (more that 150 lines of babble for 7
devices). These parameter/property names are all printed in rules file
format (e.g. ATTRS{serial}="95635333131351F0A1B2") but it's impossible
to know which are the correct ones.
In fact if one tries to filter just the parameters needed for the rule
with
udevadm info -a /dev/ttyACM0 | grep -e vendor -e product -e
serial
you get
ATTRS{product}=="Seeeduino v4"
ATTRS{serial}=="95635333131351F0A1B2"
ATTRS{product}=="EHCI Host Controller"
ATTRS{serial}=="0000:00:1a.0"
ATTRS{subsystem_vendor}=="0x1028"
ATTRS{vendor}=="0x8086"
which doesn't even list the values needed for the rule: idVendor
(corresponding to ID_VENDOR_ID) is missing as is idProduct
(corresponding to ID_MODEL_ID) and there are multiple "serial"
parameters.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: udev 229-4ubuntu21.1
ProcVersionSignature: Ubuntu 4.13.0-36.40~16.04.1-generic 4.13.13
Uname: Linux 4.13.0-36-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: amd64
CurrentDesktop: Unity
CustomUdevRuleFiles: 56-hpmud.rules 60-vboxdrv.rules .swp 99-usb-serial.rules
Date: Sat Mar 3 13:14:52 2018
EcryptfsInUse: Yes
InstallationDate: Installed on 2018-01-30 (31 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
MachineType: Dell Inc. OptiPlex 790
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.13.0-36-generic root=UUID=c43d6f43-8845-4b4c-9311-3826e5aae32e ro quiet splash vt.handoff=7
SourcePackage: systemd
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 05/28/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A05
dmi.board.name: 0HY9JP
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 6
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA05:bd05/28/2011:svnDellInc.:pnOptiPlex790:pvr01:rvnDellInc.:rn0HY9JP:rvrA00:cvnDellInc.:ct6:cvr:
dmi.product.name: OptiPlex 790
dmi.product.version: 01
dmi.sys.vendor: Dell Inc.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1753145/+subscriptions
More information about the foundations-bugs
mailing list