failed to start scanner: Invalid argument

Bug #478761 reported by Tzadik Vanderhoof
96
This bug affects 15 people
Affects Status Importance Assigned to Milestone
xsane (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: xsane

I have a Brother MFC 210C. I have just done a fresh install on this machine of Ubuntu 9.10 and scanning no longer works. (Printing works fine) I have installed these packages from the Brother site:

cupswrapperMFC210C-1.0.2-3.i386.deb
mfc210clpr-1.0.2-1.i386.deb
brscan2-0.2.4-0.i386.deb

When I click Scan in xsane, I get:

failed to start scanner: Invalid argument

This scanner was working fine in 9.04.

----------------------------

SOLUTION:

1) Install http://www.brother.com/pub/bsc/linux/dlf/brscan3-0.2.11-4.i386.deb
from http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_scn.html#brscan3

2) Add the following two lines in /lib/udev/rules.d/40-libsane.rules, under line 40 (LABEL="libsane_usb_rules_begin"):

# Brother scanners
ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"

3) Plug in scanner - no system reboot or udev restart necessary.

Revision history for this message
Tzadik Vanderhoof (tzadik-vanderhoof) wrote :
Revision history for this message
Xet 666 roV (xetrov) wrote :

I have the same situation with EPSON SX-400. It worked OK in 9.04. Now, the printer works fine right after KK install but scanner (XSANE) does not. I have installed http://linux.avasys.jp/drivers/iscan/2.22.1/iscan_2.22.1-2_i386.deb as per another thread and now get the "...invalid argument" message. Same results when user or via sudo.

Revision history for this message
James Moger (jcm21) wrote :

I have this same problem in 9.10 with both a CanoScan LIDE 70 (not supported) and a Nikon LS-50 (supported).
This can be replicated with the scanimage command line tool.

Not sure if its related or not... but I also have a USB webcam (MS LifeCam Cinema) which seems to be recognized by SANE (as v4l). I doubt that it should be recognized by SANE, but maybe there are other SANE uses? I'll try disconnecting the webcam, retrying the LS-50 (since LIDE 70 is unsupported), and will report back findings.

Agreed that sudo does not change anything.

Revision history for this message
James Moger (jcm21) wrote :

Webcam has no affect.

scanimage -L
WARNING: Unhandled message: interface=org.freedesktop.DBus.Introspectable, path=/, member=Introspect
device `coolscan3:usb:libusb:001:004' is a Nikon LS-50 ED film scanner

scanimage -T -d coolscan3:usb:libusb:001:004
scanimage: open of device coolscan3:usb:libusb:001:004 failed: Invalid argument

Results are the same using sudo.

Revision history for this message
James Moger (jcm21) wrote :

Forgot to mention, I'm running 64-bit Karmic. Looks like reporter is running 32-bit.

Revision history for this message
Tzadik Vanderhoof (tzadik-vanderhoof) wrote :

Yes 32 bit... Can I provide anything else?

Revision history for this message
Andy Brown (adb1413) wrote :

I was having a similar problem with XSane today. According to Oliver Rauch, the author of XSane, the SANE team has changed some things in the latest release of the backends that breaks compatibility. This was posted on the XSane web site in February...

"If you experience any problems with XSane and sane-backends with a version number greater than 1.0.19 then this may be caused by an incompatible development of sane-backends. In this case it may be worth to try sane-backends-1.0.19 or earlier. XSane is and will keep compatible to the original SANE-1.0 standard. I will not spend any time for incompatible things that will mess up everything."

Indeed if you look at the version numbers in Jaunty libsane is 1.0.19, whereas the one in Karmic is 1.0.20, so I suppose this kind of makes sense.

I went into Synaptic and removed xsane and its dependencies, then installed older versions from source. Now things seem to be working again with my Canon scanner. (I can scan but my preview window is a bit messed up... probably unrelated though.)

Download from:
    http://www.sane-project.org/source.html
    http://www.xsane.org/xsane-download.html

Hope that helps you guys too!

Revision history for this message
Andy Brown (adb1413) wrote :

Just a quick follow-up... I was trying to find if there was a version of XSane that the preview window would work in after I posted. At first I just went back a few versions, then I went back all the way to 0.93 and started coming back up, skipping a few here and there. The short story is that 0.93 worked, then magically everything else after that worked, including the latest. So I'm not sure what happened there, but I guess the moral of the story is if you're having the same problem with the preview window, install 0.93 and then reinstall 0.996.

Revision history for this message
Tzadik Vanderhoof (tzadik-vanderhoof) wrote : Re: [Bug 478761] Re: failed to start scanner: Invalid argument

Thanks for the advice. I installed libsane 1.0.19, xsane 0.93, then 0.996.
But now I'm getting "Failed to open device `v4l:/dev/video0': Invalid
argument"

Revision history for this message
Tzadik Vanderhoof (tzadik-vanderhoof) wrote :

OK, it looks like v4l:/dev/video0 is refering to my webcam, so the sane was
getting mixed up there. To make a long story short, my scanner is now
working! (woot!) Even better, it's working with the standard Ubuntu 9.10
sane and xsane packages ... no source compiles (double woot!). Here is
(according to my best memory) what I did to get it to work (don't know how
many of the steps were actually necessary).

- uninstall the compiled-from-source sane and xsane using "make uninstall"

- install the standard sane and xsane using apt-get

- follow these instructions from the Brother site:
(from http://solutions.brother.com/linux/en_us/instruction_scn1c.html#u9.10)

Ubuntu 9.10*1.* Open "/lib/udev/rules.d/40-libsane.rules" file.*2.* Add the
following two lines to the end of the device list. (Before the line "# The
following rule will disable ..."):

The lines to be added---------------------------

# Brother scanners
ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"

 *3.* Restart the OS.- unplug my webcam from the USB and reboot

- install (or reinstall) the 3 Brother packages for my device

mfc210clpr-1.0.2-1.i386.deb
cupswrapperMFC210C-1.0.2-3.i386.deb
brscan2-0.2.4-0.i386.deb

- plug the webcam back in

- reboot

Now whenever I run xsane, it offers me a choice of whether to scan from my
webcam or my scanner. If I make the correct choice it works. Definitely a
solution I can live with!

Revision history for this message
Christian (c-schuettler) wrote :

Hello Community,

I have the same problem with my Ubuntu 9.10 and a Brother MFC-8860DN.
I try all solutions from this posting, but without a satisfied effect.
I get everytime the same message:

scanimage: open of device brother2:net1;dev0 failed: Invalid argument

Before, I have Ubuntu 9.04 without any probelms with my scanner, but since I made the upgrade to 9.10.

I hope, there comes a useful bugfix soon!

Revision history for this message
deraffe (fffwg) wrote :

I just had difficulties to scan on a network-connected Brother MFC-5440CN after the Upgrade from Jaunty 9.04 to Kamic 9.10. Updated the brscan2 driver, added it to the configuration and it worked.
So far so good, BUT when I wanted to test it the first time, I executed "scanimage -d brother2:net1;dev0 --test", which gave me the same error you had above:
scanimage: open of device brother2:net1 failed: Invalid argument
dev0: command not found

It was just that the shell interpreted the semicolon, but maybe interpretation of the device name is the source of your problem?
Hope this was helpful.

Revision history for this message
mckemie (mckemie) wrote :

I've encountered this bug with 9.10 64 bit on Acer notebook with a CanoScan LiDE25. Scanner works great with both ScanLite and Scanner Utility but not XSane.

Revision history for this message
lacikae (lpekarik) wrote :

I am running ubuntu 9.10 on HP Probook 4510s and I have the same problems with HP ScanJet 5400c. Xsane can find a scanning device on startup and selecting preview, I get the error "failed to start scanner: Invalid argument" . Here is the output of lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 04f2:b159 Chicony Electronics Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 03f0:231d Hewlett-Packard
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 002: ID 0458:000e KYE Systems Corp. (Mouse Systems) VideoCAM Web
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
and the output of sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

  # No USB scanners found. If you expected something different, make sure that
  # you have loaded a kernel driver for your USB host controller and have setup
  # the USB system correctly. See man sane-usb for details.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

  # You may want to run this program as root to find all devices. Once you
  # found the scanner devices, be sure to adjust access permissions as
  # necessary.

In ScanLIte, I can only see the output from integrated webcam. It looks like webcam is recognised as the scanning device and the scanner is not found. Any help? Thanks in advance.

Revision history for this message
mckemie (mckemie) wrote :

My Acer has a webcam that is recognized as a scanner device by all three scanner aps: XSane, ScanLite, and Scanner Utility. All three aps also recognize my CanoScan LiDE25. I just tested the webcam with ScanLite. Worked fine.

Revision history for this message
lacikae (lpekarik) wrote :

Thanks, now it is working (I am wondering, what happened, I didnt do anything). I only tried the third possibility, the Scanner Utility (or Flegita) and the scanner was working. So after this I tried to find the scanner using command line lsusb and sane-find-scanner and the scanner was recognised. I tired XSane and now, scanner is working also under XSane. It is still not working using SkanLite where only webcam is the device that is working there. Maybe it will change after reboot.

Revision history for this message
lacikae (lpekarik) wrote :

After reboot, also SkanLite is working without problems and there are no problems with XSane or with the device recognition.

Revision history for this message
mckemie (mckemie) wrote :

On Tue, Jan 19, 2010 at 07:27:04AM -0000, lacikae wrote:
> After reboot, also SkanLite is working without problems and there are no
> problems with XSane or with the device recognition.
>
> --
> failed to start scanner: Invalid argument

Thanks for the information. How do you think you got past the above
problem with XSane?

--
Willie, ONWARD! Through the fog!
http://counter.li.org Linux registered user #228836 since 1995
Debian3.1/GNU/Linux system uptime 766 days 39 min minutes

Revision history for this message
lacikae (lpekarik) wrote :

I dont have any idea. Now I can select from two devices in XSane, the first is noname (I think, it is the integrated webcam) and the second is the scanner (with proper name HP Scanjet....). The same selection appeared in SkanLite. Maybe the Scanner Utility (Flegita) helped to recognise scanner in some way.

Revision history for this message
rik (rikkroondijk) wrote :

I have the same problem since my last Karmic updates a few days ago,
Epson 4990 , scanner is recognized , all menus are available,

when pressing scan or preview it says "failed to start scanner: Invalid argument "
strange enough it worked before , even with Karmic 9.10, just would not work when I plugged in my Ipod ?? USB problems ?

any help/ suggestions ?

Revision history for this message
rik (rikkroondijk) wrote :

this is what I get

rik@rik-desktop:~$ lsusb
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 04b8:012a Seiko Epson Corp. Perfection 4990 Photo scanner
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 003: ID 413c:3010 Dell Computer Corp. Optical Wheel Mouse
Bus 006 Device 002: ID 413c:2005 Dell Computer Corp. RT7D50 Keyboard
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
rik@rik-desktop:~$ sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04b8 [EPSON], product=0x012a [EPSON Scanner]) at libusb:001:004
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

Revision history for this message
rik (rikkroondijk) wrote :

sorry, this one is complete

rik@rik-desktop:~$ lsusb
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 04b8:012a Seiko Epson Corp. Perfection 4990 Photo scanner
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 003: ID 413c:3010 Dell Computer Corp. Optical Wheel Mouse
Bus 006 Device 002: ID 413c:2005 Dell Computer Corp. RT7D50 Keyboard
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
rik@rik-desktop:~$ sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04b8 [EPSON], product=0x012a [EPSON Scanner]) at libusb:001:004
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

  # You may want to run this program as root to find all devices. Once you
  # found the scanner devices, be sure to adjust access permissions as
  # necessary.
