# Modprobe parport_pc fails

## tdb

I have been trying for the better part of a day to get lp working, and the single point of failure continues to be getting the parport_pc to load. A straight modprobe or insmod turns up :

/lib/modules/2.4.20-gentoo-r2/kernel/drivers/parport/parport_pc.o: init_module: Device or resource busy

Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.

      You may find more information in syslog or the output from dmesg

/lib/modules/2.4.20-gentoo-r2/kernel/drivers/parport/parport_pc.o: insmod /lib/modules/2.4.20-gentoo-r2/kernel/drivers/parport/parport_pc.o failed

/lib/modules/2.4.20-gentoo-r2/kernel/drivers/parport/parport_pc.o: insmod parport_pc failed

(dmesg and /var/log/messages had nothing in them)

So I tried specifying the io port/irq with "io=0x378 irq=7"

It loads, but there is only one /dev/lp0, and an echo "test" > /dev/lp0 doesn't do anything. dmesg says parport_pc loaded, but "there is probably no parallel port there." I know the hardware works, since I booted Knoppix and it loaded and printed with no problem. I even took the io settings from knoppix and used them in gentoo to no avail.  I have read every single post on this board that is remotely relevant, and none have worked. I tried recompiling my kernel about 6 times with different settings, nothing works.  I have the port set to ECB mode in the bios. (I cannot make any other settings in the bios, there are no options to do so, it's an old presario 7500 series bios and they don't have a lot of features.) I have tried several differnt io ports, none have worked. Any help?

----------

## tdb

(bump)

----------

## tdb

Still trying, an update, though. Everything works fine when I boot Knoppix, I can print. I tried using the io and irq settings that knoppix uses, but it still reports device busy. Does anyone have a clue?

----------

## ph_flippy

 *tdb wrote:*   

> Does anyone have a clue?

 

No but the same problem. Though I haven't tried setting the IRQs yet. Where do I do that (sorry for the maybe stupid question)?

It's an Acer TravelMate 225XC.

----------

## tdb

I have limited control over the IRCs. The Presarios from back then don't have a very comprehensive bios. Everything works under Knoppix. I need to see what is enabled in the Knoppix kernel and try it on mine. There might be some feature that I enabled that is grabbing the parallel port and not saying anything. Oh well. Try it with Knoppix and see what you get.

----------

## ph_flippy

Ok, I tried Knoppix. Printing works without problems there...

So I checked the used IRQs and io-settings. Knoppix uses io=0x378 and irq=7 when loading the module parport_pc. dmesg then says something about detecting a HP DESKJET 930C, which is exactly right.

So I tried it in Gentoo:

```
insmod parport

insmod parport_pc io=0x378 irq=7

insmod lp
```

And this is what I get when running dmesg:

```
parport 0x378 (WARNING): CTR: wrote 0x0c, read 0x04

parport 0x378 (WARNING): DATA: wrote 0xaa, read 0xff

parport 0x378: You gave this address, but there is probably no parallel port there!

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

Running something like echo "test" > /dev/lp0 doesn't even trigger the printer to blink with one of its lights or utter any sounds.

I have the kernel options enabled:

```

Parallel port support  ---> 

   <M> Parallel port support

           <M>   PC-style hardware

           < >     Multi-IO cards (parallel and serial)

           [*]     Use FIFO/DMA if available (EXPERIMENTAL)

           [ ]     SuperIO chipset support (EXPERIMENTAL)

           [ ]   Support foreign hardware

           [*]   IEEE 1284 transfer modes

Character devices  --->

   <M> Parallel printer support

```

 (anything else I need?)

My BIOS-Settings for the parallel port are as follows:

```

Base Address: 378h

IRQ                  7

Operation mode: ECP

EPP DMA Channel: 1

```

Any tips? Because I am quite lost...

Did you have any luck yet, tdb?

----------

## tdb

That is exactly what I did. I also went as far as to try a ton of different kernel options under the parallel port settings and recompile about six different kernels. No luck. If you do a search for parport_pc on these forums, (and elsewhere on the net) you'll find some references to people with the same problem. It appears there is a work-around using "foomatic" that will get the thing printing from cups, but not from the command line. I would rather get it working this way, since one day I would like to use my zip drive on the machine and I try to avoid dirty hacks. (this is my home server.)

----------

## ph_flippy

Hi,

I'm afraid I must say, I gave up. I simply couldn't get it to work. Not even with the foomatic workaround. I ended up buying a USB-cable for the printer -- it works perfectly with that...

I think it should be just as easy with a normal parallel port, but sadly it isn't.

Do all people have these problems, or is it just a few with certain hardware setups?

----------

## theprog

I have the same exact problem. Compaq Presario 5360 (circa 1999)

No BIOS settings to disable PugNPlay, but I get a choice to disable the port, or Bi-Directional, ECP, and EPP. 

In linux-2.4.21/drivers/parport/TODO-parport, it mentions ECP support is not implemented in lp.c

Hopes this helps somebody.

----------

## rpmohn

I had a similar problem. I switched to genkernel and now printing works. Still don't know what I did wrong, but it's fixed now.

----------

## tdb

I have to try some other kernels too. Knoppix works fine, so I pulled the config from that kernel and am trying to sort thru it. Wolk sources didn't work on it when I tried a long time ago either. I'll have to try a vanilla kernel and see where to go from there.

----------

## tdb

Well, I finally got around to compiling vanilla 2.4.22 to test this, and, it worked. parport_pc modprobed just fine, /dev/lp0 showed up, and I was able to print from the command line just fine. I'm compiling gentoo-test-sources right now to see what happens with that. We'll see if it was the 2.4.20 kernel, or a gentoo-specific patch.

----------

## tdb

I narrowed it down to a conflict between ACPI and the parallel port. Try booting the kernel with "acpi=off". I did it with mine, and it went in with no errors and the printer works. (discovered it when I noticed all the new kernels automatically disabled ACPI, complaining that my bios was too old.) Now it's off to find a way to get ACPI to play nicely with parport_pc. It works with Knoppix, so there is something there to look at. My bios is pretty primitive (presario 7598) and I don't have a lot of control over anything. Anyone have any ideas?

----------

