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

[HL-L2300D] Doesn't print all of a sudden #4

Closed
Photon89 opened this issue Nov 25, 2015 · 70 comments
Closed

[HL-L2300D] Doesn't print all of a sudden #4

Photon89 opened this issue Nov 25, 2015 · 70 comments

Comments

@Photon89
Copy link

I guess, that's not really a bug report but rather a support request - unfortunately I didn't find a better place for it.

I recently bought an HL-L2300D and want to use it on a Raspi (running Raspbian and CUPS 1.5.3) which makes it available in the local network. I followed the steps described here to compile and install the driver: https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=116509 Initially it worked and I could use the printer both locally and over the network without any problems.

However, after literally just a few days, without any changes or updates, the printer stopped working. Now, when sending a print job, the "Ready" LED blinks for quite a long time but then just stops blinking and nothing is printed. CUPS reports the job as completed without error. I just tested the printer on my PC using the official drivers and it works, so it's not a hardware issue. Unfortunately the binary drivers won't work on a Raspi, therefore any help in making the brlaser drivers work is greatly appreciated!

Here is some information I saw being useful in one of the other bug reports, don't know whether it will help here:

$ find /sys/devices -name ieee1284_id | xargs head; echo
MFG:Brother;CMD:PJL,HBP;MDL:HL-L2300D series;CLS:PRINTER;CID:Brother Laser Type1;

@Photon89
Copy link
Author

Not really solved, but I did a reinstall of the whole Raspbian installation and cannot reproduce the problem any more. Probably it was some misconfiguration on my side.

@mabrowning
Copy link

I'm having the same issue, but it seems to be repeatable only with certain files. e.g. www.google.com/landing/cloudprint/testpage.pdf

@Photon89
Copy link
Author

Then it might be a different issue worth opening another bug report maybe? Since this one is closed, it won't get much attention from the developer, I fear.

@mabrowning
Copy link

mabrowning commented Jan 13, 2018 via email

@Photon89
Copy link
Author

Then I'll reopen it and hope the best! :)

@Photon89 Photon89 reopened this Jan 13, 2018
@drahnr
Copy link

drahnr commented Jan 25, 2018

Don't have access to this printer, so not much I can do.

@pdewacht
Copy link
Owner

Yeah, somebody with access to this printer will have to figure this one out.

@Photon89
Copy link
Author

I have access to it but obviously I am not a coder. Let me know if I can help by doing some testing though!

@pdewacht
Copy link
Owner

I'd guess there's something in the job header that the printer doesn't like. Perhaps it's a particular setting that doesn't work. Try different resolutions, different paper sizes (A4 vs US Letter) etc. and see if you can make it reliably fail in some configuration. (For example, the DCP-7065 will not print 300 dpi jobs.)

@Photon89
Copy link
Author

Photon89 commented Jan 28, 2018

