DebuggingPrintingProblems

Differences between revisions 29 and 31 (spanning 2 versions)
Revision 29 as of 2008-06-23 22:52:39
Size: 4052
Editor: c-24-21-234-111
Comment:
Revision 31 as of 2008-08-06 16:41:07
Size: 4065
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
[[Include(Debugging/Header)]]
||<tablestyle="float:right; font-size: 0.9em; width:30%; background:#F1F1ED; background-image: url('https://librarian.launchpad.net/1812570/bugsquad.png'); background-repeat: no-repeat; background-position: 98% 0.5ex; margin: 0 0 1em 1em; padding: 0.5em;">'''Contents'''[[BR]][[TableOfContents]]||
<<Include(Debugging/Header)>>
||<tablestyle="float:right; font-size: 0.9em; width:30%; background:#F1F1ED; background-image: url('https://librarian.launchpad.net/1812570/bugsquad.png'); background-repeat: no-repeat; background-position: 98% 0.5ex; margin: 0 0 1em 1em; padding: 0.5em;">'''Contents'''<<BR>><<TableOfContents>>||
Line 9: Line 9:
 2. Open a terminal/console and check if the usb kernel modules are loaded: [[BR]] {{{$ lsmod | grep usb}}}
 3. Unplug the USB printer cable from your computer and enter this command: [[BR]] {{{$ tail -f /var/log/messages }}}
 2. Open a terminal/console and check if the usb kernel modules are loaded: <<BR>> {{{$ lsmod | grep usb}}}
 3. Unplug the USB printer cable from your computer and enter this command: <<BR>> {{{$ tail -f /var/log/messages }}}
Line 13: Line 13:
 6. Find out if your printer gets detected by CUPS: [[BR]] {{{$ lpinfo -v}}}  6. Find out if your printer gets detected by CUPS: <<BR>> {{{$ lpinfo -v}}}
Line 19: Line 19:
 2. Open a terminal/console and check if the lp and ppdev kernel modules are loaded: [[BR]] {{{$ lsmod | grep lp}}}
 3. Check if the kernel detected the parallel port during bootup: [[BR]] {{{$ dmesg | grep par }}}
 4. Find out if your printer gets detected by CUPS: [[BR]] {{{$ lpinfo -v}}}
 2. Open a terminal/console and check if the lp and ppdev kernel modules are loaded: <<BR>> {{{$ lsmod | grep lp}}}
 3. Check if the kernel detected the parallel port during bootup: <<BR>> {{{$ dmesg | grep par }}}
 4. Find out if your printer gets detected by CUPS: <<BR>> {{{$ lpinfo -v}}}
Line 27: Line 27:
[[Anchor(cupserrorlog)]] <<Anchor(cupserrorlog)>>
Line 29: Line 29:
This is a file where CUPS writes information about what it is doing. Almost all printing problems can be diagnosed from the error log, so it is the first place to look to start solving problems. To be useful, you must change the logging level: [[BR]] This is a file where CUPS writes information about what it is doing. Almost all printing problems can be diagnosed from the error log, so it is the first place to look to start solving problems. To be useful, you must change the logging level: <<BR>>
Line 31: Line 31:
 2. In all Kubuntu versions and Ubuntu Feisty or older edit the file {{{/etc/cups/cupsd.conf}}}, find the line '''Log``Level ...''' and change it to '''Log``Level debug''', save the file. Then restart CUPS: [[BR]] {{{$ sudo /etc/init.d/cupsys restart}}}  2. In all Kubuntu versions and Ubuntu Feisty or older edit the file {{{/etc/cups/cupsd.conf}}}, find the line '''Log``Level ...''' and change it to '''Log``Level debug''', save the file. Then restart CUPS: <<BR>> {{{$ sudo /etc/init.d/cupsys restart}}}
