From mboxrd@z Thu Jan 1 00:00:00 1970 From: Evangelos Foutras Date: Tue, 20 Oct 2009 11:59:54 +0000 Subject: Re: group is not set properly for usb printer for older kernels Message-Id: <4ADDA63A.1020907@gmail.com> List-Id: References: <20091008191201.19276c15@workstation64.home> In-Reply-To: <20091008191201.19276c15@workstation64.home> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Matthias Schwarzott wrote: > On Donnerstag, 15. Oktober 2009, Evangelos Foutras wrote: > >> Kay Sievers wrote: >> >>> On Tue, Oct 13, 2009 at 05:30, Evangelos Foutras >>> > wrote: > >>>> I set udev's loglevel to "debug" and saw something interesting in my >>>> logs [1] after turning on the printer. Specifically, the following line >>>> appears to be of interest: >>>> >>>> Oct 12 19:38:26 foutboxd udevd-work[7541]: '/lib/udev/usb_id' (stderr) >>>> 'error opening USB device 'descriptors' file' >>>> >>>> Maybe the 'descriptors' file hasn't been created when the udev rules >>>> fire? I think this would explain why subsequent calls to udevadm >>>> test/trigger apply the correct group to the printer. >>>> >>> Yes, that might be. There have been numerous fixes to recent kernel >>> versions to address issues like this. You could try to set up rules >>> with WAIT_FOR_SYSFS="..." to possibly work around that on older kernel >>> versions. >>> >> I tried your suggestion and placing WAIT_FOR_SYSFS="descriptors" before >> the IMPORT does produce the desired behavior (awesome!). If it's not >> clear, I'm referring to line 69 in 50-udev-default.rules [1]. >> >> Any chance of applying this modification to udev.git? :) >> >> > So adding this rule anywhere before line 69 will help? > SUBSYSTEM="usb", ENV{DEVTYPE}="usb_device", WAIT_FOR_SYSFS="descriptors" > > If yes, I am going to add it to the gentoo ruleset. > > Regards > Matthias > That works too.