FreeBSD 6.0/6.1: open ("/dev/lpt0" ...) hangs up

george+freebsd at george+freebsd at
Sat Jul 22 05:46:56 UTC 2006

A couple of days ago, I upgraded from FreeBSD 5.3 to 6.1 (installed
on a previously unused disk partition).  Happiness ensued for the
most part, but I could not get printing to work at all with the
generic kernel.

I played around for a while and eventually found that
open ("/dev/lpt0" ...) would hang up.  But if I tried it in single
user mode, it worked fine.  I could even "cat foo.txt >/dev/lpt0"
in single user mode and print.  But as soon as I went multi-user,
no joy.

I compiled a custom kernel, kicking out all sorts of stuff I didn't
need, and then everything started working.  But I could make it go
bad again by putting "device plip" back in.  With that kernel, as
before, I could open /dev/lpt0 in single-user mode but not in multi-
user mode.  Specifically, it's hanging up when it tries to request
the ppbus (line 478 of lpt.c) (as determined from the printfs I
sprinkled in).  I'm guessing that if_plip.c has requested it and not
released it, which apparently happens when there's been an ioctl on
the plip.  There's no plausible reason why anythhing should be
happeneing on plip, as far as I can tell.  What can I call in lpioctl
(if_plip.c line 302) to print out some identifying information
about the process doing the ioctl? 

This problem is also present in 6.0.  Why haven't a whole bunch of
people already run into it?  Am I the only person still using a
parallel port printer and (at first) a generic kernel?

-- George Mitchell

More information about the freebsd-hackers mailing list