]> git.ipfire.org Git - thirdparty/util-linux.git/blame_incremental - sys-utils/tunelp.8
lsblk: allow to specify tree column
[thirdparty/util-linux.git] / sys-utils / tunelp.8
... / ...
CommitLineData
1.\" Copyright (C) 1992-1997 Michael K. Johnson <johnsonm@redhat.com>
2.\" Copyright (C) 1998 Andrea Arcangeli <andrea@e-mind.com>
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.
6.\"
7.TH TUNELP 8 "October 2011" "util-linux" "System Administration"
8.SH NAME
9tunelp \- set various parameters for the lp device
10.SH SYNOPSIS
11.B tunelp
12[options]
13.I device
14.SH DESCRIPTION
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
18interrupts, and if so, which one. With parameters, it sets the device
19characteristics accordingly.
20.SH OPTIONS
21.TP
22\fB\-i\fR, \fB\-\-irq\fR \fIargument\fR
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
26.B tunelp -i 0
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
35.IR /proc/parport/*/irq .
36Read
37.I /usr/src/linux/Documentation/parport.txt
38for more details on parport.
39.TP
40\fB\-t\fR, \fB\-\-time\fR \fImilliseconds\fR
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.
49.TP
50\fB\-c\fR, \fB\-\-chars\fR \fIcharacters\fR
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.
62.TP
63\fB\-w\fR, \fB\-\-wait\fR \fImilliseconds\fR
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.
70.TP
71\fB\-a\fR, \fB\-\-abort\fR \fI<on|off>\fR
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.
77.TP
78\fB\-o\fR, \fB\-\-check\-status\fR \fI<on|off>\fR
79This option is much like \-a. It makes any
80.BR open (2)
81of this device check to see that the device is on-line and not reporting any
82out of paper or other errors. This is the correct setting for most versions
83of lpd.
84.TP
85\fB\-C\fR, \fB\-\-careful\fR \fI<on|off>\fR
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.
93.TP
94\fB\-s\fR, \fB\-\-status\fR
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.
98.TP
99\fB\-r\fR, \fB\-\-reset\fR
100This option resets the port. It requires a Linux kernel version of 1.1.80 or
101later.
102.TP
103\fB\-q\fR, \fB\-\-print\-irq\fR \fI<on|off>\fR
104This option sets printing the display of the current IRQ setting.
105.SH NOTES
106.BR \-o ,
107.BR \-C ,
108and
109.B \-s
110all require a Linux kernel version of 1.1.76 or later.
111.PP
112.B \-C
113requires a Linux version prior to 2.1.131.
114.SH FILES
115.I /dev/lp?
116.br
117.I /proc/parport/*/*
118.SH AVAILABILITY
119The tunelp command is part of the util-linux package and is available from
120.UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
121Linux Kernel Archive
122.UE .