Penguin
Annotated edit history of tunelp(8) version 1 showing authors affecting page license. View with all changes included.
Rev Author # Line
1 perry 1 tunelp
2 !!!tunelp
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 NOTES
7 BUGS
8 FILES
9 ----
10 !!NAME
11
12
13 tunelp - set various parameters for the lp device
14 !!SYNOPSIS
15
16
17 __tunelp__ '''' [[-i '''' |
18 -t '''' | -c '''' | -w
19 '''' | -a [[on|off] | -o [[on|off] | -C
20 [[on|off] | -r | -s | -q [[on|off] | - T [[on|off]
21 ]
22 !!DESCRIPTION
23
24
25 __tunelp__ sets several parameters for the
26 /dev/lp''?'' devices, for better performance (or for any
27 performance at all, if your printer won't work without
28 it...) Without parameters, it tells whether the device is
29 using interrupts, and if so, which one. With parameters, it
30 sets the device characteristics accordingly. The parameters
31 are as follows:
32
33
34 __-i__ ''''
35
36
37 specifies the IRQ to use for the parallel port in question.
38 If this is set to something non-zero, -t and -c have no
39 effect. If your port does not use interrupts, this option
40 will make printing stop. The command __tunelp -i 0__
41 restores non-interrupt driven (polling) action, and your
42 printer should work again. If your parallel port does
43 support interrupts, interrupt-driven printing should be
44 somewhat faster and efficient, and will probably be
45 desirable.
46
47
48 NOTE: This option will have no effect with kernel 2.1.131 or
49 later since the irq is handled by the parport driver. You
50 can change the parport irq for example via
51 ''/proc/parport/*/irq''. Read
52 ''/usr/src/linux/Documentation/parport.txt'' for more
53 details on parport.
54
55
56 __-t__ ''''
57
58
59 is the amount of time in jiffies that the driver waits if
60 the printer doesn't take a character for the number of tries
61 dictated by the -c parameter. 10 is the default value. If
62 you want fastest possible printing, and don't care about
63 system load, you may set this to 0. If you don't care how
64 fast your printer goes, or are printing text on a slow
65 printer with a buffer, then 500 (5 seconds) should be fine,
66 and will give you very low system load. This value generally
67 should be lower for printing graphics than text, by a factor
68 of approximately 10, for best performance.
69
70
71 __-c__ ''''
72
73
74 is the number of times to try to output a character to the
75 printer before sleeping for -t ''''. It is
76 the number of times around a loop that tries to send a
77 character to the printer. 120 appears to be a good value for
78 most printers in polling mode. 1000 is the default, because
79 there are some printers that become jerky otherwise, but you
80 ''must'' set this to `1' to handle the maximal CPU
81 efficiency if you are using interrupts. If you have a very
82 fast printer, a value of 10 might make more sense even if in
83 polling mode. If you have a ''really'' old printer, you
84 can increase this further.
85
86
87 Setting -t '''' to 0 is equivalent to setting
88 -c '''' to infinity.
89
90
91 __-w__ ''''
92
93
94 is the number of usec we wait while playing with the strobe
95 signal. While most printers appear to be able to deal with
96 an extremely short strobe, some printers demand a longer
97 one. Increasing this from the default 1 may make it possible
98 to print with those printers. This may also make it possible
99 to use longer cables. It's also possible to decrease this
100 value to 0 if your printer is fast enough or your machine is
101 slow enough.
102
103
104 __-a [[on|off]__
105
106
107 This is whether to abort on printer error - the default is
108 not to. If you are sitting at your computer, you probably
109 want to be able to see an error and fix it, and have the
110 printer go on printing. On the other hand, if you aren't,
111 you might rather that your printer spooler find out that the
112 printer isn't ready, quit trying, and send you mail about
113 it. The choice is yours.
114
115
116 __-o [[on|off]__
117
118
119 This option is much like -a. It makes any ''open()'' of
120 this device check to see that the device is on-line and not
121 reporting any out of paper or other errors. This is the
122 correct setting for most versions of lpd.
123
124
125 __-C [[on|off]__
126
127
128 This option adds extra (
129
130
131 NOTE: This option is obsolete because it's the default in
132 2.1.131 kernel or later.
133
134
135 __-s__
136
137
138 This option returns the current printer status, both as a
139 decimal number from 0..255, and as a list of active flags.
140 When this option is specified, -q off, turning off the
141 display of the current IRQ, is implied.
142
143
144 __-T [[on|off]__
145
146
147 This option tell the lp driver to trust or not the IRQ. This
148 option makes sense only if you are using interrupts. If you
149 tell the lp driver to trust the irq, then, when the lp
150 driver will get an irq, it will send the next pending
151 character to the printer unconditionally, even if the
152 printer still claims to be BUSY. This is the only way to
153 sleep on interrupt (and so the handle the irq printing
154 efficiently) at least on Epson Stylus Color Printers. The lp
155 driver automagically detects if you could get improved
156 performance by setting this flag, and in such case it will
157 warn you with a kernel message.
158
159
160 NOTE: Trusting the irq is reported to corrupt the printing
161 on some hardware, you must try to know if your printer will
162 work or not...
163
164
165 __-r__
166
167
168 This option resets the port. It requires a Linux kernel
169 version of 1.1.80 or later.
170
171
172 __-q [[on|off]__
173
174
175 This option sets printing the display of the current IRQ
176 setting.
177 !!NOTES
178
179
180 -o, -C, and -s all require a Linux kernel version of 1.1.76
181 or later.
182
183
184 -C requires a Linux version prior to 2.1.131.
185
186
187 -T requires a Linux version of 2.1.131 or
188 later.
189 !!BUGS
190
191
192 By some unfortunate coincidence the ioctl LPSTRICT of 2.0.36
193 has the same number as the ioctl LPTRUSTIRQ introduced in
194 2.1.131. So, use of the -T option on a 2.0.36 kernel with an
195 tunelp compiled under 2.1.131 or later may have unexpected
196 effects.
197 !!FILES
198
199
200 ''/dev/lp?
201 /proc/parport/*/*''
202 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.