Bug 562282

Summary: parallel printer on USB docking station requires annoying trial-and-error workaround
Product: [openSUSE] openSUSE 11.2 Reporter: Peter Küppers <peter-mailbox>
Component: Mobile DevicesAssignee: E-mail List <mobile-bugs>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: jcarricksmith, jsmeix
Version: Final   
Target Milestone: ---   
Hardware: i686   
OS: openSUSE 11.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Peter Küppers 2009-12-10 19:15:49 UTC
User-Agent:       Mozilla/5.0 (en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2

Hello,

I've an old 'HP Laserjet 1100A' printer which is connected via parallel interface to a 'equip 9_1 plus LAN' USB Docking Station.
The docking station is connected to my laptop via USB.

The parallel port of the docking station is recognized as a 'Agere Systems, Inc. (Lucent) USS720 Parallel Port' with module uss720. In plus, I have module usblp loaded.
dependencies of lp, usblp and uss720:
lp                     10276  0
usblp                  14592  0
uss720                 11488  1
parport                40236  4 lp,parport_pc,uss720,ppdev

loading uss720 gives:
uss720: v0.6:USB Parport Cable driver for Cables using the Lucent Technologies USS720 Chip
uss720: NOTE: this is a special purpose driver to allow nonstandard
uss720: protocols (eg. bitbang) over USS720 usb to parallel cables
uss720: If you just want to connect to a printer, use usblp instead

Under openSUSE 11.1, it was possible to connect and run the printer on setting 'FileDevice Yes' in /etc/cups/cupsd.conf and 'DeviceURI file:/dev/usb/lp0' in /etc/cups/printers.conf.
hwinfo --usb said:
...
Hardware Class: printer
  Model: "Agere Systems, Inc. (Lucent) USS720 Parallel Port"
  Hotplug: USB
  Vendor: usb 0x047e "Agere Systems, Inc. (Lucent)"
  Device: usb 0x1001 "USS720 Parallel Port"
  Revision: "1.04"
  Driver: "usblp"
  Driver Modules: "usblp"
  Device File: /dev/usb/lp0
  Device Files: /dev/usb/lp0, /dev/usblp0, /dev/par0
  Device Number: char 180:0
  Speed: 12 Mbps
  Module Alias: "usb:v047Ep1001d0104dc00dsc00dp00ic07isc01ip02"
  Driver Info #0:
    Driver Status: uss720 is active
    Driver Activation Cmd: "modprobe uss720"
  Driver Info #1:
    Driver Status: usblp is active
    Driver Activation Cmd: "modprobe usblp"
...

Under openSUSE 11.2, the printer is not recognized on setting 'FileDevice Yes'. Without it, the printer is recognized as 'DeviceURI hp:/par/HP_LaserJet_1100?device=/dev/parport1' but don't work (dev/parport1 exists, package hplip is installed).
hwinfo says:
...
  Hardware Class: unknown
    Model: "Agere Systems, Inc. (Lucent) USS720 Parallel Port"
  Hotplug: USB
  Vendor: usb 0x047e "Agere Systems, Inc. (Lucent)"
  Device: usb 0x1001 "USS720 Parallel Port"
  Revision: "1.04"
  Driver: "uss720"
  Driver Modules: "uss720"
  Speed: 12 Mbps
  Module Alias: "usb:v047Ep1001d0104dc00dsc00dp00icFFisc00ipFF"
  Driver Info #0:
    Driver Status: uss720 is active
    Driver Activation Cmd: "modprobe uss720"
...

I assume, the printer is not recognized correct anymore.

Any idea?

Peter

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Johannes Meixner 2009-12-11 08:55:45 UTC
This is no "Printing" issue but a lower-level
device communication issue because the printing system
(CUPS and printer drivers) just uses the existing
device communication stuff but the printing system
does not do any kind of setup of the lower level
device communication stuff.

Regarding "printer is recognized as 'DeviceURI
hp:/par/HP_LaserJet_1100?device=/dev/parport1'
but don't work":
Set "LogLevel debug" in cupsd.conf, stop cupsd,
remove /var/log/cups/error_log, start cupsd,
do one single test print and wait one minute,
cp /var/log/cups/error_log /tmp/cups.error_log
and attach /tmp/cups.error_log as MIME type text/plain
to this bug.
Furthermore search in /var/log/messages for error messages
related to hp/hplip/hpmud and parport/ppdev which might
help to find the root cause of the problem and attach
only those error messages as MIME type text/plain to this bug
which look related to this particular issue.
By the way:
My HP LaserJet 1220 which is directly connected via parport
to my workstation does also not work via a "hp:/par/..."
but it works well via the generic CUPS parallel:/dev/lp0 URI
because the latter does simple unidirectional communication
(i.e. that hp:/par/... does not work for you may have
nothing to do with your docking station).

Regarding parallel port <-> USB converters see
https://bugzilla.novell.com/show_bug.cgi?id=264219#c1
but you already did what is described there.

Regarding parport and docking station, have a look at
https://bugzilla.novell.com/show_bug.cgi?id=357400

Perhaps the information therein could be also helpful
in your case but your case is duplicate complicated
because as far as I understand you have

Printer <-> parport at the docking station <-> USB at the laptop

I have no knowledge at all about docking station issues
and therefore I assign it to "Mobile Devices", perhaps
someone there has a better idea how to debug such issues.
Comment 2 Peter Küppers 2009-12-13 20:27:57 UTC
Hello Johannes,

thank's for your help.

The thing with the printer is getting worse.
When I try to install the printer with docking-station (printer->parallel->dockingstation->usb->laptop) via YaST or cups webinterface, the laptop freezes suddenly on detecting the printer. I've found bug 229231, but it didn't gave a solution.
I tested now to install the printer on laptop directly (printer->parallel->laptop) and it works, but only until I connect the docking-station (without printer).
Steps:
- booting
- switch on printer (it works)
- connect docking-station (fails, cause lp- and parport-enumeration changes)
see below.

I suppose, that there is something wrong with udev-configure-printer. That would explain maybe the info from hwinfo --usb (see above)?
Maybe also there is trouble with the uss720 module in this kernel. I get sometimes errors like this:
kernel: [  518.056084] get_1284_register timeout
kernel: [  518.056266] uss720: async_complete: urb error -104

I also tried https://bugzilla.novell.com/show_bug.cgi?id=264219#c1 which worked for me on openSUSE 11.1, but since the printer is no more recognized on /dev/usb/lp0, it don't work.

Cheers

Peter 

<<< begin testing>>>
I've /lib/udev/devices/lp0 ('fixed device') from installation

1st step: booting  (printer connected on laptop parallel port but not switched on)
devices: /dev/lp0, /dev/parport0
lsmod:
parport_pc             40004  0
parport                40236  2 ppdev,parport_pc
/var/log/boot.msg:
parport_pc 00:0a: reported by Plug and Play ACPI
parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,ECP,DMA]
hwinfo --printer: nothing
lpstat -t:
scheduler is running
no system default destination
lpstat: No destinations added.
lpstat: No destinations added.
lpstat: No destinations added.
lpstat: No destinations added.
lpinfo -v:
network socket
network beh
direct hpfax
direct hp
network http
network ipp
network lpd
direct parallel:/dev/lp0
direct scsi
network smb

