2015-01-11 15:27:56 -06:00
|
|
|
.\" Copyright (C) 1992-1997 Michael K. Johnson <johnsonm@redhat.com>
|
|
|
|
.\" Copyright (C) 1998 Andrea Arcangeli <andrea@e-mind.com>
|
2006-12-06 17:25:34 -06:00
|
|
|
.\" It may be distributed under the terms of the GNU General Public License,
|
|
|
|
.\" version 2, or any higher version. See section COPYING of the GNU General
|
|
|
|
.\" Public license for conditions under which this file may be redistributed.
|
2006-12-06 17:25:39 -06:00
|
|
|
.\"
|
2011-10-30 10:25:16 -05:00
|
|
|
.TH TUNELP 8 "October 2011" "util-linux" "System Administration"
|
2006-12-06 17:25:32 -06:00
|
|
|
.SH NAME
|
|
|
|
tunelp \- set various parameters for the lp device
|
|
|
|
.SH SYNOPSIS
|
2009-07-22 04:29:04 -05:00
|
|
|
.B tunelp
|
2011-10-30 10:25:16 -05:00
|
|
|
[options]
|
2009-07-22 04:29:04 -05:00
|
|
|
.I device
|
2006-12-06 17:25:32 -06:00
|
|
|
.SH DESCRIPTION
|
2011-10-30 10:41:21 -05:00
|
|
|
\fBtunelp\fP sets several parameters for the /dev/lp\fI?\fP devices, for
|
|
|
|
better performance (or for any performance at all, if your printer won't work
|
|
|
|
without it...) Without parameters, it tells whether the device is using
|
2006-12-06 17:25:39 -06:00
|
|
|
interrupts, and if so, which one. With parameters, it sets the device
|
2011-10-30 10:41:21 -05:00
|
|
|
characteristics accordingly.
|
|
|
|
.SH OPTIONS
|
2006-12-06 17:25:39 -06:00
|
|
|
.TP
|
2011-10-30 10:25:16 -05:00
|
|
|
\fB\-i\fR, \fB\-\-irq\fR \fIargument\fR
|
2011-10-30 10:41:21 -05:00
|
|
|
specifies the IRQ to use for the parallel port in question. If this is set
|
|
|
|
to something non-zero, \-t and \-c have no effect. If your port does not use
|
|
|
|
interrupts, this option will make printing stop. The command
|
2019-12-15 18:51:57 -06:00
|
|
|
.B tunelp \-i 0
|
2011-10-30 10:41:21 -05:00
|
|
|
restores non-interrupt driven (polling) action, and your printer should work
|
|
|
|
again. If your parallel port does support interrupts, interrupt-driven
|
|
|
|
printing should be somewhat faster and efficient, and will probably be
|
|
|
|
desirable.
|
|
|
|
.IP
|
|
|
|
NOTE: This option will have no effect with kernel 2.1.131 or later since the
|
|
|
|
irq is handled by the parport driver. You can change the parport irq for
|
|
|
|
example via
|
2006-12-06 17:25:39 -06:00
|
|
|
.IR /proc/parport/*/irq .
|
|
|
|
Read
|
2020-05-17 10:13:22 -05:00
|
|
|
.I /usr/src/linux/Documentation/admin-guide/parport.rst
|
2006-12-06 17:25:39 -06:00
|
|
|
for more details on parport.
|
|
|
|
.TP
|
2011-10-30 10:25:16 -05:00
|
|
|
\fB\-t\fR, \fB\-\-time\fR \fImilliseconds\fR
|
2011-10-30 10:41:21 -05:00
|
|
|
is the amount of time in jiffies that the driver waits if the printer doesn't
|
|
|
|
take a character for the number of tries dictated by the \-c parameter. 10
|
|
|
|
is the default value. If you want fastest possible printing, and don't care
|
|
|
|
about system load, you may set this to 0. If you don't care how fast your
|
|
|
|
printer goes, or are printing text on a slow printer with a buffer, then 500
|
|
|
|
(5 seconds) should be fine, and will give you very low system load. This
|
|
|
|
value generally should be lower for printing graphics than text, by a factor
|
|
|
|
of approximately 10, for best performance.
|
2006-12-06 17:25:39 -06:00
|
|
|
.TP
|
2011-10-30 10:25:16 -05:00
|
|
|
\fB\-c\fR, \fB\-\-chars\fR \fIcharacters\fR
|
2011-10-30 10:41:21 -05:00
|
|
|
is the number of times to try to output a character to the printer before
|
|
|
|
sleeping for \-t \fITIME\fP. It is the number of times around a loop that
|
|
|
|
tries to send a character to the printer. 120 appears to be a good value for
|
|
|
|
most printers in polling mode. 1000 is the default, because there are some
|
|
|
|
printers that become jerky otherwise, but you \fImust\fP set this to `1' to
|
|
|
|
handle the maximal CPU efficiency if you are using interrupts. If you have a
|
|
|
|
very fast printer, a value of 10 might make more sense even if in polling
|
|
|
|
mode. If you have a \fIreally\fP old printer, you can increase this further.
|
|
|
|
.IP
|
|
|
|
Setting \-t \fITIME\fP to 0 is equivalent to setting \-c \fICHARS\fP to
|
|
|
|
infinity.
|
2006-12-06 17:25:39 -06:00
|
|
|
.TP
|
2011-10-30 10:25:16 -05:00
|
|
|
\fB\-w\fR, \fB\-\-wait\fR \fImilliseconds\fR
|
2011-10-30 10:41:21 -05:00
|
|
|
is the number of usec we wait while playing with the strobe signal. While
|
|
|
|
most printers appear to be able to deal with an extremely short strobe, some
|
|
|
|
printers demand a longer one. Increasing this from the default 1 may make it
|
|
|
|
possible to print with those printers. This may also make it possible to use
|
|
|
|
longer cables. It's also possible to decrease this value to 0 if your
|
|
|
|
printer is fast enough or your machine is slow enough.
|
2006-12-06 17:25:39 -06:00
|
|
|
.TP
|
2011-10-30 10:25:16 -05:00
|
|
|
\fB\-a\fR, \fB\-\-abort\fR \fI<on|off>\fR
|
2011-10-30 10:41:21 -05:00
|
|
|
This is whether to abort on printer error - the default is not to. If you
|
|
|
|
are sitting at your computer, you probably want to be able to see an error
|
|
|
|
and fix it, and have the printer go on printing. On the other hand, if you
|
|
|
|
aren't, you might rather that your printer spooler find out that the printer
|
|
|
|
isn't ready, quit trying, and send you mail about it. The choice is yours.
|
2006-12-06 17:25:39 -06:00
|
|
|
.TP
|
2011-10-30 10:25:16 -05:00
|
|
|
\fB\-o\fR, \fB\-\-check\-status\fR \fI<on|off>\fR
|
2006-12-06 17:25:39 -06:00
|
|
|
This option is much like \-a. It makes any
|
2016-11-10 04:59:37 -06:00
|
|
|
.BR open (2)
|
2006-12-06 17:25:39 -06:00
|
|
|
of this device check to see that the device is on-line and not reporting any
|
2011-10-30 10:41:21 -05:00
|
|
|
out of paper or other errors. This is the correct setting for most versions
|
|
|
|
of lpd.
|
2006-12-06 17:25:39 -06:00
|
|
|
.TP
|
2011-10-30 10:25:16 -05:00
|
|
|
\fB\-C\fR, \fB\-\-careful\fR \fI<on|off>\fR
|
2011-10-30 10:41:21 -05:00
|
|
|
This option adds extra ("careful") error checking. When this option is on,
|
|
|
|
the printer driver will ensure that the printer is on-line and not reporting
|
|
|
|
any out of paper or other errors before sending data. This is particularly
|
|
|
|
useful for printers that normally appear to accept data when turned off.
|
|
|
|
.IP
|
|
|
|
NOTE: This option is obsolete because it's the default in 2.1.131 kernel or
|
|
|
|
later.
|
2006-12-06 17:25:39 -06:00
|
|
|
.TP
|
2011-10-30 10:25:16 -05:00
|
|
|
\fB\-s\fR, \fB\-\-status\fR
|
2011-10-30 10:41:21 -05:00
|
|
|
This option returns the current printer status, both as a decimal number from
|
|
|
|
0..255, and as a list of active flags. When this option is specified, \-q
|
|
|
|
off, turning off the display of the current IRQ, is implied.
|
2006-12-06 17:25:39 -06:00
|
|
|
.TP
|
2011-10-30 10:25:16 -05:00
|
|
|
\fB\-r\fR, \fB\-\-reset\fR
|
2011-10-30 10:41:21 -05:00
|
|
|
This option resets the port. It requires a Linux kernel version of 1.1.80 or
|
|
|
|
later.
|
2006-12-06 17:25:39 -06:00
|
|
|
.TP
|
2015-01-19 19:11:52 -06:00
|
|
|
\fB\-q\fR, \fB\-\-print\-irq\fR \fI<on|off>\fR
|
2006-12-06 17:25:39 -06:00
|
|
|
This option sets printing the display of the current IRQ setting.
|
Manual pages: order NOTES / HISTORY / BUGS / EXAMPLE consistently
There is value in ensuring that manual page sections use consistently
named sections, as far as possible, and also that sections have a
consistent order within manual pages. This is one of a series of patches
to place manual page sections in a consistent order.
In this patch, we ensure that the NOTES, HISTORY, BUGS, and EXAMPLE
sections are always placed near the end of the page, just above
AUTHORS, COPYRIGHT, SEE ALSO, and AVAILABILITY.
One page is not fixed by this patch: term-utils/agetty.8. This page
is a mess of unusual section names, and probably requires an individual
edit.
Testing that no gross editing mistake (causing accidental loss or addition
of text) was performed as follows:
$ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > a
[Apply patch]
$ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > b
$ diff a b
$ echo $?
0
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-21 02:28:32 -05:00
|
|
|
.SH FILES
|
|
|
|
.I /dev/lp?
|
|
|
|
.br
|
|
|
|
.I /proc/parport/*/*
|
2006-12-06 17:25:39 -06:00
|
|
|
.SH NOTES
|
2009-07-22 04:29:04 -05:00
|
|
|
.BR \-o ,
|
|
|
|
.BR \-C ,
|
|
|
|
and
|
|
|
|
.B \-s
|
|
|
|
all require a Linux kernel version of 1.1.76 or later.
|
2011-10-30 10:41:21 -05:00
|
|
|
.PP
|
2009-07-22 04:29:04 -05:00
|
|
|
.B \-C
|
|
|
|
requires a Linux version prior to 2.1.131.
|
2007-07-02 18:17:04 -05:00
|
|
|
.SH AVAILABILITY
|
2010-11-30 04:41:59 -06:00
|
|
|
The tunelp command is part of the util-linux package and is available from
|
2016-12-17 02:06:57 -06:00
|
|
|
.UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
|
2011-10-30 10:41:21 -05:00
|
|
|
Linux Kernel Archive
|
|
|
|
.UE .
|