LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Cups 1.4.2 and common problems (https://www.linuxquestions.org/questions/slackware-14/cups-1-4-2-and-common-problems-793787/)

disturbed1 03-07-2010 09:53 AM

Cups 1.4.2 and common problems
 
Since 1.4.x Cups no longer prefers usblp, and is built with libusb as the only backend. If your printer is not found by cups, you can try to remove usblp, and restart cups.

Code:

rmmod usblp
/etc/rc.d/rc.cups restart

Make this perminant either by rebuilding your kernel, or adding usblp to /etc/modprobe.d/blacklist
This worked for our Epson IJP printers.

If your printer is not supported by libusb, you can rebuild cups to use usblp instead of libusb. Add --disable-libusb to the SlackBuild and rebuild cups.
There is a patch on the cups bug list to enable both backends, but does not apply cleanly on 1.4.2. Debian has a mega patch, which includes a patch to enable both backends.

For HP printers (which I do not own). There have been threads here about new cups and hplip. Hplip has had some changes to the configure script as well.
Code:

--enable-pp-build    enable parallel port build (default=no)
--enable-new-hpcups Has nothing to do with cups 1.4.x This is only for internal HP testing.

The --enable-pp-build was changed from default=yes to default=no in version 3.9.6

gargamel 03-07-2010 10:38 AM

Thanks, this is very useful information.
One question, though: How do I know, if my printer is supported by libusb?

EDIT: or if my problems are caused by something else...

gargamel

Zielony 03-07-2010 11:03 AM

Who knows the real solution for this:
Code:

Mar  7 17:57:31 zielony hp[1289]: io/hpmud/musb.c 1026: bulk_write failed buf=0xbfa03424 size=50 len=-5: Success
Mar  7 17:57:31 zielony hp[1289]: io/hpmud/musb.c 1393: unable to write data hp:/usb/DeskJet_840C?serial=CN0CE1B288KV: Success
Mar  7 17:57:31 zielony kernel: usb 2-1.8: BOGUS urb flags, 1 --> 0

?

It's HP printer connected via USB.

What hplip options could help?

disturbed1 03-07-2010 11:23 AM

I looked for a list, but all I found were bug reports against cups and usblp.

HP has this to say http://hplipopensource.com/node/128
Quote:

With HPLIP 0.9.9 all USB I/O takes place with libusb. Libusb allows USB drivers to be written in user mode instead of kernel mode. Kernel modules "printer" and "usblp" are no longer required. Libusb allows unique low level control that was not available in the kernel modules. Without libusb full I/O support is not available for many HP devices.
The way I handled it, was test if cups 1.4.2 without usblp works, and so far it has for our Epson IJPs (CS120x2, R260) and our Samsung ML-1740's with jbigkit and splix.

gargamel 03-07-2010 11:31 AM

Quote:

Originally Posted by disturbed1 (Post 3889298)
I looked for a list, but all I found were bug reports against cups and usblp.

[...]

That was the reason behind my question: I didn't find a list, either, but it would be VERY useful. So, if anyone knows where to find such a list, please, post it here!

EDIT: Any reliable method to find out, if a particular model is supported, would be equally good, of course!

The problem with trial and error is, that it (1) is very time-consuming and (2) is only useful in case of positive results. If your printer works, you know it's supported. But if it doesn't the causes can be manifold, and you won't know, if it's lack of libusb support or something else, why it's not working.

gargamel

allend 03-09-2010 08:55 AM

I would like to share my experience with my Brother DCP-110C scanner/printer on -current with CUPS-1.4.2.
With the standard Slackware CUPS package, then scanning worked but printing did not work.
To get printing to work, I needed to blacklist usblp in /etc/modprobe.d and recompile CUPS by adding --disable-libusb (or --enable-libusb=no) to the cups.Slackbuild script. I also needed to change the group on the device entry /dev/bus/usb/<Bus>/<Device> from 'scanner' to 'lp'.
This is a problem for multifunction devices.
At boot, udev will assign the device to the 'scanner' group due to the rules in /lib/udev/rules.d/80-libsane.rules.
CUPS will not recognise the printer unless the group on the device is changed to 'lp', at which point the scanner is not available to skanlite or xsane until the group is changed back to 'scanner'.
Any ideas on how to make both scanning and printing available without reverting to CUPS 1.3.1 where everything worked?

Zielony 03-09-2010 10:51 AM

For me even compiling CUPS with '--disable-usb' doesn't help, though I have lp group at the printer USB port set by udev.

gargamel 03-09-2010 01:48 PM

Quote:

Originally Posted by allend (Post 3891602)
I would like to share my experience with my Brother DCP-110C scanner/printer on -current with CUPS-1.4.2.
With the standard Slackware CUPS package, then scanning worked but printing did not work.

I have exactly the same problem with my Brother MFC-290C.

Quote:

Originally Posted by allend (Post 3891602)
To get printing to work, I needed to blacklist usblp in /etc/modprobe.d and recompile CUPS by adding --disable-libusb (or --enable-libusb=no) to the cups.Slackbuild script. I also needed to change the group on the device entry /dev/bus/usb/<Bus>/<Device> from 'scanner' to 'lp'.
This is a problem for multifunction devices.
At boot, udev will assign the device to the 'scanner' group due to the rules in /lib/udev/rules.d/80-libsane.rules.
CUPS will not recognise the printer unless the group on the device is changed to 'lp', at which point the scanner is not available to skanlite or xsane until the group is changed back to 'scanner'.
Any ideas on how to make both scanning and printing available without reverting to CUPS 1.3.1 where everything worked?

I haven't tried it, but as workaround it might work to set the group to 'lp' in /lib/udev/rules.d/80-libsane.rules and make yourself a member of this group. Not sure, though, if this works, as 'scanner' might be hard-coded somewher in SANE or Skanlite.

BTW, I find the new web UI of CUPS confusing. Not exactly what I had expected from UI expert Apple...

gargamel

allend 03-10-2010 05:25 AM

Having slept on it, I now have the answer to my own question.
Copy /lib/udev/rules.d/80-libsane.rules to /etc/udev/rules.d.
Add OWNER="lp" to the line for the scanner device in /etc/udev/rules.d/80-libsane.rules.
Quote:

# Brother DCP-110C
ATTR{idVendor}=="04f9", ATTR{idProduct}=="0169", MODE="0664", OWNER="lp", GROUP="scanner", ENV{libsane_matched}="yes"
On boot, the /dev/bus/usb/<Bus>/<Device> entry now has owner "lp" and is recognised by CUPS and has group "scanner" and is recognised for scanning. :-)

