[REGRESSION] Services asked for by UDEV do not get triggered
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Release Notes for Ubuntu |
Fix Released
|
Undecided
|
Unassigned | ||
systemd |
New
|
Unknown
|
|||
systemd (Ubuntu) |
Won't Fix
|
Low
|
Unassigned |
Bug Description
The packages system-
/lib/udev/
----------
# Low-level USB device add trigger
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}
# Low-level USB device remove trigger
ACTION=="remove", SUBSYSTEM=="usb", ENV{DEVTYPE}
----------
/lib/udev/
----------
# ippusbxd udev rules file
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}
----------
If I turn on an appropriate printer (USB, supporting IPP-over-USB, here the HP DeskJet 2540) I get in the output of "udevadm monitor --environment"
----------
UDEV [17527.514150] add /devices/
ACTION=add
BUSNUM=002
DEVNAME=
DEVNUM=033
DEVPATH=
DEVTYPE=usb_device
DRIVER=usb
ID_BUS=usb
ID_MODEL=
ID_MODEL_
ID_MODEL_ID=c211
ID_REVISION=0100
ID_SERIAL=
ID_SERIAL_
ID_USB_
ID_VENDOR=HP
ID_VENDOR_ENC=HP
ID_VENDOR_
ID_VENDOR_ID=03f0
MAJOR=189
MINOR=160
PRODUCT=
SEQNUM=9891
SUBSYSTEM=usb
SYSTEMD_
TAGS=:udev-
TYPE=0/0/0
USEC_INITIALIZE
UDEV [17527.517724] add /devices/
.MM_USBIFNUM=00
ACTION=add
DEVPATH=
DEVTYPE=
ID_VENDOR_
INTERFACE=255/204/0
MODALIAS=
PRODUCT=
SEQNUM=9892
SUBSYSTEM=usb
TYPE=0/0/0
USEC_INITIALIZE
UDEV [17527.522565] add /devices/
.MM_USBIFNUM=02
ACTION=add
DEVPATH=
DEVTYPE=
ID_VENDOR_
INTERFACE=255/4/1
MODALIAS=
PRODUCT=
SEQNUM=9895
SUBSYSTEM=usb
TYPE=0/0/0
USEC_INITIALIZE
UDEV [17527.523761] add /devices/
.MM_USBIFNUM=01
ACTION=add
DEVPATH=
DEVTYPE=
DRIVER=usblp
ID_VENDOR_
INTERFACE=7/1/2
MODALIAS=
PRODUCT=
SEQNUM=9893
SUBSYSTEM=usb
TYPE=0/0/0
USEC_INITIALIZE
UDEV [17527.527275] add /devices/
.MM_USBIFNUM=01
ACTION=add
DEVNAME=
DEVPATH=
MAJOR=180
MINOR=1
SEQNUM=9894
SUBSYSTEM=usbmisc
USEC_INITIALIZE
----------
Here one can see that the UDEV rules files are correct, leading to the correct systemd services being requested
SYSTEMD_
but neither the service ippusbxd@
I can start each of these services manually though:
sudo systemctl start 'udev-configure
sudo systemctl start ippusbxd@
In each case ippusbxd gets started for this printer and a print queue auto-created.
What I expect is that the services get automatically started (and that worked in 17.04) so that after plugging in an USB printer I can immediately print as the print queue gets created automatically.
The "udev-configure
This is a regression as we had always automatic setup of USB printers.
tags: | added: rls-aa-incoming |
Changed in systemd: | |
status: | Unknown → New |
Changed in ubuntu-release-notes: | |
status: | New → Fix Released |
Changed in systemd (Ubuntu): | |
importance: | High → Critical |
summary: |
- Services asked for by UDEV do not get triggered + [REGRESSION] Services asked for by UDEV do not get triggered |
tags: | added: regression-release |
Changed in systemd (Ubuntu): | |
importance: | Critical → Low |
Some discussion with xnox on IRC helped me to get to a possible cause of the problem:
journalctl -u udev-configure- printer@ -devices- pci0000: 00-0000: 00:14.0- usb2-2x2d2. service > journalctl-u.txt
gives (file redirection prevents trimming ;lines to terminal width):
---------- pci0000: 00-0000: 00:14.0- usb2-2x2d2) ... printer[ 23296]: add /devices/ pci0000: 00/0000: 00:14.0/ usb2/2x2d2 printer[ 23296]: unable to access /sys/devices/ pci0000: 00/0000: 00:14.0/ usb2/2x2d2 printer@ -devices- pci0000: 00-0000: 00:14.0- usb2-2x2d2. service: Control process exited, code=exited status=1 pci0000: 00-0000: 00:14.0- usb2-2x2d2) . printer@ -devices- pci0000: 00-0000: 00:14.0- usb2-2x2d2. service: Unit entered failed state. printer@ -devices- pci0000: 00-0000: 00:14.0- usb2-2x2d2. service: Failed with result 'exit-code'.
-- Logs begin at Mon 2017-10-09 09:07:44 -03, end at Mon 2017-10-09 12:17:45 -03. --
Oct 09 11:29:17 till-x1carbon systemd[1]: Starting Automatic USB/Bluetooth printer setup (-devices-
Oct 09 11:29:17 till-x1carbon udev-configure-
Oct 09 11:29:17 till-x1carbon udev-configure-
Oct 09 11:29:17 till-x1carbon systemd[1]: udev-configure-
Oct 09 11:29:17 till-x1carbon systemd[1]: Failed to start Automatic USB/Bluetooth printer setup (-devices-
Oct 09 11:29:17 till-x1carbon systemd[1]: udev-configure-
Oct 09 11:29:17 till-x1carbon systemd[1]: udev-configure-
----------
The directory which needs to get accessed by udev-configure- printer is: /sys/devices/ pci0000: 00/0000: 00:14.0/ usb2/2- 2, note that the second last character is a dash. UDEV/systemd(?) inserts for the %i in the second line of the /lib/systemd/ system/ udev-configure- printer@ .service file: -devices- pci0000: 00-0000: 00:14.0- usb2-2x2d2, replacing each slash by a dash and the original dash by "x2d" (should it not be "\x2d"? Not sure what gets inserted for the %I in the ExecStart line, but udev-configure- printer ends up with a /sys/devices/ pci0000: 00/0000: 00:14.0/ usb2/2x2d2 which it does not find as the "x2d" is not turned back into a dash.
This worked in 17.04 so it is a regression.