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

Canon LBP 2900 Printer driver for OpenWrt 18.06.9, r8077-7cbbab7246 (on a TP-Link MR-3020 v1 /w 32MB RAM) #38

Open
mohit0121 opened this issue Aug 22, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@mohit0121
Copy link

Would you be kind enough in helping me with a tiny size of this driver, I need to install it on my TPLINK MR-3020 router that has a flash memory of 4 MB only.

@mounaiban mounaiban added the enhancement New feature or request label Oct 30, 2024
@mounaiban
Copy link
Owner

mounaiban commented Oct 30, 2024

Hi @mohit0121, thanks for your interest, but this driver is likely unable to work with MR-3020s due to a lack of RAM.

Based on what I know, in short, Captdriver compresses the print data only after your app (spreadsheet, word processor, etc...) has rendered the page to an uncompressed raster. In other words, your print server will have to hold both the uncompressed raster and the compressed raster in memory for every page printed.

If we were to get this driver to work on a memory-constrained system, we would have to compress the page as it is rasterised. This is enabled by creating a GhostScript device (plugin) and deploying it on the device running the user app sending the print requests. This is part of our master plan, but we are yet to find time to get this done. 😕

So when the app requests a print, CUPS delegates the rasterisation process to the GhostScript device, producing only compressed rasters. Your server will then only ever have to handle the much more space-efficient compressed data and shuttle it to the device.

The Math

An A4 page is roughly 8.3 x 11.7 US inches. At 600dpi, this amounts to 4980 x 7020 px.
Our PPD file is set up to render at one bit per pixel, this takes up 34,959,600 px ÷ 8 bits == 4,369,950 bytes (4.16 MiB?), which is pretty fair, but could be more efficient.

In contrast, a typical Hi-SCoA compressed rasterised word processor document is hardly 90K.

You might be mentioning the MR-3020 v1, which has 4MB Flash and 32MB RAM, according to the OpenWrt Wiki.

Thus, a single 1bpp page is over 1/8 the RAM of the device. The discussion on the topic Installing latest OpenWrt on old hardware on the OpenWrt forums suggests that running OpenWrt on 32MB is really pushing it. I am not sure if there will be enough RAM left for CUPS and the uncompressed rasters.

Note

This issue has been previously discussed in #7.

References

Resolution. Apple CUPS PPD Compiler Driver Information File Reference. https://www.cups.org/doc/ref-ppdcfile.html#Resolution

@mounaiban mounaiban changed the title Canon LBP 2900 Printer driver for OpenWrt 18.06.9, r8077-7cbbab7246 Canon LBP 2900 Printer driver for OpenWrt 18.06.9, r8077-7cbbab7246 (on a TP-Link MR-3020 v1 /w 32MB RAM) Oct 30, 2024
@mohit0121
Copy link
Author

Dear @mounaiban Thank you for your response.

I was wondering, what if, I attach a USB Powered Hub along with a USB drive (32 GB) and then do a installation of the said driver, will it work?
Like so >> https://openwrt.org/docs/guide-user/additional-software/extroot_configuration

@mounaiban
Copy link
Owner

@mohit0121 extroot seems to be intended to increase available storage memory (Flash), which is helpful, but I think you also need more RAM.

In theory, you might be able to create swap space on external storage devices to free up RAM. However, I don't think OpenWrt has any support for swap space out of the box. You will likely need to undertake some deep customisations to enable this feature. Please be aware that using swap space, if this feature can even be enabled, is only advisable on flash memory devices designed for frequent writing (aka "SSDs").

@mohit0121
Copy link
Author

mohit0121 commented Nov 6, 2024 via email

@mounaiban
Copy link
Owner

Thank you so much for your quick response. Does this mean, we’re out of luck? ☹ any other alternatives?

Until we implement the Ghostscript device, that's pretty much the case...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants