]>
Commit | Line | Data |
---|---|---|
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 |
9 | tunelp \- 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 |
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 | |
7eda085c | 18 | interrupts, and if so, which one. With parameters, it sets the device |
8de4751a SK |
19 | characteristics accordingly. |
20 | .SH OPTIONS | |
7eda085c | 21 | .TP |
42eb213e | 22 | \fB\-i\fR, \fB\-\-irq\fR \fIargument\fR |
8de4751a SK |
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 | |
1c4c6024 | 26 | .B tunelp \-i 0 |
8de4751a SK |
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 | |
7eda085c KZ |
35 | .IR /proc/parport/*/irq . |
36 | Read | |
37 | .I /usr/src/linux/Documentation/parport.txt | |
38 | for more details on parport. | |
7eda085c | 39 | .TP |
42eb213e | 40 | \fB\-t\fR, \fB\-\-time\fR \fImilliseconds\fR |
8de4751a SK |
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. | |
7eda085c | 49 | .TP |
42eb213e | 50 | \fB\-c\fR, \fB\-\-chars\fR \fIcharacters\fR |
8de4751a SK |
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. | |
7eda085c | 62 | .TP |
42eb213e | 63 | \fB\-w\fR, \fB\-\-wait\fR \fImilliseconds\fR |
8de4751a SK |
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. | |
7eda085c | 70 | .TP |
42eb213e | 71 | \fB\-a\fR, \fB\-\-abort\fR \fI<on|off>\fR |
8de4751a SK |
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. | |
7eda085c | 77 | .TP |
42eb213e | 78 | \fB\-o\fR, \fB\-\-check\-status\fR \fI<on|off>\fR |
7eda085c | 79 | This option is much like \-a. It makes any |
a7bbc2f3 | 80 | .BR open (2) |
7eda085c | 81 | of this device check to see that the device is on-line and not reporting any |
8de4751a SK |
82 | out of paper or other errors. This is the correct setting for most versions |
83 | of lpd. | |
7eda085c | 84 | .TP |
42eb213e | 85 | \fB\-C\fR, \fB\-\-careful\fR \fI<on|off>\fR |
8de4751a SK |
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. | |
7eda085c | 93 | .TP |
42eb213e | 94 | \fB\-s\fR, \fB\-\-status\fR |
8de4751a SK |
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. | |
7eda085c | 98 | .TP |
42eb213e | 99 | \fB\-r\fR, \fB\-\-reset\fR |
8de4751a SK |
100 | This option resets the port. It requires a Linux kernel version of 1.1.80 or |
101 | later. | |
7eda085c | 102 | .TP |
b06c1ca6 | 103 | \fB\-q\fR, \fB\-\-print\-irq\fR \fI<on|off>\fR |
7eda085c | 104 | This option sets printing the display of the current IRQ setting. |
7eda085c | 105 | .SH NOTES |
67925e34 PB |
106 | .BR \-o , |
107 | .BR \-C , | |
108 | and | |
109 | .B \-s | |
110 | all require a Linux kernel version of 1.1.76 or later. | |
8de4751a | 111 | .PP |
67925e34 PB |
112 | .B \-C |
113 | requires 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 | 119 | The 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 |
121 | Linux Kernel Archive |
122 | .UE . |