Page 1 of 1
What is involved in writing a Printer Driver? - SOLVED
Posted: Wed Sep 11, 2019 11:12 am
by Falcon
Just before switching to MX, my printer died. I looked for a new printer that had Linux support and found a Canon TR8520 "all in one" printer that stated that they had a Linux driver, so I bought the printer. I used it for a while on Windows 7 and liked its features. Then I changed over the computer's OS to MX and downloaded the Linux driver from the Canon site. The first time I tried to print from MX I discovered that something was amiss. This Linux driver only allows you to print from the cassette on one side of the paper, doesn't allow you to print from the rear tray and can't scan from the printer to the computer as it did under Windows 7. I called Canon tech support and was told that "they chose not to include the additional functions in the Linux driver". Great!
The printer download from the Canon site included the source code for the driver, but the chances are that it only reflects the functions that the Linux driver supports. I would like to be able to use all of the available functions that were included in the Windows driver and in order to do this, I will need to write some driver code. The only problem is that my only programming experience was with BASICA in the 1980s. What is involved in writing a driver for this printer? Am I likely to need more documentation from Canon in order to see how to implement the additional functions that I want? Which programming language would be best to use? Like I said, I haven't done any programming in years, but I'm not adverse to learning something new unless those of you who are more knowledgeable think that I would probably be in over my head. Any information will be appreciated.
Re: What is involved in writing a Printer Driver?
Posted: Wed Sep 11, 2019 12:37 pm
by CrackMeUp
Yup, way over your head, mine too

... Canons are pretty notorious for minimal Linux support ... that's why there are developer PPAs for Ubuntu-based distros to deal with the lack ... Unfortunately pure Debian/Debian-based distros like MX don't recommend using PPAs ... NEVER ... they'll bork your system.
If you installed all the software from the Canon site, you should have no problem printing ... also if you installed the
ScanGear MP .deb you should be able to scan as well ... but not with native Debian scanner apps ... so ....
(1) Turn on your printer, turn the scanner off then on (you only have to do this once so that the driver is detected)
(2) To run ScanGear, you open a terminal session and type
Cheers
Re: What is involved in writing a Printer Driver?
Posted: Wed Sep 11, 2019 4:59 pm
by Falcon
CrackMeUp,
Thanks for the reply.
I installed both the printer driver and the Scangear driver. Unfortunately I can only print on one side of the paper from the cassette. Can't print double-sided and can't print from the rear tray at all, which makes it pretty much useless if I want to print photos.
Using Scangear from the computer, I can scan either a single sheet from the platen, or multiple sheets from the document feeder. But I can't scan multiple sheets from the platen and combine them in a single document like I can with the Windows version. I guess I'll have to keep my older computer on Windows 7 so that I can still utilize the full set of features that the printer offers.
Re: What is involved in writing a Printer Driver?
Posted: Thu Sep 12, 2019 6:18 am
by srq2625
CrackMeUp wrote: Wed Sep 11, 2019 12:37 pm
Unfortunately pure Debian/Debian-based distros like MX don't recommend using PPAs ... NEVER ... they'll bork your system.
While this statement is, in general, true there is one way I know of to make it work and work cleanly. Take the source code and compile it on your system to generate a .deb file. Then install the .deb file.
For the first few years of my Linux life, I did this with darktable and it worked out quite well.
Of course, this only makes sense if you can find a PPA that includes a driver for your printer that supports all the functionality of the printer.
Re: What is involved in writing a Printer Driver?
Posted: Thu Sep 12, 2019 8:07 am
by asqwerth
If you do find a PPA, you can post the details in the Package Requests subforum and ask the Packaging Team if the packages within the PPA are compatible with MX18 or whether the packaging team would be able to rebuild it to be Debian-compatible.
https://mxlinux.org/wiki/help-files/mx-faqs/
Important thing is to ask first.
Re: What is involved in writing a Printer Driver?
Posted: Thu Sep 12, 2019 10:03 am
by Falcon
Gentlepersons,
Thanks for the ideas and suggestions about this issue. Rather than asking the developers to do a bunch of work for me to try to get this printer functioning fully on MX, it's probably easier to just keep Windows 7 on my older computer and use it in the instances where I need the additional features of the printer. These printers don't last forever, and when it dies, then I will be back to square one trying to find another printer that will work with Linux and asking someone to try to modify a PPA file for me. While it's not the best solution, I think that using the Windows computer is the easiest solution for everyone in the long run.
Re: What is involved in writing a Printer Driver?
Posted: Thu Sep 12, 2019 10:38 pm
by CrackMeUp
@ Falcon
BTW Win 7 is dead/obsolete/kaput come January 2020 ... you obviously made a bad (luck) choice purchasing that printer ... one of the very few that don't function well/completely with Linux OSes. In my experience with Canons, the Linux drivers (even third-party) are very limited and do not exploit all the features of the printer ... sell the sucker and get yourself a similar HP product ... No-brainer and work(s) OOTB ... any Linux OS will automatically detect/download the drivers for full functionality ... choose the model that fits your needs and go for it ...
https://developers.hp.com/hp-linux-imag ... ices/index ...
Cheers
Re: What is involved in writing a Printer Driver?
Posted: Thu Sep 12, 2019 11:09 pm
by JayM
Falcon wrote: Thu Sep 12, 2019 10:03 am
Gentlepersons,
Thanks for the ideas and suggestions about this issue. Rather than asking the developers to do a bunch of work for me to try to get this printer functioning fully on MX, it's probably easier to just keep Windows 7 on my older computer and use it in the instances where I need the additional features of the printer. These printers don't last forever, and when it dies, then I will be back to square one trying to find another printer that will work with Linux and asking someone to try to modify a PPA file for me. While it's not the best solution, I think that using the Windows computer is the easiest solution for everyone in the long run.
When you do shop for another printer, check it first at
http://www.openprinting.org/printers/ to see how well or poorly it works under Linux.
Re: What is involved in writing a Printer Driver?
Posted: Thu Sep 12, 2019 11:24 pm
by CrackMeUp
@JayM
The link you offered is handy, but unfortunately outdated in it's compatibility database, especially as new printer/model versions are concerned, e.g., the OP's printer (Canon TR8520) isn't even listed ... many others as well ... could list many other reasons not to fully trust their database ... Google-it yourself and you'll get the picture ... therefore, HP is, de facto, one's best choice simply because Linux systems already have the HPLIP software installed ... Google-it yourself and you'll get the picture ...

