non-existant lp and parport devices

Joern Abatz joern at
Mon Jul 18 17:42:14 PDT 2005

On Mon, Jul 18, 2005 at 05:05:08PM -0600, Archaic wrote:
> I seem to be failing miserably at my first attempt to print with a 2.6
> kernel and udev. I've tried building parport and parport_pc modularly
> and non-modularly, with and without ieee1284 support and with and
> without FIFO/DMA support. I've also tried forcing the base address and
> IRQ. I've triple checked that the printer port is enabled in the BIOS
> (as an ECP-capable port). With parport and parport_cp built
> non-modularly and with no kernel args, dmesg gives:
> parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
> parport0: irq 7 detected
> However, udev does not make any parport or lp device files. I've tried
> creating both manually. Echoing anything to them gives me:
> bash: /dev/lp0: No such device or address
> I've tried lp0 to 4 and parport0 to 4. I've verified that the udev rules
> have both parport and lp rules. Cups claims the URI to the printer is:
> Device URI: parallel:/dev/unknown-parallel0
> This is the first time I've ever attempted to use a printer on this
> computer, so I'm not even sure if the port is screwed up or not. I only
> know that the dmesg output is confusing at best.
> /proc/sys/dev/parport/parport0/irq seems to suggest that the IRQ is
> wrong. So I switched to a modular parport so I could try different
> options. I explicitly passed modprobe parport_pc io=0x378 irq=7 and got:
> parport0: PC-style at 0x378 (0x778), irq 7, dma 7 [PCSPP,TRISTATE,COMPAT,ECP,DMA]
> This time /proc/sys/dev/parport/parport0/{dma,irq} show something other
> than -1 so it would seem that all is good. However, after deleting the
> printers and trying again I'm not even given the chance to choose the
> parallel port. Trying with lpadmin gives:
> lpadmin: add-printer (set device) failed: client-error-not-possible
> So I guess my question is which part of the puzzle is responsible for
> creating the devices?

You need both a kernel driver for parallel ports and another one for printer
support. Unfortunately they are in completely different places in the 'make
menuconfig' dialog: parallel port support is in the main menu, and printer
support is in 'device drivers/character devices'.

'No such file' means: /dev/lp0 is missing. 'No such device' means: the
kernel driver associated with /dev/lp0 is not answering. A list of drivers
and device files can be found in kernel/Documentation/devices.txt.

'lsmod' gives a list of loaded modules. 'cat /proc/devices' gives a list of
available devices in the kernel (though the corresponding files in /dev may
still not exist).

The udev rules for /dev/lp* are in /etc/udev like:
KERNEL="lp[0-9]*",      GROUP="lp"
KERNEL="parport[0-9]*", GROUP="lp"

(I have a kernel device 'lp', but no 'parport', so maybe the parport rule
is not necessary, I don't know.)

If you change the udev rules file, you need to call
'/etc/rc.d/init.d/udev start' once to make udev read the rules again.


More information about the blfs-support mailing list