]> git.ipfire.org Git - thirdparty/util-linux.git/blame - sys-utils/tunelp.8
Imported from util-linux-2.7.1 tarball.
[thirdparty/util-linux.git] / sys-utils / tunelp.8
CommitLineData
fd6b7a7f
KZ
1.\" This file Copyright (C) 1992-1997 Michael K. Johnson <johnsonm@redhat.com>
2.\" It may be distributed under the terms of the GNU General Public License,
3.\" version 2, or any higher version. See section COPYING of the GNU General
4.\" Public license for conditions under which this file may be redistributed.
5.\" $Id: tunelp.8,v 1.6 1997/06/20 16:10:35 janl Exp $
6dbe3af9
KZ
6.TH tunelp 8 "26 August 1992" "Cohesive Systems" "Linux Programmer's Manual"
7.SH NAME
8tunelp \- set various parameters for the lp device
9.SH SYNOPSIS
10\fBtunelp\fP \fI<device>\fP [-i \fI<IRQ>\fP | -t \fI<TIME>\fP | -c \fI<CHARS>\fP | -w \fI<WAIT>\fP | -a [on|off] | -o [on|off] | -C [on|off] | -r | -s | -q [on|off] ]
11.SH DESCRIPTION
12\fBtunelp\fP sets several parameters for the /dev/lp\fI?\fP devices, for better
13performance (or for any performance at all, if your printer won't work
14without it...) Without parameters, tells whether the device is using
15interrups, and if so, which one. With parameters, sets the device
16characteristics accordingly. The parameters are as follows:
17
18-i \fI<IRQ>\fP is the IRQ to use for the parallel port in question. If this
19is set to something non-zero, -t and -c have no effect. If your port
20does not use interrupts, this option will make printing stop.
21.B tunelp -i 0
22restores non-interrupt driven (polling) action, and your printer should
23work again. If your parallel port does support interrupts,
24interrupt-driven printing should be somewhat faster and efficient, and
25will probably be desireable.
26
27-t \fI<TIME>\fP is the amount of time in jiffies that the driver waits if the
28printer doesn't take a character for the number of tries dictated by
29the -c parameter. 10 is the default value. If you want fastest
30possible printing, and don't care about system load, you may set this
31to 0. If you don't care how fast your printer goes, or are printing
32text on a slow printer with a buffer, then 500 (5 seconds) should be
33fine, and will give you very low system load. This value generally
34should be lower for printing graphics than text, by a factor of
35approximately 10, for best performance.
36
37-c \fI<CHARS>\fP is the number of times to try to output a character to the
38printer before sleeping for -t \fI<TIME>\fP. It is the number of times around
39a loop that tries to send a character to the printer. 120 appears to
40be a good value for most printers. 250 is the default, because there
41are some printers that require a wait this long, but feel free to
42change this. If you have a very fast printer like an HP laserjet 4, a
43value of 10 might make more sense. If you have a \fIreally\fP old
44printer, you can increase this farther.
45
46Setting -t \fI<TIME>\fP to 0 is equivalent to setting -c \fI<CHARS>\fP
47to infinity.
48
49-w \fI<WAIT>\fP is the a busy loop counter for the strobe signal. While most
50printers appear to be able to deal with an extremely short strobe,
51some printers demand a longer one. Increasing this from the default
520 may make it possible to print with those printers. This may also
53make it possible to use longer cables.
54
55-a [on|off] This is whether to abort on printer error -- the default
56is not to. If you are sitting at your computer, you probably want to
57be able to see an error and fix it, and have the printer go on
58printing. On the other hand, if you aren't, you might rather that
59your printer spooler find out that the printer isn't ready, quit
60trying, and send you mail about it. The choice is yours.
61
62-o [on|off] This option is much like -a. It makes any open() of this
63device check to see that the device is on-line and not reporting any
64out of paper or other errors. This is the correct setting for most
65versions of lpd.
66
67-C [on|off] This option adds extra ("careful") error checking. When
68this option is on, the printer driver will ensure that the printer is
69on-line and not reporting any out of paper or other errors before
70sending data. This is particularly useful for printers that normally
71appear to accept data when turned off.
72
73-s This option returns the current printer status, both as a
74decimal number from 0..255, and as a list of active flags. When
75this option is specified, -q off, turning off the display of the
76current IRQ, is implied.
77
78-o, -C, and -s all require a Linux kernel version of 1.1.76 or later.
79
80-r This option resets the port. It requires a Linux kernel version of
811.1.80 or later.
82
83-q [on|off] This option sets printing the display of the current IRQ
84setting.