rik@rik-desktop:~$ scanimage -L
WARNING: Unhandled message: interface=org.freedesktop.DBus.Introspectable, path=/, member=Introspect
device `epson2:libusb:001:004' is a Epson GT-X800 flatbed scanner
rik@rik-desktop:~$

Revision history for this message
rik (rikkroondijk) wrote :

any help/suggestions on this problem ?

scanimage -L read out below

WARNING: Unhandled message: interface=org.freedesktop.DBus.Introspectable, path=/, member=Introspect
device `epson2:libusb:001:004' is a Epson GT-X800 flatbed scanner
rik@rik-desktop:~$

Revision history for this message
rik (rikkroondijk) wrote :

this is more info on the same

WARNING: Unhandled message: interface=org.freedesktop.DBus.Introspectable, path=/, member=Introspect
scanimage: sane_start: Error during device I/O
scanimage rik@rik-desktop:~$ scanimage -d
WARNING: Unhandled message: interface=org.freedesktop.DBus.Introspectable, path=/, member=Introspect
scanimage: option requires an argument -- 'd'
rik@rik-desktop:~$

Revision history for this message
Doug Morse (dm-dougmorse) wrote :
Download full text (3.6 KiB)

I too am having a very similar problem. I just recently switched this particular machine from WinXP Home SP3 to Ubuntu 9.10.

Before I did the install, I used WUBI to try out 9.10. At that point, my Epson Perfection 3590 Photo scanner, connected via USB 2.0, worked just fine.

I thought I checked it again after actually installing Ubuntu 9.10 (from the same ISO image), but I'm not sure. If so, I'm also not sure if I checked it before or after updating everything, specifically updating the kernel from the xxxx.31-14 version to the xxxx.31-19 version.

So, I can't be sure, but I'm wondering if it's a kernel-update issue or a library-update issue???

Technical info:

------------------------------------------------------------------------------
root@dougshome:~# lsusb -t
------------------------------------------------------------------------------
1-6:1.0: No such file or directory
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/2p, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/2p, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/2p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/6p, 480M
    |__ Port 6: Dev 3, If 0, Class=vend., Driver=, 480M

------------------------------------------------------------------------------
root@dougshome:~# sane-find-scanner -v
------------------------------------------------------------------------------
This is sane-find-scanner from sane-backends 1.0.20

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

searching for SCSI scanners:
checking /dev/scanner... failed to open (Invalid argument)
checking /dev/sg0... failed to open (Invalid argument)
checking /dev/sg1... failed to open (Invalid argument)
checking /dev/sg2... failed to open (Invalid argument)
...
[checking /dev/sg[3-y], same error mesage...]
...
checking /dev/sgz... failed to open (Invalid argument)
  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

searching for USB scanners:
checking /dev/usb/scanner... failed to open (Invalid argument)
checking /dev/usb/scanner0... failed to open (Invalid argument)
checking /dev/usb/scanner1... failed to open (Invalid argument)
checking /dev/usb/scanner2... failed to open (Invalid argument)
...
[checking /dev/usb/scannner[3-14], same error mesage...]
...
checking /dev/usbscanner15... failed to open (Invalid argument)
found USB scanner (vendor=0x04b8 [EPSON], product=0x0122 [EPSON Scanner]) at libusb:001:003
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.
done

---------------------------------------------------------------------------...

Read more...

Revision history for this message
rik (rikkroondijk) wrote :
Download full text (6.7 KiB)

hi Doug,

This solved it all for me , thanks to Maxo !, see below. I only had to
change "gksudo gedit" in to "sudo gedit"

Sunday, November 15, 2009
Scanning Problems in Ubuntu Karmic
9.10<http://maxolasersquad.blogspot.com/2009/11/scanning-problems-in-ubuntu-karmic-910.html>
I went to scan in some pictures today with my new Karmic install and ran
into problems. When I went to scan I would get "Failed to start scanner:
Invalid argument" Some Googling revealed that many people are experiencing
broken scanning after upgrading to Karmic with various printers. A little
more searching revealed the solution. I think that there is probably an
even better solution, but this is how I got scanning to work.
First I installed libsane-extras:
sudo aptitude install libsane-extras
Next I edited saned.conf to enable the epson driver.
gksudo gedit /etc/init.d/sane.d/dll.conf
In this file I removed the # at the line that read #epson
To get the parameters for me scanner I ran:

$ sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure
that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04b8, product=0x0839) at libusb:001:003
found USB scanner (vendor=0x0bc7 [X10 Wireless Technology Inc],
product=0x0004 [USB Receiver]) at libusb:007:002
  # Your USB scanner was (probably) detected. It may or may not be supported
