On Wed, 06 May 2015 14:38:25 -0500 Bruce Dubbs <[email protected]> wrote:
> Hazel Russman wrote: > > On Wed, 06 May 2015 12:40:50 -0500 > > Bruce Dubbs <[email protected]> wrote: > > > >> Hazel Russman wrote: > >>> On Wed, 06 May 2015 11:40:56 -0500 > >>> Bruce Dubbs <[email protected]> wrote: > >>> > >>>> Hazel Russman wrote: > >>>>> Like several people on this list, I have been getting annoying messages > >>>>> at > >>>>> boot time about nonexistent storage devices on empty usb ports. An > >>>>> earlier > >>>>> post by Bruce Dubbs suggested a simple edit of > >>>>> /lib/udev/rules.d/50-udev-default.rules to prevent this. On my LFS7.6 > >>>>> system > >>>>> with systemd, this edit worked very well. > >>>>> > >>>>> However on LFS7.7 with sysvinit, it does not work. Not only do the > >>>>> messages > >>>>> remain, but the change somehow screws up xorg's evdev driver so that > >>>>> neither > >>>>> the mouse nor the keyboard work any more. This means that not only can > >>>>> I not > >>>>> use X but I can't even get back to a console to correct the problem! > >>>>> > >>>>> At first I thought I might have made a typo during the edit, so I tried > >>>>> again > >>>>> by copying the previously edited file from LFS7.6 (where it works > >>>>> perfectly > >>>>> well) to LFS7.7. It turns out the effect is real, though it only shows > >>>>> up > >>>>> after rebooting with the modified file; simply shutting down and > >>>>> restarting X > >>>>> under the new rules doesn't cause problems. > >>>>> > >>>>> A diff run shows that the only difference between the old and the new > >>>>> files > >>>>> is the position of the line ACTION!="add", > >>>>> GOTO="default_permissions_end". > >>>>> > >>>>> Can anyone explain this? > >>>> > >>>> Does it work if you use the unmodified 50-udev-default.rules? > >> > >>> Yes. The file that comes with LFS works perfectly, except for the > >>> spurious warnings. > >> > >> Hmm. Works OK for me. > >> > >>>> The rules that are skipped by the change are: > >>>> > >>>> 1. SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \ > >>>> IMPORT{builtin}="usb_id", \ > >>>> IMPORT{builtin}="hwdb --subsystem=usb" > >>>> > >>>> 2. SUBSYSTEM=="input", ENV{ID_INPUT}=="", \ > >>>> IMPORT{builtin}="input_id" > >>>> > >>>> 3. ENV{MODALIAS}!="", \ > >>>> IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}" > >> > >> One thing to try is to start with the unmodified rules file and add the > >> condition ACTION=="add" to rule 1 above. That would skip the problematic > >> IMPORT{builtin}="usb_id" command that causes the spurious warnings. > > > In the mean time I have done a few more tests and I can definitely say that > the line which is causing the problem in 7.7 is > > SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id" > > > If this is above the skip line, evdev works. The other two rules can safely > come below and be skipped. > > Then move this line above the modified location of the goto line. > > > I don't really understand udev rules, but would I be right in thinking that > the "non-add" events which would lead to this line being skipped include > keystrokes and mouse clicks? Because those are the things which are not > working. > > No. udev really is only meant to create or delete devices in /dev. It also > can > add symlinks or change ownership and permissions. It rarely does some > initialization when a device is created, but that's not it's primary purpose. > > -- Bruce > I've done a few further experiments on this, including building and testing a LFS-7.7-systemd with a skeleton X desktop. There are really two different problems: 1) The spurious error messages at boot. These are associated with the rule SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" and can be prevented in systemd-udev-216 by bypassing this rule except for add events. In systemd-udev-217 they no longer occur at all. However in [e]udev-217 they do, and cannot be prevented by changing the rule. 2) The "evdev bug". This occurs only in [e]udev-217 and not in either of the two systemd-udevs. It is associated with the rule SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id" If this rule is bypassed, xf86-input-evdev no longer works. So it's a bug in eudev, probably in the usb_id builtin function, since this is called in both the problematic rules. Maybe this should be reported upstream? -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
