Bug 155474

Summary: HP Deskjet 880c does not work
Product: [openSUSE] SUSE Linux 10.1 Reporter: Ulrich Derenthal <uli.2001>
Component: PrintingAssignee: Johannes Meixner <jsmeix>
Status: RESOLVED DUPLICATE QA Contact: Johannes Meixner <jsmeix>
Severity: Normal    
Priority: P5 - None    
Version: Beta 3   
Target Milestone: ---   
Hardware: x86   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: error_log after trying to print from KWrite

Description Ulrich Derenthal 2006-03-06 16:48:05 UTC
Hello,

my printer (a HP Deskjet 880c) worked fine with previous versions of Suse Linux, and at the moment, it also works with Windows (on the same machine).

However, it does not work with Suse 10.1 beta 3 (this problem also occured in earlier alpha versions of Suse 10.1; I am not sure whether it occured in 10.0, but it definitely worked in 9.x).

The printer is configured with Yast. I deleted it there and added it again (it seems to be auto-detected), but the test-printing does not give any results (the printer does not react in any way).

What kind of further information should I provide? I am not sure what to try next.
Comment 1 Johannes Meixner 2006-03-07 08:05:48 UTC
How is the printer connected?
Parallel port or USB or something else?

Is it recognized by the matching CUPS backend?
See
http://en.opensuse.org/SDB:CUPS_in_a_Nutshell
---------------------------------------------------------------------
The Backends
...
Every backend can also be addressed directly. For example,
the "parallel" and "usb" backends return the IEEE-1284
identification of connected printers.
---------------------------------------------------------------------
I.e. run both backends and post the result here.

Can you send plain text directly to the printer?
I.e. does it print "hello" with
echo -en "\rhello\r\f" >/dev/lp0 (for parallel port)
or
echo -en "\rhello\r\f" >/dev/usb/lp0 (for USB)

Which PPD do you use?
Attach /etc/cups/ppd/<QUEUENAME>.ppd as "text/plain" attachment to this bug.

Provide CUPS debug info for excactly one failed printout, see
http://en.opensuse.org/SDB:CUPS_in_a_Nutshell
----------------------------------------------------------------------------
If problems are encountered:
1. Set the "LogLevel debug" in /etc/cups/cupsd.conf.
2. Stop cupsd.
3. Move /var/log/cups/error_log* to another location (or delete it)
   in order to avoid having to search through gigantic log files.
4. Start cupsd.
5. Retry the action leading to the problem.
   (i.e. print one file using "lp -d <QUEUENAME> /etc/fstab")
6. Now /var/log/cups/error_log* contains many messages that are useful
   for troubleshooting. 
----------------------------------------------------------------------------
Attach /var/log/cups/error_log as "text/plain" attachment to this bug.

How did you install Suse Linux 10.1?
A new installation or an update from an older (which?) version?
Comment 2 Ulrich Derenthal 2006-03-07 18:04:22 UTC
It is connected to the only parallel port on the computer.

I updated from earlier 9.x-versions to 9.3 to 10.0-rc1 to 10.0 to various 10.1-alpha-versions to 10.1-beta1 to 10.1-beta3.

> /usr/lib/cups/backend/parallel
direct parallel:/dev/unknown-parallel0 "HEWLETT-PACKARD DESKJET 880C" "Parallel Port #1"

The part "/dev/unknown-parallel0" seems wrong to me. In Yast, the device is given as "/dev/lp0". 

As root:
> echo -en "\rhello\r\f" >/dev/lp0
The command seems to do nothing.
Ctrl+C results in:
"bash: echo: write error: Unterbrechung während des Betriebssystemaufrufs"
In /var/log/messages, this results in:
Mar  7 18:59:37 linux klogd: lp0: ECP mode
Mar  7 18:59:47 linux klogd: DMA write timed out
Mar  7 18:59:58 linux klogd: DMA write timed out

This seems wrong, but I do not know how to interpret it.

I will do the "LogLevel debug" steps later.
Comment 3 Ulrich Derenthal 2006-03-07 18:10:21 UTC
I changed to "LogLevel debug" in /etc/cups/cupsd.conf.