by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

  # You may want to run this program as root to find all devices. Once you
  # found the scanner devices, be sure to adjust access permissions as
  # necessary.

Here the line that read "found USB scanner (vendor=0x04b8, product=0x0839)
at libusb:001:003" was the key. These parameters needed to go in the epson
drivers file.
gksudo gedit /etc/init.d/sane.d/epson.conf
I replaced the line that read "usb" to read "usb 0x4b8 0x0839" Finally I
just needed to restart the sane daemon.
sudo /etc/init.d/saned restart
After this scanning finally worked.
Posted by Maxo at 3:10
PM<http://maxolasersquad.blogspot.com/2009/11/scanning-problems-in-ubuntu-karmic-910.html>
 <http://www.blogger.com/email-post.g?blogID=2160921736769720124&postID=5950210381081136885>
Labels: Linux <http://maxolasersquad.blogspot.com/search/label/Linux>,
technology <http://maxolasersquad.blogspot.com/search/label/technology>,
ubuntu <http://maxolasersquad.blogspot.com/search/label/ubuntu>

On Mon, Feb 22, 2010 at 2:13 PM, Doug Morse <email address hidden> wrote:

> I too am having a very similar problem. I just recently switched this
> particular machine from WinXP Home SP3 to Ubuntu 9.10.
>
> Before I did the install, I used WUBI to try out 9.10. At that point,
> my Epson Perfection 3590 Photo scanner, connected via USB 2.0, worked
> just fine.
>
> I thought I checked it again aft...

Read more...

Revision history for this message
Doug Morse (dm-dougmorse) wrote :

Hi rik (and others),

Thanks for the suggestion.

I did in fact resolved the problem, but before your post...

I knew I wasn't crazy -- I HAD seen xsane work on the machine under WUBI. So, I booted from the install CD and just ran in "Live CD" mode. Still no joy.

So then I rebooted a different machine -- a 5 mo. old laptop -- under WUBI and hooked the scanner to that. No joy, no joy, no joy.

So, since I had wiped WinXP off the target machine (my desktop machine, 32bit), where the scanner has been working fine for years, I installed the original Epson driver / software on the laptop booted under Windows Vista. STILL no joy. I had inadvertently install the 32bit drivers instead of the 64bit ones. So, I uninstalled the 32bit Epson drivers/software and then installed the correct 64bit version. Still no workie (although I had never had the scanner attached to this 64bit laptop).

At this point, I just wondered if the scanner had gotten into some weird state. So, I installed the 32bit Epson drivers/software on an older Dell Inspiron 9300 laptop running winxp sp3. FINALLY, my scanner worked again.

At that point, I attached it back to the original, target machine. In so doing, I also plugged it BACK into its original USB port -- port 1, which is farther from it -- rather than in port 4 where I had plugged it into during the switch to Ubunutu because that port is physically closer.

The good news is that the scanner reset twice during boot -- which is what it had always done under winxp on the same machine -- and low and behold, xsane worked perfectly!

So, I'm not sure if the scanner got into some odd state -- possible, but I doubt it -- that hooking it up to an older Dell 32bit laptop fixed, or if, more likely, SIMPLY SWITCHING THE USB PORT fixed things??!?

The target machine / my desktop has an ABIT KT7A mb with two on-board USB ports that I have never used for anything (they are USB 1.0 and hence slow). When I got the scanner, I also purchased a StarTech USB 2.0 4-port PCI card, and that provides the 4 ports I actually use.

I've no idea why switching ports would matter, especially since /proc and lsusb show the exact same information for the scanner whether on port 1 or 4, but who knows. I suppose I could move the scanner over to ports 2, 3, and 4, respectively, and see what happens -- and am happy to do so if anyone needs me to -- but for now I'm simply happy that my scanner is working and working reliably again.

Thanks all,
Doug

Revision history for this message
rik (rikkroondijk) wrote :

hi Doug,

glad that worked for you :-)

switching ports did not for me at all

cheers

rik

On Mon, Mar 8, 2010 at 4:05 PM, Doug Morse <email address hidden> wrote:

