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