You are not logged in.

#1 2019-08-22 18:27:35

nixIT
Member
Registered: 2010-01-13
Posts: 528

[SOLVED] brother hl 2270dw printing garbage

Hey gang, odd issue

EDIT START:

solution was to apply the patch and set Page Margin/Offsets to "Driver Default"

EDIT STOP



I have a brother hl 2270dw printer that has been working on my arch system for years using the brother-hl2270dw aur package. Yesterday I sent 5 jobs to the printer and they started printing. When I grabbed them from the printer half the pages had 1 line of text at the top:

<</.HWMargins [17. 12. 17. 12.]>>setpagedevice

so I rebooted my computer and tried the same document, same result. I loaded up mousepad and tried to print, same result.
I then rebooted the printer and computer (again), same result

I then went into cups (http://localhost:631) checked my printer queue and had failed jobs in it. I cleared them out (using the cups interface and root password) and tried again. same results.

I checked to see which files were updated that day during my system update and the only file I saw as and updated mirrorlist. That shouldn't have caused my printing to mysteriously stop.

I then cleared the queue, deleted the printer from cups and re-added it (using root credentials), going through all the steps naming the printer, selecting the driver all went well. When I clicked Add Printer from the driver selection page (selecting the HL-2270DW driver I installed from AUR) I get the following message:

Add Printer brother_hl_2270dw Error
Unable to add printer:

Unable to copy PPD file.

this file should already be installed.

I stopped and restarted the cups service, same thing.

I then uninstalled the driver and cups from my system, rebooted and installed cups and the 2270dw driver from AUR, same thing. I then tried picking a random printer from the list, not the HL-2270DW, and the install finished, granted I can't print but the driver/PPD file installed. I tried the 2270dw again and got the same unable to copy message.

I uninstalled cups and the driver again, searched my system for all brother*.* files and removed them. Installed cups and the driver BAM, same problem.

After my latest uninstall/reinstall of cups and the driver, Here is what my /var/log/cups/error_log looks like:

E [22/Aug/2019:13:50:31 -0400] Unable to create KeepAlive/PID file "/var/cache/cups/org.cups.cupsd": No such file or directory
E [22/Aug/2019:13:50:31 -0400] Unable to create "/var/cache/cups/job.cache.N": No such file or directory
E [22/Aug/2019:14:08:56 -0400] [Job 136] Unable to queue job for destination "ipp://arch1/printers/brother_hl_2270dw".
E [22/Aug/2019:14:08:56 -0400] [Job 135] Unable to queue job for destination "ipp://arch1/printers/brother2270dw".
E [22/Aug/2019:14:09:24 -0400] [Client 6] pam_authenticate() returned 7 (Authentication failure)
E [22/Aug/2019:14:09:29 -0400] [cups-deviced] PID 4891 (cups-brf) stopped with status 13!
E [22/Aug/2019:14:09:39 -0400] [cups-deviced] PID 4924 (cups-brf) stopped with status 13!
E [22/Aug/2019:14:11:49 -0400] [Client 26] Returning IPP server-error-internal-error for CUPS-Add-Modify-Printer (ipp://localhost/printers/brother_hl_2270dw) from localhost.
E [22/Aug/2019:14:12:22 -0400] [cups-deviced] PID 5058 (cups-brf) stopped with status 13!

any ideas on what to look for?

thanx

--nixIT

EDIT:
I should note I can print from my arch laptop (hasn't been updated in a while) and my wifes SP5 can print, so the printer is working.

I added it as an IPP://<ip address>/ip/port1 same issue

used how it was added on the laptop:

IPP://<ip address>/BINARY_P1

same issue

Last edited by nixIT (2019-08-27 13:28:22)


ASRock X570 PG VELOCITA AM4 AMD X570  | AMD Ryzen 5900x | 128GB G.SKILL RipjawsV  | ASRock Radeon RX 6700 XT Challenger D

Offline

#2 2019-08-22 19:44:50

nixIT
Member
Registered: 2010-01-13
Posts: 528

Re: [SOLVED] brother hl 2270dw printing garbage

I updated my laptop and when I printed I got the same:

<</.HWMargins [17. 12. 17. 12.]>>setpagedevice

I loaded up http://localhost:631 and went to the print queue where I noticed a message saying filter failed. so I downgraded cups, libcups and cups-filter on my laptop and BAM, was able to print on my laptop

I then downgraded cups, libcups, and cups-filter on my main desktop, went to add my printer and still got the "Unable to copy PPD file" message. sad

Any idea on what could cause this?

thanx

--nixIT


ASRock X570 PG VELOCITA AM4 AMD X570  | AMD Ryzen 5900x | 128GB G.SKILL RipjawsV  | ASRock Radeon RX 6700 XT Challenger D

Offline

#3 2019-08-22 20:19:53

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

Re: [SOLVED] brother hl 2270dw printing garbage

ls -l /etc/cups/ppd/ /usr/share/cups/model/

Online

#4 2019-08-22 21:16:22

nixIT
Member
Registered: 2010-01-13
Posts: 528

Re: [SOLVED] brother hl 2270dw printing garbage

After downgrading the 3 packages, I then did anther uninstalled of the 2270dw package, reboot, reinstall of the package and then finally after a restart of cups service, I was able to add the printer with the correct driver.

So it appears that there is a conflict with the latest cups, libcups, cups-filter and the brother-2270dw aur package.

I'm not even sure how to report this, cups issue? printer driver package issue?

--nixIT


ASRock X570 PG VELOCITA AM4 AMD X570  | AMD Ryzen 5900x | 128GB G.SKILL RipjawsV  | ASRock Radeon RX 6700 XT Challenger D

Offline

#5 2019-08-22 21:57:54

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED] brother hl 2270dw printing garbage

After the cups update did you try rebuilding 2270dw?

Offline

#6 2019-08-22 22:52:43

nixIT
Member
Registered: 2010-01-13
Posts: 528

Re: [SOLVED] brother hl 2270dw printing garbage

@loqs, yes rebuilt the package and same thing, even uninstalled it, removed everything brother related and reinstalled. Only after downgraded those 3 packages, rebooting then restarting the cups service (it was already started) did it work.

The odd thing, why would it all of a sudden get (what I'm going to call corrupt) part way through printing multiple documents? nothing cups related was updated during the printing process yesterday. odd.


ASRock X570 PG VELOCITA AM4 AMD X570  | AMD Ryzen 5900x | 128GB G.SKILL RipjawsV  | ASRock Radeon RX 6700 XT Challenger D

Offline

#7 2019-08-22 23:03:18

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED] brother hl 2270dw printing garbage

git bisect between the good and bad versions of the cups packages?

Offline

#8 2019-08-23 00:20:40

Serioga
Member
Registered: 2017-05-25
Posts: 4

Re: [SOLVED] brother hl 2270dw printing garbage

Same problem with the Brother hl2280dw AUR

Works when downgraded as follows:

sudo pacman -Ss cups | grep installed

extra/cups 2.2.12-1 [installed: 2.2.11-2]
extra/cups-filters 1.25.3-1 [installed: 1.25.1-1]
extra/libcups 2.2.12-1 [installed: 2.2.11-2]

Offline

#9 2019-08-23 17:08:36

nixIT
Member
Registered: 2010-01-13
Posts: 528

Re: [SOLVED] brother hl 2270dw printing garbage

It's good to hear that it's not just me. smile

Which package maintainer could this be reported to? Or, is there a different printer driver that we should use? with updated cups packages, I was able to install drivers for different printers, it appears from my tests it's only the 2270dw package/driver.


ASRock X570 PG VELOCITA AM4 AMD X570  | AMD Ryzen 5900x | 128GB G.SKILL RipjawsV  | ASRock Radeon RX 6700 XT Challenger D

Offline

#10 2019-08-23 20:32:13

Serioga
Member
Registered: 2017-05-25
Posts: 4

Re: [SOLVED] brother hl 2270dw printing garbage

It works when the Brother's .ppd file is modified as described here:
https://aur.archlinux.org/packages/brot … ent-705311

Offline

#11 2019-08-24 12:15:08

jsoy9pQbYVNu5nfU
Member
Registered: 2013-04-19
Posts: 108

Re: [SOLVED] brother hl 2270dw printing garbage

Serioga wrote:

Same problem with the Brother hl2280dw AUR

Works when downgraded as follows:

sudo pacman -Ss cups | grep installed

extra/cups 2.2.12-1 [installed: 2.2.11-2]
extra/cups-filters 1.25.3-1 [installed: 1.25.1-1]
extra/libcups 2.2.12-1 [installed: 2.2.11-2]

For anybody with a HP printer w/ hplip installed coming here, downgrading to the aforementioned versions fixed also a) printer setup problems and b) a weird printing problem where the printer would just spew empty sheets of papers until the tray was empty with HPLIP. Like the AUR link to the Brother package implies, I presume that CUPS fails to load hplip's PPD files as I find in the log

