You are not logged in.

#1 2021-02-20 18:10:34

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 602

Printing some files on remote printer works via lp but not via CUPS

Hi guys,

I ran into the following problem: A Brother HL-L2300D is attached to a RasPi and shared via CUPS. A client running Arch has the printer configured via a dnssd:// address. What works and what doesn't:

Printing some PDF files via Atril works. Say, I can print this paper: https://arxiv.org/pdf/hep-ph/9906447v1.pdf Same goes for Ghostscript (.ps) files, say the .ps version of the same paper: https://arxiv.org/ps/hep-ph/9906447v1

Printing other PDF files via Atril does _not_ work. In particular, scanned files (but also such with small file size of about 60kB) or websites (Google Maps page).

Printing the very same PDF files which fail with Atril but using the lp command works again.

Printing documents from LibreOffice Writer or Calc works.

Printing some images (with small resolution) from an image viewer (Eye of Mate) works.

Printing larger images from the same image viewer does _not_ work.

In the access_log on the client I see the line

localhost - - [20/Feb/2021:19:05:39 +0100] "POST /printers/printer HTTP/1.1" 200 253111 Print-Job successful-ok

for a job which does _not_ print. And the lines

localhost - - [20/Feb/2021:18:56:20 +0100] "POST /printers/printer HTTP/1.1" 200 325 Create-Job successful-ok
localhost - - [20/Feb/2021:18:56:20 +0100] "POST /printers/printer HTTP/1.1" 200 251817 Send-Document successful-ok
localhost - - [20/Feb/2021:18:56:51 +0100] "POST /printers/printer HTTP/1.1" 200 28915 Print-Job successful-ok

for a job which does print.

On the server I see

[v1.fe80::23ff:fe1c:2e61:f258+eth0] - - [20/Feb/2021:18:44:00 +0100] "POST /printers/Brother_HL-L2300D_series_simplex HTTP/1.1" 200 392 Validate-Job successful-ok
[v1.fe80::23ff:fe1c:2e61:f258+eth0] - - [20/Feb/2021:18:44:00 +0100] "POST /printers/Brother_HL-L2300D_series_simplex HTTP/1.1" 200 357 Create-Job successful-ok
[v1.fe80::23ff:fe1c:2e61:f258+eth0] - - [20/Feb/2021:18:44:00 +0100] "POST /printers/Brother_HL-L2300D_series_simplex HTTP/1.1" 200 75452 Send-Document successful-ok

for both jobs which do and do not print.

So as far as I can see the problem happens somewhere on the client side (the Arch machine). When a job is unsuccessful, the printer's LED blinks a few times but then nothing happens.

Thanks for any input,
PhotonX


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad L13 Yoga Gen2, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#2 2021-02-20 19:22:40

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: Printing some files on remote printer works via lp but not via CUPS

sanity check - from https://wiki.archlinux.org/index.php/CUPS
"Warning: Avoid configuring both the server and the client with a printer filter - either the print queue on the client or the server should be 'raw'."

Have you tried debug logging?
https://wiki.archlinux.org/index.php/CU … #Debug_log

Offline

#3 2021-02-20 19:38:33

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 602

Re: Printing some files on remote printer works via lp but not via CUPS

Thanks for the hints! The client is "raw" indeed in my case. I now set the log level to debug and am a bit overwhelmed with the output: https://pastebin.com/YmZT05CT

edit: The output is from a non-working job, generated on the client.

Last edited by PhotonX (2021-02-20 19:39:47)


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad L13 Yoga Gen2, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#4 2021-02-21 18:47:44

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: Printing some files on remote printer works via lp but not via CUPS

Your pastebin has things like...

PhotonX wrote:

E [20/Feb/2021:20:35:06 +0100] Unknown directive BrowseOrder on line 9 of /etc/cups/cupsd.conf.
E [20/Feb/2021:20:35:06 +0100] Unknown directive BrowseAllow on line 10 of /etc/cups/cupsd.conf.
E [20/Feb/2021:20:35:06 +0100] Unknown directive BrowseRemoteProtocols on line 11 of /etc/cups/cupsd.conf.
etc
etc

so it looks like you have non-standard unsupported options in your /etc/cups/cupsd.conf file: you could try reverting that back to default - you should have /etc/cups/cupsd.conf.default that you can copy back.

Can you try evince as an alternative to atril as maybe it's a bug in atril: if the same files print using evince, I'd say you have found a bug in atril.

Offline

#5 2021-04-19 11:45:40

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 602

Re: Printing some files on remote printer works via lp but not via CUPS

Sorry for late reply, I didn't have physical access to the network in question for some time.

I substituted the cupsd.conf file with the cupsd.conf.pacnew and still have the same issue. When I print from Atril, I get the following output: https://pastebin.com/mfj3ipPh

When I print from epdfview the print job never finishes and I get the following output (it continues like this making the log size many MB, I just cut it off somewhere): https://pastebin.com/aBVsU9eZ

Now there seem to be no "Unknown directive" errors any more but it doesn't help...


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad L13 Yoga Gen2, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#6 2021-04-19 12:53:36

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: Printing some files on remote printer works via lp but not via CUPS

Nothing is jumping out at me from your debug logs. Did you try evince as well?
What driver are you using on the pi?
Can you reverse what you have done and use a driver at the arch client side and configure a raw queue on the pi?
Have you tried bypassing the pi and connecting the printer directly to your arch box and see if it works there with the relevant driver?

Offline

#7 2021-04-19 17:25:49

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 602

Re: Printing some files on remote printer works via lp but not via CUPS

Did you try evince as well?

Yep, no luck...

What driver are you using on the pi?

brlaser v4.

Have you tried bypassing the pi and connecting the printer directly to your arch box and see if it works there with the relevant driver?

As far as I remember, it did last time I tried.

Can you reverse what you have done and use a driver at the arch client side and configure a raw queue on the pi?

Tried that, it works but only with simplex printing. With duplex it gives the following output: https://pastebin.com/y8fBWvDB

I'm using this driver on the client: https://aur.archlinux.org/packages/brother-hll2300d/

P.S.: I now tested the printer on the Arch client directly (via USB). The official CUPS printer seems to not support duplex printing, even when attached via USB I get simplex printouts though the duplex option is set. The brlaser driver, however, prints duplex perfectly -- this is what I used on the pi. I will now try to set up the printer as raw on the Raspi and use the brlaser printer on the client.

P.P.S.: Looks like it worked!! Thanks a ton for your support!

Last edited by PhotonX (2021-04-19 17:59:34)


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad L13 Yoga Gen2, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#8 2021-04-22 10:40:57

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: Printing some files on remote printer works via lp but not via CUPS

Great - glad you have a working solution.
It would seem there is an issue then when you have a driver on the pi: perhaps an architecture issue after reading a few things online?

Offline

Board footer

Powered by FluxBB