systemd-udevd does not work as expected using custom rules
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Hi!
In this example I'm using an external USB-Keyboard to trigger a rule on plugin/-off. The same example works in Arch, but not in (K)Ubuntu 16.10.
System:
Thinkpad X220:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.10
Release: 16.10
Codename: yakkety
Kernel: Linux x220 4.8.0-27-generic #29-Ubuntu SMP Thu Oct 20 21:03:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
I used following steps to reproduce:
Check device:
cmd: lsusb
output: Bus 001 Device 005: ID 1267:0103 Logic3 / SpectraVideo plc G-720 Keyboard
cmd: udevadm monitor
1.Plugin keyboard
2.Check shortest path
my example: /devices/
cmd: udevadm -a -p /devices/
output:
SUBSYSTEM=="usb"
ATTR{idProduct}
ATTR{idVendor}
Create rule:
nano /etc/udev/
content: ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}
Test rule:
cmd: udevadm test /devices/
shortened output:
...Reading rules file: /lib/udev/
rules contain 393216 bytes tokens (32768 * 12 bytes), 37025 bytes strings
27127 strings (224162 bytes), 23453 de-duplicated (190812 bytes), 3675 trie nodes used
value '[dmi/id]
value '[dmi/id]
IMPORT builtin 'usb_id' /lib/udev/
IMPORT builtin 'hwdb' /lib/udev/
MODE 0664 /lib/udev/
PROGRAM 'mtp-probe /sys/devices/
starting 'mtp-probe /sys/devices/
'mtp-probe /sys/devices/
Process 'mtp-probe /sys/devices/
RUN '/lib/udev/
RUN '/bin/sh -c '/bin/rm /home/kubuntu/
handling device node '/dev/bus/
preserve permissions /dev/bus/
preserve already existing symlink '/dev/char/189:5' to '../bus/
created db file '/run/udev/
ACTION=add
BUSNUM=001
DEVNAME=
DEVNUM=006
DEVPATH=
DEVTYPE=usb_device
DRIVER=usb
ID_BUS=usb
ID_MODEL=0103
ID_MODEL_ENC=0103
ID_MODEL_
ID_MODEL_ID=0103
ID_REVISION=0101
ID_SERIAL=1267_0103
ID_USB_
ID_VENDOR=1267
ID_VENDOR_ENC=1267
ID_VENDOR_
ID_VENDOR_ID=1267
MAJOR=189
MINOR=5
PRODUCT=
REMOVE_CMD=/bin/sh -c '/bin/rm /home/kubuntu/
SUBSYSTEM=usb
TYPE=0/0/0
USEC_INITIALIZE
run: '/lib/udev/
run: '/bin/sh -c '/usr/bin/touch /home/kubuntu/
Unload module index
Unloaded link configuration context.
I've tried following to load rules:
> udevadm control -R
> systemctl restart systemd-udevd
> reboot
Nothing seems to work. Even after a few days and reboots it keeps the same,
BUT there's a "workaround":
After every reboot use:
systemctl stop systemd-udevd
systemctl start systemd-udevd
and the rule works.
Could anyone give me a hint why this does not work as expected in Kubuntu 16.10 or can confirm this?
Thanks in advance!
no longer affects: | systemd (Ubuntu) |
affects: | ubuntu → systemd (Ubuntu) |
Changed in systemd (Ubuntu): | |
status: | New → Won't Fix |
Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https:/ /wiki.ubuntu. com/Bugs/ FindRightPackag e. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.
To change the source package that this bug is filed about visit https:/ /bugs.launchpad .net/ubuntu/ +bug/1641440/ +editstatus and add the package name in the text box next to the word Package.
[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]