gargamel 03-10-2010 02:53 PM

Two questions:
1. Is blacklisting usblp still required with this solution?
2. Is the order of parameters important? Because, I added OWNER="lp" at the end of the ATTR line, not before the GROUP, as you did.

It doesn't yet work here, the answers to the questions above would help me to track it further down. Thanks!

gargamel

allend 03-10-2010 03:39 PM

Quote:

1. Is blacklisting usblp still required with this solution?
Yes, it was for me. The usblp kernel module creates a /dev/usb/lp0 device entry which does not appear to be recognised by CUPS-1.4.2.
Quote:

2. Is the order of parameters important? Because, I added OWNER="lp" at the end of the ATTR line, not before the GROUP, as you did.
I do not think the order is important.

gargamel 03-10-2010 03:58 PM

Great, it works now!
I just had to reinstall the driver files provided by Brother and to manually select the PPD file.

Excellent! Thanks!

gargamel

phi11ip 05-11-2010 07:32 AM

Quote:

Originally Posted by disturbed1 (Post 3889227)
Since 1.4.x Cups no longer prefers usblp, and is built with libusb as the only backend. If your printer is not found by cups, you can try to remove usblp, and restart cups.

Code:

rmmod usblp
/etc/rc.d/rc.cups restart

Make this perminant either by rebuilding your kernel, or adding usblp to /etc/modprobe.d/blacklist

Thanks a lot for that. Worked a charm with my Canon PIXMA ip6700D printer.

Phil


All times are GMT -5. The time now is 08:14 AM.