> Hi rik (and others),
>
> Thanks for the suggestion.
>
> I did in fact resolved the problem, but before your post...
>
> I knew I wasn't crazy -- I HAD seen xsane work on the machine under
> WUBI. So, I booted from the install CD and just ran in "Live CD" mode.
> Still no joy.
>
> So then I rebooted a different machine -- a 5 mo. old laptop -- under
> WUBI and hooked the scanner to that. No joy, no joy, no joy.
>
> So, since I had wiped WinXP off the target machine (my desktop machine,
> 32bit), where the scanner has been working fine for years, I installed
> the original Epson driver / software on the laptop booted under Windows
> Vista. STILL no joy. I had inadvertently install the 32bit drivers
> instead of the 64bit ones. So, I uninstalled the 32bit Epson
> drivers/software and then installed the correct 64bit version. Still no
> workie (although I had never had the scanner attached to this 64bit
> laptop).
>
> At this point, I just wondered if the scanner had gotten into some weird
> state. So, I installed the 32bit Epson drivers/software on an older
> Dell Inspiron 9300 laptop running winxp sp3. FINALLY, my scanner worked
> again.
>
> At that point, I attached it back to the original, target machine. In
> so doing, I also plugged it BACK into its original USB port -- port 1,
> which is farther from it -- rather than in port 4 where I had plugged it
> into during the switch to Ubunutu because that port is physically
> closer.
>
> The good news is that the scanner reset twice during boot -- which is
> what it had always done under winxp on the same machine -- and low and
> behold, xsane worked perfectly!
>
> So, I'm not sure if the scanner got into some odd state -- possible, but
> I doubt it -- that hooking it up to an older Dell 32bit laptop fixed, or
> if, more likely, SIMPLY SWITCHING THE USB PORT fixed things??!?
>
> The target machine / my desktop has an ABIT KT7A mb with two on-board
> USB ports that I have never used for anything (they are USB 1.0 and
> hence slow). When I got the scanner, I also purchased a StarTech USB
> 2.0 4-port PCI card, and that provides the 4 ports I actually use.
>
> I've no idea why switching ports would matter, especially since /proc
> and lsusb show the exact same information for the scanner whether on
> port 1 or 4, but who knows. I suppose I could move the scanner over to
> ports 2, 3, and 4, respectively, and see what happens -- and am happy to
> do so if anyone needs me to -- but for now I'm simply happy that my
> scanner is working and working reliably again.
>
> Thanks all,
> Doug
>
> --
> failed to start scanner: Invalid argument
> https://bugs.launchpad.net/bugs/478761
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Doug Morse (dm-dougmorse) wrote :

hi rik,

thanks again for your help. very kind of you to take the time to share
your experiences.

that's sort of the reason for my wordy reply: just in case my experiences
can be helpful to someone else.

it drives me crazy hunting around for a solution to a problem, then to find
one or more folks with the same or similar problems, and then the
discussion drops off a cliff without any mention of whether someone got the
problem resolved or not, and what (if anything they) learned along the way.
for the apparently less technical folks, i'm quite forgiving, but it really
irks me when someone is clearly technically knowledgeable (like me) and
drops off without a word. so, i try to not be that way. in the long run,
it's good community membership behavior, giving as well as taking, that
makes all this work.

thanks for being a good community member. :)

cheers,
doug

On Wed, 10 Mar 2010 04:54:06 -0000 rik <email address hidden> wrote:
> hi Doug,
>
> glad that worked for you :-)
>
> switching ports did not for me at all
>
>
> cheers
>
> rik

Revision history for this message
Doug Morse (dm-dougmorse) wrote :

Sorry folks, I thought that reply by email would go only to rik. My apologies. --doug

Revision history for this message
Tzadik Vanderhoof (tzadik-vanderhoof) wrote :
Download full text (3.8 KiB)

Did you see my response of 11/15/09?

On Mon, Mar 8, 2010 at 7:05 PM, Doug Morse <email address hidden> wrote:

> Hi rik (and others),
>
> Thanks for the suggestion.
>
> I did in fact resolved the problem, but before your post...
>
> I knew I wasn't crazy -- I HAD seen xsane work on the machine under
> WUBI. So, I booted from the install CD and just ran in "Live CD" mode.
> Still no joy.
>
> So then I rebooted a different machine -- a 5 mo. old laptop -- under
> WUBI and hooked the scanner to that. No joy, no joy, no joy.
>
> So, since I had wiped WinXP off the target machine (my desktop machine,
> 32bit), where the scanner has been working fine for years, I installed
> the original Epson driver / software on the laptop booted under Windows
> Vista. STILL no joy. I had inadvertently install the 32bit drivers
> instead of the 64bit ones. So, I uninstalled the 32bit Epson
> drivers/software and then installed the correct 64bit version. Still no
> workie (although I had never had the scanner attached to this 64bit
> laptop).
>
> At this point, I just wondered if the scanner had gotten into some weird
> state. So, I installed the 32bit Epson drivers/software on an older
> Dell Inspiron 9300 laptop running winxp sp3. FINALLY, my scanner worked
> again.
>
> At that point, I attached it back to the original, target machine. In
> so doing, I also plugged it BACK into its original USB port -- port 1,
> which is farther from it -- rather than in port 4 where I had plugged it
> into during the switch to Ubunutu because that port is physically
> closer.
>
> The good news is that the scanner reset twice during boot -- which is
> what it had always done under winxp on the same machine -- and low and
> behold, xsane worked perfectly!
>
> So, I'm not sure if the scanner got into some odd state -- possible, but
> I doubt it -- that hooking it up to an older Dell 32bit laptop fixed, or
> if, more likely, SIMPLY SWITCHING THE USB PORT fixed things??!?
>
> The target machine / my desktop has an ABIT KT7A mb with two on-board
> USB ports that I have never used for anything (they are USB 1.0 and
> hence slow). When I got the scanner, I also purchased a StarTech USB
> 2.0 4-port PCI card, and that provides the 4 ports I actually use.
>
> I've no idea why switching ports would matter, especially since /proc
> and lsusb show the exact same information for the scanner whether on
> port 1 or 4, but who knows. I suppose I could move the scanner over to
> ports 2, 3, and 4, respectively, and see what happens -- and am happy to
> do so if anyone needs me to -- but for now I'm simply happy that my
> scanner is working and working reliably again.
>
> Thanks all,
> Doug
>
> --
> failed to start scanner: Invalid argument
> https://bugs.launchpad.net/bugs/478761
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “xsane” package in Ubuntu: New
>
> Bug description:
> Binary package hint: xsane
>
> I have a Brother MFC 210C. I have just done a fresh install on this
> machine of Ubuntu 9.10 and scanning no longer works. (Printing works fine)
> I have installed these packages from the Brother site:
>
> cupswrapperMFC210C-...

