Issues with original printer driver (Brother MFC-L8390CDW)

As I’ve said already, in the printer itself, in CUPS and in the application, all settings are as expected. But I made some progress! Yeah.

After diving a little bit deeper into the driver (I’ve learned, that Brother has an extra CUPS wrapper), I found the reason. I’ve enabled debugging in the driver, which wrote a /tmp/br_lpdfilter_laser.log file, with the following content:

 BR_PRT_PATH=/opt/brother/Printers/mfcl8390cdw/    PRINTER=mfcl8390cdw

 BRCONV=/opt/brother/Printers/mfcl8390cdw/lpd/brmfcl8390cdwfilter    PRINTER=mfcl8390cdw

PRINTER=mfcl8390cdw
$ENV{PS} =  1
$ENV{BRPRINTERRCFILE} = /tmp/brmfcl8390cdwrc_1088491
$ENV{BRPAPERWIDTH} = -1
$ENV{BRPAPERHEIGHT} = -1
 PAPERINF=/opt/brother/Printers/mfcl8390cdw/inf/paperinfij2

 TYPE=Letter  w=5100 h=6600 size_br=

size_gs = 5100x6600 ,size_br =  -ps 5100x6600

[0 0 612 792]

<</ImagingBBox [0 0 612 792] /PageOffset [-0 0]>> setpagedevice

**** (echo  '<</ImagingBBox [0 0 612 792] /PageOffset [-0 0]>> setpagedevice';cat /tmp/br_input.sTuiQe) | /usr/bin/gs -r600 -g5100x6600 -q -dNOPROMPT -dNOPAUSE -dSAFER -sDEVICE=ppmraw -sstdout=%stderr -sOutputF
ile=- - -c quit   ****

**** /tmp/br_input.sTuiQe  ****

**** debug=2  ****

file type = <PDF
>

 (echo  '<</ImagingBBox [0 0 612 792] /PageOffset [-0 0]>> setpagedevice';cat /tmp/br_input.sTuiQe) | /usr/bin/gs -r600 -g5100x6600 -q -dNOPROMPT -dNOPAUSE -dSAFER -sDEVICE=ppmraw -sstdout=%stderr -sOutputFile=
- - -c quit  > /tmp/br_lpdfilter_laser_gsout.dat

cat /tmp/br_lpdfilter_laser_gsout.dat | /opt/brother/Printers/mfcl8390cdw/lpd/brmfcl8390cdwfilter -pi /opt/brother/Printers/mfcl8390cdw/inf/paperinfij2 -rc /tmp/br_lpdfilter_laser.rc>/tmp/br_lpdfilter_laser_out
.prn

cat /tmp/br_lpdfilter_laser_out.prn
file type = PDF

What makes me wondering, is the line TYPE=Letter w=5100 h=6600 size_br=. Then, I found a file named /opt/brother/Printers/mfcl8390cdw/cupswrapperbrother_lpdwrapper_mfcl8390cdw. Within this file, another pseudo-defaults file is included, named $basedir/inf/br${PRINTER}rc which leads to the real file /opt/brother/Printers/mfcl8390cdw/inf/brmfcl8390cdwrc. And this contains:

[mfcl8390cdw]
MediaType=Plain
PageSize=Letter
InputSlot=AutoSelect
BRResolution=Fine
Copies=0
Collate=OFF
BRReverse=OFF
BRMonoColor=Auto
BRColorMatching=Normal
BRGray=OFF
BREnhanceBlkPrt=OFF
TonerSaveMode=OFF
BRImproveOutput=OFF
Brightness=0
Contrast=0
RedKey=0
GreenKey=0
BlueKey=0
Saturation=0
BRSkipBlank=OFF
Language=us

There it is. It contains a fixed PageSize=Letter. After that, I’ve to agree, that @j8a was right, that changing the entry in this file (in my case PageSize instead of PageType) solves the issue.

EDIT: Rejoiced a little too soon. Duplex still doesn’t work with original driver. At least, page position is correct now.

EDIT 2: Found out, that when adding a hard BRDuplex=DuplexTumble the duplex function works (in this case always, which is nothing one wants). It’s all just sick

Does anyone has an idea, why this file overwrites all other settings and defaults? I would expect, that this file would be used as the absolutely last fallback only!?