Example output of lsusb command highlighting Canon scanner, showing a line item indicating a Canon device connected on Bus 001 and Device 002, framed in yellow.
Example output of lsusb command highlighting Canon scanner, showing a line item indicating a Canon device connected on Bus 001 and Device 002, framed in yellow.

Download Canon LiDE 20 Scanner Driver: A Linux Installation Guide

Are you trying to get your Canon LiDE 20 scanner working on your Linux system? Many users find that while Canon scanners work seamlessly with Windows, setting them up on Linux can be a bit more challenging. If you’ve recently purchased a Canon LiDE 20 or similar model and are struggling to install the drivers on your Linux machine, you’re in the right place. This guide provides a step-by-step approach to successfully install your Canon LiDE 20 scanner driver on a Linux system, specifically tested on Ubuntu 18.04, and adaptable to other distributions. Follow these instructions carefully, and if you encounter any issues, the troubleshooting tips provided will help you get back on track. Remember, it’s crucial to ensure each step is working before moving to the next for a smooth installation process.

Step 1 – Ensuring Scanner Recognition

Before diving into driver installation, we need to make sure your Linux system recognizes your Canon LiDE 20 scanner. This involves installing essential packages that facilitate USB device recognition and scanner utilities. Open your terminal and execute the following commands one by one:

sudo apt update
sudo apt install sane-utils libusb-dev usbutils
  • sudo apt update: This command updates your package lists, ensuring you have the latest information about available software versions.
  • sudo apt install sane-utils libusb-dev usbutils: This command installs three key packages:
    • sane-utils: Provides essential utilities for Scanner Access Now Easy (SANE), an API that allows scanner applications to access image acquisition devices.
    • libusb-dev: Contains development files for libusb, a library that provides generic access to USB devices. This is necessary for your system to communicate with the scanner via USB.
    • usbutils: A suite of utilities for inspecting and managing USB devices, including lsusb which we’ll use shortly.

After installation, use the lsusb command to check if your Canon scanner is detected. Canon devices are typically identified by the vendor ID 04a9. Run the following command to filter the output for Canon scanners:

lsusb | grep '04a9'

If this command doesn’t produce any output, it means your scanner is not being recognized by the system.

Troubleshooting Scanner Recognition:

  1. Check USB Connection: Ensure the USB cable is securely connected to both your Canon LiDE 20 scanner and your computer. Try using a different USB port on your computer to rule out a faulty port.
  2. System Restart: Sometimes a simple restart can resolve device recognition issues. Reboot your Linux system, keeping the scanner connected.
  3. Scanner Power and Initialization: When you power on your computer, listen for any sounds from the scanner, such as the scanner head adjusting. This indicates the scanner is receiving power and attempting to initialize. If you hear no sounds, try a different USB port as power delivery might be an issue with the current port.
  4. Windows USB Test (If Applicable): If you have access to a Windows system, temporarily connect your Canon LiDE 20 scanner and install the Windows driver. This will help verify if the USB connection and the scanner itself are functioning correctly. Canon’s Windows drivers are generally well-supported, making this a useful diagnostic step.

Step 2 – Scanner Identification and Permissions

Once your system recognizes the scanner at a basic USB level, the next step is to identify it specifically and configure the necessary permissions. Running lsusb again should now show your Canon scanner in the list of connected USB devices.

Examine the output of lsusb. You are looking for a line that describes your Canon scanner. This line will contain a Bus ID and a Device ID, typically in the format Bus xxx Device yyy. For instance, in the example output below, the Canon scanner is on Bus 001 and Device 002.

Output of lsusb command highlighting Canon scanner

To check the permission settings for your scanner connection, you need to use the getfacl command along with the Bus and Device IDs specific to your system. Replace 001 and 002 in the example below with your Bus and Device IDs:

getfacl /dev/bus/usb/001/002

The output of this command will show the access control list for the USB device, including the group that has permission to access it. In many cases, this group is lp (line printer group). To allow scanner access, you need to add your user to both the saned group (scanner management group) and the lp group. Execute the following command, which will add your user to these groups:

