# cups does not work with 2.6.14-gentoo-r2 kernel

## Weaselweb

Hi,

i recently updated to 2.6.14-gentoo-r2 kernel und after that i get allways the error message from cups:

 *Quote:*   

> Unable to send print file to printer: Invalid argument

 

Nothing other has changed.

After i rebooted the 2.6.13 kernel it works again.

Any ideas why 2.6.14 does not work oder how to fix that?

Greetings

Weaselweb

----------

## kptn_kermit

I get the same error message when trying to print with USB printer.

The odd thing is, that printing works with my HP 5L on parport, but not with Canon i865 ib USB port. 

Maybe an USB problem ?

Regards

Kermit

----------

## Weaselweb

ah, yes i omit the info that it is a USB printer HP Laserjet.

I think too it's an USB problem.

Greetings

Weaselweb

----------

## davidgurvich

Are you certain similar options are enabled in both kernels?

----------

## Weaselweb

well, i copied the config from 2.6.13 and typed "make oldconfig" answered a few options and then normal "make & &make modules_install" that's all.

There is no really reason, that some options are missing.

----------

## davidgurvich

Check to make sure.

----------

## pragmatine

See this bug:

https://bugs.gentoo.org/show_bug.cgi?id=112473

I assume that currently you select your printer through cups using something like:

```
usb:/dev/lp0
```

or maybe thru a custom udev device rule (this is what I used to do which caused the same problem):

```
usb:/dev/printers/epson_stylus_color_670
```

The problem it seems is with accessing it like this and specifying a specific device to use.

Instead just choose "Local printer" and "USB Printer #1" and it should work.

However, this doesnt allow the custom udev device to be used so isnt a good long term fix.

----------

## kptn_kermit

Doesn't work for me:

Changing printer with CUPS web interface, the printer port is changing to usb:/dev/usb/lp0 which do not exist.

In my /etc/udev/rules.d/10-udev.rules the line for Canon is as follows:

# USB Canon printer

BUS="usb",SYSFS{serial}="212O2T",NAME="%k",SYMLINK="usblp0"

It do not work either, if I comment this line out and do a reboot (cause I am not sure, how to restart udev by hand). 

In summary: 

Using 10-udev.rules

"Unable to send print file to printer: Invalid argument"

Commenting it out:

/dev/usb/lp0: not such file or directory

----------

## pragmatine

what device is being created when you plug in your printer??

----------

## kptn_kermit

How can I check this ?

----------

## Weaselweb

type "find /dev" before and after you plug your printer in

compare these two outputs (you can save them in files "find /dev > file")

easiest with "diff -u file1 file2"

----------

## HomerSimpson

I can't print either. My last kernel was 2.6.10. It was printing. After upgrading to 2.6.14-gentoo-r2, it quit working. I was printing to a custom /dev directory but even setting it up as usb printer #1, does not print.

I have the same problem as stated earlier. CUPS wants to print to /dev/usb/lp0, which does not exist. The default rule creates /dev/lp0. I can manually set it to this using webmin but then it thinks it is a parallel printer. CUPS still does not print.

----------

## Weaselweb

Try editing your /etc/cups/printers.conf and setting

DeviceURI usb:/dev/lp0

----------

## HomerSimpson

I did that but it still doesn't print. It looks like it starts to send the print job but the printer never prints.

I emerge 2.6.13-r5 and all is well again. I will wait until this gets solved  in 2.6.14 (or 15 or 16 or...) before I try again.

Thanks

----------

## Weaselweb

but it finds your device /dev/lp0?

for those problems i allways keep 2 older versions as backup if a newer one doesn't work (like this one)

----------

## HomerSimpson

I have to select parallel printer or manually set the URI to /dev/lp0. If you select USB printer 1, it selects /dev/usb/lp0.

I am up and running now with an older kernel. Keeping the old ones is a good idea. My last one was 2.6.10 so I decided to upgrade to 2.6.13 and it works.

Thanks

----------

## hinken

Hi!

Thank you for helping me printing my school-paper!

I was going nuts over here(The printer has always worked for me) then I tried your suggestion editing /etc/cups/printers.conf , changing to DeviceURI usb:/dev/lp0   saved my day!

Thanks again!

/hinken

----------

## kptn_kermit

diff -u file1.txt file2.txt with

find /dev > file1.txt before plugging in the USB printer and

find /dev > file2.txt after plugging in

leads to

muppets ~ # diff -u file1.txt file2.txt 

--- file1.txt   2005-12-02 12:27:08.000000000 +0100

