Bug 744076

Summary: USB to Parallel Port dongle not fully initialized at boot (udev-configure-printer failure)
Product: [openSUSE] openSUSE 12.1 Reporter: Forgotten User xdG2V-P5g9 <forgotten_xdG2V-P5g9>
Component: BasesystemAssignee: Dominique Leuenberger <dimstar>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: forgotten_l5QCzUHucG, forgotten_xdG2V-P5g9, jslaby, oneukum, rmilasan
Version: Final   
Target Milestone: ---   
Hardware: PC   
OS: openSUSE 12.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Forgotten User xdG2V-P5g9 2012-01-30 13:21:55 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) konqueror/4.7.2 Safari/534.34

I have USB to Parallel Port dongle (noname, Prolific chip inside) with a parallel printer connected. If this dongle is inserted at boot moment, it is recognized and a kernel module usblp is loaded but no device file /dev/usblp0 created. Without it I can't use the printer. The dmesg output is:
...
[    1.484040] usb 6-2: new full speed USB device number 2 using ohci_hcd
[    1.633170] usb 6-2: New USB device found, idVendor=067b, idProduct=2305
[    1.633173] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.633174] usb 6-2: Product: IEEE-1284 Controller
[    1.633176] usb 6-2: Manufacturer: Prはlific Technology Inc.
[...
If I remove a dongle and insert it again, the device file is created and I can use the printer (with some manual changes in cups configuration). The dmesg output is now:
...
[  416.485317] usb 6-2: USB disconnect, device number 2
[  419.842112] usb 6-3: new full speed USB device number 3 using ohci_hcd
[  419.990242] usb 6-3: New USB device found, idVendor=067b, idProduct=2305
[  419.990251] usb 6-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  419.990258] usb 6-3: Product: IEEE-1284 Controller
[  419.990263] usb 6-3: Manufacturer: Prはlific Technology Inc.
[  424.994806] usblp0: USB Bidirectional printer dev 3 if 0 alt 1 proto 2 vid 0x067B pid 0x2305


Reproducible: Always

Steps to Reproduce:
1. Boot the computer with the dongle connected
2. ls /dev/usblp*
3. Remove the dongle from the computer, connect it back and wait for driver reload
4. ls /dev/usblp*
Actual Results:  
No file in first try

/dev/usblp0
in the second try
Comment 1 Jiri Slaby 2012-02-07 10:10:32 UTC
(In reply to comment #0)
> Steps to Reproduce:
> 1. Boot the computer with the dongle connected
> 2. ls /dev/usblp*
> 3. Remove the dongle from the computer, connect it back and wait for driver
> reload
> 4. ls /dev/usblp*

Hmm... Is this a kernel or udev issue?
Comment 2 Oliver Neukum 2012-02-07 14:34:14 UTC
Could be both. usblp would log something if probe succeeded.
Comment 3 Jiri Slaby 2012-02-07 16:34:18 UTC
(In reply to comment #2)
> usblp would log something if probe succeeded.

Does it?
Comment 4 Jiri Slaby 2012-04-24 07:59:25 UTC
Closing due to lack of response.
Comment 5 Forgotten User l5QCzUHucG 2012-07-11 19:48:14 UTC
Hi Jiri,

I'm not the original reported but I got bitten by this as well. My set-up is a HP BusinessInkjet 1200 connected to an box running OpenSuse 12.1 with a USB<->Parallel Port converter cable.

The printer is set-up via Yast2 and I can print a test page successfully.

However, upon reboot, the printer is not properly initialised. It appears that the CUPS daemon has not started or is not responding yet as the dmesg output shows the following:

[   14.754637] udev-configure-printer[690]: add /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0

[   14.754806] udev-configure-printer[690]: device devpath is /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1

[   14.754846] udev-configure-printer[690]: Device vendor/product is 067B:2305

[   14.758783] udev-configure-printer[690]: MFG:HP MDL:HP Business Inkjet 1200 SERN:TH55P34042 serial:-

[   15.034984] usblp0: USB Bidirectional printer dev 3 if 0 alt 1 proto 2 vid 0x067B pid 0x2305

[   15.037050] udev-configure-printer[706]: add /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/usb/lp0

[   16.355480] udev-configure-printer[690]: failed to connect to CUPS server; giving up

I solved this by adding 

rmmod usblp 
modprobe usblp

to my boot.local
The printer now works as expected.

So it doesn't look like a kernel issue as such and more like a timing issue with respect to the start-up of the cups daemon but that's just a wild guess on my part.
Comment 6 Jiri Slaby 2012-07-11 20:16:36 UTC
(In reply to comment #5)
> udev-configure-printer[706]: add /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/usb/lp0
> udev-configure-printer[690]: failed to connect to CUPS server; giving up

Nothing for us => reassigning.
Comment 7 Robert Milasan 2012-07-12 06:29:33 UTC
Well according to the error this doesn't look like udev issue and udev-configure-printer is a different package, it doesn't belong to udev.

Also an idea would be to add usblp to initrd.

Maybe adding the maintainer of udev-configure-printer would be a good idea.
Comment 8 Jiri Slaby 2012-07-12 07:31:58 UTC
(In reply to comment #7)
> Also an idea would be to add usblp to initrd.

Steve, could you add usblp to INITRD_MODULES in /etc/sysconfig/kernel and regenerate initrds using mkinitrd if that makes a difference?

> Maybe adding the maintainer of udev-configure-printer would be a good idea.

Ah, ok. The name confused me.
Comment 9 Robert Milasan 2012-07-12 07:50:09 UTC
Sorry, the actual package name is system-config-printer and udev-configure-printer is part of it.
Comment 10 Forgotten User l5QCzUHucG 2012-07-13 18:23:21 UTC
Hi Jiri,

So I removed my boot.local workaround and added usblp to the appropriate section via Yast (which ran mkinitrd). Unfortunately, it did not make any difference.
dmesg shows exactly the same error message as in Comment 5

Re-enabling my boot.local solution brings the printer back on-line.

Any other info that I can provide you with?

Cheers,
 Steve
Comment 11 Dominique Leuenberger 2012-07-20 18:06:25 UTC
Steve,

Thank you very much for your report and time on this issue.
From the description, this indeed looks like a racing condition between udev-configure-printer and cups starting up.

There is a slight chance that this might improve in openSUSE 12.2, when booting systemd, as the startup of services is triggered in various ways. As such, udev-configure-printer would be an own systemd service there, triggered to load up cups first (I just submitted a system-config-printer package which actually installs the systemd service files, to GNOME:Factory for review)
Comment 12 Bernhard Wiedemann 2012-07-21 15:00:13 UTC
This is an autogenerated message for OBS integration:
This bug (744076) was mentioned in
https://build.opensuse.org/request/show/128567 Factory / system-config-printer
Comment 13 Dominique Leuenberger 2012-08-06 10:06:55 UTC
Marking resolved (for 12.2 at least).

the startup logic is largely changed by the use of systemd.