XSane fails to open device (invalid argument)

I'm new to Linux and installed Ubuntu 15.10 few days ago. I can successfully print on my Canon i-SENSYS MF4890dw, but when trying to scan with Xsane I get the following:

Failed to open device 'pixma:MF4800_10.237.93.145': invalid argument

As I have read some feeds from other similar threads, I've tried on Xterm:

scanimage -T 

which returns:

scanimage: open of device pixma:MF4800_10.237.93.145 failed: Invalid argument

and

uname -r

which returns 4.2.0-25-generic.


There was a bug in the scanning library that affected wireless scanning using some devices. Upgrade libsane to 1.0.26 or newer. If it isn't available in the software centre, install it from this ppa:

sudo add-apt-repository ppa:rolfbensch/sane-git
sudo apt-get update
sudo apt-get dist-upgrade

We had similar problems with our Canon scanner. Installing updated versions of xsane and its libraries from the SANE daily ppa got us mostly functional, although the document feeder still does not work.

Another problem we encountered was that the ufw firewall was blocking access to the networked scanner. If you are using ufw and the scanner is networked, try disabling ufw and trying a scan again. If this works, it is pretty easy to allow the scanner through ufw so you don't have to turn it off completely.


This is usually a permissions issue.

Use lsusb to see what bus and dev your printer/scanner is on (assuming it's connected via usb).

$ lsusb
Bus 003 Device 006: ID 0400:0132 Brother Industries, Ltd

This device is on Bus 003, device 006... which corresponds to this file:

$ ls -l /dev/bus/usb/003/006
crw-rw-r-- 1 root lp   189, 261 Jan 21 17:18 006

Notice the group is 'lp'.

Add yourself to the 'lp' group using:

sudo usermod -a -G lp {your-username-goes-here}

Log out and back in... try xsane.