# Printing problem with kernel 2.6

## DonHora

Hi

I've got a HP LaserJet 6L connected with my computer via a parallel cable.

Under kernel 2.4.22, I can print with no problem at all. Everything's working fine. But under kernel 2.6 (vanilla 2.6.3 and 2.6.5 tested) I can't print.

After some research, I found that a 'cat /dev/lp0' returns correct data under 2.4, but exits with "Input/Output Error" under 2.6. The 'cat test.txt > /dev/lp0' method found in the Gentoo Printing HOWTO works under 2.4 but not under 2.6.

Under 2.6, 'cat /proc/sys/dev/parport/parport0/autoprobe' returns :

```
CLASS:PRINTER;

MODEL:HP LaserJet 6L;

MANUFACTURER:Hewlett-Packard;

DESCRIPTION:Hewlett-Packard LaserJet 6L Printer;

```

I can read in dmesg :

```
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]

parport0: Printer, Hewlett-Packard HP LaserJet 6L

parport_pc: Via 686A parallel port: io=0x378

parport: PnPBIOS parport detected.

```

so it's clear that 2.6 detects my printer, but I can't access it with /dev/lp0.

Feel free to ask me further configuration informations.

DonHora

----------

## TheRAt

You are doing:

```
# modprobe lp (Only for 2.6 kernel users)

# modprobe parport 

# modprobe parport_pc
```

as per the Gentoo Printing guide?

----------

## DonHora

 *TheRAt wrote:*   

> You are doing:
> 
> ```
> # modprobe lp (Only for 2.6 kernel users)
> 
> ...

 Sure I did   :Wink: 

Here are the revelant parts of my lsmod :

```
lp                     11268  0

parport_pc             25280  1

parport                41288  2 lp,parport_pc
```

and of my dmesg :

```
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]

parport0: Printer, Hewlett-Packard HP LaserJet 6L

parport_pc: Via 686A parallel port: io=0x378

parport: PnPBIOS parport detected.

pnp: Device 00:10 disabled.

lp0: using parport0 (polling).
```

What is this line : 'pnp: Device 00:10 disabled.' ? Maybe it's the problem.

----------

## DonHora

*update*

To access the printer device I must do :

```
rmmod lp parport_pc

modprobe lp
```

These modules are loaded at system boot but I doesn't work. If I remove them and re-insert them, it works. I would like to know exactly why it doesn't work. Maybe someone could tell me a way to get a complete kernel trace (like strace but for kernel) when I do a 'cat somefile > /dev/lp0' ?

----------

## |Quantum|

Hey!

I have exactly the same problem. The first time parport, parport_pc and lp are loaded, it won' t work. In this case, it seems the port is detected correctly, but when I do -for example- ls >/dev/lp0  then nothing happens.  I have to hit CTRL-C to end it. Also CUPS seems to ignore print jobs, it doesn't hang and it doesn't log anything.

I have to unload all 3 modules (yep, I tested it: all the way down to parport which doesn't depend on other modules), and then reload them.

I *do* get those nasty "spurious IRQ" messages in the kernel log  but until kernel 2.4.x this was never a problem. Also for a while, the first time de modules are loaded I got a detected port, but only PCSPP, TRISTATE. Then the second time I god PCSPP, TRISTATE, EPP, ECP, FIFO.

I checked my BIOS and it was set to ECP/EPP combi mode. I changed it to ECP only and since then de port is detected correctly the first time, but it DOES NOT work!

I also tried to emerge to udev, because I thought maybe something was wrong with the device driver. No change.

This is very annoying because I like to compile small drivers which are always needen right into the kernel. But because it's not working, the only way to print is compiling as modules and *manually* unload/reload the drivers!

I have an Epson Stylus C62.  config.gz will follow in next post  :Smile: 

-D-

 *DonHora wrote:*   

> *update*
> 
> To access the printer device I must do :
> 
> ```
> ...

 

----------

## |Quantum|

OK folks here is my kernel config.

http://www.student.kuleuven.ac.be/~m9600065/config

----------

## DonHora

So, I'm not the only one having this problem. I will fill a bug report to gentoo bugzilla. Here is a temporary workaround:

Add the following lines to "/etc/conf.d/local.start":

```
/etc/init.d/cupsd stop

rmmod lp

rmmod parport_pc

modprobe lp

/etc/init.d/cupsd start
```

----------

## |Quantum|

OK,

I want to add http://www.student.kuleuven.ac.be/~m9600065/kernel.txt to the story.

Please note the message about "Weird Via 686A parport base 0x0"

I haven't noticed it until recently.

Maybe your config is doing the same thing no?

----------

## DonHora

 *|Quantum| wrote:*   

> I want to add http://www.student.kuleuven.ac.be/~m9600065/kernel.txt to the story.
> 
> Please note the message about "Weird Via 686A parport base 0x0"

 

I found something interesting in your dmesg. You've got the same in mine : *Quote:*   

> parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
> 
> parport_pc: Via 686A parallel port: io=0x378
> 
> parport: PnPBIOS parport detected.
> ...

 

 *Quote:*   

> parport_pc: Weird Via 686A parport base 0x0, ignoring
> 
> pnp: Device 00:10 activated.
> 
> parport: PnPBIOS parport detected.
> ...

 

I think that the problem is with the red lines. I don't know how to know what is device 00:10, but I guess it's the parallel port. Does anyone know how to list pnp devices ?

----------

## |Quantum|

Hmmm yes very interesting, so you have the same chipset I suppose.

Now we have to get the attention of those Gentoo-guru's  :Wink: 

-D-

----------

## bk0

I also have an HP Laserjet 6L, and suddenly starting with 2.6.5 (possibly 2.6.5-r1) it stopped working (all previous 2.6 kernels worked fine).

Manually loading the "lp" kernel module fixes the problem. Weird.

----------

## archsvile

If u need help setting up yer prinyter i can help u. IM me at :    teddienv1ruzx      im usally on all the time    :Smile:   :Wink: 

----------

## bubblesorter2

I have the very same problem (same VIA chipset as well) and definitely the pnp device 00:10 is the parallel port (see below)

parport0: Printer, Canon BJC-6000

parport_pc: Via 686A parallel port: io=0x378

pnp: the driver 'parport_pc' has been registered

pnp: match found with the PnP device '00:10' and the driver 'parport_pc'

parport: PnPBIOS parport detected.

uhci_hcd 0000:00:07.2: port 2 portsc 0099

hub 1-0:1.0: debounce: port 2: delay 100ms stable 4 status 0x101

pnp: Device 00:10 disabled.

I'm going to make some research on pnp in kernel 2.6, any help appreciated

----------

