Re: [Desktop-packages] [Bug 1568996] Re: Duplex printing does not work properly for HP printers
-- You received this bug notification because you are a member of Desktop Packages, which is subscribed to hplip in Ubuntu. https://bugs.launchpad.net/bugs/1568996 Title: Duplex printing does not work properly for HP printers Status in hplip package in Ubuntu: Incomplete Bug description: I am reporting this as a new bug because I want to avoid adding further to the mish mash of half fixed bugs that is duplex printing on hp printers via cups. I will warn readers that this will sound like a bit of a rant. But these issues have been outstanding for years 1. Take the hpcups.drv driver information from the upstream part of the current source package and run it throught the cups ppd compiler in test mode, anbd filter the output for failures. roger@dragon:~/ppd-testing$ ppdc -t hpcups.drv.upstream | grep FAIL roger@dragon:~/ppd-testing$ Result a nice clean file. 2. Take this file and run it through the script debian/local/make- duplex-page-sizes-default.sh that is run when this file is installed on a system. Then repeat the above test. roger@dragon:~/ppd-testing$ ppdc -t hpcups.drv.munged | grep FAIL --- Other FAILS removed hp-photosmart_6510_series.ppd: FAIL **FAIL** Multiple occurrences of option PageRegion choice name Card4x6. **FAIL** Multiple occurrences of option PageRegion choice name Hagaki. **FAIL** Multiple occurrences of option PageRegion choice name Card5x8. **FAIL** Multiple occurrences of option PageRegion choice name Oufuku. **FAIL** Multiple occurrences of option PageRegion choice name Executive. **FAIL** Multiple occurrences of option PageRegion choice name A4. **FAIL** Multiple occurrences of option PageSize choice name Card4x6. **FAIL** Multiple occurrences of option PageSize choice name Hagaki. **FAIL** Multiple occurrences of option PageSize choice name Card5x8. **FAIL** Multiple occurrences of option PageSize choice name Oufuku. **FAIL** Multiple occurrences of option PageSize choice name Executive. **FAIL** Multiple occurrences of option PageSize choice name A4. --Other FAILS removed I have removed the many other printer types that fail for clarity. It is a feature of the cups ppdc compiler that if you do not specify the -t option it will blithely go on and produce the compiled ppds errors and all. I personally think that this is a bug and the compiler should refuse to produce erroneous ppds, but putting that to one side. Taking A4 as an exmaple the hp6510 ppd file now has two definitions for PageSize A4. *PageSize A4/A4 210x297mm: "<>setpagedevice" and *PageSize A4/A4 AutoDuplex 210x297mm: "<>setpagedevice" Same name but different page dimensions. Only the first one will ever be seen by the cups system. 3. This above often does not matter when printing from the command line. Because PageSize options are not often specified. However, taking as an example a gnome desktop application such as Evince printing a pdf using the gtk+ print options with duplex printing selected. In this case a PageSize option will be passed to Cups and it will look like this. D [11/Apr/2016:17:59:54 +0100] [Job 288] argv[5]="InputSlot=Upper number-up=1 MediaType=Plain PageSize=Custom.A4 OutputMode=Normal ColorModel=KGray Duplex=DuplexNoTumble job-uuid=urn:uuid:4ef4d5ed- e47e-3817-4972-b4bfad8ef5d8 job-originating-host-name=localhost date- time-at-creation= date-time-at-processing= time-at-creation=1460393994 time-at-processing=1460393994" So the PageSize is "Custom.A4". The "Custom" bit gets stripped off so what is passed down for matching is "A4" which matches the first occurrence of A4. Depending on what other defaults are set in the pdd it might print something, but it will most likely be clipped. In the case of the 6510 it results in this. D [11/Apr/2016:17:59:55 +0100] [Job 288] Unrecoverable error: rangecheck in setpagedevice Of course the above line only appears in the error_log if you have debugging turned on. So the job just appears to stuck in the print queue for no reason at all. This is probably another bug. The work around. This has been mentioned many times in various bug reports. You need page sizes, page regions, imageable areas, and paper dimensions with names ending in .Duplex in your ppd. Rename the duplicate which has the biggest bottom margin, hopefully this is the one with AutoDuplex in the descriptive text. It is probably best to make these entries default as well. You might make the corresponding changes in the drv file if you wish. That will save you having to reapply them every time the ppd file is regenerated. I realise that I have broken just about every rule in the "bug laws". I offer no excuse:-) Comments please. Roger ProblemType: Bug DistroRelease: Ubuntu 15.10 Package: printer-driver-hpcups 3.15.7-0ubuntu4
Re: [Desktop-packages] [Bug 1568996] Re: Duplex printing does not work properly for HP printers
On 18/04/16 04:41, Till Kamppeter wrote: > Perhaps we need to remove the script to return to upstream reality with > the original awkwardness (perhaps this could be the SRU for Xenial) and > for a more sophisticated solution pre-build all PPDs, edit them with a > script to rename the paper sizes, and then either compress the PPDs with > pyppd for shipping or look whther CUPS has a tool to reverse-compile > PPDs to a .drv file, to generate the new .drv file this way. > > WDYT? > Hi Till, My gut response is remove the script. However this may bring into play problems with jobs sticking in the queue for no apparent reason that I mentioned in the original bug post. This definitely occurs when printing from applications using gtk+ and is caused by cups not picking up that GS has terminated with an error, in this case "rangecheck in SetPageDevice. This error is only reported in the error_log if debug logging is enabled. I think it would be a good idea to fix this anyway! I have been looking at a solution using cupsUIConstraint and cupsUIResolver to forbid the use of non duplex page sizes when duplex printing is selected and a .duplex page size is available. I have not got it to work yet. The idea is to insert lines like these after each .Duplex CustomMedia found. Attribute cupsUIContraints A4Pagesize "*Duplex *PageSize A4" Attribute cupsUIResolver A4PageSize "*Duplex *PageSize A4.Duplex" Attribute cupsUIContraints A4PageRegion "*Duplex *PageRegion A4" Attribute cupsUIResolver A4PageRegion "*Duplex *PageRegion A4.Duplex" Attribute cupsUIContraints A4ImageableArea "*Duplex *ImageableArea A4" Attribute cupsUIResolver A4ImageableArea "*Duplex *ImageableArea A4.Duplex" Attribute cupsUIContraints A4PaperDimension "*Duplex *PaperDimension A4" Attribute cupsUIResolver A4PaperDimension "*Duplex *PaperDimension A4.Duplex" Comments? Roger -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to hplip in Ubuntu. https://bugs.launchpad.net/bugs/1568996 Title: Duplex printing does not work properly for HP printers Status in hplip package in Ubuntu: Incomplete Bug description: I am reporting this as a new bug because I want to avoid adding further to the mish mash of half fixed bugs that is duplex printing on hp printers via cups. I will warn readers that this will sound like a bit of a rant. But these issues have been outstanding for years 1. Take the hpcups.drv driver information from the upstream part of the current source package and run it throught the cups ppd compiler in test mode, anbd filter the output for failures. roger@dragon:~/ppd-testing$ ppdc -t hpcups.drv.upstream | grep FAIL roger@dragon:~/ppd-testing$ Result a nice clean file. 2. Take this file and run it through the script debian/local/make- duplex-page-sizes-default.sh that is run when this file is installed on a system. Then repeat the above test. roger@dragon:~/ppd-testing$ ppdc -t hpcups.drv.munged | grep FAIL --- Other FAILS removed hp-photosmart_6510_series.ppd: FAIL **FAIL** Multiple occurrences of option PageRegion choice name Card4x6. **FAIL** Multiple occurrences of option PageRegion choice name Hagaki. **FAIL** Multiple occurrences of option PageRegion choice name Card5x8. **FAIL** Multiple occurrences of option PageRegion choice name Oufuku. **FAIL** Multiple occurrences of option PageRegion choice name Executive. **FAIL** Multiple occurrences of option PageRegion choice name A4. **FAIL** Multiple occurrences of option PageSize choice name Card4x6. **FAIL** Multiple occurrences of option PageSize choice name Hagaki. **FAIL** Multiple occurrences of option PageSize choice name Card5x8. **FAIL** Multiple occurrences of option PageSize choice name Oufuku. **FAIL** Multiple occurrences of option PageSize choice name Executive. **FAIL** Multiple occurrences of option PageSize choice name A4. --Other FAILS removed I have removed the many other printer types that fail for clarity. It is a feature of the cups ppdc compiler that if you do not specify the -t option it will blithely go on and produce the compiled ppds errors and all. I personally think that this is a bug and the compiler should refuse to produce erroneous ppds, but putting that to one side. Taking A4 as an exmaple the hp6510 ppd file now has two definitions for PageSize A4. *PageSize A4/A4 210x297mm: "<>setpagedevice" and *PageSize A4/A4 AutoDuplex 210x297mm: "<>setpagedevice" Same name but different page dimensions. Only the first one will ever be seen by the cups system. 3. This above often does not matter when printing from the command line. Because PageSize options are not often specified. However, taking as an
Re: [Desktop-packages] [Bug 1568996] Re: Duplex printing does not work properly for HP printers
-- You received this bug notification because you are a member of Desktop Packages, which is subscribed to hplip in Ubuntu. https://bugs.launchpad.net/bugs/1568996 Title: Duplex printing does not work properly for HP printers Status in hplip package in Ubuntu: Incomplete Bug description: I am reporting this as a new bug because I want to avoid adding further to the mish mash of half fixed bugs that is duplex printing on hp printers via cups. I will warn readers that this will sound like a bit of a rant. But these issues have been outstanding for years 1. Take the hpcups.drv driver information from the upstream part of the current source package and run it throught the cups ppd compiler in test mode, anbd filter the output for failures. roger@dragon:~/ppd-testing$ ppdc -t hpcups.drv.upstream | grep FAIL roger@dragon:~/ppd-testing$ Result a nice clean file. 2. Take this file and run it through the script debian/local/make- duplex-page-sizes-default.sh that is run when this file is installed on a system. Then repeat the above test. roger@dragon:~/ppd-testing$ ppdc -t hpcups.drv.munged | grep FAIL --- Other FAILS removed hp-photosmart_6510_series.ppd: FAIL **FAIL** Multiple occurrences of option PageRegion choice name Card4x6. **FAIL** Multiple occurrences of option PageRegion choice name Hagaki. **FAIL** Multiple occurrences of option PageRegion choice name Card5x8. **FAIL** Multiple occurrences of option PageRegion choice name Oufuku. **FAIL** Multiple occurrences of option PageRegion choice name Executive. **FAIL** Multiple occurrences of option PageRegion choice name A4. **FAIL** Multiple occurrences of option PageSize choice name Card4x6. **FAIL** Multiple occurrences of option PageSize choice name Hagaki. **FAIL** Multiple occurrences of option PageSize choice name Card5x8. **FAIL** Multiple occurrences of option PageSize choice name Oufuku. **FAIL** Multiple occurrences of option PageSize choice name Executive. **FAIL** Multiple occurrences of option PageSize choice name A4. --Other FAILS removed I have removed the many other printer types that fail for clarity. It is a feature of the cups ppdc compiler that if you do not specify the -t option it will blithely go on and produce the compiled ppds errors and all. I personally think that this is a bug and the compiler should refuse to produce erroneous ppds, but putting that to one side. Taking A4 as an exmaple the hp6510 ppd file now has two definitions for PageSize A4. *PageSize A4/A4 210x297mm: "<>setpagedevice" and *PageSize A4/A4 AutoDuplex 210x297mm: "<>setpagedevice" Same name but different page dimensions. Only the first one will ever be seen by the cups system. 3. This above often does not matter when printing from the command line. Because PageSize options are not often specified. However, taking as an example a gnome desktop application such as Evince printing a pdf using the gtk+ print options with duplex printing selected. In this case a PageSize option will be passed to Cups and it will look like this. D [11/Apr/2016:17:59:54 +0100] [Job 288] argv[5]="InputSlot=Upper number-up=1 MediaType=Plain PageSize=Custom.A4 OutputMode=Normal ColorModel=KGray Duplex=DuplexNoTumble job-uuid=urn:uuid:4ef4d5ed- e47e-3817-4972-b4bfad8ef5d8 job-originating-host-name=localhost date- time-at-creation= date-time-at-processing= time-at-creation=1460393994 time-at-processing=1460393994" So the PageSize is "Custom.A4". The "Custom" bit gets stripped off so what is passed down for matching is "A4" which matches the first occurrence of A4. Depending on what other defaults are set in the pdd it might print something, but it will most likely be clipped. In the case of the 6510 it results in this. D [11/Apr/2016:17:59:55 +0100] [Job 288] Unrecoverable error: rangecheck in setpagedevice Of course the above line only appears in the error_log if you have debugging turned on. So the job just appears to stuck in the print queue for no reason at all. This is probably another bug. The work around. This has been mentioned many times in various bug reports. You need page sizes, page regions, imageable areas, and paper dimensions with names ending in .Duplex in your ppd. Rename the duplicate which has the biggest bottom margin, hopefully this is the one with AutoDuplex in the descriptive text. It is probably best to make these entries default as well. You might make the corresponding changes in the drv file if you wish. That will save you having to reapply them every time the ppd file is regenerated. I realise that I have broken just about every rule in the "bug laws". I offer no excuse:-) Comments please. Roger ProblemType: Bug DistroRelease: Ubuntu 15.10 Package: printer-driver-hpcups 3.15.7-0ubuntu4
Re: [Desktop-packages] [Bug 1568996] Re: Duplex printing does not work properly for HP printers
Hi Till, Just tested with a Xenial live dvdrom. Yes the problem is still there. Looks like the same list of printers. Roger On 12/04/16 17:48, Till Kamppeter wrote: > Can you please test (with a live CD or USB stick) whether the problem > persists in Xenial (Ubuntu 16.04 LTS)? Thanks. > > > ** Changed in: hplip (Ubuntu) > Status: New => Incomplete > -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to hplip in Ubuntu. https://bugs.launchpad.net/bugs/1568996 Title: Duplex printing does not work properly for HP printers Status in hplip package in Ubuntu: Incomplete Bug description: I am reporting this as a new bug because I want to avoid adding further to the mish mash of half fixed bugs that is duplex printing on hp printers via cups. I will warn readers that this will sound like a bit of a rant. But these issues have been outstanding for years 1. Take the hpcups.drv driver information from the upstream part of the current source package and run it throught the cups ppd compiler in test mode, anbd filter the output for failures. roger@dragon:~/ppd-testing$ ppdc -t hpcups.drv.upstream | grep FAIL roger@dragon:~/ppd-testing$ Result a nice clean file. 2. Take this file and run it through the script debian/local/make- duplex-page-sizes-default.sh that is run when this file is installed on a system. Then repeat the above test. roger@dragon:~/ppd-testing$ ppdc -t hpcups.drv.munged | grep FAIL --- Other FAILS removed hp-photosmart_6510_series.ppd: FAIL **FAIL** Multiple occurrences of option PageRegion choice name Card4x6. **FAIL** Multiple occurrences of option PageRegion choice name Hagaki. **FAIL** Multiple occurrences of option PageRegion choice name Card5x8. **FAIL** Multiple occurrences of option PageRegion choice name Oufuku. **FAIL** Multiple occurrences of option PageRegion choice name Executive. **FAIL** Multiple occurrences of option PageRegion choice name A4. **FAIL** Multiple occurrences of option PageSize choice name Card4x6. **FAIL** Multiple occurrences of option PageSize choice name Hagaki. **FAIL** Multiple occurrences of option PageSize choice name Card5x8. **FAIL** Multiple occurrences of option PageSize choice name Oufuku. **FAIL** Multiple occurrences of option PageSize choice name Executive. **FAIL** Multiple occurrences of option PageSize choice name A4. --Other FAILS removed I have removed the many other printer types that fail for clarity. It is a feature of the cups ppdc compiler that if you do not specify the -t option it will blithely go on and produce the compiled ppds errors and all. I personally think that this is a bug and the compiler should refuse to produce erroneous ppds, but putting that to one side. Taking A4 as an exmaple the hp6510 ppd file now has two definitions for PageSize A4. *PageSize A4/A4 210x297mm: "<>setpagedevice" and *PageSize A4/A4 AutoDuplex 210x297mm: "<>setpagedevice" Same name but different page dimensions. Only the first one will ever be seen by the cups system. 3. This above often does not matter when printing from the command line. Because PageSize options are not often specified. However, taking as an example a gnome desktop application such as Evince printing a pdf using the gtk+ print options with duplex printing selected. In this case a PageSize option will be passed to Cups and it will look like this. D [11/Apr/2016:17:59:54 +0100] [Job 288] argv[5]="InputSlot=Upper number-up=1 MediaType=Plain PageSize=Custom.A4 OutputMode=Normal ColorModel=KGray Duplex=DuplexNoTumble job-uuid=urn:uuid:4ef4d5ed- e47e-3817-4972-b4bfad8ef5d8 job-originating-host-name=localhost date- time-at-creation= date-time-at-processing= time-at-creation=1460393994 time-at-processing=1460393994" So the PageSize is "Custom.A4". The "Custom" bit gets stripped off so what is passed down for matching is "A4" which matches the first occurrence of A4. Depending on what other defaults are set in the pdd it might print something, but it will most likely be clipped. In the case of the 6510 it results in this. D [11/Apr/2016:17:59:55 +0100] [Job 288] Unrecoverable error: rangecheck in setpagedevice Of course the above line only appears in the error_log if you have debugging turned on. So the job just appears to stuck in the print queue for no reason at all. This is probably another bug. The work around. This has been mentioned many times in various bug reports. You need page sizes, page regions, imageable areas, and paper dimensions with names ending in .Duplex in your ppd. Rename the duplicate which has the biggest bottom margin, hopefully this is the one with AutoDuplex in the descriptive text. It is probably best to make these entries default as well. You might make the