Line 36: Line 36:
From Gutsy on the security of the CUPS printing system is improved by using App``Armor. Unfortunately, the configuration is not perfect yet, especially if third-party printer drivers are used. If you have any problems with printing, try deactivating the App``Armor protection with {{{sudo aa-complain cupsd}}}. If this helps, look for messages containing '''audit''' in the {{{/var/log/messages}}} file. These show which components are accessed by the printing system for which there is no explicit permission given in {{{/etc/apparmor.d/usr.sbin.cupsd}}}. You can re-activate App``Armor via {{{sudo aa-enforce cupsd}}}. Report a bug (package "cupsys" so that we can correct the default configuration of App``Armor. From Gutsy on the security of the CUPS printing system is improved by using App``Armor. Unfortunately, the configuration is not perfect yet, especially if third-party printer drivers are used. If you have any problems with printing, try deactivating the App``Armor protection with {{{sudo aa-complain cupsd}}}. If this helps, look for messages containing '''audit''' in the {{{/var/log/messages}}} file. These show which components are accessed by the printing system for which there is no explicit permission given in {{{/etc/apparmor.d/usr.sbin.cupsd}}}. You can re-activate App``Armor via {{{sudo aa-enforce cupsd}}}. Report a bug, about the package "cupsys", so that we can correct the default configuration of App``Armor.
Line 44: Line 44:
|| [https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/29050 29050] || Parallel/LPT printer not detected in Dapper and Edgy. Fixed in Feisty. || add "ppdev" to {{{/etc/modules}}} || || [[https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/29050|29050]] || Parallel/LPT printer not detected in Dapper and Edgy. Fixed in Feisty. || add "ppdev" to {{{/etc/modules}}} ||

Debugging Central

This page is part of the debugging series — pages with debugging details for a variety of Ubuntu packages.

Printer detection

USB printer

  1. Make sure that the printer is connected to your system and powered on.
  2. Open a terminal/console and check if the usb kernel modules are loaded:
    $ lsmod | grep usb

  3. Unplug the USB printer cable from your computer and enter this command:
    $ tail -f /var/log/messages 

  4. Reconnect the USB printer cable, you should see some messages appearing.
  5. Press Ctrl-C to stop the logging.
  6. Find out if your printer gets detected by CUPS:
    $ lpinfo -v

  7. Attach the output of the above commands to the bug report.

Parallel port printer

  1. Make sure that the printer is connected to your system and powered on.
  2. Open a terminal/console and check if the lp and ppdev kernel modules are loaded:
    $ lsmod | grep lp

  3. Check if the kernel detected the parallel port during bootup:
    $ dmesg | grep par 

  4. Find out if your printer gets detected by CUPS:
    $ lpinfo -v

  5. Attach the output of the above commands to the bug report.

Printing bug info

Attach the output of the printingbuginfo script for some useful information about your system related to printing like the version of Ubuntu you use, configured printers and the versions of important printing packages installed. The printingbuginfo script can be found here: https://wiki.ubuntu.com/PrintingBugInfoScript.

CUPS error_log

This is a file where CUPS writes information about what it is doing. Almost all printing problems can be diagnosed from the error log, so it is the first place to look to start solving problems. To be useful, you must change the logging level:

  1. In Ubuntu Gutsy or newer, select "System" -> "Administration" -> "Printing" in the main menu of your desktop. The printer setup tool system-config-printer will open. Select "Server Settings" in the list on the left. Then check the checkbox "Save debugging information for troubleshooting" and click "Apply".

  2. In all Kubuntu versions and Ubuntu Feisty or older edit the file /etc/cups/cupsd.conf, find the line LogLevel ... and change it to LogLevel debug, save the file. Then restart CUPS:
    $ sudo /etc/init.d/cupsys restart

  3. Try to print something.
  4. Add /var/log/cups/error_log as an attachment to the bug report.

AppArmor Protection of the printing system

From Gutsy on the security of the CUPS printing system is improved by using AppArmor. Unfortunately, the configuration is not perfect yet, especially if third-party printer drivers are used. If you have any problems with printing, try deactivating the AppArmor protection with sudo aa-complain cupsd. If this helps, look for messages containing audit in the /var/log/messages file. These show which components are accessed by the printing system for which there is no explicit permission given in /etc/apparmor.d/usr.sbin.cupsd. You can re-activate AppArmor via sudo aa-enforce cupsd. Report a bug, about the package "cupsys", so that we can correct the default configuration of AppArmor.

Known bugs

Description of known issues, how to recognise them and stock responses/actions.

Bug#

Description

Action

29050

Parallel/LPT printer not detected in Dapper and Edgy. Fixed in Feisty.

add "ppdev" to /etc/modules


CategoryBugSquad CategoryDebugging

DebuggingPrintingProblems (last edited 2018-07-03 19:37:28 by vorlon)