Read more...

Revision history for this message
Doug Morse (dm-dougmorse) wrote :

Hi Tzadik,

Yes, thanks, I did see your post from 11/15/09 and considered trying your solution. However, I have an Epson rather than Brother scanner, and I was able to correct the problem by, more likely, switching USB ports or possibly having forced a scanner reset with a WinXP SP3 machine.

Cheers,
Doug

Revision history for this message
stop (whoopwhoop) wrote :

I'm getting this:
"failed to open device 'brother2:bus2;dev1': invalid argument."
with a Brother dcp-115c on ubuntu 10.04 32 bit.
Are there any developments on this issue? Is there a workaround that works for my setup?

Revision history for this message
Davias (davias) wrote :

+1; read everything and tried everything (ubuntu 9.10 amd64, it was working with 9.04)

scanimage: open of device gt68xx:libusb:001:009 failed: Invalid argument

tried also with libsane 1.0.19 ... nothing. And I read around the bug is still there in 10.04

Any help? TIA

Revision history for this message
Doug Morse (dm-dougmorse) wrote :

Hi Davias,

Something about the xsane driver seems to put my scanner into an odd state wherein I also get the "invalid argument" error message and cannot scan. At first I thought it could be a number of things (see comment #30), but I've definitely nailed it down to hardware state issue.

Normally, the main LED indicating the scanner is powered on and ready is either fully-lit green or off. When the scanner gets in this odd state, however, the LED is either off when the USB cable is unplugged or "half-lit" green. Switching USB ports, switching from one Ubuntu machine to another -- nothing fixes it. I've found that the only way to correct the problem is to hook the scanner back up to a WinXP box and then run some application that activates the manufacturer's driver (in my case, the Epson Scan Utility). I don't even have to scan anything -- I just need to ensure that the main LED becomes fully-lit green again.

Eventually, under Ubuntu the scanner LED goes half-bright again and, notably, thereafter the scanner *no longer* resets itself twice after reboot (i.e., normally, I can hear the scanner resetting twice during reboot -- this is true for when its connected to WinXP and it is true when its connected to Ubuntu and when xsane will subsequently work). I'm still not clear on when and why the scanner gets into this state, but eventually I will and will then post here.

My scanner is an Epson, not a Brother, and I'm running 9.10, not 10.04, so my problem and workaround may not be of help to you, but I'd be curious one way or another.

My suspicion is that either xsane, some of its drivers, or some Ubuntu USB driver put or leave the scanner hardware in some odd, non-functional state. The reason I say this is, not only does my scanner LED turn half-lit green when the problem it starts, it *stays* that way no matter what: hard reboot of the machine, removing power from the scanner, doing both at the same time, doing both in the two possible orderings, etc. Nada, nothing, nichts. The *only* way I have found to "reset" the scanner is to have the manufacturer's drivers interact with it. Very odd indeed.

Next time this happens, I'm going to try running the Epson Scan Utility on WinXP under VirtualBox on the Ubuntu machine to which my scanner is normally connecting. I don't know if it will work or not, but it'd be nice to be to fix this problem on the fly w/o having to reboot or physically move the scan.

Anyway, my apologies for the long post. I hope this information can be of help to you or others.

Cheers,
Doug

Revision history for this message
Davias (davias) wrote :

Dear Doug,
sorry for the delay, I finally had time to give a try to your solution: IT WORKS! (where nothing else did...)

This is what I did:
1) started Windows 2000 in VirtualBox 3.1.6 on my Ubuntu 9.10 AMD64
2) on the Devices menu of VirtualBox I selected "unknown USB device 05D8:4022" - this is the address where my Mustek scanner lives on.
3) started DirectScan, the Mustek scan program on Win2K
4) the Win2K device disconnect window appeared, informing that it was now safe to unplug USB device Mustek ScanPlus 1200
5) at THE SAME TIME the XSane dialog box appeared offering which device to use for scanning, my webcam or Mustek ScanPlus 1200 - this is common as I have 2 scanning device, at least for sane.
6) selected the Mustek ScanPlus 1200 and instead of getting "open of device gt68xx:libusb:001:009 failed: Invalid argument"
I had xsane up and running!

So definitely using the Windows driver took the scanner away from this strange lock mode it was fallen!

Thanks again for your solution,
Dave

Revision history for this message
Doug Morse (dm-dougmorse) wrote :

Hi Davias,

That's great -- I'm glad it worked! And thanks for letting me know: It
makes me feel better knowing that at least one other person is having a
similar problem and that the same solution works. Thanks also for posting
to LaunchPad so others can know, and I'm glad to know that it worked from
within VirtualBox, as I use it to for legacy Windows issues.