sudo usermod -aG saned,lp $USER
  • sudo usermod -aG saned,lp $USER: This command modifies your user account ($USER) to include membership in the saned and lp groups.
    • -aG: Adds the user to the specified groups without removing them from other groups they already belong to.
    • saned,lp: Specifies the groups to add the user to, separated by commas.
    • $USER: A variable that represents your current username.

After adding yourself to these groups, use the sane-find-scanner command to verify if the scanner is now correctly identified by the SANE system:

sane-find-scanner

If successful, sane-find-scanner should list your Canon LiDE 20 scanner with details about its USB connection.

Output of sane-find-scanner command showing Canon scanner detected

Troubleshooting Scanner Identification:

  1. Verify Group Membership: To confirm you’ve been successfully added to the saned and lp groups, use the following command:

    cat /etc/group | grep $USER

    This command will list the groups your user belongs to. Ensure that saned and lp are in the list. If they are not, re-run the usermod command from above. You might need to log out and log back in or reboot your system for group membership changes to fully take effect.

Step 3 – Software Equipment (SANE Backend Installation)

Even after successful scanner recognition, you might encounter an issue where scanner identification fails when using scanimage -L. This command lists the scanners detected by the SANE backend. If it fails to identify your Canon LiDE 20, it often points to an outdated SANE backend version.

While there might be repository suggestions for older Ubuntu versions, compiling and installing the latest SANE backend from source is generally a cleaner and more robust solution.

First, install the necessary prerequisites for compiling software:

sudo apt install build-essential libieee1284-3 gphoto2 autoconf automake libtool gettext git autopoint autoconf-archive pkg-config libjpeg-dev
  • sudo apt install ...: This command installs a comprehensive set of development tools and libraries required for compiling software from source code. These include:
    • build-essential: Essential tools for compiling C/C++ code (gcc, g++, make, etc.).
    • libieee1284-3: A library for parallel port access, sometimes needed for older scanners.
    • gphoto2: A digital camera library, which shares dependencies with scanner drivers.
    • autoconf, automake, libtool, gettext, git, autopoint, autoconf-archive, pkg-config: Build system utilities for configuring and compiling software.
    • libjpeg-dev: Development files for libjpeg, a library for JPEG image handling.

Once the prerequisites are installed, choose a directory where you want to download the SANE backend source code (e.g., your home directory) and execute the following commands:

git clone https://gitlab.com/sane-project/backends.git
cd backends
./autogen.sh
BACKENDS="canon pixma" ./configure
make
sudo make install

Let’s break down these commands:

  • git clone https://gitlab.com/sane-project/backends.git: Downloads the source code of the SANE backends from the GitLab repository using Git. This will create a directory named backends.
  • cd backends: Changes your current directory to the newly created backends directory.
  • ./autogen.sh: Runs the autogen.sh script, which generates the configure script and other necessary build files.
  • BACKENDS="canon pixma" ./configure: Executes the configure script to prepare the build environment. BACKENDS="canon pixma" specifically tells the configuration to include backends for Canon and Pixma scanners, reducing compilation time and size.
  • make: Compiles the SANE backends using the configured settings.
  • sudo make install: Installs the compiled SANE backends to your system. sudo is necessary as this step requires administrator privileges to write to system directories.

After successful installation, run scanimage -L again. It should now correctly identify your Canon LiDE 20 scanner.

Output of scanimage -L command showing Canon scanner correctly identified

To check the SANE backend version, you can use scanimage -V. Compiling from source usually updates your backend version to the latest available. For example, it might upgrade from version 1.0.27 to 1.0.29 or newer.

Step 4 – Additional Software (Optional)

With the driver installed, you’ll need scanning software to utilize your Canon LiDE 20. While there are several options, Simple Scan is a user-friendly and popular choice for Linux. You can install it with:

sudo apt install simple-scan

Simple Scan provides a straightforward interface for basic scanning tasks and is often sufficient for everyday use.

Once installed, you should be able to launch Simple Scan and start scanning documents or photos with your Canon LiDE 20 scanner.

By following these steps, you should have successfully installed your Canon LiDE 20 scanner driver on your Linux system. Enjoy scanning!

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *