[Desktop-packages] [Bug 1000253] Re: Brother HL-1440 printing extra page with PJL codes

2013-04-17 Thread irrelative
Thank you for your work!

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

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

Status in “cups” package in Ubuntu:
  Fix Released
Status in “cups” source package in Precise:
  Fix Released

Bug description:
  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
  (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 test -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
  

[Desktop-packages] [Bug 1000253] Re: Brother HL-1440 printing extra page with PJL codes

2013-04-15 Thread irrelative
$ lsusb
Bus 003 Device 005: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 004 Device 004: ID 1a86:7584 QinHeng Electronics CH340S
Bus 005 Device 002: ID 055f:0210 Mustek Systems, Inc. ScanExpress A3 USB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

No HP printers, no printers at all, but printing works. Connection through 
LPT-USB noname adapter! I think, not much choises, here is it:
Bus 004 Device 004: ID 1a86:7584 QinHeng Electronics CH340S

Yes, by the way! hp-toolbox (hplip-gui package) couldn't find any
printers, not automatically, not manually (Bus 004 Device 004), but CUPS
do (web interface - administration - add printer):

Local Printers: * Serial Port #1
* Serial Port #2
* HP LaserJet 5100 Series (HP LaserJet 5100 
Series)
* HP Printer (HPLIP)
* CUPS-PDF (Virtual PDF Printer)
* LPT #1
* HP Fax (HPLIP)

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

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

Status in “cups” package in Ubuntu:
  Fix Released
Status in “cups” source package in Precise:
  Fix Released

Bug description:
  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
  (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 

[Desktop-packages] [Bug 1000253] Re: Brother HL-1440 printing extra page with PJL codes

2013-04-11 Thread irrelative
No PJL pages for a week. Therefore, it's a solution.

usb-unidir-default
usb-no-reattach-default=true

What does these settings mean?
Should they persist after cups update?
Should they be included in cups package?

Unfortunately, Google shows only related bugs.

Thank you!

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

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

Status in “cups” package in Ubuntu:
  Fix Released
Status in “cups” source package in Precise:
  Fix Released

Bug description:
  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
  (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 test -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 

[Desktop-packages] [Bug 1000253] Re: Brother HL-1440 printing extra page with PJL codes

2013-04-03 Thread irrelative
$ cancel -a
$ lpadmin -p 'HP-LaserJet-5100-Series' -o usb-unidir-default=true
(usblp blacklisted!)
- five jobs printed, no PJL codes, succesful

$ lpadmin -p 'HP-LaserJet-5100-Series' -R usb-unidir-default
$ cancel -a
$ lpadmin -p 'HP-LaserJet-5100-Series' -o usb-no-reattach-default=true
(usblp blacklisted!)
- five jobs printed, no PJL codes, succesful

$ lpadmin -p 'HP-LaserJet-5100-Series' -R usb-no-reattach-default
$ cancel -a
$ lpadmin -p 'HP-LaserJet-5100-Series' -o usb-unidir-default=true
(usblp blacklisted!)
- five jobs printed, no PJL codes, succesful

$ lpadmin -p 'HP-LaserJet-5100-Series' -R usb-unidir-default
$ lsusb
Bus 003 Device 004: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 004 Device 032: ID 1a86:7584 QinHeng Electronics CH340S
Bus 005 Device 003: ID 055f:0210 Mustek Systems, Inc. ScanExpress A3 USB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

I understood you correctly? May be I should cancel blacklisting usblp
first (due to determined incompatibility)?

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

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

Status in “cups” package in Ubuntu:
  Fix Released
Status in “cups” source package in Precise:
  Fix Released

Bug description:
  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
  (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
  

[Desktop-packages] [Bug 1000253] Re: Brother HL-1440 printing extra page with PJL codes

2013-04-03 Thread irrelative
$ modprobe -l | grep usblp
kernel/drivers/usb/class/usblp.ko

reboot printer
$ cancel -a
$ lpadmin -p 'HP-LaserJet-5100-Series' -o usb-unidir-default=true
- 5 tests: ok, PJL, ok, PJL, ok

$ lpadmin -p 'HP-LaserJet-5100-Series' -R usb-unidir-default
$ cancel -a
reboot printer
$ lpadmin -p 'HP-LaserJet-5100-Series' -o usb-no-reattach-default=true
- 5 tests: ok, ok, ok, ok, ok

$ lpadmin -p 'HP-LaserJet-5100-Series' -R usb-no-reattach-default
$ cancel -a
reboot printer
$ lpadmin -p 'HP-LaserJet-5100-Series' -o usb-unidir-default=true
- 5 tests: ok, ok, ok, ok, ok

$ lpadmin -p 'HP-LaserJet-5100-Series' -R usb-unidir-default

May be, five tests is not sufficient. Errors appear in about 20% of
print jobs. Should I test more thoroughly?

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

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

Status in “cups” package in Ubuntu:
  Fix Released
Status in “cups” source package in Precise:
  Fix Released

Bug description:
  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
  (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 test -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 

[Desktop-packages] [Bug 1000253] Re: Brother HL-1440 printing extra page with PJL codes

2013-04-03 Thread irrelative
Understood. Will try this for a few days.
Thank you for paying attention to me!

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

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

Status in “cups” package in Ubuntu:
  Fix Released
Status in “cups” source package in Precise:
  Fix Released

Bug description:
  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
  (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 test -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 

[Desktop-packages] [Bug 1000253] Re: Brother HL-1440 printing extra page with PJL codes

2013-03-29 Thread irrelative
Similar symptoms as above. Occasionally printing PJL codes at the first
page, before queue useful data. After this garbage page, the queue
printing as expected.

Printer:
HP-LaserJet-5100
Printer work as local and network shared.
Printer connected through LPT-USB noname adapter.

System:
Linux 3.5.0-26-generic #40-Ubuntu SMP Tue Feb 26 19:57:24 UTC 2013 x86_64 
x86_64 x86_64 GNU/Linux
Distributor ID: Ubuntu
Description:Ubuntu 12.10
Release:12.10
Codename:   quantal

CUPS:
1.6.2-1ubuntu3

Printer worked fine with CUPS 1.5.3, PJL codes appeared after update to
1.6.x

After reading this topic, made some changes:
echo blacklist usblp  /etc/modprobe.d/blacklist-usblp.conf
rmmod usblp

Done some tests, so far no errors.
Logs in attach, but they have been written after blacklisting usblp. Sorry: 
work machine, haven't much time for debugging. By the way, I haven't notice any 
appropriate errors in logs before. May be, need to change debug level?


** Attachment added: logs.7z
   
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1000253/+attachment/3605653/+files/logs.7z

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

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

Status in “cups” package in Ubuntu:
  Fix Released
Status in “cups” source package in Precise:
  Fix Released

Bug description:
  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
  (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