open of device pixma:MX7600_... failed: invalid argument

Bug #1512027 reported by James Ring
138
This bug affects 27 people
Affects Status Importance Assigned to Milestone
sane-backends (Ubuntu)
Expired
Low
Unassigned

Bug Description

Up until recently, I've been able to scan fine with my Canon Pixma
MX7600. Then I upgraded to Ubuntu Wily and I've started getting:

$ scanimage
scanimage: open of device pixma:MX7600_192.168.2.107 failed: Invalid argument

The device pings and I can get to its HTTP port. Everything appears OK.

If I run

strace -f -s 256 -o /tmp/trace.txt scanimage

the relevant output appears to be:

socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 204
connect(204, {sa_family=AF_INET, sin_port=htons(8612),
sin_addr=inet_addr("192.168.2.107")}, 16) = 0
sendto(204, "BJNP\2\1\0\0\0\0\0\0\0\0\0\0", 16, 0, NULL, 0) = 16
select(205, [204], NULL, NULL, {4, 0}) = 1 (in [204], left {3, 998257})
recvfrom(204, "BJNP\202\1\0\0\0\0\0\0\0\0\0\20\0\1\10\0\6\4\0\0\205\316\356\343\300\250\2k",
2048, 0, NULL, N
ULL) = 32
close(204)
write(2, "scanimage: open of device pixma:MX7600_192.168.2.107 failed:
Invalid argument\n", 78) = 78

It appears to me that the scanner is responding but the driver doesn't
like the response. I'm running sane 1.0.14-11 and sane-utils
1.0.25+git201505.

WORKAROUND: Use the PPA from https://launchpad.net/~rolfbensch/+archive/ubuntu/sane-git

Revision history for this message
James Ring (sjr-f) wrote :

I also verified that downgrading to libsane 1.0.24-4ubuntu1 from 1.0.25+git201505 allows me to scan again, so I definitely there's some sort of sane-pixma regression in there.

Revision history for this message
James Ring (sjr-f) wrote :

According to one of the authors of the sane-pixma backend:

"this looks similar to an issue that I fixed some time ago. Please see
if you can find a package of the released 1.0.25. that should fix your
issue"

See http://lists.alioth.debian.org/pipermail/sane-devel/2015-October/034084.html

Revision history for this message
James Ring (sjr-f) wrote :

I can confirm that building the backend from git at HEAD resolves the issue.

Revision history for this message
Gustav Hartvigsson (gustav-hartvigsson) wrote :

Still not fixed in the official repo, can we get this patched yet?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sane-backends (Ubuntu):
status: New → Confirmed
Revision history for this message
Gustav Hartvigsson (gustav-hartvigsson) wrote :

Mine is a Pixma MP620, over the network thought.

Revision history for this message
James Ring (sjr-f) wrote :

There is a PPA that has an updated sane-backends package that fixes the issue:

http://lists.alioth.debian.org/pipermail/sane-devel/2015-November/034088.html

It would be nice to see this fixed in the official repo of course :)

Revision history for this message
Konilabs (koni) wrote :

Hi, I have exactly the same issue.
I use Xubuntu 15.04 with a Canon Pixma MG5350 printer.

I added James Ring PPA and updated sane package, and this solved the issue.
Please put the fix in official repository :)

Revision history for this message
Sven (sven-koehler) wrote :

I'm trying to use a pixma MX850. The output of scanimage is:
scanimage: open of device pixma:MX850_conepr2c failed: Invalid argument

Revision history for this message
Michael Heesemann (pbhoeh) wrote :

The bug affects me too. I installed packages from debian experimental as described here:

http://askubuntu.com/questions/688642/network-scanner-canon-stops-after-upgrade-from-15-04-to-15-10

Revision history for this message
Goffdely (goffdely) wrote :

Même punition, même motif ;-)
I had the same problem with my MP620 and the upgrade to Ubuntu Wily. Rolf Bensch'PPA (thank you, James Ring) solves this problem... after two updates (some incompatibilities in the first one...).

Revision history for this message
David Cavallini (david-cavallini-gmail) wrote :

Same for my new Canon Pixma MG2980.

So I upgraded to libsane 1.0.26-gitxxx ppa package (from Rolf Bensch), and now wireless works fine for both printing *and* scanning without any proprietary package from Canon, which is really nice!

