# parport and parport_pc not loading...

## crimson

I compiled parport and parport_pc as modules, and I get this message when I try to load them: 

```

modprobe: Can't locate module parport

modprobe: Can't locate module parport_pc

```

This is confusing, because I did a locate and the parport.o and parport_pc.o files are in the  

```
/usr/src/linux-2.4.19-gentoo-r10/drivers/parport/
```

 directory.  I do have a /dev/lp0 device and my printer is a HP Deskjet 712c.  

When I try and 

```
$cat "test" > /dev/lp0
```

 I get nothing. 

how can I get these modules to load?

----------

## steveb

 *crimson wrote:*   

> I compiled parport and parport_pc as modules, and I get this message when I try to load them: 
> 
> ```
> 
> modprobe: Can't locate module parport
> ...

 

what do you get as a output from the following command:

```
find /lib/modules/2.4.19-gentoo-r10/ -iname "parport*"
```

cheers

SteveB

----------

## crimson

The output of the above command was:

/lib/modules/2.4.19-gentoo-r10/kernel/drivers/parport

/lib/modules/2.4.19-gentoo-r10/kernel/drivers/parport/parport.o

/lib/modules/2.4.19-gentoo-r10/kernel/drivers/parport/parport_pc.o

Ok, I did a make menuconfig and realized that they were built into the kernel.  

I decided to try making them modules, then ran make modules and make modules_install.  modprobe parport loaded fine, but modprobe parport_pc gave the following error :

```

/lib/modules/2.4.19-gentoo-r10/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.19-gentoo-r10/kernel/drivers/parport/parport_pc.o: insmod /lib/modules/2.4.19-gentoo-r10/kernel/drivers/parport/parport_pc.o failed

/lib/modules/2.4.19-gentoo-r10/kernel/drivers/parport/parport_pc.o: insmod parport_pc failed

```

I have no idea what to do :\

----------

## steveb

 *crimson wrote:*   

> The output of the above command was:
> 
> /lib/modules/2.4.19-gentoo-r10/kernel/drivers/parport
> 
> /lib/modules/2.4.19-gentoo-r10/kernel/drivers/parport/parport.o
> ...

 

if you compiled them into the kernel and now you activated them as modules, then you need to do:

```
make dep && make clean && make bzImage && make modules && make modules_install
```

the make bzImage is IMPORTANT!

cheers

SteveB

----------

## crimson

ok, I'll do that, but  :Smile: .. will they work?

and is there any special way to put them in the modules.autoload?

(ie alias, etc)?

----------

## crimson

well printing still doesn't work.  I *can get the parport module to load, but NOT the parport_pc module.

My printer's stats in the bios are io: 378h / irq : 7 .

I try loading parport_pc with:

```
$insmod parport_pc io=0x378 irq=7
```

 and get the following error:

```
Using /lib/modules/2.4.19-gentoo-r10/kernel/drivers/parport/parport_pc.o

/lib/modules/2.4.19-gentoo-r10/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

```

----------

## sala

 *crimson wrote:*   

> well printing still doesn't work.  I *can get the parport module to load, but NOT the parport_pc module.
> 
> My printer's stats in the bios are io: 378h / irq : 7 .
> 
> I try loading parport_pc with:
> ...

 

This might be no help, but make sure you have "Parallel printer support" compiled in your kernel (or as a module).  It's under "Character Devices" if you are using menuconfig.

----------

## spanommers

just checking, after compiling the kernel, did you put the new bzImage file in /boot and reboot?

cp /boot/bzImage /boot/bzImage.old

cp /usr/src/linux/arch/i386/boot/bzImage /boot

----------

## crimson

yes, I have these modules compiled and all support for parport and lp in the kernel.  And I made sure to reboot with the *new kernel.  

I am thinking about  installing redhat 7.3 on a different hard drive and seeing how they handle it.  I'm also going to try and change the irq for my parallel port in the bios.

----------

## steveb

could you try to just use the io address, but no irq:

```
insmod parport