As of myself, the original problem was solved after the reinstall of Raspbian. However, I am glad to report a new problem. :) On all client machines besides of one, I cannot print in duplex (whenever I change the duplex setting to anything other than "off" the printer won't print). On one machine, however, I am able to print in duplex. Is there a possibility to get dump of the used settings (I am using system-config-printer to add and configure printers on the client machines) to compare them? From what I can see in the GUI configuration, the settings are identical and I don't understand why duplex works on one machine and fails on three others...

@pdewacht
Copy link
Owner

Currently the duplex printing option is only enabled for the DCP-7065DN. Maybe you selected different printer models on different machines?

Otherwise you can enable CUPS debug logging and search for "page header" in the /var/log/cups/error.log. brlaser dumps the parameters for the first page of each print job. If the Duplex flag is set, brlaser will send the printer commands for duplex printing.

@pdewacht
Copy link
Owner

@Photon89 I've added the HL-L2300D to the list of working printers, since at least the basics seem to be working for you. Can you try to print mabrowning's test file?

@Photon89
Copy link
Author

Further observations:

The CUPS server is a raspi running Raspbian, the Raspbian brlaser package is installed.

The client machine capable of duplex printing has an active avahi service which seems to have added a printer automatically which is capable of duplex printing. If I add a printer manually, it won't be capable of duplex printing on any of the client machines.

I now installed the latest git revision on one of the client machines. When adding a printer, it didn't ask for a driver and showed "remote printer" in the driver field. So I went to the settings and manually changed to the brlaser driver on the client. But when changing the settings to duplex, it didn't print again. The client shows me "cups-waiting-for-job-complete", the printer blinks a few times but doesn't print.

@pdewacht
Copy link
Owner

@Photon89 You don't need printer drivers on the clients. With CUPS you only need to install the printer driver on the print server. The clients then send the print jobs to the server to be processed (usually in PostScript or PDF format).

You can use client-side printer drivers with CUPS, but I think that needs special configuration. I don't know if you've done that.


Also, there's something that doesn't add up in your description

  • The client with working duplex printing had a queue set up using Avahi
  • Avahi sets up queues in the normal CUPS way (i.e. using the printer driver on the server)
  • You say that the server has the Raspbian brlaser package
  • But the Raspbian package has no support at all for duplex printing, that's a feature that I've only merged at the end of last year, it's not yet part of a release.

Did you install brlaser from git on the Raspbian system as well? Or perhaps that CUPS install is using a different (and seemingly more featured) driver?

@Photon89
Copy link
Author

Photon89 commented Jan 30, 2018

Sorry, stupid me! Turned out that on the new setup I actually installed the official i386 driver with some QEMU User Emulation magic (there was a howto for it but the website is down). So it looks like I am not a good tester here... @mabrowning should take over, I guess.

@girtsf
Copy link

girtsf commented Apr 3, 2018

Same problem here. I can print a basic text document (from macOS client), but printing https://static.googleusercontent.com/media/www.google.com/en//landing/cloudprint/testpage.pdf causes the printer to blink "Ready" LED seemingly forever and do nothing. CUPS thinks that the job has completed. When it gets into this mode, it seems to be wedged and needs a hard power cycle.

@mabrowning
Copy link

@girtsf Luckily, (other than testing Google Cloud Print), whatever is in that PDF seems to be a pretty rare case and I have been running the printer for the past few months without further issue.

@dcousens
Copy link

dcousens commented Apr 3, 2018

@mabrowning for me it is high DPI images/rasters that cause issues.
Lowering the DPI in whatever program you are using can get it through, though it can degrade the content so badly it isn't worth printing...

@girtsf
Copy link

girtsf commented Apr 4, 2018

Is there a way to make CUPS filter raster stuff to lower DPI?

@Exxion
Copy link

Exxion commented Apr 6, 2018

Setting the resolution to 300 DPI under Set Default Options->General solved this for me, but according to the manufacturer, this printer should go up to 600, so this is really just a workaround.
I'll try to do some more detailed debugging soon.

@rkreis
Copy link
Contributor

rkreis commented Apr 6, 2018 via email

@rkreis
Copy link
Contributor

rkreis commented Apr 6, 2018 via email

@girtsf
Copy link

girtsf commented Apr 6, 2018

[..] I got a useful error message on the printer's LCD [..]

The HL-L2300D doesn't have an LCD. When it fails, the "Ready" LED keeps blinking forever. I suspect it just sits in a crash loop internally.

Thanks for the details on the source of the problem!

(We ended up just ordering a new printer rather than fighting so hard to get a $100 printer working. But if there is an easy downsample/recompress raster filter fix, somebody else might benefit from it.)

@dcousens
Copy link

dcousens commented Apr 7, 2018

https://www.brother.com.au/monochrome-laser-printers/hl-l2300d-detail

8MB Memory

Yeah, that would do it.

@Exxion
Copy link

Exxion commented Apr 7, 2018

The file I was trying to print does print on the original drivers, but I'm not entirely certain they didn't just automatically switch it to 300 DPI to do so
EDIT: Yeah, it prints fine on the original drivers.

@Exxion
Copy link

Exxion commented Apr 7, 2018

Oh, and I forgot to mention that if you print a multi-page job and only some of the pages have the offending 600 DPI images, it will print all the pages without images but skip the ones with images. I don't know anything about driver development, but it sounds like that rules out the crash-loop theory as well as anything wrong with the entire job.

@pdewacht
Copy link
Owner

Ok, so the printer either hangs or skips pages when printing images in 600dpi mode. But 300dpi mode works fine. And at least for Exxion, the official drivers also work fine.

I don't buy the "out of memory" explanation. An uncompressed A4-sized bitmap needs about 4 megabyte. If the printer is equipped with 8MB RAM, that should be plenty. Also, I can't find any memory complaints online about this particular model.

It's possible that the printer chokes on the print data generated by this driver. Though in that case I'd expect 300dpi prints to be affected as well. (Perhaps they are, just less often?)

Can somebody send me a some print data samples? A couple of pages that fail to print and a couple that print without problems, preferably generated with the same print settings? Maybe I can spot a pattern. (You can mail this directly to me: pdewacht@gmail.com, if you don't want to make your files public.)


Capturing print data with CUPS: This is unfortunately a bit involved. First, edit /etc/cups/cups-files.conf and enable the FileDevice option: FileDevice Yes. Restart CUPS. Then, create a special print queue:

sudo lpadmin -p brlaser-test -E -m drv:///brlaser.drv/brl2300d.ppd -v file:/tmp/prnfile

When you print to this brlaser-test queue, the generated print data will be written to the file /tmp/prnfile. Each time you print this file will be overwritten, so you need to copy this file after every print.

@sjuk
Copy link

sjuk commented Aug 7, 2018

I think I've found the download location for the original driver. Brother HL-L2300D Download. I've installed the driver and it can print the pdewacht.pdf.

That looked promising for me and made me some more testing. I've tried a pdf file with four pages in duplex mode. But this did not work. And surprisingly in the new driver (brother-hll2300d) there is one more choice for resolution quality 300 dpi. And now I can confirm the issue of user @Exxion. With duplex & 600 dpi the multi-paged pdf does get printed. With duplex & 300 dpi it prints, but in lower quality.

For neither the brlaser nor the the original driver from brother gives a decent solution.
I would be very happy if someone knows of a better solution and can share it with us.
Thanks in advance

@sjuk
Copy link

sjuk commented Sep 22, 2018

Hello Everybody, is there anyone who can help? Is there anything I can do to help (testing something, providing log files or something else)?

@Photon89
Copy link
Author

Here is how I made it work on the Raspi without using any drivers at all (and official binary drivers on the clients): https://forum.manjaro.org/t/how-to-set-up-a-remote-printer-which-is-attached-to-a-raspberry-pi-or-any-other-arm-computer/57056

@sjuk
Copy link

sjuk commented Sep 23, 2018

Could be a terrible printer. Has anyone asked Brother for help?

I already asked Brother for help. But they only threw some links on me. :-(
http://support.brother.com/g/b/downloadtop.aspx?c=de&lang=de&prod=HLL2300D_US_EU_AS
http://support.brother.com/g/s/id/htmldoc/printer/cv_hll2300d/ger/index.html#GUID-AF8C0063-911B-44B3-B52D-0FC0D110ABB5_40#KEY=duplex

The links did not help and asking twice did not lead to another answer. :-(

@sjuk
Copy link

sjuk commented Sep 23, 2018

Here is how I made it work on the Raspi without using any drivers at all (and official binary drivers on the clients): https://forum.manjaro.org/t/how-to-set-up-a-remote-printer-which-is-attached-to-a-raspberry-pi-or-any-other-arm-computer/57056

Before I switch to another distribution. Can you please confirm that printing of pdf documents with duplex works flawlessly?

@Photon89
Copy link
Author

Photon89 commented Sep 23, 2018

@sjuk Though I can recommend Manjaro, you don't have to switch to it just to make your printer work. The only Manjaro-specific steps in the howto are steps 1 and 2 from the client setup. In case of a different distro, you just have to install your printer driver and the nss-mdns (or equivalent) package with the package manager of your distro instead of pacman.

And yeah, I can confirm that duplex printing works for me with this setup.

@dcousens
Copy link

@Photon89 can you print the problematic files?

@Photon89
Copy link
Author

@dcousens Yes, I can print, for example, the pdewacht.pdf file from comment #4 (comment) But I guess, that's no surprise since I use the official Brother drivers on the clients.

@sjuk
Copy link

sjuk commented Sep 26, 2018

I've also installed the official Brother drivers. I used linux-brprinter-installer-2.2.0-1 install script from their homepage. The script automatically downloaded and installed the following packages.
hll2300dcupswrapper-3.2.0-1.i386.deb
hll2300dlpr-3.2.0-1.i386.deb
In the printer manager gui there are two printers and the drivers are called
Brother HL-L2300D
Brother HL-L2300D for CUPS

@Photon89 is there any chance to compare our drivers? Do you know where the "real" driver files are located, so that we can share them here for comparing purpose?

Thanks in advance

@Photon89
Copy link
Author

@sjuk Well, as I said, the HowTo I linked just describes how to use the official drivers with an ARM device like a Raspberry Pi. Those are exactly the same drivers as in the install script from Brother's homepage.

@sjuk
Copy link

sjuk commented Sep 26, 2018

@Photon89 Sorry, but in this case your comment is not helpful at all. But thank you for trying.

@ph33nx
Copy link

ph33nx commented Oct 12, 2018

For anyone who needs a quick solution..

Edit the file: /etc/cups/ppd/Brother_HL-L2320D_series.ppd
Replace 600 to 300 in: Resolution 300dpi/300 DPI: "<</HWResolution[300 300]/cupsBitsPerColor

& Voila!! You can print now.

although the quality drops a little but it still works.

@sjuk
Copy link

sjuk commented Oct 12, 2018

For anyone who needs a quick solution..

Edit the file: /etc/cups/ppd/Brother_HL-L2320D_series.ppd
Replace 600 to 300 in: Resolution 300dpi/300 DPI: "<</HWResolution[300 300]/cupsBitsPerColor

& Voila!! You can print now.

although the quality drops a little but it still works.

I've found the file and added the following line under *DefaultResolution: 600dpi.

*Resolution 300dpi/300 DPI: "<</HWResolution[300 300]/cupsBitsPerColor 1/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3>>setpagedevice"

After that I was able to choose 300 DPI for the next print. Now pdewacht.pdf gets printed. But the quality is very poor. Some words cannot be read with this resolution. I would not so far to call this workaround a solution.

But thank you very much sharing your knowledge, because it leads the attention to the resolution. Perhaps a developer could have a look at that?

@Terrabits
Copy link

In case it helps clarify things:

I am also using brlaser (built from current repo) with the 2300D on a raspberry pi. I've added the 300 dpi setting per @abhi21x and @sjuk. I tried printing the files linked above with these results:

  1. pdewacht.pdf prints at 300 dpi
  2. pdewacht.pdf does not print at 600 dpi
  3. no.pdf from @dcousens prints at both dpi for me
  4. ok.pdf from @dcousens also prints at both dpi

So perhaps my system or printer is somehow different than @dcousens, or perhaps the minimal example is too minimal. I don't know.

For pdewacht at 600 dpi, cups says the job completed but it never prints (blinky light for 5 seconds then nothing).

In all scenarios I get nothing in /var/log/cups/error_log with LogLevel warn (the default), and a ton of stuff with LogLevel debug, none of which looks particularly interesting.

@pdewacht
Copy link
Owner

Hi all! I just received a fix for a similar issue that affected the HL-1210W (#40). Can anybody retest today's git version?

@dcousens
Copy link

dcousens commented Mar 26, 2019

Resolved!
(and tested with other problematic documents too)

@Terrabits
Copy link

I can confirm as well 👍. Thank you! 👏

@janbuchar
Copy link

This sounds great! Will there be a release any time soon or should I switch to the git version?

@pdewacht
Copy link
Owner

Sorry for the delay, I'm making a new release tonight.

@dcousens
Copy link

dcousens commented Oct 10, 2019

I'm unable to print the following test document, isolated down to the smallest thing I possibly could.

It is strange.pdf.

@Terrabits maybe you could try?

@Terrabits
Copy link

@dcousens This printed for me using the drivers that I built from source around the time of my previous post (3/27).

@dcousens
Copy link

@Terrabits thank you for testing!
I can only print that document using 300 DPI.

Somehow yet again we have different results!
@sjuk could you try?

@dcousens
Copy link

@pdewacht I managed to have that document print by changing

-  static const unsigned max_lines_per_block_ = 64;
+  static const unsigned max_lines_per_block_ = 32;

@sjuk
Copy link

sjuk commented Oct 20, 2019

@Terrabits thank you for testing!
I can only print that document using 300 DPI.

Somehow yet again we have different results!
@sjuk could you try?

@dcousens: I've cloned, compiled and installed version 6 of brlaser driver from pdewacht's git repository. After that I added a new printer which automatically assigned the recently installed driver. Printing of strange.pdf worked fine. Printing pdewacht.pdf also worked fine with the driver. Looks very promising. :-)

@mathematicalmichael
Copy link

in case anyone comes across this:
cloned and compiled the branch from #68 worked flawlessly (just followed readme instructions) and resolved my pdf printing issues on ubuntu 18 (x86)

@niftyteam
Copy link

in case anyone comes across this:
cloned and compiled the branch from #68 worked flawlessly (just followed readme instructions) and resolved my pdf printing issues on ubuntu 18 (x86)

agreeing with @mathematicalmichael. this just worked on my hl-l2320d. i was having problems printing in duplex, and printing with images. changing the resolution on the ppd files made it work on all my windows/mac/ios devices.

@2mac
Copy link

2mac commented Nov 9, 2021

I ran into this issue recently and found this thread. For those like me who find this before the next official release, this bug was fixed by another commit to master. Just build the latest master and it will work. No need to use a fork.

Also, when this happened to me, I had to reset the printer to get it to print any job after the bad print. To do this (on the HL-L2300D), turn off the printer, hold "Go" and turn it on. When the 3 top lights come on, release the button, then press it 10 times and wait. This will reset all internal state of the printer, and you'll be able to print again.

@mattmays
Copy link

mattmays commented Dec 3, 2021

I have a Brother HL-L2320D and compiling from master and resetting per @2mac's instructions worked like a charm. Thanks!

@djabaay
Copy link

djabaay commented Sep 1, 2022

I signed in because this thread and fix was a Godsend. I have a Brother HL-2300D which had all of the above symptoms you all methodically debugged. I cloned the repo, configured, compiled, and installed, and restarted cups. I was able to then successfully print the black and white image that previously failed. There wasn't even a need to re-add the printer, it just worked. Thank you all so much.

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