Skip to content

About

Open-source Linux CUPS driver for Canon PIXMA/MAXIFY inkjets (G1010-G4010, G3020, GX, E, TS, TR, MG). Printing, head cleaning, nozzle check, paper-out alerts and real cancel. 164 models, byte-identical to Canon's output, no binary blobs.

Topics

Resources

Contributing

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

Canon PIXMA / MAXIFY driver for Linux (IVEC)

An open-source CUPS driver for Canon inkjet printers on Linux, covering the PIXMA G (MegaTank) series G1010/G2010/G3010/G4010, G3020, G5080, G6080 and GX, plus E, TS, TR, MG, MX, MB, iB, XK and GM. It provides printing, head cleaning, nozzle checks, alignment and paper-out alerts, with no Canon binaries.

CI License: GPL-3.0-or-later Models: 164

If you kept a Windows partition only because your Canon printer or its maintenance tools did not work on Linux, this project is for you.

Highlights

  • 164 printer models with full profiles: paper sizes, margins, media types, borderless, duplex, and which maintenance operations each one supports. See docs/SUPPORTED_MODELS.md. Other Canon printers that speak the same protocol fall back to a generic profile.
  • Exactly what Canon's driver sends. For every model, the output was compared byte for byte with Canon's official Linux driver: 1194 of 1194 jobs and maintenance commands match (research/RESULTS.md).
  • Fully open. No proprietary libraries, no 32-bit dependencies. Plain C on top of libcups, so it should build anywhere CUPS runs, including ARM boards like the Raspberry Pi.
  • The maintenance tools you were booting Windows for: cleaning, deep cleaning, ink flush (system cleaning), nozzle check, print head alignment, roller and bottom plate cleaning.
  • Paper-out, jam and cover-open alerts as desktop notifications, like the Windows status monitor, and a Cancel that really stops the printer (the stock CUPS USB backend cannot do that with Canon printers).
  • 2-sided printing on printers without a duplex unit: the front sides print, a window shows a picture of how to put the stack back, and Continue prints the backs (verified on a G3010).
  • Print quality Draft / Normal / High in every print dialog.
  • Canon Photo Print, a photo printing app like Canon's Photo Garden: borderless 4x6 / 5x7 / A4, several photos per sheet, photo paper and High quality set up for you, with a live preview.
  • Right-click Print in Dolphin (KDE) for PDFs, images, text and office documents, including 2-sided and grayscale.
  • Android too: the IVEC Print app adds USB-connected printers to every app's Print menu on phones, tablets and Android desktops, with the same model profiles, 2-sided printing, quality settings and maintenance. No root needed. See android/README.md.
  • Works everywhere printing works: LibreOffice, Firefox, Chrome, GTK and Qt apps, and the lp command line all see the printer and its options.

Install

Arch Linux, Manjaro, EndeavourOS, CachyOS (pacman repository)

Add this to /etc/pacman.conf:

[canon-ivec]
SigLevel = Optional TrustAll
Server = https://github.com/noble6/canon-universal-driver/releases/latest/download

Then:

sudo pacman -Sy canon-ivec-driver
canonctl setup                       # creates the print queue for your printer

Updates arrive with your normal sudo pacman -Syu. The packages are built by GitHub Actions from the tagged source (release workflow). An AUR package (canon-ivec-driver, recipe in packaging/arch) is on its way.

Debian, Ubuntu, Linux Mint

Download canon-ivec-driver_*_amd64.deb from the latest release, then:

sudo apt install ./canon-ivec-driver_*_amd64.deb
canonctl setup

Android

Download ivec-print-*.apk from the latest release and install it. Connect the printer with a USB cable (a USB-C or OTG adapter on phones), allow IVEC Print to use it, and turn on IVEC Print under Settings > Connected devices > Printing. Details in android/README.md.

From source (any distribution)

git clone https://github.com/noble6/canon-universal-driver.git
cd canon-universal-driver
# Arch:   sudo pacman -S --needed base-devel cups ghostscript python libusb
# Debian: sudo apt install build-essential libcups2-dev libusb-1.0-0-dev cups cups-filters ghostscript python3 libnotify-bin
# Fedora: sudo dnf install gcc make cups-devel libusb1-devel cups cups-filters ghostscript python3 libnotify
# openSUSE: sudo zypper install gcc make cups-devel libusb-1_0-devel cups cups-filters ghostscript python3 libnotify-tools
make && make check
sudo make install
sudo systemd-tmpfiles --create /usr/lib/tmpfiles.d/canon-ivec.conf   # manual 2-sided printing
canonctl setup