insmod parport_pc io=0x378 irq=none
```

cheers

SteveB

----------

## crimson

I still get the same Device or Resource busy error as above.  :Sad: 

dmesg | grep parport  tells me : 

parport0: PC-style at 0x278 (0x678) [PCSPP(,...)]

parport0: irq 5 detected

lp0: using parport0 (polling).

(replace irq 5 with 7, and 0x278 with 0x378 before I switched them in the bios.  Exactly the same output as before though)

----------

## steveb

 *crimson wrote:*   

> I still get the same Device or Resource busy error as above. 
> 
> dmesg | grep parport  tells me : 
> 
> parport0: PC-style at 0x278 (0x678) [PCSPP(,...)]
> ...

 

irq 5 is normaly used for lpt2. however... it looks like you have the parport_pc runing allready. what does 'lsmod' printout?

cheers

SteveB

----------

## crimson

parport loads fine, but parport_pc is what gives me the error : Device or Resource busy.  With either IRQ(5/7) I get the same error.

lsmod gives

```

Module                  Size  Used by    Tainted: P  

NVdriver             1067040  10  (autoclean)

parport                13792   0 

emu10k1                59656   1 

ac97_codec              9032   0  [emu10k1]

tulip                  38592   1 

```

----------

## steveb

and what is the output of:

```
cat /proc/interrupts
```

cheers

SteveB

----------

## crimson

Ok, I did cat /proc/interrupts when I had my parallel port as irq 5 and got:

           CPU0       

  0:     336355          XT-PIC  timer

  1:       7080          XT-PIC  keyboard

  2:          0          XT-PIC  cascade

  7:        115          XT-PIC  Audigy

  9:      12612          XT-PIC  usb-uhci, usb-uhci, usb-uhci, eth0

 11:     230795          XT-PIC  nvidia

 12:     215179          XT-PIC  PS/2 Mouse

 14:       7334          XT-PIC  ide0

 15:          7          XT-PIC  ide1

NMI:          0 

LOC:     336325 

ERR:          1

MIS:          0

Then again with my parallel port as irq7:

           CPU0       

  0:      31457          XT-PIC  timer

  1:        503          XT-PIC  keyboard

  2:          0          XT-PIC  cascade

  5:         27          XT-PIC  Audigy

  9:       1556          XT-PIC  usb-uhci, usb-uhci, usb-uhci, eth0

 11:      20736          XT-PIC  nvidia

 12:      31647          XT-PIC  PS/2 Mouse

 14:      15036          XT-PIC  ide0

 15:          7          XT-PIC  ide1

NMI:          0 

LOC:      31425 

ERR:          9

MIS:          0

----------

## steveb

 *crimson wrote:*   

> Ok, I did cat /proc/interrupts when I had my parallel port as irq 5 and got:
> 
>            CPU0       
> 
>   0:     336355          XT-PIC  timer
> ...

 

looks like your soundcard (i think Audigy is a soundcard) likes to use irq5 or irq7. can you try to move your soundcard to another free irq (maybe 10 or 13?) and then try again with parport and parport_pc?

cheers

SteveB

----------

## crimson

sorry, I'm not quite sure how to change irq's for my sound card.  The bios only has option to change the parallel port and serial ports.

----------

## crimson

OK, this is good news for once :).  I updated the kernel, and built parport and printer support into the kernel.  It looks like the kernel finally detects my Printer!  

Here's my dmesg output:  

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

parport0: irq 7 detected

parport0: faking semi-colon

parport0: Printer, HEWLETT-PACKARD DESKJET 710C

spurious 8259A interrupt: IRQ7.

pty: 256 Unix98 ptys configured

Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI ISAPNP enabled

ttyS00 at 0x03f8 (irq = 4) is a 16550A

ttyS01 at 0x02f8 (irq = 3) is a 16550A

lp0: using parport0 (polling).

lp0: console ready

ppdev: user-space parallel port driver

However I still can't print :(.  Any suggestions?

----------

## crimson

I got it to WORK!!!  Ok, the problem was that I figured since I couldn't (and still can't) do a echo "printer test" > /dev/lp0 that the device wouldn't print.  This is wrong!  

I set up foomatic and cups with this command: 

foomatic-configure -s cups -p 71232 -c /dev/lp0 -n Deskjet -d pnm2ppa

And much to my surprise a test page actually printed out!  The other problem I had was not having PARPORT_PC_SUPERIO=y in the kernel.

Thanks for trying to help me out, it took a long time!

----------