I tried to print a one-word document from KWrite.

The resulting /var/log/cups/error_log is attached.
Comment 4 Ulrich Derenthal 2006-03-07 18:11:43 UTC
Created attachment 71612 [details]
error_log after trying to print from KWrite
Comment 5 Johannes Meixner 2006-03-08 08:07:32 UTC
As long as the echo command does not print, it cannot work.
The echo sends data directly via parallel port to the printer.
This does not work.
Therefore the printing system can also not send data to the printer.

Check if the necessary parallel por modules are loaded:
lsmod | egrep 'parport|lp'
should list
parport, parport_pc, lp
If not the automagic module loading (via udev and HAL)
does not work for you (it works for me).

Check the parport related kernel messages:
dmesg | grep 'parport'
should show something like
---------------------------------------------------------
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE,EPP]
parport0: irq 7 detected
parport0: Printer, Canon BJC-2100
lp0: using parport0 (polling).
---------------------------------------------------------
Note the recommended BIOS settings for parallel port
according to
http://en.opensuse.org/SDB:Installing_a_Printer
----------------------------------------------------------
The BIOS settings for the first parallel interface
should be set as follows:
IO address 378 (hexadecimal)
Interrupt 7
Mode "Normal" or "SPP" or "Output-Only"
(other modes may not work)
DMA is disabled
(should be automatically switched off using the modes above) 
----------------------------------------------------------
Comment 6 Ulrich Derenthal 2006-03-08 08:41:53 UTC
I will check the BIOS setting soon. The output of the second command seems strange:

> lsmod | egrep 'parport|lp'
lp                     11332  2
parport_pc             35812  1
parport                33736  2 lp,parport_pc

> dmesg | grep 'parport'
parport 0x378 (WARNING): CTR: wrote 0x0c, read 0xff
parport 0x378 (WARNING): DATA: wrote 0xaa, read 0xff
parport 0x378: You gave this address, but there is probably no parallel port there!
parport0: PC-style at 0x378 [PCSPP,TRISTATE]
parport: PnPBIOS parport detected.
parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,ECP,DMA]
parport0: Printer, HEWLETT-PACKARD DESKJET 880C
lp0: using parport0 (interrupt-driven).
Comment 7 Johannes Meixner 2006-03-08 09:30:09 UTC
Avoid DMA (used in ECP mode).
There was a kernel problem in Suse Linux 10.0, see
http://lists.suse.com/archive/suse-linux-e/2005-Nov/1206.html
Comment 8 Johannes Meixner 2006-03-08 09:43:37 UTC
Regarding parport in ECP/DMA mode also see bug #116655
starting at
https://bugzilla.novell.com/show_bug.cgi?id=116655#c52

Please tell me what happens when you
 1. Reboot
 2. dmesg | egrep 'parport|DMA'
 3. lsmod | egrep '^parport|^lp'
 4. echo -en "\rhello\r\f" >/dev/lp0
 5. Wait one minute
 6. dmesg | egrep 'parport|DMA'
 7. lsmod | egrep '^parport|^lp'
 8. rmmod lp parport_pc parport
 9. modprobe parport parport_pc lp
10. dmesg | egrep 'parport|DMA'
11. lsmod | egrep '^parport|^lp'
12. echo -en "\rhello\r\f" >/dev/lp0
13. Wait one minute
14. dmesg | egrep 'parport|DMA'
15. lsmod | egrep '^parport|^lp'
Comment 9 Ulrich Derenthal 2006-03-09 10:37:32 UTC
I switched from DMA to standard mode in the BIOS, and now everything seems to work (printing from the command line as well as from KMail, for example).

Do you still want me to try these commands? 
If so: in standard mode or with DMA mode?
Comment 10 Johannes Meixner 2006-03-09 11:05:18 UTC
All modes in the BIOS which do not use DMA should work
(normally these are all modes except ECP).
As far as I knoe EPP ist the fastest/highest/whatever-best mode
which works.
Additionally all modes except ECP should also work with an interrupt,
see our manual.


*** This bug has been marked as a duplicate of 116655 ***