You are not logged in.

#1 2023-01-08 19:47:54

paleRider
Member
Registered: 2014-04-22
Posts: 11

[SOLVED] Issue with Brother laser printer brother-hll2310d

Hi everyone

I decided to post here after spending 2 days fighting with my printer. It's a Brother HL-L2310D (usb only, no network). I've used it for about 2 years as a USB printer with Arch Linux, installed the drivers from the AUR in 2020 (package is called brother-hll2310d, I believe it's packaged from the official Brother provided RPM) and it worked fine for 2 years, including double sided, PDF files, and manual tray.

A few weeks ago I switched to a different laptop (but same make, an Acer Aspire V3), installed Arch Linux and wanted to install my printer on that one too. No luck. I still have access to my old laptop and printing still works perfectly fine from it, but fails from the new one with the same drivers. On a Dual Boot with Windows 7 on the "new" laptop, it works too. I install the driver, add the printer in Cups (it is recognised as a usb printer and the right driver is displayed), but then printing fails.

What I've tried so far:

-same driver (from the AUR)
-a different driver, brlaser
-PPD file installed manually (downloaded from Brother's website)

I could not find anything obviously wrong with the logs. The best result I got was with the brlaser driver where I could print texts or image files embedded in Office documents. Printing PDF failed (I didn't save the logs). I wasn't even able to reproduce this a second time (after reinstalling for testing purposes) and now brlaser fails completely. This being said my original idea was to not focus on brlaser because on a similar system, the "official" driver is working. Also, brlaser doesn't include this specific model.

Another thing to note is that after adding the printer with the AUR driver on the new laptop, the filter file was missing (/usr/lib/cups/filter/brother_lpdwrapper_HLL2310D) and I had to manually copy it from my old laptop. From then the "missing filter file" messages were gone but it was still not working. Anyway, I would assume that from the moment you have to do such things manually, there's already an issue and I should probably not need to copy over a filter file manually.

For now, as a workaround I'm printing to PDF files that I transfer to my older laptop to print, not convenient but it works.

The logs are huge and I wouldn't want anyone to spend too much time looking into them, but just in case, I added them as a link to a ZIP file from Google Drive: https://drive.google.com/file/d/1Bopdzc … baWyxXu_sa

aur_debug_off --> from the AUR driver without debugs
aur_debug_on --> same as above with debugs
brlaser_debug_off --> with brlaser
brlaser_debug_on
ppd_debug_off --> with installation after providing PPD file manually
ppd_debug_on


Any guidance would be greatly appreciated... thank you.

Last edited by paleRider (2023-01-12 23:05:31)

Offline

#2 2023-01-08 21:48:59

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: [SOLVED] Issue with Brother laser printer brother-hll2310d

I would assume that from the moment you have to do such things manually, there's already an issue and I should probably not need to copy over a filter file manually.

According to https://aur.archlinux.org/cgit/aur.git/ … r-hll2310d /usr/lib/cups/filter/brother_lpdwrapper_HLL2310D is supposed to be insntalled by that package.

pacman -Qilkk brother-hll2310d
D [08/Jan/2023:20:08:35 +0100] [Job 76] PID 10585 (/usr/lib/cups/filter/brother_lpdwrapper_HLL2310D) exited with no errors.

But

D [08/Jan/2023:20:08:35 +0100] [Job 76] sh: line 1: -r600: command not found

looks like there's a problem - check the package for a script w/ that reference.

Offline

#3 2023-01-08 22:24:36

paleRider
Member
Registered: 2014-04-22
Posts: 11

Re: [SOLVED] Issue with Brother laser printer brother-hll2310d

Thank you Seth, I'll check that during the week. Will be a good starting point.

Offline

#4 2023-01-12 22:32:20

paleRider
Member
Registered: 2014-04-22
Posts: 11

Re: [SOLVED] Issue with Brother laser printer brother-hll2310d

./src/opt/brother/Printers/HLL2310D/lpd/lpdfilter:221:      " | $GHOST_SCRIPT -r$resolution -g$size_gs $GHOST_OPT ";
./src/opt/brother/Printers/HLL2310D/lpd/lpdfilter:225:    "cat $INPUT_TEMP | $GHOST_SCRIPT -r$resolution -g$size_gs $GHOST_OPT"

and a bit further:
./src/opt/brother/Printers/HLL2310D/cupswrapper/lpdwrapper:119:  'Resolution=600'                   => {"opt"=>"-res" , "val"=>"600"},

so it looks like the -r600 corresponds to a ghostscript resolution parameter but the command seems to work on my system... investigating this further.

Last edited by paleRider (2023-01-12 22:32:41)

Offline

#5 2023-01-12 22:35:12

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: [SOLVED] Issue with Brother laser printer brother-hll2310d

Simply lackign ghostscript?

type gs
pacman -Qs ghostscript

Offline

#6 2023-01-12 22:44:09

paleRider
Member
Registered: 2014-04-22
Posts: 11

Re: [SOLVED] Issue with Brother laser printer brother-hll2310d

Hi again Seth!

that's the first thing I checked when I saw the output of my previous message but unfortunately it's there...

~ $ pacman -Qs ghostscript
local/ghostscript 10.0.0-2

Offline

#7 2023-01-12 22:52:51

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: [SOLVED] Issue with Brother laser printer brother-hll2310d

The error would suggest that

$GHOST_SCRIPT -r$resolution -g$size_gs $GHOST_OPT "

is executed as

-r600 -g$size_gs $GHOST_OPT "
my $GHOST_SCRIPT=`which gs`;
pacman -Qo /usr/bin/which

https://archlinux.org/packages/core/x86_64/which/

Offline

#8 2023-01-12 23:04:42

paleRider
Member
Registered: 2014-04-22
Posts: 11

Re: [SOLVED] Issue with Brother laser printer brother-hll2310d

... that was it. "which" wasn't installed and cups was simply not finding the references to ghostscript. Installing "which" solved the issue and I'm now able to print...

$ pacman -S which

A big thank you, Seth, you've been of great help.

Last edited by paleRider (2023-01-13 10:48:30)

Offline

#9 2023-01-13 07:53:02

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: [SOLVED] Issue with Brother laser printer brother-hll2310d

You might want to raise this at https://aur.archlinux.org/packages/brother-hll2310d to make "which" a dependency of the package or patch the perl script to execute

/bin/sh -c 'which gs'

or just hardcode "$GHOST_SCRIPT" as "gs" because the approach in the script it pretty pointless (we already rely on the shell to resolve the "which" binary and the result of the query obviously isn't used to warn the user, so we can also rely on the shell to resolve "gs" - if anything, hardcode /usr/bin/gs)

Offline

Board footer

Powered by FluxBB