2nd step: switch on printer
no direct recognition
installation per YaST
devices: /dev/lp0, /dev/parport0
lsmod:
lp                     10276  0
parport_pc             40004  0
parport                40236  3 lp,ppdev,parport_pc
/var/log/messages:
kernel: [  484.721108] lp0: using parport0 (interrupt-driven).
kernel: [  484.727413] lp0: ECP mode
udev-configure-printer: add /module/lp
udev-configure-printer: add /devices/pnp0/00:0a/printer/lp0
laptop udev-configure-printer: Failed to get parent
laptop hp[3779]: io/hpmud/musb.c 1987: invalid usb_open: Permission denied
kernel: [ 1447.769524] parport_pc 00:0a: disabled
kernel: [ 1447.824877] parport1: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
kernel: [ 1447.916069] parport1: Printer, Hewlett-Packard HP LaserJet 1100
kernel: [ 1448.022508] parport_pc 00:0a: activated
kernel: [ 1448.022565] parport_pc 00:0a: reported by Plug and Play ACPI
kernel: [ 1448.022658] parport1: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,ECP,DMA]
kernel: [ 1448.048069] parport1: Printer, Hewlett-Packard HP LaserJet 1100
kernel: [ 1448.119427] lp0: using parport1 (interrupt-driven).
udev-configure-printer: add /devices/pnp0/00:0a/printer/lp0
udev-configure-printer: Failed to get parent
udev-configure-printer: add /module/lp
udev-configure-printer: Failed to get parent
kernel: [ 1547.007021] lp0: ECP mode
hp[22449]: io/hpmud/musb.c 1987: invalid usb_open: Permission denied
/var/log/YaST2/y2log:
[YCP] Printer.ycp:535 Autodetected printers: [$["class":"network", "deviceID":"", "info":"AppSocket/HP JetDirect", "model":"Unknown", "uri":"socket"], $["class":"network", "deviceID":"", "info":"Backend Error Handler", "model":"Unknown", "uri":"beh"], $["class":"direct", "deviceID":"", "info":"HP Fax (HPLIP)", "model":"Unknown", "uri":"hpfax"], $["class":"direct", "deviceID":"MFG:Hewlett-Packard;MDL:HP LaserJet 1100;DES:HP LaserJet 1100A Printer-Copier-Scanner;CMD:MLC,MFPDTF1,PCL,PJL;CLS:PRINTER;REV:1.0;IO PREFS:ECP18;", "info":"HP LaserJet 1100 LPT #1", "model":"HP LaserJet 1100", "uri":"parallel:/dev/lp0"], $["class":"direct", "deviceID":"MFG:Hewlett-Packard;MDL:HP LaserJet 1100;DES:HP LaserJet 1100A Printer-Copier-Scanner;CMD:MLC,MFPDTF1,PCL,PJL;CLS:PRINTER;REV:1.0;IO PREFS:ECP18;", "info":"HP LaserJet 1100 LPT parport0 HPLIP", "model":"HP LaserJet 1100", "uri":"hp:/par/HP_LaserJet_1100?device=/dev/parport0"], $["class":"network", "deviceID":"", "info":"Internet Printing Protocol (http)", "model":"Unknown", "uri":"http"], $["class":"network", "deviceID":"", "info":"Internet Printing Protocol (ipp)", "model":"Unknown", "uri":"ipp"], $["class":"network", "deviceID":"", "info":"LPD/LPR Host or Printer", "model":"Unknown", "uri":"lpd"], $["class":"direct", "deviceID":"", "info":"SCSI Printer", "model":"Unknown", "uri":"scsi"], $["class":"network", "deviceID":"", "info":"Windows Printer via SAMBA", "model":"Unknown", "uri":"smb"], $[]]
[YCP] Printer.ycp:1038 skipped 'hp:/par/' DeviceURI 'hp:/par/HP_LaserJet_1100?device=/dev/parport0'
[YCP] printer/basicadd.ycp:375 Selected connection is: $["class":"direct", "deviceID":"MFG:Hewlett-Packard;MDL:HP LaserJet 1100;DES:HP LaserJet 1100A Printer-Copier-Scanner;CMD:MLC,MFPDTF1,PCL,PJL;CLS:PRINTER;REV:1.0;IO PREFS:ECP18;", "info":"HP LaserJet 1100 LPT #1", "model":"HP LaserJet 1100", "uri":"parallel:/dev/lp0"]
[YCP] printer/basicadd.ycp:384 Drivers for 'HP LaserJet 1100'
hwinfo --printer:
13: Parallel 00.0: 10900 Printer
  [Created at parallel.156]
  Unique ID: 6r1H.U9jKjN2Dfx1
  Parent ID: +X1u.ecK7NLYWZ5D
  Hardware Class: printer
  Model: "Hewlett-Packard HP LaserJet 1100"
  Vendor: "Hewlett-Packard"
  Device: "HP LaserJet 1100"
  Device File: /dev/lp1
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #12 (Parallel controller)
lpstat -t:
scheduler is running
no system default destination
device for hplaserjet1100A: parallel:/dev/lp0
hplaserjet1100A accepting requests since Sun Dec 13 17:43:22 2009
printer hplaserjet1100A is idle.  enabled since Sun Dec 13 17:43:22 2009
lpinfo -v:
network socket
network beh
direct canon:/dev/lp0
direct epson:/dev/lp0
direct hpfax
direct hp:/par/HP_LaserJet_1100?device=/dev/parport1
network http
network ipp
network lpd
direct parallel:/dev/lp0
direct scsi
network smb

3rd step: plug in docking station
devices: /dev/lp0, /dev/lp1, /dev/parport1  /dev/parport2
lsmod:
usblp                  14592  0
lp                     10276  0
uss720                 11488  1
parport_pc             40004  1
parport                40236  4 uss720,lp,parport_pc,ppdev
/var/log/messages:
kernel: [ 1686.600459] parport2: fix this legacy no-device port driver!
kernel: [ 1686.600968] lp1: using parport2 (polling).
kernel: [ 1686.601084] usbcore: registered new interface driver uss720
kernel: [ 1686.601099] uss720: v0.6:USB Parport Cable driver for Cables using the Lucent Technologies USS720 Chip
kernel: [ 1686.601111] uss720: NOTE: this is a special purpose driver to allow nonstandard
kernel: [ 1686.601120] uss720: protocols (eg. bitbang) over USS720 usb to parallel cables
kernel: [ 1686.601129] uss720: If you just want to connect to a printer, use usblp instead
udev-configure-printer: add /devices/virtual/printer/lp1
udev-configure-printer: failed to claim interface
kernel: [ 1686.693540] usbcore: registered new interface driver usblp
udev-configure-printer: failed to claim interface
udev-configure-printer: invalid or missing IEEE 1284 Device ID
udev-configure-printer: Failed to get parent
hwinfo --printer: nothing !!!
lpstat -t:
scheduler is running
no system default destination
device for hplaserjet1100A: parallel:/dev/lp0
hplaserjet1100A accepting requests since Sun Dec 13 17:43:22 2009
printer hplaserjet1100A is idle.  enabled since Sun Dec 13 17:43:22 2009
lpinfo -v:
network socket
network beh
direct canon:/dev/lp0
direct epson:/dev/lp0
direct hpfax
direct parallel:/dev/lp1
direct hp:/par/HP_LaserJet_1100?device=/dev/parport1
network http
network ipp
network lpd
direct parallel:/dev/lp0
direct scsi
network smb

and after a while:
devices: /dev/lp0, /dev/lp1, /dev/parport2  /dev/parport4
/var/log/messages:
kernel: [ 2740.394810] lp0: ECP mode
hp[22613]: io/hpmud/musb.c 1987: invalid usb_open: Permission denied
hp[22613]: io/hpmud/pp.c 627: unable to read device-id ret=-1
python: io/hpmud/pp.c 627: unable to read device-id ret=-1
kernel: [ 2788.815400] parport_pc 00:0a: disabled
kernel: [ 2788.841522] parport3: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
kernel: [ 2788.916061] parport3: Printer, Hewlett-Packard HP LaserJet 1100
kernel: [ 2789.034261] parport_pc 00:0a: activated
kernel: [ 2789.034317] parport_pc 00:0a: reported by Plug and Play ACPI
kernel: [ 2789.034411] parport3: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,ECP,DMA]
kernel: [ 2789.060065] parport3: Printer, Hewlett-Packard HP LaserJet 1100
kernel: [ 2789.133172] lp0: using parport2 (polling).
kernel: [ 2789.133307] lp1: using parport3 (interrupt-driven).
udev-configure-printer: add /module/lp
udev-configure-printer: add /devices/virtual/printer/lp0
udev-configure-printer: Failed to get parent
udev-configure-printer: add /devices/pnp0/00:0a/printer/lp1
udev-configure-printer: Failed to get parent
udev-configure-printer: Failed to get parent
kernel: [ 3054.814163] lp1: ECP mode
hp[22793]: io/hpmud/musb.c 1987: invalid usb_open: Permission denied
<<< end testing>>>
Comment 3 Peter Küppers 2009-12-14 19:17:35 UTC
Hello Johannes,

I've sat back component 'printing', cause I assume it's a cups related thing.

I made some further investigations and had a look in /var/log/YaST2/y2log (cause /var/log/messages and /var/log/cups/error_log didn't show anything with interest).
I found out, that without the docking-station plugged in, 'yast printer' and then 'Add' calls (among other things) /usr/lib/YaST2/bin/autodetect_printers.
Within this, lpstat and lpinfo are called with different parameters.

Then I made tests on the command line with this commands, different parameters and the docking station plugged in.

And bingo:
lpinfo -v freezes the system!

I've seen some related hints about this in the web, but no solution for this. So, any idea about this?

Peter
Comment 4 Johannes Meixner 2009-12-15 08:16:03 UTC
"laptop freezes suddenly on detecting the printer"
has nothing to do with bug #229231 which is only
about a hangup in an old yast2-printer.

A complete and sudden machine freeze (i.e a stop of the kernel)
is again a low level issue.

When it works directly (printer->parallel->laptop)
it proves that it works regarding the printing system
(i.e. when the low level parpoprt stuff works, the
printing system works too - of course).

When it does not work with the docking-station in between
it is a lower level issue that the communicatin via 
parport and/or USB does not work normally with the
docking-station in between and of course you see
then various errors in the printing system layer
as a consequence.

udev-configure-printer is a only magic full automated
printer setup tool and when it fails the only consequence
is that you won't have an automated printer setup.
In your case I recomend to remove the udev-configure-printer RPM
(you could use in yast2-printer the "Autoconfig Settings")
to get it out of your way because in your case it doesn't work
and in the worst case it might even cause whatever unexpected
trouble.

Because of all this it is not an issue in the printing system
but a lower-level device communication issue because
the printing system (CUPS and printer drivers)
uses the existing device communication stuff
but the printing system does not do any kind of setup
of the lower level device communication stuff.

Perhaps it might be even a kernel related issue but
I have no knowledge at all about docking station issues
and therefore I assign it back to "Mobile Devices", hopefully
someone there has better knowledge how to debug such issues.


From what I see in your log messages:

Without the docking-station in between you have
------------------------------------------------------------------
kernel: ... parport1: Printer, Hewlett-Packard HP LaserJet 1100
...
kernel: [ 1448.119427] lp0: using parport1 (interrupt-driven).
------------------------------------------------------------------
and the device communication works via /dev/lp0 and
the CUPS device URI is accordingly parallel:/dev/lp0

But with the docking-station in between you have
------------------------------------------------------------------
kernel: ... parport3: Printer, Hewlett-Packard HP LaserJet 1100
...
kernel: ... lp1: using parport3 (interrupt-driven).
------------------------------------------------------------------
so that with the docking-station in between the number
of the parport where the printer is connected to has changed
so that device communication may now works via /dev/lp1 and
a matching CUPS device URI of parallel:/dev/lp1

Test if device communication works via /dev/lp1 according to
http://en.opensuse.org/SDB:Installing_a_Printer
as root with
  echo -en "\rHello\r\f" >/dev/lp1

To change the CUPS device URI use as root
  lpadmin -p hplaserjet1100A -v parallel:/dev/lp1

Please report if it works via /dev/lp1.
Comment 5 Johannes Meixner 2009-12-15 08:41:07 UTC
To analyze what in "lpinfo -v" lets the system freeze:

Basically "lpinfo -v" lets the cupsd launch the cups-deviced, see
http://www.cups.org/documentation.php/doc-1.3/man-cups-deviced.html
which calls each executable file in /usr/lib/cups/backend
without parameters.

When a CUPS backenmd is called without parameters, it does
autodetection, see "man 7 backend".

I assume one of those backends lets the system freeze
when it does autodetection.

I guess it is the parallel or usb backend.

As root call each executable file in /usr/lib/cups/backend
until you found the one which lets your system freeze.

Usually it works as follows:

root@host# /usr/lib/cups/backend/usb 
direct usb://HP/LaserJet%201100

root@host# /usr/lib/cups/backend/parallel 
direct parallel:/dev/lp0

In particular reagrding the parallel port:
Note that wrong parport_pc settings in /etc/modprobe.conf
(i.e. settings which do not match to your actual hardware)
can cause the kernel to freeze because those settings
are direct hardware settings (DMA, IO-port, interrupt)
and wrong hardware settings can of course let the system freeze.

But again I have no knowledge at all about how to find out
what the right parallel port hardware settings are
in case of a docking station.
For a usual PC the settings must match to what is set
in the BIOS of the PC.
But does a docking station have a BIOS where the user
can read and change its values?
Comment 6 Peter Küppers 2009-12-15 09:10:53 UTC
Hello Johannes,

thank's again for your help.

I found out, that the module uss720 (loaded for the parallel port on the docking station) freezes the system.
Removing it and putting it in the blacklist for modprobe let 'yast printer' do the autodetection.
As it's said by the module (on loading):
>>>
uss720: v0.6:USB Parport Cable driver for Cables using the Lucent Technologies
USS720 Chip
uss720: NOTE: this is a special purpose driver to allow nonstandard
uss720: protocols (eg. bitbang) over USS720 usb to parallel cables
uss720: If you just want to connect to a printer, use usblp instead
<<<
So I assume I don't need it.

I'm still struggling a little bit with the result of the autodetection, but I'll give my solution here.

I also will try /usr/lib/cups/backend and give the result.

Peter
Comment 7 Peter Küppers 2009-12-16 20:28:06 UTC
Hello,

and here the results and solution (with uss720 in blacklist):

/usr/lib/cups/backend/usb find anything, neither /hp...

so I added again 'FileDevice Yes' in /etc/cups/cupsd.conf and DeviceURI file://dev/usblp1 in /etc/cups/printers.conf.

The printer works then.

That's a little bit 'dirty', cause cups says:
>>>
Note: File devices are managed by the scheduler. Since the scheduler normally runs as the root user, file devices can be used to overwrite system files and potentially gain unauthorized access to the system. If you must create printers using file devices, we recommend that you set the FileDevice directive to Yes for only as long as you need to add the printers to the system, and then reset the directive to No.
<<<
But for my standalone laptop it's OK.

I'm not sure if I should set the RESOLVED status, so please let me know.

Thank's a lot

Peter
Comment 8 Johannes Meixner 2009-12-17 10:47:10 UTC
From the printing system point of view
the 'FileDevice Yes' workaround is the
currently best possible "solution" because
the root cause is a lower level device communication
issue (otherwise a CUPS backend would autodetect it).

Theoretically there might be a bug in the
lower level device communication software
but from my non-expert point of view it is
more likely that this special hardware is
just not better supported and won't get
better supported unless a software contributor
who has this special hardware could implement
better support for it (if this is possible at all).

Conclusion:
From the current point of view the most reasonable
bug resolution is WONTFIX which means in this case
that the reported issue is indeed a valid issue and
the root cause might even be fixed, but most likely
not with reasonable effort. This would really be a
status TOOEXPENSIVE that Bugzilla does not provide, see
http://en.opensuse.org/Bug_Status_WONTFIX
Comment 9 John Carrick Smith 2010-05-28 17:29:57 UTC
I have an interest in driving a printer via a usb-parallel port converter. My printer worked in openSuse 11.1 but stopped in 11.2. Researching a solution I found on www.linuxhq.com that there was a gap in maintenance of the driver between kernel 2.6.28 and 2.6.33. I don't understand what the patches are doing. I am hoping that openSuse 11.3, with an updated kernel, will restore the functionality which will get my printer working again.

I hope that this might give you some encouragement that the work-around will not be required in near future.

John