Installing a USB Printer

Support knowledgebase (jsmeix_print-device-usb)
Applies to

SuSE Linux: Versions since 6.4

Situation:

You want to install a USB printer.

Prerequisite:

Procedure:

If you are running SuSE Linux 8.0, refer to the Reference Manual. We recommend you use YaST2 to configure your USB printer.

If you are running SuSE Linux 7.3 or a previous version and want to use /var/lib/apsfilter/SETUP (or lprsetup), select PARALLEL in the DEVICE section and enter /dev/usblp0 as device (see the article Installing a Printer).

Execute the following command as root to check if the USB printer is accessible:

echo -en "\rHello\r\f" >/dev/usblp0
or
echo -en "\rHello\r\f" >/dev/usb/lp0
If just a single USB printer is connected, you should get one sheet with the word Hello printed on it. This requires that the printer can print ASCII texts (here you can see the word Hello surrounded by the ASCII character \r for carriage return, followed by the ASCII character \f for a page feed). Printers unable to print ASCII text are mostly GDI printers. However, there are printers that cannot print ASCII text, but still run under Linux. See the articles GDI Printers and Purchase of Printers and Compatibility. If this is the case, at least the printer's manufacturer and product name should be displayed in the output of the command
cat /proc/bus/usb/devices
If neither manufacturer nor product name is shown, it usually does not make sense to attempt further configuration.

Try to reload the USB system with the command mentioned below (fuser ... ). If this does not work, check if the printer can be accessed via the first parallel port (see the SDB article "Installing a Printer").

If several USB printers are connected, note that the USB subsystem automatically detects connected USB printers. The first detected USB printer can be addressed via the device /dev/usblp0 or /dev/usb/lp0. The second via /dev/usblp1 or /dev/usb/lp1. The third via /dev/usblp2 or /dev/usb/lp2. Some printer models might also be automatically detected despite being turned off. The reason is that even when they are off, they are not separated from the power supply system and can be addressed through the USB connection. To avoid any confusion regarding the USB devices, all USB printers should be on before booting Linux.

Sometimes a USB printer can no longer be adressed, for example, if the USB plug is pulled out while printing. In this case, execute the following commands as root to finish all processes accessing /dev/usblp0 and to unload and subsequently reload the kernel modules relevant to the USB printer:

  fuser -k /dev/usblp0    or    fuser -k /dev/usb/lp0
  rmmod printer
  rmmod usb-uhci     or                     rmmod usb-ohci
  umount usbdevfs    from SuSE Linux 7.1 on rcusbmgr stop
  rmmod usbcore
  modprobe usbcore
  mount usbdevfs     from SuSE Linux 7.1 on rcusbmgr start
  modprobe usb-uhci  or                     modprobe usb-ohci
  modprobe printer
Before doing this, use the command lsmod to find out what USB modules are loaded (usb-uhci or usb-ohci) and if there are still module dependencies. For example, the message
usbcore ... [printer usb-uhci]
indicates that the module usbcore is required by the modules printer and usb-uhci. The modules printer and usb-uhci should be unloaded before the module usbcore.

It can also happen that not all the necessary kernel modules are loaded during the boot process. The necessary kernel modules in Intel-based systems are usbcore, usb-uhci (or usb-ohci), and printer. Only printer is needed in PPC-based systems. In this case, load the necessary modules with modprobe (see above). Also refer to the SDB article "Installing a USB printer with SuSE Linux 7.0".


See also:
o Installing a Printer from SuSE Linux 6.4 to 7.3

Keywords: PRINTING, PRINTER, USB

Categories: Frequently asked Questions , Documentation , Printer

SDB-jsmeix_print-device-usb, Copyright SuSE Linux AG, Nürnberg, Germany - Version: 22. Mar 2000
SuSE Linux AG - Last generated: 11. Oct 2002 by jsmeix (sdb_gen 1.40.0)