E [24/Aug/2019:13:47:59 +0200] PPD file for ENVY_5000 cannot be loaded.
E [24/Aug/2019:13:47:59 +0200] Illegal option keyword string on line 198 of /etc/cups/ppd/ENVY_5000.ppd.

both when attempting to print and when attempting to setup. The last couple of CUPS releases say that they "fixed some PPD parser issues" (https://github.com/apple/cups/releases) which is why I assume that the problems with certain PPDs are related to that. I'm assuming the vendor has to fix the PPDs.

Last edited by jsoy9pQbYVNu5nfU (2019-08-24 12:17:10)

Offline

#12 2019-08-24 13:55:42

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED] brother hl 2270dw printing garbage

Nixit does applying the following change to the package based on jadedpasta's comment work?
Apply with:

cd brother-hl2270dw
git apply -v /path/to/the.patch

patch

diff --git a/HL2270DW.ppd.patch b/HL2270DW.ppd.patch
index b91add0..e318cc4 100644
--- a/HL2270DW.ppd.patch
+++ b/HL2270DW.ppd.patch
@@ -1,8 +1,14 @@
-279c279,283
-< 
----
-> *OpenUI *Margins/Page Margins/Offsets: PickOne
-> *DefaultMargins: Custom
-> *Margins Default/Driver Default: ""
-> *Margins Custom/Custom (set with 'alignmargins'): "<</.HWMargins[0 0 0 0] /Margins[0 0]>>setpagedevice"
-> *CloseUI: *Margins
+diff --git a/usr/share/cups/model/HL2270DW.ppd b/usr/share/cups/model/HL2270DW.ppd
+index fb159b9..7cfa839 100755
+--- a/usr/share/cups/model/HL2270DW.ppd
++++ b/usr/share/cups/model/HL2270DW.ppd
+@@ -276,4 +276,9 @@ restore
+ *UIConstraints:       *InputSlot MANUAL       *Duplex DuplexTumble
+ *UIConstraints:       *InputSlot MANUAL       *Duplex DuplexNoTumble
+ 
++*OpenUI *Margins/Page Margins/Offsets: PickOne
++*DefaultMargins: Other
++*Margins Default/Driver Default: ""
++*Margins Other/Other (set with 'alignmargins'): "<</.HWMargins[0 0 0 0] /Margins[0 0]>>setpagedevice"
++*CloseUI: *Margins
+ 
diff --git a/PKGBUILD b/PKGBUILD
index d5ef81e..789aa5c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,7 +14,7 @@ source=("http://www.brother.com/pub/bsc/linux/dlf/hl2270dwlpr-2.1.0-1.i386.rpm"
         "HL2270DW.ppd.patch")
 md5sums=('69c1987c0636a64fb48f3c6826a3ae28'
          '5a7cc60cafaf60d722d9bce3f2751164'
-         'de9cee3fed4afb1ee7f5516b5bac9f25')
+         'a5e274f01541458b51fe9d2392113cdb')
 
 if [[ "$CARCH" == "x86_64" ]]; then
   depends+=('lib32-glibc')
@@ -42,7 +42,7 @@ package() {
   sed -i -e 's/Brother HL2270DW for CUPS/Brother HL-2270DW/' "$srcdir/usr/share/cups/model/HL2270DW.ppd"
 
   # Add margin correction (alignmargins output: https://wiki.linuxfoundation.org/en/OpenPrinting/Database/CUPSDocumentation)
-  patch "$srcdir/usr/share/cups/model/HL2270DW.ppd" < "$srcdir/HL2270DW.ppd.patch"
+  patch -p1 -i ../HL2270DW.ppd.patch
 
   # Replace references to $srcdir
   sed -i -e "s#$srcdir/usr#/usr#" "$srcdir/usr/lib/cups/filter/brlpdwrapperHL2270DW"

Last edited by loqs (2019-08-26 16:08:32)

Offline

#13 2019-08-26 12:20:27

nixIT
Member
Registered: 2010-01-13
Posts: 528

Re: [SOLVED] brother hl 2270dw printing garbage

@loqs

Thanx for the info, I'm not sure how to do this.


ASRock X570 PG VELOCITA AM4 AMD X570  | AMD Ryzen 5900x | 128GB G.SKILL RipjawsV  | ASRock Radeon RX 6700 XT Challenger D

Offline

#14 2019-08-26 16:14:58

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED] brother hl 2270dw printing garbage

Save the contents of the patch code block somewhere other than the brother-hl2270dw directory then use the instructions I provided in the other code block.
If you saved the patch as /tmp/test.patch then the commands would be

cd brother-hl2270dw
git apply -v /tmp/test.patch

Then build and install the package as normal.

Offline

#15 2019-08-27 02:44:10

nixIT
Member
Registered: 2010-01-13
Posts: 528

Re: [SOLVED] brother hl 2270dw printing garbage

thanx, never done anything like that before.

This did not help me, same as before nothing but that one line prints. I did not delete the printer from cups and then re-add it after installing with the patch. Would that make a difference?

thanx

--nixIT


ASRock X570 PG VELOCITA AM4 AMD X570  | AMD Ryzen 5900x | 128GB G.SKILL RipjawsV  | ASRock Radeon RX 6700 XT Challenger D

Offline

#16 2019-08-27 06:27:53

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

Re: [SOLVED] brother hl 2270dw printing garbage

Would that make a difference?

Probably. The ppds get copied to /etc/cups/ppd when you add the printer.

Online

#17 2019-08-27 13:27:01

nixIT
Member
Registered: 2010-01-13
Posts: 528

Re: [SOLVED] brother hl 2270dw printing garbage

seth wrote:

Would that make a difference?

Probably. The ppds get copied to /etc/cups/ppd when you add the printer.

Thanx, I deleted the printer from cups, uninstalled the driver, reinstalled after applying the patch, restarted cups and readded the printer.

I got the same issue when trying to print, however after going into default settings and changing "Page Margin/Offsets" from "Other (set with alignments)" to "Driver Default" it work. Odd as I never remember changing this option previously.

oh well, thanx for helping, it's all good.


ASRock X570 PG VELOCITA AM4 AMD X570  | AMD Ryzen 5900x | 128GB G.SKILL RipjawsV  | ASRock Radeon RX 6700 XT Challenger D

Offline

Board footer

Powered by FluxBB