Bug 699724

Summary: Cannot print with HPLIP and ghostscript 9.24 (cannot find the ICC profiles)
Product: Ghostscript Reporter: 0strodamus <0strodamus>
Component: CUPS driverAssignee: Chris Liddell (chrisl) <chris.liddell>
Status: RESOLVED DUPLICATE    
Severity: normal CC: andriyano-31, htl10, mike
Priority: P4    
Version: unspecified   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: Revised gs_init.ps

Description 0strodamus 2018-09-06 00:05:36 UTC
Hi,
I posted to another user's bug report filed at https://github.com/apple/cups/issues/5394. There was also a bug report filed here https://bugs.ghostscript.com/show_bug.cgi?id=699713 which was fixed. I tested with Archlinux ghostscript 9.24-2 which includes the bug report patch, but I am still seeing failures here. Downgrading to ghostscript 9.23 resolves the issue for me. Both the ps_gray.icc and cupsext module do exist on my system at /usr/share/ghostscript/9.24/iccprofiles/ps_gray.icc and /usr/lib/python3.7/site-packages/cupsext.so respectively. I'm attaching a sample cupsd debug output below. Thanks for any help and for all your hard work making and sharing ghostscript with the world!

D [04/Sep/2018:14:38:27 -0700] [Job 151] Printer make and model: HP HP Color LaserJet Pro M252c10
D [04/Sep/2018:14:38:27 -0700] [Job 151] Running command line for pstops: pstops 151 username test.pdf 1 \'HPRGBEmulation=DefaultSRGB HPGraphicsNeutralGrays=Black HPGeneralHalftone=Smooth Duplex=DuplexNoTumble PageSize=Letter HPEdgeControl=Normal InputSlot=Auto HPPhotoNeutralGrays=ProcessBlack HPTextNeutralGrays=Black HPPJLColorAsGray=no MediaType=Unspecified noHPPJLEconoMode job-uuid=urn:uuid:d74dc1fe-35ae-3104-4ec8-080a9e5e2bbf job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1536095824 time-at-processing=1536097106\'
D [04/Sep/2018:14:38:27 -0700] [Job 151] Using image rendering resolution 600 dpi
D [04/Sep/2018:14:38:27 -0700] [Job 151] Running command line for gs: gs -q -dNOPAUSE -dBATCH -dSAFER -dNOMEDIAATTRS -sDEVICE=ps2write -dShowAcroForm -sOUTPUTFILE=%stdout -dLanguageLevel=3 -r600 -dCompressFonts=false -dNoT3CCITT -dNOINTERPOLATE -c \'save pop\' -f /var/spool/cups/tmp/014165b902777
D [04/Sep/2018:14:38:27 -0700] [Job 151] Started filter gs (PID 5150)
D [04/Sep/2018:14:38:27 -0700] [Job 151] Started filter pstops (PID 5151)
D [04/Sep/2018:14:38:27 -0700] [Job 151] \033[31;01merror: Failed to create /var/spool/cups/tmp/.hplip\033[0m
D [04/Sep/2018:14:38:27 -0700] [Job 151] ./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find ps_gray.icc
D [04/Sep/2018:14:38:27 -0700] [Job 151] + ./base/gsicc_manage.c:255: gsicc_initialize_iccsmask(): failed to load gray smask profile
D [04/Sep/2018:14:38:27 -0700] [Job 151] Page = 612x792; 12,12 to 600,780
D [04/Sep/2018:14:38:27 -0700] [Job 151] slow_collate=0, slow_duplex=0, slow_order=0
D [04/Sep/2018:14:38:27 -0700] [Job 151] This document does not conform to the Adobe Document Structuring Conventions and may not print correctly.
D [04/Sep/2018:14:38:27 -0700] [Job 151] : ERROR: Error importing HPLIP modules:5143 No module named \'cupsext\'
D [04/Sep/2018:14:38:27 -0700] [Job 151] Sent 0 bytes...
D [04/Sep/2018:14:38:27 -0700] [Job 151] PID 5143 (/usr/lib/cups/filter/hpps) stopped with status 1.
D [04/Sep/2018:14:38:27 -0700] [Job 151] Hint: Try setting the LogLevel to "debug" to find out more.
D [04/Sep/2018:14:38:27 -0700] [Job 151] Waiting for read thread to exit...
D [04/Sep/2018:14:38:27 -0700] [Job 151] PID 5144 (/usr/lib/cups/backend/usb) exited with no errors.
D [04/Sep/2018:14:38:27 -0700] [Job 151] ./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find default_rgb.icc
D [04/Sep/2018:14:38:27 -0700] [Job 151] | ./base/gsicc_manage.c:2025: gsicc_set_device_profile(): cannot find device profile
D [04/Sep/2018:14:38:27 -0700] [Job 151] GPL Ghostscript 9.24: Unrecoverable error, exit code 1
D [04/Sep/2018:14:38:27 -0700] [Job 151] ./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find default_gray.icc
D [04/Sep/2018:14:38:27 -0700] [Job 151] | ./base/gsicc_manage.c:2025: gsicc_set_device_profile(): cannot find device profile
D [04/Sep/2018:14:38:27 -0700] [Job 151] PID 5150 (gs) stopped with status 1!
D [04/Sep/2018:14:38:27 -0700] [Job 151] PID 5151 (pstops) exited with no errors.
D [04/Sep/2018:14:38:27 -0700] [Job 151] PID 5142 (/usr/lib/cups/filter/pdftops) stopped with status 1.
D [04/Sep/2018:14:38:27 -0700] [Job 151] Hint: Try setting the LogLevel to "debug" to find out more.
D [04/Sep/2018:14:38:27 -0700] [Job 151] End of messages
D [04/Sep/2018:14:38:27 -0700] [Job 151] printer-state=3(idle)
D [04/Sep/2018:14:38:27 -0700] [Job 151] printer-state-message="Filter failed"
D [04/Sep/2018:14:38:27 -0700] [Job 151] printer-state-reasons=none E [04/Sep/2018:14:43:29 -0700] [Job 151] Job stopped due to filter errors; please consult the error_log file for details.
Comment 1 Chris Liddell (chrisl) 2018-09-06 09:14:35 UTC
I can't reproduce this issue, but that may be down the specifics of the configuration.

If I post a revised gs_init.ps, would you be able to put it on your system, and test it?
Comment 2 andreymal 2018-09-06 15:38:32 UTC
At least two users (including me) have the same bug https://bugs.archlinux.org/task/59959

Perhaps this is not an Arch Linux problem (I was redirected here from the Arch Linux bug tracker)

I can put gs_init.ps on my system
Comment 3 Chris Liddell (chrisl) 2018-09-06 15:54:37 UTC
Created attachment 15576 [details]
Revised gs_init.ps

I don't think it specific to Arch - in fact, the code I've added in the attached gs_init.ps is from another bug report on here. It's not exactly the fix I want to use, but that means recompiling whereas this is just the Postscript.

Putting the attached file in place of your current one makes it work, then I can make the relevant bugs duplicates of each other, and push my actual fix.
Comment 4 andreymal 2018-09-06 16:03:17 UTC
Revised gs_init.ps works for me
Comment 5 Chris Liddell (chrisl) 2018-09-06 16:11:39 UTC
(In reply to andreymal from comment #4)
> Revised gs_init.ps works for me

That's great, I appreciate you testing it.
Comment 6 Chris Liddell (chrisl) 2018-09-06 16:11:58 UTC

*** This bug has been marked as a duplicate of bug 699722 ***
Comment 7 0strodamus 2018-09-06 20:35:36 UTC
It's working for me too. I also compiled and tested with patches http://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=c8c01f8c4164 and http://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=13418541a5ae. Thanks for the fix!