Too bad we're finding this out just as Ubunutu has dropped xsane from
official support / its repositories as of Lucid 10.4.... :( Not the end of
the world, tho': I'm sure .debs will be available, and worse case I'll
build it from sources myself. I'm prefer the control that xsane gives me
compared to Simple Scanner and the like.

Best,
Doug

On Tue, 01 Jun 2010 14:32:33 -0000 Davias <email address hidden> wrote:
>
> Dear Doug,
> sorry for the delay, I finally had time to give a try to your solution:
> IT WORKS! (where nothing else did...)
>
> This is what I did:
> 1) started Windows 2000 in VirtualBox 3.1.6 on my Ubuntu 9.10 AMD64
> 2) on the Devices menu of VirtualBox I selected "unknown USB device
> 05D8:4022" - this is the address where my Mustek scanner lives on. 3)
> started DirectScan, the Mustek scan program on Win2K 4) the Win2K device
> disconnect window appeared, informing that it was now safe to unplug USB
> device Mustek ScanPlus 1200 5) at THE SAME TIME the XSane dialog box
> appeared offering which device to use for scanning, my webcam or Mustek
> ScanPlus 1200 - this is common as I have 2 scanning device, at least for
> sane. 6) selected the Mustek ScanPlus 1200 and instead of getting "open
> of device gt68xx:libusb:001:009 failed: Invalid argument" I had xsane up
> and running!
>
> So definitely using the Windows driver took the scanner away from this
> strange lock mode it was fallen!
>
> Thanks again for your solution,
> Dave
>

Revision history for this message
madtom1999 (tompotts) wrote :

I'm getting the same (Failed to start scanner: Invalid argument) for an Epson Perfecftion 640U
under 64 bit 9.4
Worked fine on 8.10....

Revision history for this message
madtom1999 (tompotts) wrote :

Just updated to 10.10 (64 bit) still getting the same problem

Revision history for this message
madtom1999 (tompotts) wrote :

I've managed to solve my problem by modifying /etc/sane.d/dll.conf to read epson.conf rather than epson2.conf

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

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

Changed in xsane (Ubuntu):
status: New → Confirmed
Revision history for this message
Tristan Schmelcher (tschmelcher) wrote :

I had this same problem on Ubuntu 11.10 64-bit with a Brother MFC-7220 and the brscan2 driver. Printing worked fine, but attempting to scan gave the "Invalid argument" error. In my case it turned out that the issue was that it didn't work with USB 3.0 ports. Whenever it was plugged into a USB 3.0 port, I got the "Invalid argument" error; whenever it was plugged into a USB 2.0 port, it worked. I also noticed in "dmesg" that it printed this message precisely whenever I plugged it into a USB 3.0 port:

[ 2534.356937] usb 3-2: ep 0x85 - rounding interval to 512 microframes, ep desc says 800 microframes

So that may be the cause of the problem.

(It also printed a message saying "[ 2535.503268] usb 3-2: usbfs: USBDEVFS_CONTROL failed cmd mtp-probe rqt 128 rq 6 len 1024 ret -110", but that was printed even with USB 2.0 ports when everything was working.)

Revision history for this message
Martyn Russell (martyn-lanedo) wrote :

I have a Brother MFC-7320 and I was getting this this afternoon:

$ scanimage -t
scanimage: open of device brother3:bus3;dev1 failed: Invalid argument

Using strace, I also saw the USBDEVFS_CONTROL error being reported up the stack from the ioctl call.

What fixed this for me was adding my username to the group "lp". I also Added to /lib/udev/rules.d/40-libsane.rules

  MODE="0664", GROUP="lp"

So the final line looks like:

  ATTRS{idVendor}=="04f9", MODE="0664", GROUP="lp", ENV{libsane_matched}="yes"

Note, you may have to:

a) turn off the printer
b) sudo service udev restart
c) log out and log back in (for new group permissions to take effect)
d) turn printer on

Hope this helps.

Revision history for this message
Martyn Russell (martyn-lanedo) wrote :

I am also using Ubuntu Pangolin (beta2).

Revision history for this message
odorono2 (odorono2) wrote :

 I installed today a Brother MFC-J6510DW , an all-in-one device. Printer was not a problem at all, and works fine. I managed to install the scanner using the drivers provided in Brother's website, but xsane doesn't seem to communicate very well with it. I'm using it over the network -- so no cable present.

 Basically, it has worked a couple of times, always as root through sudo, both running directly xsane and over the Gimp. But most of the times I get after a certain waiting time a message saying "failed to start scanner: Invalid Argument".

 Any ideas?

Revision history for this message
Steve Kieu (msh-computing) wrote :

I have this too on Ubuntu 12.04 - but when I use 10.04 on my ancient laptop it works fine

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

To get my DCP 7030 scanner working in Ubuntu 12.04 i386, I had to do the following:

1) Install http://www.brother.com/pub/bsc/linux/dlf/brscan3-0.2.11-4.i386.deb
from http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_scn.html#brscan3

2) Add the following two lines in /lib/udev/rules.d/40-libsane.rules, under line 40 (LABEL="libsane_usb_rules_begin"):

# Brother scanners
ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"

3) Plug in scanner - no system reboot or udev restart necessary.

Revision history for this message
Dennis Schwertel (tmassassin) wrote :

#48 worked for me with brscan4, THANK YOU! Scanner on Brother DCP 7055, Ubuntu 12.04 64bit

Michael Nagel (nailor)
description: updated
Revision history for this message
Matthew Carpenter (matt-eisgr) wrote :

This is still affecting me with my Brother MFC-440CN scanner. At first I thought it was a network problem... however, after connecting via USB, I still get the exact same problem (in 12.10):

scanimage: open of device brother2:net1;dev0 failed: Invalid argument

Revision history for this message
Matthew Carpenter (matt-eisgr) wrote :

This has apparently been a problem for some time. Can we please get a backdated version of libsane until it once again becomes sane? something we can install in place of the current libsane, call it "libsane-legacy." Yes, I realize this actually requires several packages, and impacts even more. This type of "I danced on my left leg while sacrificing a goat" solution is less than savory.

