]> git.ipfire.org Git - thirdparty/util-linux.git/blame - sys-utils/tunelp.8
docs: update year in libs docs
[thirdparty/util-linux.git] / sys-utils / tunelp.8
CommitLineData
3a60b1c2
BS
1.\" Copyright (C) 1992-1997 Michael K. Johnson <johnsonm@redhat.com>
2.\" Copyright (C) 1998 Andrea Arcangeli <andrea@e-mind.com>
fd6b7a7f
KZ
3.\" It may be distributed under the terms of the GNU General Public License,
4.\" version 2, or any higher version. See section COPYING of the GNU General
5.\" Public license for conditions under which this file may be redistributed.
7eda085c 6.\"
42eb213e 7.TH TUNELP 8 "October 2011" "util-linux" "System Administration"
6dbe3af9
KZ
8.SH NAME
9tunelp \- set various parameters for the lp device
10.SH SYNOPSIS
67925e34 11.B tunelp
42eb213e 12[options]
67925e34 13.I device
6dbe3af9 14.SH DESCRIPTION
8de4751a
SK
15\fBtunelp\fP sets several parameters for the /dev/lp\fI?\fP devices, for
16better performance (or for any performance at all, if your printer won't work
17without it...) Without parameters, it tells whether the device is using
7eda085c 18interrupts, and if so, which one. With parameters, it sets the device
8de4751a
SK
19characteristics accordingly.
20.SH OPTIONS
7eda085c 21.TP
42eb213e 22\fB\-i\fR, \fB\-\-irq\fR \fIargument\fR
8de4751a
SK
23specifies the IRQ to use for the parallel port in question. If this is set
24to something non-zero, \-t and \-c have no effect. If your port does not use
25interrupts, this option will make printing stop. The command
1c4c6024 26.B tunelp \-i 0
8de4751a
SK
27restores non-interrupt driven (polling) action, and your printer should work
28again. If your parallel port does support interrupts, interrupt-driven
29printing should be somewhat faster and efficient, and will probably be
30desirable.
31.IP
32NOTE: This option will have no effect with kernel 2.1.131 or later since the
33irq is handled by the parport driver. You can change the parport irq for
34example via
7eda085c
KZ
35.IR /proc/parport/*/irq .
36Read
37.I /usr/src/linux/Documentation/parport.txt
38for more details on parport.
7eda085c 39.TP
42eb213e 40\fB\-t\fR, \fB\-\-time\fR \fImilliseconds\fR
8de4751a
SK
41is the amount of time in jiffies that the driver waits if the printer doesn't
42take a character for the number of tries dictated by the \-c parameter. 10
43is the default value. If you want fastest possible printing, and don't care
44about system load, you may set this to 0. If you don't care how fast your
45printer goes, or are printing text on a slow printer with a buffer, then 500
46(5 seconds) should be fine, and will give you very low system load. This
47value generally should be lower for printing graphics than text, by a factor
48of approximately 10, for best performance.
7eda085c 49.TP
42eb213e 50\fB\-c\fR, \fB\-\-chars\fR \fIcharacters\fR
8de4751a
SK
51is the number of times to try to output a character to the printer before
52sleeping for \-t \fITIME\fP. It is the number of times around a loop that
53tries to send a character to the printer. 120 appears to be a good value for
54most printers in polling mode. 1000 is the default, because there are some
55printers that become jerky otherwise, but you \fImust\fP set this to `1' to
56handle the maximal CPU efficiency if you are using interrupts. If you have a
57very fast printer, a value of 10 might make more sense even if in polling
58mode. If you have a \fIreally\fP old printer, you can increase this further.
59.IP
60Setting \-t \fITIME\fP to 0 is equivalent to setting \-c \fICHARS\fP to
61infinity.
7eda085c 62.TP
42eb213e 63\fB\-w\fR, \fB\-\-wait\fR \fImilliseconds\fR
8de4751a
SK
64is the number of usec we wait while playing with the strobe signal. While
65most printers appear to be able to deal with an extremely short strobe, some
66printers demand a longer one. Increasing this from the default 1 may make it
67possible to print with those printers. This may also make it possible to use
68longer cables. It's also possible to decrease this value to 0 if your
69printer is fast enough or your machine is slow enough.
7eda085c 70.TP
42eb213e 71\fB\-a\fR, \fB\-\-abort\fR \fI<on|off>\fR
8de4751a
SK
72This is whether to abort on printer error - the default is not to. If you
73are sitting at your computer, you probably want to be able to see an error
74and fix it, and have the printer go on printing. On the other hand, if you
75aren't, you might rather that your printer spooler find out that the printer
76isn't ready, quit trying, and send you mail about it. The choice is yours.
7eda085c 77.TP
42eb213e 78\fB\-o\fR, \fB\-\-check\-status\fR \fI<on|off>\fR
7eda085c 79This option is much like \-a. It makes any
a7bbc2f3 80.BR open (2)
7eda085c 81of this device check to see that the device is on-line and not reporting any
8de4751a
SK
82out of paper or other errors. This is the correct setting for most versions
83of lpd.
7eda085c 84.TP
42eb213e 85\fB\-C\fR, \fB\-\-careful\fR \fI<on|off>\fR
8de4751a
SK
86This option adds extra ("careful") error checking. When this option is on,
87the printer driver will ensure that the printer is on-line and not reporting
88any out of paper or other errors before sending data. This is particularly
89useful for printers that normally appear to accept data when turned off.
90.IP
91NOTE: This option is obsolete because it's the default in 2.1.131 kernel or
92later.
7eda085c 93.TP
42eb213e 94\fB\-s\fR, \fB\-\-status\fR
8de4751a
SK
95This option returns the current printer status, both as a decimal number from
960..255, and as a list of active flags. When this option is specified, \-q
97off, turning off the display of the current IRQ, is implied.
7eda085c 98.TP
42eb213e 99\fB\-r\fR, \fB\-\-reset\fR
8de4751a
SK
100This option resets the port. It requires a Linux kernel version of 1.1.80 or
101later.
7eda085c 102.TP
b06c1ca6 103\fB\-q\fR, \fB\-\-print\-irq\fR \fI<on|off>\fR
7eda085c 104This option sets printing the display of the current IRQ setting.
7eda085c 105.SH NOTES
67925e34
PB
106.BR \-o ,
107.BR \-C ,
108and
109.B \-s
110all require a Linux kernel version of 1.1.76 or later.
8de4751a 111.PP
67925e34
PB
112.B \-C
113requires a Linux version prior to 2.1.131.
7eda085c
KZ
114.SH FILES
115.I /dev/lp?
116.br
117.I /proc/parport/*/*
86d62711 118.SH AVAILABILITY
601d12fb 119The tunelp command is part of the util-linux package and is available from
d673b74e 120.UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
8de4751a
SK
121Linux Kernel Archive
122.UE .