Re: What is involved in writing a Printer Driver?
Posted: Fri Sep 13, 2019 9:54 am
by Falcon
Guys,
Thanks for the info on the HP printer. I'm sure that I can find someone to give the Canon printer to who will be using the Windows 7 or 10 OS. So are you saying that I can just buy any HP printer and be sure that it will be fully functional? If so, great! I've got a lot of Reward Points stacked up on Amazon and a new printer might be a good way to make use of them.
I only use the Windows 7 computer to run a couple of programs that I need that have no Linux counterpart. When Microsoft ends support for 7, the computer will still be usable for what I need.
BTW I put a Review of the TR8520 printer on Amazon telling prospective buyers that it's Linux support is almost worthless. I hope that someone will think twice before buying it and trying to make it work with their Linux computer.
Re: What is involved in writing a Printer Driver?
Posted: Fri Sep 13, 2019 11:28 am
by mw1649
My 2 cents.
I only recommend HP printers for people I convert to MX-xx.
Personally I would check HP list of printer support here:
https://developers.hp.com/hp-linux-imag ... ices/index
Also I try to avoid the models that require a plugin as I had some issues with one but that was some time back.
Happy printing!
Mikew
Re: What is involved in writing a Printer Driver?
Posted: Fri Sep 13, 2019 5:20 pm
by Falcon
Mike,
Thanks for the pointer to the listing of HP printers. I noticed that under "Support", some printers say
"Full (End of Support)". Would I be better off choosing a printer that does not have this caveat?
Re: What is involved in writing a Printer Driver?
Posted: Sat Sep 14, 2019 8:53 am
by mw1649
Best from the horse's mouth.
https://developers.hp.com/hp-linux-imag ... Level.html
"Full - End-of-Support":
The HP product has reached the end of support life, meaning the HPLIP solution is considered “As-is”. No further HPLIP code changes will be implemented by HP. While monitoring of Launchpad posts by HP personnel will continue, follow-up by HP personnel on these products will be extremely limited. Community members are encouraged to assist others with issues on these printers. Patches provided to HP to address issues on these products will be considered (but not guaranteed) for inclusion in future HPLIP releases. As of the end-of-support date, device functions and features available from the product and available from HPLIP should continue to function but cannot be guaranteed to continue to work in subsequent HPLIP releases.
So I don't recommend buying one of them.
Re: What is involved in writing a Printer Driver?
Posted: Sat Sep 14, 2019 11:11 am
by Falcon
Mike,
Thanks. I will be sure to stay away from printers that have this designation.
Re: What is involved in writing a Printer Driver?
Posted: Sat Sep 14, 2019 12:32 pm
by CrackMeUp
HP OfficeJet (non-Pro are more affordable) models are excellent ... when you search the HP database from
https://developers.hp.com/hp-linux-imag ... ices/index, use the FF--->Edit--->Find function to highlight all the HP OfficeJet entries on the page. You'll notice the ones that match your needs by their content ... e.g.
HP OfficeJet 6960 All-in-one shows you "YES" in all categories of functionality. Also shown is the recommended HPLIP driver version ... in the above-mentioned example, HP requires 3.16.9 ... MX-18 (Debian Stretch) comes with 3.18 after MX updates (greater than the 3.16.9) so it's an automatic up-to-date recognition by your system in this case.
For those HP OfficeJets (based on your purchase choice) that require more recent versions of HPLIP (3.19), simply read about/download the Linux driver (Debian), follow the Walkthrough guide on the page below and you're all set. BTW, this latest driver covers ALL recent/past HP printers (except, of course, those that are no longer supported on the database). HP ALWAYS provides the latest HPLIP version for it's products as new printers go to market. Here is the link ...
https://developers.hp.com/hp-linux-imag ... /downloads
Re: What is involved in writing a Printer Driver?
Posted: Sat Sep 14, 2019 12:56 pm
by JBoman
FWIW I have used HP, Canon, and Epson printers in the past with few problems but not always full functionality. My most recent printer since the first of this year is a Brother MFC-J485DW multifunction printer and everything works as it should. I did have to download the drivers from Brother for it and it took a bit of trial and err to get everything working including the scanner but overall I consider it the best printer I have run so far and everything works as it should. Also the ink cartridges are about half the cost of other printer inks I have used. Just my 2cents.