Log out and back in once so the printer notifications start. Optional extras: pyside6 (or your distribution's PySide6 package) for Canon Photo Print and the 2-sided picture guide, numpy for its color adjustment, and SANE for scanning.

On Arch, sudo scripts/install-local.sh does all of this, removes leftovers of other Canon drivers and starts the notifications.

Using it

canonctl setup picks the right profile from the printer's own model ID. Over USB it uses this driver. For printers on Wi-Fi it creates a driverless IPP queue, which the printer supports natively.

Print from any application. Useful options:

Option Where you find it Values
Paper size every print dialog A4, Letter, Legal, A5, B5, 4x6, 5x7, 8x10, envelopes, ... and "(borderless)" variants
Color mode every print dialog Color, Grayscale
Print quality every print dialog ("Quality") Draft, Normal, High (on models that support it)
Media type LibreOffice: Properties. Chrome: "Print using system dialog" Plain paper, glossy photo papers, matte, envelopes, ...
2-sided every print dialog Long edge, Short edge. Models without a duplex unit (G3010 and other ink-tank models) get guided manual 2-sided printing: the front sides print, a window shows a picture of how to put the stack back (blank side facing you, TOP edge in first), and Continue prints the backs (or run canonctl continue).

From the shell: lp -o PageSize=4x6.bl -o MediaType=glossygold photo.jpg, or list options with lpoptions -l.

Printing photos

Open Canon Photo Print from the application menu, or right-click photos in Dolphin and choose Print photos... (it is also listed under "Open With" in image viewers). Add or drag in photos, pick the paper size and layout (1, 2, 4, 6 or 9 per sheet), and press Print. For 4x6, 5x7 and similar sizes it picks borderless, photo paper and High quality automatically; photos are rotated to fill the sheet best, and Fit whole photo avoids cropping. The Color panel adjusts brightness, contrast, saturation and the cyan / magenta / yellow balance with a live preview.

Borderless printing always runs slightly past the paper edges (on a G3010: 2 mm at the top, 2.8 mm at the sides, 5 mm at the bottom), and that part is lost. Canon Photo Print lays the photo out for the part that lands on the paper, so the uneven top and bottom overspray does not cut off text, and the preview shows the real crop. Under Borderless:

  • Extension: how far the photo runs past the paper edge. Small zooms the least; Large is the most forgiving.
  • Paper position and Alignment test...: if a thin white strip shows on one side, print the one-sheet alignment test, read the last visible line on the left and right, and enter the two numbers. The app remembers your printer's position from then on.

The driver also fills the borderless print area completely (Canon's driver leaves about 0.5 mm unprinted at two edges), so there is no sliver to show through. Other applications printing borderless lose those strips, just like with Canon's own driver.

Colours look off (for example too red or magenta)? Print a nozzle check first (canonctl nozzle). Gaps or missing lines in one colour block mean a clogged nozzle: run canonctl clean, check again, then canonctl deep-clean if needed. Also make sure the paper type matches the paper you loaded. From a terminal: canon-photo-print *.jpg.

Right-click printing

In Dolphin, right-click a file and choose Print, Print 2-sided or Print in grayscale. It works for PDFs, images, text and office documents; office files are converted with LibreOffice first. From a terminal: canon-ivec-print file.pdf.

Maintenance

canonctl nozzle          # nozzle check pattern
canonctl clean           # print head cleaning, all inks  (clean black / clean color)
canonctl deep-clean      # deep cleaning, all inks        (deep-clean black)
canonctl flush           # ink flush / system cleaning; uses a lot of ink, asks first
canonctl align           # print head alignment
canonctl roller          # paper feed roller cleaning
canonctl platen          # bottom plate cleaning
canonctl status

The CUPS web interface (http://localhost:631) and desktop printer settings also offer Clean Print Heads and Print Self-Test Page.

Paper out and other alerts

When the printer stops for paper, a jam or an open cover, a notification shows what happened and Canon's support code (1000 = out of paper). The fix is the same as on Windows: load paper, then press the printer's Black or Color button, and printing continues where it stopped. The printer does not continue by itself after paper is loaded.

Cancel printing in the notification, the print queue window or cancel aborts the job on the printer itself: its error lamp clears and it is ready for the next job. If CUPS paused the queue after an error, the notification offers Resume instead.

Notifications start automatically at login (canon-ivec-notify).

Alerts, cancel, print quality and guided 2-sided printing were verified on a G3010: paper out, resume with the Black button, cancel while waiting for paper, Draft vs High, and 2-sided pages in order and upright. Other models use the same status messages. If an alert does not appear on yours, run sudo canonctl report after reproducing it and attach the output to an issue.

Scanning

Scanning is handled by SANE, which already supports most of these printers:

sudo pacman -S sane sane-airscan simple-scan     # USB: pixma backend, Wi-Fi: eSCL
canonctl scan

How it works

Canon inkjets since about 2013 speak IVEC: a stream of small XML commands (StartJob, SetConfiguration, SendData, EndJob, ...) with each page sent as a standard PWG Raster image. This driver renders pages with Ghostscript, fits them to the model's printable area, and wraps them in IVEC commands. Its own USB backend (canonivec://) sends them, reads the printer's status the whole time, and can cancel a job on the printer.

The protocol was worked out by running Canon's official Linux driver in a sandbox and diffing its output across 164 models and every option combination. The full write-up is in docs/PROTOCOL_IVEC.md, and research/ has the harness to reproduce it.

application -> CUPS -> Ghostscript -> rastertocanonivec -> canonivec backend <-> printer
                                        (IVEC + PWG)          (status, cancel)
canonctl / desktop -> cmdtocanonivec (maintenance)            canon-ivec-notify (alerts)

Troubleshooting

See docs/TROUBLESHOOTING.md. Start with:

canonctl doctor
canonctl detect

Credits

Madaboutpawz for everything to make this project possible.

Contributing

Hardware reports are the most valuable contribution: does your model print, do the margins look right, does the paper-out alert appear? See CONTRIBUTING.md. Bug reports should include the output of canonctl detect, canonctl doctor and, for status problems, sudo canonctl report.

License

GPL-3.0-or-later. This project contains no Canon code. Canon, PIXMA and MAXIFY are trademarks of Canon Inc. This project is not affiliated with or endorsed by Canon.

About

Open-source Linux CUPS driver for Canon PIXMA/MAXIFY inkjets (G1010-G4010, G3020, GX, E, TS, TR, MG). Printing, head cleaning, nozzle check, paper-out alerts and real cancel. 164 models, byte-identical to Canon's output, no binary blobs.

Topics

Resources

Contributing

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages