{
    "mode": "man",
    "parameter": "LP",
    "section": "4",
    "url": "https://www.chedong.com/phpMan.php/man/LP/4/json",
    "generated": "2026-11-11T07:10:44Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "lp - line printer devices\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "#include <linux/lp.h>",
                    "content": ""
                }
            ]
        },
        "CONFIGURATION": {
            "content": "lp[0–2]  are  character  devices for the parallel line printers; they have major number 6 and\nminor number 0–2.  The minor numbers correspond to the printer port  base  addresses  0x03bc,\n0x0378, and 0x0278.  Usually they have mode 220 and are owned by user root and group lp.  You\ncan  use  printer  ports  either with polling or with interrupts.  Interrupts are recommended\nwhen high traffic is expected, for example, for  laser  printers.   For  typical  dot  matrix\nprinters, polling will usually be enough.  The default is polling.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The following ioctl(2) calls are supported:\n\nint ioctl(int fd, LPTIME, int arg)\nSets  the amount of time that the driver sleeps before rechecking the printer when the\nprinter's buffer appears to be filled to arg.  If you have a  fast  printer,  decrease\nthis number; if you have a slow printer, then increase it.  This is in hundredths of a\nsecond, the default 2 being 0.02 seconds.  It influences only the polling driver.\n\nint ioctl(int fd, LPCHAR, int arg)\nSets  the  maximum  number of busy-wait iterations which the polling driver does while\nwaiting for the printer to get ready for receiving a character to arg.  If printing is\ntoo slow, increase this number; if the system gets too  slow,  decrease  this  number.\nThe default is 1000.  It influences only the polling driver.\n\nint ioctl(int fd, LPABORT, int arg)\nIf  arg  is  0, the printer driver will retry on errors, otherwise it will abort.  The\ndefault is 0.\n\nint ioctl(int fd, LPABORTOPEN, int arg)\nIf arg is 0, open(2) will be aborted on error, otherwise error will be  ignored.   The\ndefault is to ignore it.\n\nint ioctl(int fd, LPCAREFUL, int arg)\nIf  arg  is  0,  then  the out-of-paper, offline, and error signals are required to be\nfalse on all writes, otherwise they are ignored.  The default is to ignore them.\n\nint ioctl(int fd, LPWAIT, int arg)\nSets the number of busy waiting iterations to wait before strobing the printer to  ac‐\ncept a just-written character, and the number of iterations to wait before turning the\nstrobe  off  again,  to arg.  The specification says this time should be 0.5 microsec‐\nonds, but experience has shown the delay caused by the code is  already  enough.   For\nthat reason, the default value is 0.  This is used for both the polling and the inter‐\nrupt driver.\n\nint ioctl(int fd, LPSETIRQ, int arg)\nThis  ioctl(2)  requires superuser privileges.  It takes an int containing the new IRQ\nas argument.  As a side effect, the printer will be reset.  When arg is 0, the polling\ndriver will be used, which is also default.\n\nint ioctl(int fd, LPGETIRQ, int *arg)\nStores the currently used IRQ in arg.\n\nint ioctl(int fd, LPGETSTATUS, int *arg)\nStores the value of the status port in arg.  The bits have the following meaning:\nLPPBUSY     inverted busy input, active high\nLPPACK      unchanged acknowledge input, active low\nLPPOUTPA    unchanged out-of-paper input, active high\nLPPSELECD   unchanged selected input, active high\nLPPERRORP   unchanged error input, active low\n\nRefer to your printer manual for the meaning of the signals.  Note  that  undocumented\nbits may also be set, depending on your printer.\n\nint ioctl(int fd, LPRESET)\nResets the printer.  No argument is used.\n",
            "subsections": []
        },
        "FILES": {
            "content": "/dev/lp*\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "chmod(1), chown(1), mknod(1), lpcntl(8), tunelp(8)\n\nLinux man-pages 6.7                          2023-02-05                                        lp(4)",
            "subsections": []
        }
    },
    "summary": "lp - line printer devices",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "chmod",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/chmod/1/json"
        },
        {
            "name": "chown",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/chown/1/json"
        },
        {
            "name": "mknod",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mknod/1/json"
        },
        {
            "name": "lpcntl",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/lpcntl/8/json"
        },
        {
            "name": "tunelp",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/tunelp/8/json"
        }
    ]
}