Re: What is involved in writing a Printer Driver?
Posted: Thu Sep 19, 2019 6:21 pm
by Falcon
CrackMeUp,
I finally found and bought an HP 9015 printer that was on sale at Sam's Club with a 35% discount. I brought it home and went through the initial set-up. I found that it needed the 3.19 driver. I went to the installation page referenced by you and attempted to use the Automatic install. Unfortunately, during installation I got the messages that automatic installation was not supported for "unknown" distro. I was instructed to perform a manual installation, instead.
Part of the manual install requires me to run a terminal command that's dependent upon the version of Debian; either version 5.0x or 6.0x. I don't know which version of Debian MX is based upon. Running Quick System Info shows:
base: Debian GNU/Linux 9 (stretch). If "Linux 9" means Linux 9.0x, then I don't know where to go from here. Any suggestions?
Thanks.
Re: What is involved in writing a Printer Driver?
Posted: Thu Sep 19, 2019 8:46 pm
by m_frank
The stable repo has version
3.18.12+dfsg0-2~mx17+1, unfortunately.

Which leads to your search...
But the MX Test Repo may provide a packaged solution.
Code: Select all
MX Test Repo:
============
hplip 3.19.6+dfsg0-1~mx17+1
hplip-data 3.19.6+dfsg0-1~mx17+1
Use the
MXPI (MX Package Installer),
select the
MX Test Repo tab,
enter
hplip in the filter box (top right),
select the
hplip packages you need,
hplip &
hplip-data should be marked as upgradable,
select the
Upgrade button at the bottom right.
Re: What is involved in writing a Printer Driver?
Posted: Thu Sep 19, 2019 9:01 pm
by Falcon
Thank you. I will try this tomorrow morning.
I took a quick look at the Test Repo and found the package that you mentioned. There are four packages shown:
hplip
hplip-data
hplip-doc
hplip-gui
You mentioned that I should select the packages in the Test Repo and then click Upgrade. I do not have any of the HP software installed on the system at this time. Do I need to install the software in the Popular Applications and Stable Repo first, and then use the Test Repo to upgrade to the latest level, or can I just install the HP software directly from the Test Repo using the Upgrade button?
Re: What is involved in writing a Printer Driver? - SOLVED
Posted: Wed Sep 25, 2019 2:16 pm
by Falcon
Since the original topic of this post was about writing a printer driver, but it has now progressed to a question about installing software for an HP printer, I decided to mark it SOLVED and then I opened a new thread called "Setting Up a New HP Printer". I hope this conforms to forum protocol.
Re: What is involved in writing a Printer Driver? - SOLVED
Posted: Wed Sep 25, 2019 2:17 pm
by Eadwine Rose
Thank you.. makes it easier for others to find things when they are looking for info :)