Revision history for this message
Tim Fisken (tim2) wrote :

This bug is also fixed in the 1.0.25 packages that are available in Debian testing and unstable ( https://packages.debian.org/source/stretch/sane-backends ). I wonder if these newer packages could be imported into Ubuntu for the 16.10 release?

Revision history for this message
ipatrol (ipatrol6010) wrote :

Almost a year in, there is NO excuse for this not to be fixed yet. We already have the fix, it's now on the devs/QA to implement it.

Changed in sane-backends (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
David Kowis (dkowis) wrote :

Indeed, quite frustrating that this is still so old, and unfixed.

Revision history for this message
afalout (andrej-falout) wrote :

Initially, would not believe this 2 year old bug would still be present in Xenial repos. But it is. Meaning there are a lot of Canon owners around the world being quite unhappy, and not of them technical enough to find this. Who is in charge here? Can this please be escalated?

Revision history for this message
Dwain Sims (dsims) wrote :

Add me to the list. This is broken for my Canon ImageClass MP4770n.

Revision history for this message
penalvch (penalvch) wrote :

James Ring, thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:
apport-collect 1512027

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

tags: added: regression-release
Changed in sane-backends (Ubuntu):
importance: Undecided → Low
status: Fix Committed → Incomplete
Revision history for this message
James Ring (sjr-f) wrote :

I can't reproduce the bug anymore because I've been using the workaround in the intervening year since I wrote the bug. I think you should have enough information to resolve it.

Revision history for this message
penalvch (penalvch) wrote :

James Ring, as I don't have your hardware, I can't confirm/deny any results you reported about. Also, not providing requested information regarding your environment doesn't motivate developers to want to fix your problem.

description: updated
Revision history for this message
James Ring (sjr-f) wrote :

The sane project has already confirmed a fix exists in 1.0.25. Unless you go out and buy a Pixma MX7600, you're not gonna have my hardware whether I run apport or not. The apparent motivation to fix bugs in Ubuntu appears anemic at best already, I don't think I'm going to do much harm to that.

Revision history for this message
Daniel Douglas Soyka (ddsoyka) wrote :

I am also experiencing this issue on 16.10 with a Canon MX410. The provided work-around resolved the issue for me.

Revision history for this message
rotomoto (bertusrex) wrote :

Had the same issue on 16.04 Xenial, fixed by the workaround of using Rolf Bensch's ppa.

Xenial (and other releases) still has 1.0.25+git20150528-1ubuntu2 versions of sane* packages which have this bug.

Solution is easy: update to the latest official 1.0.25 release, no need for further analysis of this bug.

Changed in sane-backends (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
André Heynatz (ombatar) wrote :

I have the same issue with a Canon Pixma MX925 (ethernet). I have added the PPA from Rolf Bensch but there is a problem with the libsane package. Is it possible to upgrade the official package to 1.0.25 release which shall resolve this problem? It has been released for quite some time: "2015-10-04: SANE-Backends-1.0.25 has been released." References: http://lists.alioth.debian.org/pipermail/sane-devel/2015-October/034084.html and http://www.sane-project.org/

Revision history for this message
Andrew Tribick (ajtribick) wrote :

I had this issue also with a Canon Pixma MG5250 on Zesty. Upgrading to the 1.0.27 version of libsane from Rolf Bensch (https://launchpad.net/~rolfbensch/+archive/ubuntu/sane-release) fixed it.

Revision history for this message
Jan Pokorný (pokorny-h) wrote :

I had the same issue. After installing 1.0.27+git20170821-xenial0 I can scan one image and than the printer is stuck. It says its still scaning, had to restart the printer.

Revision history for this message
Rolf Bensch (rolfbensch) wrote :

I just fixed this issue. My ppa will provide the fix tomorrow: 1.0.27+git20170901.

Revision history for this message
Stian (stian) wrote :

I confirm the extact same problem in Element OS, fixed in version 1.0.27 from Rolf, error existed in 1.0.25. Thanks for the PPA Rolf!

Revision history for this message
Stian (stian) wrote :

Sorry, Elementary OS (spellcheck...)

Revision history for this message
Andrew Tribick (ajtribick) wrote :

Tested again with the libsane version 1.0.27-1~experimental2ubuntu1 in Artful, it no longer exhibits this bug.

Revision history for this message
Henrik (newbeg) wrote :

I am having the exact same issue with a wireless installed brother MFC-L2740DW on Ubuntu 16.04.3.
Installed the repository as suggested here. Now libsane version is 1.0.27+git20180122-xenial0 - but the problem unfortunately remains.

on starting XSANE: "failed to open device brother4:net1;dev0 invalid argument"

scanimage -L
device `brother4:net1;dev0' is a Brother MFC-L2740DW MFC-L2740DW

scanimage --test
scanimage: open of device brother4:net1;dev0 failed: Invalid argument

please help !

Revision history for this message
Michael Foster (michael-r-foster) wrote :

I too have the same issue with a Brother DCP-L2540DW on Ubuntu 16.04.

$ dpkg -l |grep libsane
ii libsane:amd64 1.0.27+git20180209-xenial0 amd64 API library for scanners
ri libsane-common 1.0.27+git20180209-xenial0 amd64 API library for scanners -- documentation and support files
ii libsane-hpaio:amd64 3.16.3+repack0-1 amd64 HP SANE backend for multi-function peripherals

Output from simple-scan -d
[+0.00s] DEBUG: simple-scan.vala:674: Starting Simple Scan 3.20.0, PID=19090
[+0.00s] DEBUG: Connecting to session manager
[+0.10s] DEBUG: ui.vala:2032: Loading state from /home/mfoster/.cache/simple-scan/state
[+0.10s] DEBUG: ui.vala:1995: Restoring window to 684x996 pixels
[+0.10s] DEBUG: autosave-manager.vala:64: Loading autosave information
[+0.10s] DEBUG: autosave-manager.vala:259: Waiting to autosave...
[+0.10s] CRITICAL: gtk_event_controller_reset: assertion 'GTK_IS_EVENT_CONTROLLER (controller)' failed
[+0.15s] DEBUG: scanner.vala:1447: sane_init () -> SANE_STATUS_GOOD
[+0.15s] DEBUG: scanner.vala:1453: SANE version 1.0.27
[+0.15s] DEBUG: scanner.vala:1514: Requesting redetection of scan devices
[+0.15s] DEBUG: scanner.vala:803: Processing request
[+0.20s] DEBUG: autosave-manager.vala:281: Autosaving book information
[+0.30s] DEBUG: ui.vala:2124: Saving state to /home/mfoster/.cache/simple-scan/state
[+3.30s] DEBUG: simple-scan.vala:404: Requesting scan at 150 dpi from device '(null)'
[+3.30s] DEBUG: scanner.vala:1560: Scanner.scan ("(null)", dpi=150, scan_mode=ScanMode.GRAY, depth=2, type=ScanType.ADF_BOTH, paper_width=2159, paper_height=2794, brightness=0, contrast=0)
[+6.39s] DEBUG: scanner.vala:338: sane_get_devices () -> SANE_STATUS_GOOD
[+6.39s] DEBUG: scanner.vala:350: Device: name="brother4:bus3;dev1" vendor="Brother" model="DCP-L2540DW" type="USB scanner"
[+6.39s] DEBUG: scanner.vala:803: Processing request
[+6.40s] DEBUG: scanner.vala:864: sane_open ("brother4:bus3;dev1") -> SANE_STATUS_INVAL
[+6.40s] WARNING: scanner.vala:868: Unable to get open device: Invalid argument
[+6.77s] DEBUG: ui.vala:2124: Saving state to /home/mfoster/.cache/simple-scan/state

Revision history for this message
Franck (alci) wrote :

Using 18.04 (wip), I had the same problem with a Brother J4625DW all in one printer/scanner. Installing the driver from Brother (http://support.brother.com/g/s/id/linux/en/instruction_scn1b.html?c=us_ot&lang=en&redirect=on) instead of the brother driver from the repos solved the problem, so it might be a workaround for those using Brother scanners.

Revision history for this message
David Ward (dpward) wrote :

All currently supported versions of Ubuntu have sane-backends 1.0.27 or later.

If this issue still occurs with a Pixma MX7600, please change the status of this bug back.

For any device except a Pixma MX7600 that currently shows a similar issue, please open a separate bug. Do not comment on this one.

Changed in sane-backends (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for sane-backends (Ubuntu) because there has been no activity for 60 days.]

Changed in sane-backends (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.