Summary: | udevd affected by instance in early user space / does not apply udev rules as expected/logged | ||
---|---|---|---|
Product: | systemd | Reporter: | Tom Yan <tom.ty89> |
Component: | general | Assignee: | Kay Sievers <kay> |
Status: | RESOLVED NOTOURBUG | QA Contact: | systemd-bugs |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
modified trigger service to capture test cases
journalctl -b (without `sleep 1` in udev hook) journalctl -b (with `sleep 1` in udev hook) slightly modified systemd-udev-trigger.service used for attached journals |
Description
Tom Yan
2015-04-15 19:49:39 UTC
Created attachment 115091 [details]
journalctl -b (without `sleep 1` in udev hook)
Created attachment 115092 [details]
journalctl -b (with `sleep 1` in udev hook)
Created attachment 115093 [details]
slightly modified systemd-udev-trigger.service used for attached journals
command order reversed from the original. see main report for reason
According to the discussion here: http://www.spinics.net/lists/linux-usb/msg124033.html, the hid-generic module is responsible for setting the default value to "enabled". From my further testings, I can see that, if the hid-generic module is not loaded in early user space, either because the time is not enough, or it is excluded/blacklisted from/in the initcpio (while sufficient time is given, e.g. sleep 5), the udev rule applied would be overrided by the behaviour of the module; while if it is loaded before, that would not happen. Then I run the following command after the udev rules are properly applied: # modprobe -r hid-generic; modprobe hid-generic The result is, the value is set to "enabled" again. So it seems that THE ACTUAL PROBLEM IS: udevd apply the udev rule before hid-generic is loaded. BUT this is true ONLY IF if it's a fact, the module won't be loaded again later if (or loaded in the same way as) the module is loaded in the early user space, which I am not sure about. That really feels like broken behaviour of the hid-generic kernel module, I don't think we can do much about this in the systemd context. Please file a bug against this module in the kernel bugzilla! Actually I do agree with you that it's better to fix it in the kernel. I'm also discussing this on the linux-usb mailing list. http://lxr.free-electrons.com/ident?i=device_set_wakeup_enable However all drivers with this (and potentially other similar functions) will probably cause the same issue, so I was wondering if there's any possiblity for udev to have a workaround. Na, systemd/udev are not the place for workarounds around other software really. Sorry. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.