Closed michaelrsweet closed 18 years ago
CUPS.org User: mike
Please attach your /var/log/cups/error_log file.
Also, please run the following commands and send the output:
lpstat -v
su lp -c /usr/lib/cups/backend/usb
CUPS.org User: mike
[posting to cups.bugs - William, please post your comments to the web form to get them into the bug database, thanks!]
series of commands run: /etc/init.d/cups start lpr -P 115_Color /etc/cups/printers.conf
pkill -9 usb lprm -P 115_Color /etc/init.d/cups stop
/etc/init.d/cups start lpstat -v su lp -c /usr/lib/cups/backend/usb /etc/init.d/cups stop
lpstat -v (irrelevant printers clipped for security) device for 115_Color: usb://HP/Color%20LaserJet%203800
su lp -c /usr/lib/cups/backend/usb direct usb://HP/Color%20LaserJet%203800 "HP Color LaserJet 3800" "HP Color LaserJet 3800 USB #1" "MFG:Hewlett-Packard;CMD:PJL,MLC,BIDI-ECP,PCLXL,PCL,PJL,POSTSCRIPT;1284.4DL:4d,4e,1;MDL:HP Color LaserJet 3800;CLS:PRINTER;DES:Hewlett-Packard Color LaserJet 3800;"
CUPS.org User: ywlke
The error_log reflects the commands listed in the previous post.
CUPS.org User: mike
Fixed in Subversion repository.
"str1756.patch":
--- runloop.c (revision 5719) +++ runloop.c (working copy) @@ -53,6 +53,7 @@ totalbytes, /* Total bytes written / bytes; / Bytes written / int paperout; /_ "Paper out" status */
print_fd, device_fd, use_bc);
+ /*
for (print_bytes = 0, print_ptr = print_buffer, offline = 0, paperout = 0, total_bytes = 0;;) { /*
FD_ZERO(&output);
} + /*
print_ptr = print_buffer; +
(int)print_bytes);
}
/* @@ -196,7 +227,7 @@ paperout = 0; }
fprintf(stderr, "DEBUG: Wrote %d bytes...\n", (int)bytes);
fprintf(stderr, "DEBUG: Wrote %d bytes of print data...\n", (int)bytes);
print_bytes -= bytes;
print_ptr += bytes;
--- usb-unix.c (revision 5719) +++ usb-unix.c (working copy) @@ -44,7 +44,7 @@
-int open_device(const char uri); +int open_device(const char uri, int *use_bc);
/* @@ -75,14 +75,6 @@ (void)argv;
/*
@@ -90,7 +82,15 @@
do {
tbytes = backendRunLoop(print_fd, device_fd, use_bc);
if (print_fd != 0 && tbytes >= 0) fprintf(stderr, "INFO: Sent print file, " CUPS_LLFMT " bytes...\n", @@ -277,7 +277,7 @@ { sprintf(device, "/dev/usb/printer%d", i);
if ((fd = open(device, O_WRONLY | O_EXCL)) >= 0) { if (!backendGetDeviceID(fd, device_id, sizeof(device_id), make_model, sizeof(make_model), @@ -314,8 +314,12 @@ */
int /* O - File descriptor or -1 on error _/ -opendevice(const char *uri) / I - Device URI _/ +opendevice(const char *uri, / I - Device URI */
int fd; /* File descriptor / + + /
int i; /* Looping var / int busy; / Are any ports busy? */
int fd; /* File descriptor / char format[255], / Format for device filename / device[255], / Device filename _/ deviceid[1024], / Device ID string */ @@ -446,7 +449,6 @@
int i; /* Looping var / int busy; / Are any ports busy? */
if ((fd = open(device, O_WRONLY | O_EXCL)) >= 0) backendGetDeviceID(fd, device_id, sizeof(device_id), make_model, sizeof(make_model), "usb", device_uri, sizeof(device_uri)); @@ -481,8 +483,18 @@ }
if (!strcmp(uri, device_uri))
*/
fputs("DEBUG: Setting use_bc to 0!\n", stderr);
+
else {
Version: 1.2.1 CUPS.org User: ywlke
I'm not sure that this problem is actually printer or OS-specific since I don't have another machine with a different OS to use for testing, nor do I have another USB printer to work with. I am using Solaris 10 (1/06 release) SPARC on a Sun Blade 150. The printer is an HP Color LaserJet 3800. This printer works when I use 1.1.23, but if I run 1.2.1 and send a print job, the usb backend ("usb") chews up 100% CPU without printing, and I end up having to kill it. I am sure this is not an ESP GS or Foomatic problem. The USB backend is running as user "lp".