** Description changed:

  When I send a job to the printer, it often (but not always) has an extra
  page before my print job with what appears to be PJL codes being printed
  out as text.  It usually looks something like this:
  
  JL SET MEDIATYPE-REGULAR
-                                                      @PJL SET SOURCETRAY=AUTO
-                                                                               
                               @PJL SET RESOLUTION=300
-                                                                               
                                                                                
   @PJL SET
+                                                      @PJL SET SOURCETRAY=AUTO
+                                                                               
                               @PJL SET RESOLUTION=300
+                                                                               
                                                                                   @PJL
 SET
  (the last line may be cut off by the right margin)
  
  This behavior started after I switched to Ubuntu 12.04.
  
  I am assuming this problem is in the printer driver (or somewhere in the
  print handling sequence), since it appears when printing from different
  programs.
  
  Release: 12.04
  Package version: 1.5.2-9ubuntu1
  
  Per instructions, I am attaching a print job I captured which shows the
  error.
+ 
+ [IMPACT]
+ 
+ Users of the Brother HL-1440 (and some other printers) get pages with
+ PJL commands when they print after the upgrade from Lucid LTS or Oneiric
+ to Precise LTS. In Precise the problem was solved by an ugly workaround
+ of blacklisting the usblp kernel module in the first CUPS SRU. This
+ solution breaks printing for other users, those who use proprietary
+ printer drivers with CUPS backends based on the old /dev/usb/lp* device
+ files and also users who send jobs by directly sending data to the
+ /dev/usb/lp* device files. This worked under Lucid LTS.
+ 
+ The libusb-based USB backend of CUPS was far from completely
+ implemented. It lacked the ability to communicate uni-directionally with
+ devices which are not able to communicate bi-directionally, refrain from
+ re-attaching the usblp kernel module after printing for some devices,
+ reset the printer after printing the job, ... In the proposed package
+ these adaptations for devices with quirks are done in the USB backend.
+ Especially this backend now works with said Brother printer by built-in
+ exception rules for this model, so that the communication is done uni-
+ directionally and the usblp kernel module will not get re-attached to
+ the printer after printing the job. This makes the printer working
+ without blacklisting the usblp module. So this second SRU is an improved
+ solution.
+ 
+ [TESTCASE]
+ 
+ Unfortunately, for reproducing this bug one needs the actual printer.
+ 
+ Connect a Brother HL-1440 to the USB port of the computer.
+ 
+ With stock Precise (without updates) you will not be able to print
+ correctly, you will get the PJL code. After applying the already
+ available updates (including the first SRU for CUPS) you will be able to
+ print, but only because the usblp kernel module is blacklisted. Remove
+ the blacklisting via
+ 
+ sudo mv /etc/modprobe.d/blacklist-cups-usblp.conf ~
+ sudo modprobe usblp
+ 
+ and you will get the problem again.
+ 
+ After installing the proposed package the kernel module is not
+ blacklisted any more and you will still be able to print.
+ 
+ If you are on a Precise with all updates and you have a print queue with
+ an URI containing /dev/usb/lp* you will not be able to print. This
+ worked with stock Precise and works again with the proposed package.
+ 
+ You can easily test this with any Ubuntu-supported USB printer:
+ 
+ lpadmin -p test -E -v parallel:/dev/usb/lp0 -m <PPD file which works with 
this printer>
+ lpadmin -p teat -o PageSize=A4
+ lp- d test ~/.bashrc
+ 
+ The printing on this queue works on stock Precise, does not work on
+ Precise with all updates (usblp is blacklisted) and works again with the
+ proposed package.
+ 
+ [Regression Potential]
+ 
+ The patch looks perhaps more dramatic than it is. This is because
+ several code sections are put into "if" blocks, indenting all the
+ (unchanged) code lines. This especially happens because now we suppress
+ using the back channel for selected printers (and also printers which
+ claim to be uni-directional only).
+ 
+ The code was developed in several steps and uploaded step-by-step to my
+ PPA. There the reporters of the bugs covered by this SRU and some
+ additional bugs (bug 902535, bug 995111) tested it intensively. They did
+ not hit any regressions compared to stock Precise or the first CUPS SRU.
+ 
+ The code is also applied to the CUPS package in Quantal and this also
+ did not cause any regression bug report yet.
+ 
+ I have tested the code on four HP printers (HP LaserJet 3390, HP Color
+ LaserJet CM3530 MFP, HP PhotoSmart C8100, HP PhotoSmart C5200, all on
+ direct USB) and one Epson printer (Epson Stylus Photo 880, both direct
+ USB and parallel with Prolific USB -> Parallel adaptor) and all work
+ fine, no regressions.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1000253

Title:
  Brother HL-1440 printing extra page with PJL codes

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1000253/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to