Revision history for this message
Michael Nagel (nailor) wrote :

Matthew, does comment #48 work for you?

Revision history for this message
thedanyes (thedanyes) wrote :

The 'failed to start scanner: invalid argument' error message seems rather non-specific, and by association I think this bug discussion overall seems rather non-specific. I can intermittently replicate this error message by plugging my Fujitsu ScanSnap S500 into an over-loaded USB hub. lsusb still shows it, but scanimage -L gives the "no scanners were identified" error, and of course xsane gives the "failed to start scanner: invalid argument" error. Unplugging the scanner and plugging it into a different USB port fixes the issue.

I think what the original poster described seems like a hardware-specific issue, and maybe this should be separated out into one bug per scanner model, or at least better described in the bug title.

Revision history for this message
dbclinton (dbclin) wrote :

I can confirm that switching my Brother DCP-7060D from a USB 3.0 port to USB 2.0 got it working - finally defeating the "Invalid argument" error!

Revision history for this message
JoKer (joker777vs-666) wrote :

@dbclinton
How did you switch the USB ports? I would like to try it out as well.

Revision history for this message
dbclinton (dbclin) wrote :

@JoKer
I meant that when you choose a USB port on your PC to plug in your scanner, make sure it's an older USB 2.0 port rather than USB 3.0 - in almost all cases USB 3.0 ports can be easily identified by a bright blue pin rather than black or white.
By the way, just this past week the same "fix" worked for me on a completely different system using a completely different scanner. There's definitely a compatibility bug in the driver.

Revision history for this message
Linda (elindarie) wrote :

I have a problem getting "invalid argument" from a Brother DCP-8155DN scanner that's working on Debian 7.6 (32-bit) but not Ubuntu 14.04 (64-bit). I tried changing from the USB 3.0 port to 2.0, but it didn't help.

The main thing I want to say here is that on someone's post, not sure if it's in this bug, they said maybe the problem had to do with the fact that lsusb and scanimage gave different dev and bus numbers. So I tried this on my computer where the scanner is working, where lsusb and scanimage gave different dev and bus numbers, too, so that's not the problem. For instance,

lsusb:

Bus 001 Device 005: ID 04f9:0293 Brother Industries, Ltd

scanimage -L:

device `brother4:bus4;dev1' is a Brother DCP-8155DN USB scanner

Even though the bus and device numbers are different, scanimage -T starts up the scanner, and gscan2pdf works fine, produces a nice image. Also sane-find-scanner finds it:

found USB scanner (vendor=0x04f9, product=0x0293) at libusb:001:005

Revision history for this message
Davias (davias) wrote :

Happened again, Ubuntu 14.04 AMD64 latest upgrade...said wrong permissions...tried everything, finally changed USB port power off and reboot...ok...

Revision history for this message
penalvch (penalvch) wrote :

Tzadik Vanderhoof, thank you for reporting this and helping make Ubuntu better.

As per https://wiki.ubuntu.com/Releases your release is EOL.

If you have an issue in a supported release (ex. 16.04) please file a new report, and feel free to subscribe me to it.

Changed in xsane (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Bob Littlefield (bobl0619) wrote :

I have a networked Canon pixma mg6320. Printing was no problem. Using xsane I receive 'invalid argument' although the scanner is listed twice in the opening dialog. I am able to scan using gimp. Re the SaneDaemon tutorial I added /etc/systemd/system/saned.socket and saned@.service. then systemctl status saned.socket displayed bad. Removed these two additions and saned.socket was OK.

bob@bob-ubuntu-64:~$ sudo systemctl enable saned.socket
[sudo] password for bob:
bob@bob-ubuntu-64:~$ sudo systemctl start saned.socket
bob@bob-ubuntu-64:~$ systemctl status saned.socket
● saned.socket - saned incoming socket
   Loaded: loaded (/lib/systemd/system/saned.socket; enabled; vendor preset: enabled)
   Active: active (listening) since Tue 2016-11-15 15:08:13 PST; 24h ago
   Listen: [::]:6566 (Stream)
 Accepted: 4; Connected: 0

Nov 15 15:08:13 bob-ubuntu-64 systemd[1]: Listening on saned incoming socket.
Nov 15 15:18:24 bob-ubuntu-64 systemd[1]: saned.socket: Too many incoming connections (1), refusing connection
Nov 15 15:18:39 bob-ubuntu-64 systemd[1]: saned.socket: Too many incoming connections (1), refusing connection
Nov 15 15:31:14 bob-ubuntu-64 systemd[1]: saned.socket: Too many incoming connections (1), refusing connection
Nov 15 15:37:49 bob-ubuntu-64 systemd[1]: saned.socket: Too many incoming connections (1), refusing connection
Nov 16 15:43:09 bob-ubuntu-64 systemd[1]: Listening on saned incoming socket.

bob@bob-ubuntu-64:~$ sudo service saned status
[sudo] password for bob:
● saned.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)
bob@bob-ubuntu-64:~$ sudo usermod -a -G lp saned
bob@bob-ubuntu-64:~$

How do I unmask saned.service. I am running 16.04. Although I can scan using gimp would much rather like to use xsane for its features. So far I have seen several recommendations but none has helped here.

Revision history for this message
penalvch (penalvch) wrote :

Bob Littlefield, given this report is closed, if you would like your issue addressed please file a new report via a terminal:
ubuntu-bug xsane

Please feel free to subscribe me to it.

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.