Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get a Brother QL-700 to print anything with cups-filters 1.28 #493

Open
tvanesse opened this issue Dec 30, 2022 · 7 comments
Open

Comments

@tvanesse
Copy link

tvanesse commented Dec 30, 2022

Transfering an issue originally posted in ghostscript-printer-app, I am unable to get my Brother QL-700 to print anything with cups-filters-1.28.

After downgrading to 1.27 yesterday, I was able to send jobs and getting the printer to actually print stuff like it used to. The euphoria was short-lived though, because I woke up this morning finding my computer (rebooted) unable to make the QL-700 print anything, again.
I tried to repeat the exact same steps I took the day before but no luck.

I now have a computer with CUPS 2.4.1 and a downgraded cups-filters 1.27 and I still can't get the QL-700 to print (but it used to!).

Out of despair, I am looking for guidance on how to get more useful information about this problem and, finally, get this printer to do its job.

@tvanesse
Copy link
Author

tvanesse commented Dec 30, 2022

I changed the log level of the CUPS logger to debug, restarted the service and tried to send a job. Here is, I think, the portion of the log that might highlight the source of the problem:

W [29/Dec/2022:18:17:30 +0100] [Job 97] Use \"pdftops-renderer\" option (see cups-filters README file) to use Ghostscript or MuPDF for the PDF -> PostScript conversion.
W [29/Dec/2022:18:17:38 +0100] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'QL-700-Gray..\' already exists
W [29/Dec/2022:18:17:38 +0100] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'QL-700-DeviceN..\' already exists
W [29/Dec/2022:18:17:44 +0100] [Job 97] Grayscale/monochrome printing requested for this job but Poppler is not able to convert to grayscale/monochrome PostScript.
W [29/Dec/2022:18:17:44 +0100] [Job 97] Use \"pdftops-renderer\" option (see cups-filters README file) to use Ghostscript or MuPDF for the PDF -> PostScript conversion.
W [29/Dec/2022:18:17:56 +0100] [Job 98] Grayscale/monochrome printing requested for this job but Poppler is not able to convert to grayscale/monochrome PostScript.
W [29/Dec/2022:18:17:56 +0100] [Job 98] Use \"pdftops-renderer\" option (see cups-filters README file) to use Ghostscript or MuPDF for the PDF -> PostScript conversion.
W [29/Dec/2022:18:22:18 +0100] [Job 100] Grayscale/monochrome printing requested for this job but Poppler is not able to convert to grayscale/monochrome PostScript.
W [29/Dec/2022:18:22:18 +0100] [Job 100] Use \"pdftops-renderer\" option (see cups-filters README file) to use Ghostscript or MuPDF for the PDF -> PostScript conversion.
W [29/Dec/2022:18:23:48 +0100] [Job 101] Level 3 PostScript not supported by mutool.
E [29/Dec/2022:18:23:48 +0100] [Job 101] No pages found!
E [29/Dec/2022:18:23:48 +0100] [Job 101] Send data failed.
E [29/Dec/2022:18:23:50 +0100] [Job 101] Job stopped due to filter errors; please consult the /var/log/cups/error_log file for details.
D [29/Dec/2022:18:23:50 +0100] [Job 101] The following messages were recorded from 18:23:48 to 18:23:50
D [29/Dec/2022:18:23:50 +0100] [Job 101] Applying default options...
D [29/Dec/2022:18:23:50 +0100] [Job 101] Adding default pdftops-renderer=mupdf
D [29/Dec/2022:18:23:50 +0100] [Job 101] Adding start banner page "none".
D [29/Dec/2022:18:23:50 +0100] [Job 101] Adding end banner page "none".
D [29/Dec/2022:18:23:50 +0100] [Job 101] File of type application/pdf queued by "thomas".
D [29/Dec/2022:18:23:50 +0100] [Job 101] hold_until=0
D [29/Dec/2022:18:23:50 +0100] [Job 101] Queued on "QL-700" by "thomas".
D [29/Dec/2022:18:23:50 +0100] [Job 101] time-at-processing=1672334628
D [29/Dec/2022:18:23:50 +0100] [Job 101] 3 filters for job:
D [29/Dec/2022:18:23:50 +0100] [Job 101] pdftopdf (application/pdf to application/vnd.cups-pdf, cost 66)
D [29/Dec/2022:18:23:50 +0100] [Job 101] pdftops (application/vnd.cups-pdf to application/vnd.cups-postscript, cost 100)
D [29/Dec/2022:18:23:50 +0100] [Job 101] brother_lpdwrapper_ql700 (application/vnd.cups-postscript to printer/QL-700, cost 0)
D [29/Dec/2022:18:23:50 +0100] [Job 101] job-sheets=none,none
D [29/Dec/2022:18:23:50 +0100] [Job 101] argv[0]="QL-700"
D [29/Dec/2022:18:23:50 +0100] [Job 101] argv[1]="101"
D [29/Dec/2022:18:23:50 +0100] [Job 101] argv[2]="thomas"
D [29/Dec/2022:18:23:50 +0100] [Job 101] argv[3]="harvest-labels-2022-12-30T00_00_00.000+01_00 (1).pdf"
D [29/Dec/2022:18:23:50 +0100] [Job 101] argv[4]="1"
D [29/Dec/2022:18:23:50 +0100] [Job 101] argv[5]="PageSize=62mm noCollate BrTrimtape=ON BrBrightness=0 BrMirror=OFF number-up=1 BrContrast=0 BrCutAtEnd=ON BrPriority=BrSpeed BrMargin=3 BrCutLabel=1 BrHalftonePattern=BrErrorDiffusion job-uuid=urn:uuid:88a113dd-b402-3eca-4080-5149cbeffded pdftops-renderer=mupdf job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1672334628 time-at-processing=1672334628"
D [29/Dec/2022:18:23:50 +0100] [Job 101] argv[6]="/var/spool/cups/d00101-001"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[2]="CUPS_DOCROOT=/usr/share/cups/doc-root"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[3]="CUPS_REQUESTROOT=/var/spool/cups"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[4]="CUPS_SERVERBIN=/usr/lib/cups"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[5]="CUPS_SERVERROOT=/etc/cups"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[6]="CUPS_STATEDIR=/run/cups"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[7]="HOME=/var/spool/cups/tmp"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[8]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[9]="SERVER_ADMIN=root@thebigmachine"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[10]="SOFTWARE=CUPS/2.4.1"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[11]="TMPDIR=/var/spool/cups/tmp"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[12]="USER=root"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[13]="CUPS_MAX_MESSAGE=2047"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[14]="CUPS_SERVER=/run/cups/cups.sock"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[15]="CUPS_ENCRYPTION=IfRequested"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[16]="IPP_PORT=631"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[17]="CHARSET=utf-8"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[18]="LANG=en_GB.UTF-8"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[19]="PPD=/etc/cups/ppd/QL-700.ppd"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[20]="CONTENT_TYPE=application/pdf"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[21]="DEVICE_URI=usb://Brother/QL-700?serial=000G9Z497133"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[22]="PRINTER_INFO=Brother QL-700"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[23]="PRINTER_LOCATION="
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[24]="PRINTER=QL-700"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[25]="PRINTER_STATE_REASONS=none"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[26]="CUPS_FILETYPE=document"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[27]="FINAL_CONTENT_TYPE=application/vnd.cups-postscript"
D [29/Dec/2022:18:23:50 +0100] [Job 101] envp[28]="AUTH_I****"
D [29/Dec/2022:18:23:50 +0100] [Job 101] Started filter /usr/lib/cups/filter/pdftopdf (PID 8449)
D [29/Dec/2022:18:23:50 +0100] [Job 101] Started filter /usr/lib/cups/filter/pdftops (PID 8452)
D [29/Dec/2022:18:23:50 +0100] [Job 101] Started filter /usr/lib/cups/filter/brother_lpdwrapper_ql700 (PID 8453)
D [29/Dec/2022:18:23:50 +0100] [Job 101] Started backend /usr/lib/cups/backend/usb (PID 8454)
D [29/Dec/2022:18:23:50 +0100] [Job 101] Loading USB quirks from \"/usr/share/cups/usb\".
D [29/Dec/2022:18:23:50 +0100] [Job 101] Loaded 118 quirks.
D [29/Dec/2022:18:23:50 +0100] [Job 101] Printing on printer with URI: usb://Brother/QL-700?serial=000G9Z497133
D [29/Dec/2022:18:23:50 +0100] [Job 101] pdftops - copying to temp print file \"/tmp/0210463b503d3\"
D [29/Dec/2022:18:23:50 +0100] [Job 101] pdftopdf: Last filter determined by the PPD: brother_lpdwrapper_ql700; FINAL_CONTENT_TYPE: application/vnd.cups-postscript => pdftopdf will not log pages in page_log.
D [29/Dec/2022:18:23:50 +0100] [Job 101] libusb_get_device_list=6
D [29/Dec/2022:18:23:50 +0100] [Job 101] STATE: +connecting-to-device
D [29/Dec/2022:18:23:50 +0100] [Job 101] STATE: -connecting-to-device
D [29/Dec/2022:18:23:50 +0100] [Job 101] iSerialNumber=\"000G9Z497133\"
D [29/Dec/2022:18:23:50 +0100] [Job 101] Printer found with device ID: MFG:Brother;CMD:PT-CBP;MDL:QL-700;CLS:PRINTER; Device URI: usb://Brother/QL-700?serial=000G9Z497133
D [29/Dec/2022:18:23:50 +0100] [Job 101] Device protocol: 2
D [29/Dec/2022:18:23:50 +0100] [Job 101] Sending data to printer.
D [29/Dec/2022:18:23:50 +0100] [Job 101] Set job-printer-state-message to "Sending data to printer.", current level=INFO
D [29/Dec/2022:18:23:50 +0100] [Job 101] PDF interactive form and annotation flattening done via QPDF
D [29/Dec/2022:18:23:50 +0100] [Job 101] pdftopdf: \"print-scaling\" IPP attribute: auto
D [29/Dec/2022:18:23:50 +0100] [Job 101] pdftopdf: Print scaling mode: Do not scale, center, crop if needed
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] After Cropping: 176.000000 284.000000 175.679993 282.459991
D [29/Dec/2022:18:23:50 +0100] [Job 101] PID 8449 (/usr/lib/cups/filter/pdftopdf) exited with no errors.
D [29/Dec/2022:18:23:50 +0100] [Job 101] Printer make and model: Brother QL-700
D [29/Dec/2022:18:23:50 +0100] [Job 101] Running command line for pstops: pstops 101 thomas \'harvest-labels-2022-12-30T00_00_00.000+01_00 (1).pdf\' 1 \'PageSize=62mm BrTrimtape=ON BrBrightness=0 BrMirror=OFF BrContrast=0 BrCutAtEnd=ON BrPriority=BrSpeed BrMargin=3 BrCutLabel=1 BrHalftonePattern=BrErrorDiffusion job-uuid=urn:uuid:88a113dd-b402-3eca-4080-5149cbeffded pdftops-renderer=mupdf job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1672334628 time-at-processing=1672334628\'
D [29/Dec/2022:18:23:50 +0100] [Job 101] Set job-printer-state-message to "Level 3 PostScript not supported by mutool.", current level=WARN
D [29/Dec/2022:18:23:50 +0100] [Job 101] Running command line for mutool: mutool draw -L -smtf -Fps -o- -cgray -r300x300 /tmp/0210463b503d3
D [29/Dec/2022:18:23:50 +0100] [Job 101] Started filter mutool (PID 8496)
D [29/Dec/2022:18:23:50 +0100] [Job 101] Unable to execute mutool program: No such file or directory
D [29/Dec/2022:18:23:50 +0100] [Job 101] Started filter pstops (PID 8497)
D [29/Dec/2022:18:23:50 +0100] [Job 101] PID 8496 (mutool) stopped with status 1!
D [29/Dec/2022:18:23:50 +0100] [Job 101] file: cannot read magic file `/etc/magic\' (Permission denied) (Permission denied)
D [29/Dec/2022:18:23:50 +0100] [Job 101] Usage: file [-bcCdEhikLlNnprsSvzZ0] [--apple] [--extension] [--mime-encoding]
D [29/Dec/2022:18:23:50 +0100] [Job 101] [--mime-type] [-e <testname>] [-F <separator>]  [-f <namefile>]
D [29/Dec/2022:18:23:50 +0100] [Job 101] [-m <magicfiles>] [-P <parameter=value>] [--exclude-quiet]
D [29/Dec/2022:18:23:50 +0100] [Job 101] <file> ...
D [29/Dec/2022:18:23:50 +0100] [Job 101] file -C [-m <magicfiles>]
D [29/Dec/2022:18:23:50 +0100] [Job 101] file [--help]
D [29/Dec/2022:18:23:50 +0100] [Job 101] The print file is empty.
D [29/Dec/2022:18:23:50 +0100] [Job 101] PID 8497 (pstops) stopped with status 1!
D [29/Dec/2022:18:23:50 +0100] [Job 101] PID 8452 (/usr/lib/cups/filter/pdftops) stopped with status 1.
D [29/Dec/2022:18:23:50 +0100] [Job 101] Hint: Try setting the LogLevel to "debug" to find out more.
D [29/Dec/2022:18:23:50 +0100] [Job 101] PID 8453 (/usr/lib/cups/filter/brother_lpdwrapper_ql700) exited with no errors.
D [29/Dec/2022:18:23:50 +0100] [Job 101] Sent 0 bytes...
D [29/Dec/2022:18:23:50 +0100] [Job 101] Waiting for read thread to exit...
D [29/Dec/2022:18:23:50 +0100] [Job 101] PID 8454 (/usr/lib/cups/backend/usb) exited with no errors.
D [29/Dec/2022:18:23:50 +0100] [Job 101] End of messages
D [29/Dec/2022:18:23:50 +0100] [Job 101] printer-state=3(idle)
D [29/Dec/2022:18:23:50 +0100] [Job 101] printer-state-message="Send data failed."
D [29/Dec/2022:18:23:50 +0100] [Job 101] printer-state-reasons=none

At some point it's complaining about not finding mutool but

$ sudo apt install mupdf-tools
...
mupdf-tools is already the newest version (1.19.0+ds1-2)
...

@tvanesse
Copy link
Author

Further down the log I'm also seeing this

E [29/Dec/2022:19:56:29 +0100] QL-700: File \"/usr/lib/cups/filter/pdftopdf\" not available: No such file or directory
E [29/Dec/2022:19:56:29 +0100] [Job 107] Unable to start filter "pdftopdf" - No such file or directory.
E [29/Dec/2022:19:56:29 +0100] [Job 107] Stopping job because the scheduler could not execute a filter.

@tillkamppeter
Copy link
Member

This means that you have done something wrong with your installation of cups-filters. ALL versions of cups-filters come with pdftopdf and also install it with make install. So you must have done something wrong with the installation ...

@tvanesse
Copy link
Author

tvanesse commented Dec 30, 2022

This means that you have done something wrong with your installation of cups-filters. ALL versions of cups-filters come with pdftopdf and also install it with make install. So you must have done something wrong with the installation ...

Ok but it seems pdftopdf is actually installed:

$ ls -l /usr/lib/cups/filter/ | grep pdfto
-rwxr-xr-x 1 root root  22840 avr 11  2022 mupdftoraster
-rwxr-xr-x 1 root root 141824 avr 11  2022 pdftopdf
-rwxr-xr-x 1 root root  39656 avr 11  2022 pdftops
-rwxr-xr-x 1 root root  43512 avr 11  2022 pdftoraster

Not sure if having those filters owned by root is expected though.
It's tempting to chown the whole /usr/lib/cups/filter directory and see what happens but I don't want to mess around with something I don't fully understand.

Would you agree this looks like CUPS is unable to access the filters because of some missing permission? I mean, the filters are definitely installed on disk but CUPS still complains about not finding them...
Many thanks for your support anyway @tillkamppeter , feels good to know I'm not writing in the void :-)

@tvanesse
Copy link
Author

image
Probably linked to this but the Ubuntu GUI used to manage printers now has disabled buttons.

Do you know what is the cleanest and most complete way to uninstall everything CUPS/printer-related apart from apt remove cups && snap remove cups?

@tvanesse
Copy link
Author

tvanesse commented Dec 30, 2022

Here is a second log where I tried to print the same PDF first with pdftops-renderer-default=pdftops and then with pdftops-renderer-default=mupdf.

If you take a look at [Job 13], it looks like it's completed with no errors, but in reality the physical printer is in an error state (blinking red LED).

logs-cups-jobs-20221230.log

@sarthk05
Copy link

sarthk05 commented Jan 8, 2023

@tvanesse After going through your log files there is an error saying that it couldn't open the file due to some permission issue . Could you change permission of file to 644 using chmod . And try printing the file once again and let me know if it works and also try to capture log while doing that so we can se if it is working or there are any other problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants