LPT(4)
π LPT π
ok bestie, buckle up, we're talking about the lpt generic printer device driver, straight out of the Kernel Interfaces Manual. yes it's a manual page, yes it's from 1999, and yes it still ate π
β¨ NAME β¨
lpt β generic printer device driver π¨οΈπΈ
π¦ SYNOPSIS π¦
device ppc
device ppbus
device lpt
three little lines. that's it. that's the whole vibe. β¨
π DESCRIPTION π
okay so the current lpt driver is literally just the port of the original lpt driver over to the ppbus(4) system. a glow-up, if you will. π
and why did they do this port, you ask? two reasons, bestie:
- it lets the parallel port be shared with other parallel devices (sharing is caring, we love a communal queen π)
- the
inb()/outb()calls got swapped out forppbusfunction calls. and nowlptis arch-independent thanks to theppbusinterface. iconic. seeppbus(4)for more info about the wholeppbussystem, iykyk.
the parallel port bus gets allocated by lpt when the printer device is opened, and it's released only when the transfer is completed: either when the device is closed, or when the entire buffer is sent in interrupt driven mode. it holds on until it's done, no cap π«Ά
the driver can be configured to be either interrupt-driven, or to poll the printer. and here's the cute part β ports that are configured to be interrupt-driven can be switched to polled mode by using the lptcontrol(8) command. slay.
depending on your hardware, extended capabilities may be configured with the lptcontrol(8) command too. with an ECP/ISA port, you can take advantage of FIFO and DMA. fancy. π₯
and ooh, want printer info from /dev/lpt0? just apply the cat command to the device, literally that's it. if the printer supports IEEE1284 nibble mode and has data to send to the host, you will get it. it's giving instant gratification. π
πΈ FILES πΈ
/dev/lpt0β first parallel port driver β
π SEE ALSO π
go read them, bestie, they're all in the group chat π«Ά
π HISTORY π
this driver replaces the functionality of the lpa driver, which is now defunct. lpa didn't make it. we don't talk about lpa. π
π BUGS π
ok so, the tea:
- there are lots of them. especially in cheap parallel port implementations. (the cheap ones are NOT passing the vibe check π)
- it is only possible to open a
lptport when a printer is connected and on-line, which makes it impossible to runlptcontrol(8)when there is no printer connected. like, you literally can't. the door is locked and the printer has the key. π - this driver could still stand a rewrite.
fr fr, that last one is just written in the manual. they said it, not me. π
and that's the whole page, bestie!! π this one came out of the Debian edition, dated February 14, 1999 β a literal Valentine's Day release, which is honestly the most romantic thing a manpage has ever done. happy reading, go cat a printer. π¦πβ¨
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1993 Christopher G. Demetriou
- Copyright (c) 1994 Geoffrey M. Rehmet
- Copyright (c) 1999 Nicolas Souchu
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms