Public bug reported:

I recently upgraded from Ubuntu 17.10 to 18.04 and encountered what appears to 
be a regression in udev. On 17.10 (and previous), the following udev rule to 
rename a USB serial device worked perfectly:
SUBSYSTEMS=="usb", ATTRS{product}=="IOTool", 
ATTRS{manufacturer}=="zplab.wustl.edu", ATTRS{serial}=="0xFFFF", 
SYMLINK+="ttyIOTool"

This would yield symlinks as expected:
> ls -l /dev/ttyIOTool
lrwxrwxrwx 1 root root 7 Jun 26 21:34 /dev/ttyIOTool -> ttyACM1

On 18.04, the same symlinks are made correctly at boot time. However, if
the device is unplugged and then re-plugged, the symlink instead goes to
/dev/bus/usb:

> ls -l /dev/ttyIOTool     
lrwxrwxrwx 1 root root 15 Jun 26 21:33 /dev/ttyIOTool -> bus/usb/003/013

This is a problem, because /dev/bus/usb devices can't be opened as
serial ports in the way that /dev/tty devices can.

However, manually triggering udev via `udevadm trigger` returns the
symlinks to the expected state. I am fairly certain that this behavior
represents a bug, because there shouldn't be any difference in behavior
between an auto-triggered event with a disconnect / reconnect, and one
manually triggered via udevadm trigger, right?

Version information: udevadm --version gives 237 on the 18.04 system
(with this broken behavior) and 234 on an identical 17.10 system with
the correct behavior. On a similar 16.10 system with udevadm version
231, such symlinks also work fine.

Note also that there are several reports of similar udev behavior around the 
web, which have left the users fairly perplexed; e.g.:
https://github.com/psi46/elComandante/issues/14
https://github.com/oskarpearson/mmeowlink/issues/52

Please let me know if there's anything further I can do to help debug
this problem. I can probably work around this by using /dev/serial/by-
id, but if anyone has other workarounds to try (different udev rules,
perhaps?), I would be grateful as well.

** Affects: udev (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1778833

Title:
  tty symlink incorrect after disconnect/reconnect, fixed by manual
  udevadm trigger

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/udev/+bug/1778833/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to