Konica Minolta PagePro 1300W USB Printing problem

Bug #37554 reported by Jimmy Angelakos
44
Affects Status Importance Assigned to Milestone
cupsys (Ubuntu)
Fix Released
Medium
Matthias Klose

Bug Description

I was unable to print on my Konica Minolta PagePro 1300W ever since I switched from Breezy to Dapper. I've tried solutions involving drivers and CUPS but everything appears to work normally except I can't print, and CUPS simply says: Printer off-line.

However I was made very suspicious by this thread:
http://www.linuxprinting.org/forums.cgi?group=linuxprinting.minolta.general;article=578

and now I believe that the Kernel is to blame for this. My printer appears to be connected normally, and I can install it perfectly well from gnome-cups-manager. However it does not receive any data (the light does not flash) when the GUI shows it is supposed to be printing.

Revision history for this message
Jimmy Angelakos (vyruss) wrote :

When I turn on my printer, dmesg says:
[4295953.738000] usb 2-2: new full speed USB device using uhci_hcd and address 4
[4295953.871000] drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 4 if 0 alt 0 proto 2 vid 0x0686 pid 0x300C

Revision history for this message
Jimmy Angelakos (vyruss) wrote :

When I try to print a test page, /var/log/cups/error_log says:
I [01/Apr/2006:09:25:49 +0300] Adding start banner page "none" to job 4.
I [01/Apr/2006:09:25:49 +0300] Adding end banner page "none" to job 4.
I [01/Apr/2006:09:25:49 +0300] Job 4 queued on "PagePro-1300W" by "vyruss".
I [01/Apr/2006:09:25:49 +0300] Started filter /usr/lib/cups/filter/pstops (PID 8711) for job 4.
I [01/Apr/2006:09:25:49 +0300] Started filter /usr/lib/cups/filter/foomatic-rip (PID 8712) for job 4.
I [01/Apr/2006:09:25:49 +0300] Started backend /usr/lib/cups/backend/usb (PID 8713) for job 4.
W [01/Apr/2006:09:25:49 +0300] [Job 4] Printer off-line.

and it continues saying "Printer off-line" forever.

Revision history for this message
Ben Collins (ben-collins) wrote :

I saw a few days ago where a similar problem was fixed in cups. Moving there since they may be able to better debug this.

Revision history for this message
Matthias Klose (doko) wrote :

please recheck, after a dist-upgrade to dapper 20060414, removal and resintallation of the printer

Changed in cupsys:
assignee: nobody → doko
status: Unconfirmed → Needs Info
Revision history for this message
Jimmy Angelakos (vyruss) wrote :

No, I'm afraid it still doesn't work. What's strange is that parallel printing with the same printer works! That's why I originally filed this as a kernel bug...

Revision history for this message
Oliver Zendel (zendel) wrote :

After upgrading from breezy to dapper I run into similar problems with my hp 1022 usb printer. I'm not sure whether I had tracked down this bug completely but finally I created a working patch for cups.

/var/log/cups/error.log says:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
D [26/May/2006:20:56:35 +0200] Get-Jobs ipp://localhost.localdomain:631/printers/HP1022
D [26/May/2006:20:56:35 +0200] cupsdProcessIPPRequest: 5 status_code=0 (successful-ok)
D [26/May/2006:20:56:35 +0200] cupsdCloseClient: 5
D [26/May/2006:20:56:38 +0200] [Job 71] LPGETSTATUS returned a port status of 00...
W [26/May/2006:20:56:38 +0200] [Job 71] Printer fault!
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

this is the code snipped from backend/usb-unix.c that generates these logging output:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  while (!ioctl(fd, LPGETSTATUS, &status))
  {
    fprintf(stderr, "DEBUG: LPGETSTATUS returned a port status of %02X...\n", status);

    if (status & LP_POUTPA)
    {
      fputs("WARNING: Media tray empty!\n", stderr);
      fputs("STATUS: +media-tray-empty-error\n", stderr);

      paperout = 1;
    }

    if (!(status & LP_PERRORP))
      fputs("WARNING: Printer fault!\n", stderr);
    else if (!(status & LP_PSELECD))
      fputs("WARNING: Printer off-line.\n", stderr);
    else
      break;

    sleep(5);
  }
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

first !ioctl(fd, LPGETSTATUS, &status) is ever evaluated to true (even if status is 0). Maybe this is a side effect from a bug in the kernel. Second I really don't know why the break statement is never reached, so i applied following (ugly) patch that enabled printing for me:

--- cupsys-1.2.0/backend/usb-unix.c.orig 2006-05-26 22:08:53.000000000 +0200
+++ cupsys-1.2.0/backend/usb-unix.c 2006-05-26 22:09:43.000000000 +0200
@@ -158,7 +158,7 @@
   * Show the printer status before we send the file...
   */

- while (!ioctl(fd, LPGETSTATUS, &status))
+ while (!ioctl(fd, LPGETSTATUS, &status) && status != 0)
   {
     fprintf(stderr, "DEBUG: LPGETSTATUS returned a port status of %02X...\n", status);

Revision history for this message
Bruno S. (fischkudder-deactivatedaccount) wrote :

Older CUPS versions didn't do a status check. That's why the printer did work previously. Unfortunately it seems Minolta printers themselves aren't 100% class compliant (-> general Minolta problem).

Revision history for this message
Martin Pitt (pitti) wrote :

Oliver, thanks for your investigations. Indeed the break won't be reached, since !(0 && something) is always true.

However, from reading lp.h, it says

  #define LP_PERRORP 0x08 /* unchanged input, active low */

so if that bit is zero, it means 'yes', and thus the printer reports an error condition. I'll talk with upstream about this.

Revision history for this message
Martin Pitt (pitti) wrote :
Changed in cupsys:
status: Needs Info → Confirmed
Revision history for this message
Oliver Zendel (zendel) wrote :

After updating to cupsys 1.2.2-0ubuntu0.6.06 printing works fine for me. Thanks.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for checking again!

Changed in cupsys:
status: Confirmed → Fix Released
Revision history for this message
Habi (ivan-habi) wrote :

The printer finally works without any workarounds in 9.04 (Jaunty).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.