+++ file2.txt   2005-12-02 12:27:20.000000000 +0100

@@ -1,4 +1,5 @@

 /dev

+/dev/usbdev2.5

 /dev/vcsa7

 /dev/vcs7

 /dev/vcsa6

@@ -31,6 +32,7 @@

 /dev/bus/usb/4

 /dev/bus/usb/4/1

 /dev/bus/usb/2

+/dev/bus/usb/2/5

 /dev/bus/usb/2/1

 /dev/bus/usb/1

 /dev/bus/usb/1/1

@@ -159,6 +161,7 @@

 /dev/ttyS2

 /dev/ttyS1

 /dev/.udevdb

+/dev/.udevdb/class@usb_device@usbdev2.5

 /dev/.udevdb/class@usb_device@usbdev3.3

 /dev/.udevdb/class@input@mouse2

 /dev/.udevdb/class@usb_device@usbdev5.1

----------

## Tarball

I am having the same problem.

Kernel 2.6.15-gentoo, cups 1.1.23-r7

I had cups set up to print to /dev/printers/ml1510 which was a symlink setup by UDev.  I think it used to be linked to /dev/usblp0, however I notice that now it is linked to /dev/usbdev5.8 which has the attributes:

```

lrwxrwxrwx  1 root root 12 Jan 24 23:14 /dev/printers/ml1510 -> ../usbdev5.8

crw-rw----  1 root root 189, 519 Jan 24 23:14 /dev/usbdev5.8

```

Here's the bit I haven't figured yet, I try redirecting something to that device as root (I am not expecting anything other than gibberish) but I get this:

```

# ls > /dev/usbdev5.8

ls: write error: Invalid argument

```

That 'invalid argument' sounds familiar...

```

Unable to send print file to printer: Invalid argument

```

I've got to go to work now but maybe this is where the problem lies?!?!

----------

## Weaselweb

I changed my printer device from /dev/hp_printer to /dev/usb/lp0 and it works fine. I don't know where this bug is, but that's a workaround (not quite good, but it works)

HTH

Weaselweb

----------

## Tarball

Hmmm, I don't have that device.

Are you using UDEV?  Which version?

----------

## Weaselweb

Currently I'm using udev-079 but this workaround did work with earlier versions

----------

## raise

I had a custom role in  /etc/udev/rules.d/10-udev.rules

BUS="usb", SYSFS{serial}="M05P10412101027350", NAME="epson-printer", SYMLINK="printers/epson_stylus_printer"

after commenting it out the dev node /dev/usb/lp0 was created again. I changed it in cups and it works again. I'm using kernel 2.6.15 stable. Is there a known bug that this gets fixed soon. I use udev 079

g.

----------

## raise

I opended a bug at gentoo and the answer to to bug was:

You need to use "==" instead of "=" for your rules.

Try rewriting this as:

  BUS=="usb", SYSFS{serial}=="M05P10412101027350", NAME="epson-printer",

SYMLINK="printers/epson_stylus_printer"

-----------

Funny API change in the middle of udev development. May be it was a bug that it worked before? However it works now and people with similar problems should fix this easy and that's what count's.

----------

## kptn_kermit

Changing the entry in /etc/udev/rules.d/10-udev.rules from "=" to "==" do not change anything.

The entry in detail:

# Canon i865 USB:

BUS=="usb", SYSFS{serial}=="21202T", NAME=="canon_i865", SYMLINK=="printers/canon_i865"

I configured the printer in CUPS with:

usb:/dev/canon_i865 

The cups error is as usual:

"Unable to send print file to printer: Invalid argument" 

and /var/log/messages is telling me:

Mar 21 08:07:36 muppets usb 3-1: new full speed USB device using uhci_hcd and address 2

Mar 21 08:07:36 muppets drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x04A9 pid 0x107F

Any ideas, what I am doing wrong ?

Regards

KK

----------

## alphamaennchen

The udev rules have to look like this:

note the usb/lp, cause cups takes /dev/usb/lp0 ...

BUS="usb", KERNEL="lp*", SYSFS{serial}=="E1J168348", NAME="brother_hl160%n", SYMLINK="usb/lp%n"

BUS="usb", KERNEL="usb*," SYSFS{serial}=="E1J168348", NAME="brother_hl160%n", SYMLINK="usb/lp0", GROUP="lp"

SYSFS{serial}=="E1J168348", NAME="brother%n", SYMLINK="usb/lp0", GROUP="lp"

----------

