May 24, 2007 · General · Email This Post

Sponsored Link
To Fix Scanner Operation broken by an Edgy to Feisty Upgrade

If you have been using a USB scanner and upgrade from Edgy to Feisty, you may find that your scanner no longer works.

These notes may help. There is a long thread about this check here . The problem seems to lie in the usb suspend functions built into Feisty's new kernel in order to keep laptop users happy.Here are a few tricks taken from the above thread that might get your scanner going again. They did for me.

0. Download & install scanbuttond using adept or any preferred tool

At the console ...

1. list usb devices : lsusb
2. run scanbuttond : scanbuttond -r 1000000
3. list available imaging devices : scanimage -L
4. Test basic scanner operation : scanimage -T -d
5. Test gui scanner operation : xsane


0. Use adept or whatever tool you prefer to install the "scanbuttond" package.use the following command to install scanbuttond

sudo aptitude install scanbuttond

This is a daemon that will poll your scanner to see if any of its buttons have been pressed. You don't need to press a button -- your scanner may not even have one. The point seems to be that the daemon pokes the scanner at an interval you specify thereby keeping it awake and and able to respond to other programs. For more information, see the above thread and/or

1. List the currently known USB devices & check that your scanner is in the list.

To do this, open a console & enter "lsusb" at the prompt. (without quotes of course). Here's a typical output ...

[email protected]:~$ lsusb
Bus 005 Device 007: ID 04a9:2206 Canon, Inc. CanoScan N650U/N656U
Bus 005 Device 006: ID 0aec:3260 Neodio Technologies Corp. 7-in-1 Card Reader
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 004: ID 046d:c408 Logitech, Inc. Marble Mouse (4-button)
Bus 001 Device 001: ID 0000:0000

Here we see that a CanoScan N650U is available as device 007 on bus 005. These numbers matter and they are tricky because they can change. Typically, if you unplug, then reconnect the scanner the device number is likely to change. Note the numbers that appear on your own system for use later. If your scanner doesn't appear in the USB devices list, then, sorry, this article won't help you.

2.Start the scan button daemon

Again at the console prompt, enter "scanbuttond -r 1000000" The number here is the retry (polling) interval in micro-seconds. The value shown here is pretty much the consensus that emerged in the discussion thread. If you later want to stop the daemon, issue the command "killall scanbuttond"

3. Check the status of your scanner from the command line -- enter "scanimage -L".

Scanimage is a command line tool for reading images from scanners and cameras. It works through the sane scanner access interface in much the same way as the GUI scanning tools. It has a useful manual entry. (To see this, as always, enter "man scanimage" at the prompt)

scanimage -L gives a list of the imaging devices currently available throught the sane interface. Here's a typical output ...

[email protected]:~$ scanimage -L
device `v4l:/dev/video0′ is a Noname BT878 video (Leadtek WinFast 20 virtual device
device `plustek:libusb:005:007′ is a Canon N650U/N656U USB flatbed scanner

Here we see two available devices, most importantly the Canon scanner in my system. Note the device name & syntax for subsequent testing. Here it is "plustek:libusb:005:007". This says that the plustek package is working through libusb to device 007 on bus 005. Many scanners are run this way but some are not. A specific manufacturer, e.g HP, might appear in place of plustek. The bus and device numbers should match those obtained previously with the lsusb command

4. Test operation of the scanner from the command line -- enter "scanimage -T -d

where is the device id show by the previous command, e.g. here we would enter "scanimage -T -d plustek:libusb:005:007"

If all is well, the scanner should start making operating noises and some pass/fail test results will be shown in the console window.
A typical example on my system ...'

[email protected]:~$ scanimage -T -d plustek:libusb:005:007
scanimage: scanning image of size 202×150 pixels at 24 bits/pixel
scanimage: acquiring RGB frame, 8 bits/sample
scanimage: reading one scanline, 606 bytes... PASS
scanimage: reading one byte... PASS
scanimage: stepped read, 2 bytes... PASS
scanimage: stepped read, 4 bytes... PASS
scanimage: stepped read, 8 bytes... PASS
scanimage: stepped read, 16 bytes... PASS
scanimage: stepped read, 32 bytes... PASS
scanimage: stepped read, 64 bytes... PASS
scanimage: stepped read, 128 bytes... PASS
scanimage: stepped read, 256 bytes... PASS
scanimage: stepped read, 512 bytes... PASS
scanimage: stepped read, 1024 bytes... PASS
scanimage: stepped read, 1023 bytes... PASS
scanimage: stepped read, 511 bytes... PASS
scanimage: stepped read, 255 bytes... PASS
scanimage: stepped read, 127 bytes... PASS
scanimage: stepped read, 63 bytes... PASS
scanimage: stepped read, 31 bytes... PASS
scanimage: stepped read, 15 bytes... PASS
scanimage: stepped read, 7 bytes... PASS
scanimage: stepped read, 3 bytes... PASS

5. Test operation of the scanner with the xsane gui interface or some other scanner program.

eg enter "xsane" at the console prompt. On startup, xsane shows a device selection dialog where you can check that the bus & device numbers match those previously noted. Xsane also has a good manual entry (man xsane)

If xsane runs the scanner successfully, then so should other programs -- Gimp, Kooka, OpenOffice etc.

Sponsored Link

Related posts

26 Comments to “Fixing a scanner broken by the Feisty upgrade”

  1. Luke says:

    scanimage is not available on my default Kubuntu Feisty system. Do I have to add a repository in order to install it?

  2. SkipF says:

    THANKS! Saved ME a trip (or two) to Staples…Thanks Again!!!

  3. Limulus says:

    Luke: I’m using Ubuntu, but it should be the same for you; when I tried to run scanimage on my system it said:

    $ scanimage
    The program ‘scanimage’ is currently not installed. You can install it by typing:
    sudo apt-get install sane-utils
    Make sure you have the ‘universe’ component enabled

  4. JohnCraick says:

    AFAIK, scanimage and other command line utilities for SANE are available in the sane-utils package which is part of the standard repositories under Feisty (and previous xUbuntus). Run adept, enter “sane” in the search box and see what turns up.

    I replied quite a bit earlier to this but that reply seems to have vanished into interstitial cyberspace space. Maybe this one will fare better.

  5. Gregg says:

    Wow, thanks for the solution. My scanner worked haltingly and very slowly. Now it works once again. Question: Will the daemon have to be started each login or will it stay running in each session?
    Thanks again.


  6. Francesco says:

    Thank you for your workaround. i am using kubuntu 7.04 with an agfa snapscan 1212U. After installed and run scanbuttond i have used Kooka with no more problem.

    Thank you again

  7. Paul says:

    My setup didnt like the -d option on
    4. Test basic scanner operation : scanimage -T -d
    so I left out ‘-d’ and everything now works OK

  8. Arthus says:

    The Scanner CanonLide25 works fine after scanbuttond “-r 1000000” from the console. But i have one question, how can i make this “scanbuttond -r 1000000” runnimg after the Computer is started automatic ?

  9. John Craick says:

    I’m glad this seems to have helped a few people.

    A few things about this tip, esp. a correction to the original text …

    Line “4. Test Basic scanner operation … ” is wrong. It should say “scanimage -T -d “yourdevice”
    where “yourdevice” is something like plustek:libusb:005:008 (or whatever). I think that when originally entering the text I used the gt. & lt. signs () and the message board software tossed them out as bad html. Sorry about that. I guess most folk will have figured that out, but if you just use “scanimage -T -d” on the command line, then nothing happens or maybe you get an error message.

    Auto running scanbuttond at boot time : Arthus, and others privately, asked how the scanbuttond command could be issued automatically at boot up rather than being entered manually every time at the console. The short answer is yes, you can put it in a boot-up script but, this being Linux, it isn’t as easy as just tossing the statement into our trusty autoexec.bat file. I think an explanation is too long to put here but I’ll do a separate tip on it shortly. Meanwhile, if you want to pursue this immediately, have a look at

  10. John,

    People like you are the reason I switched to Ubuntu. It took some work to find someone whose tut made sense.

    Your tut worked flawlessly. Thanks a bunch John and Ubuntu Geek.

  11. John Craick says:

    Scanning Problems Through a USB Hub

    The following may help if you are still be having problems with scanner operation despite using scanbuttond.

    My scanner would work about 1 time in 10, apparently depending on which USB device port it was allocated when it was plugged in. I normally connect it through a USB hub. When I removed the hub and used a direct USB connection instead, operation was then 100% reliable. I tried both powered & non powered hubs & the problem was reproduced immediately in both cases.

    So – worth a try if you still have the problems and are working through a hub.

    – J

  12. Peter Noseda, Melbourne, Aust says:

    Thankyou, thankyou. Scanner working perfectly again.

  13. Arnaud says:

    Woow! It works!
    Thanks a lot guy !
    If you pass in the belgium give a mail and I offer u a special beer !

  14. Osric says:

    Thanks a lot!!!
    This is not a bug with Ubuntu, since I have had the same issue on Fedora 7. The scanner (Canon Lide 25) worked fine on an older version of Fedora. The workaround worked well. This probably a bug in the upgraded kernel.

  15. dompie says:

    Fantastisch (fantastic); het werkt (it works.
    A shame (for Canonical) that this was not posted from the beginning.

    Anyway: end good, all good.

  16. András says:

    Thank you very much, it worked me also, you helped me a lot!

  17. Tim says:

    Everything worked till step 4 (with exclusion of the parameter “-d” in step 4), but after starting xsane I got again the error message and even step 3 is not working any more. Do you have some idea what is wrong?
    I’m using Scapscan 1212U.

  18. Psycho says:

    Thanks for the help.
    This worked perfect with a Cannon N1240U.
    I enjoy Linux but am a beginner with many of the commands.
    This was a great help.

  19. mad Bob says:

    I have just entered scanbuttond into the session startup programs with the command “scanbuttond -r 1000000” . Restarted and my Canonlide30 was still working ok.


  20. Mike says:

    This step didn’t work for me nothing happens. Even when I remove the -d flag. Now that my Windows XP disc is broken I guess I have to make a 5 GB Ubuntu Dapper 6.06 install just for my crappy CanonScan 630u.

    “scanimage -T -d canon630u:libusb:003:003”

    Soooo disappointing 🙁

  21. JohnCraick says:

    In reply to Mike above on 23 Feb 2008.

    scanimage -T -d canon630u:libusb:003:003

    – that’s the wrong scanimage command. Perhaps my explanation wasn’t clear enough.

    Try scanimage -T -d plustek:libusb:003:003

    Canon scanners (and several others) use the generic, plustek driver, not one of their own.
    So scanimage -T -d canon630u:libusb etc won’t work.

    Good luck with it. I wonder if this will eventually be fixed by canonical in one of the new versions.

    As a user, I don’t know, and I don’t care, who “owns” this problem but the fact that it has persisted for over a year and 2 Ubuntu versions is pretty bloody poor, IMO

    Regards to all,


  22. JohnCraick says:

    Vote to get this fixed

    Ubuntu are running a “brainstorm” about what needs to be improved.

    People whov’e had this scanner problem might care to vote for the scanner fix.


  23. LeeSublett says:

    This is what i come up with

    Bus 004 Device 004: ID 03f0:2305 Hewlett-Packard ScanJet 3970c
    Bus 004 Device 001: ID 0000:0000
    Bus 003 Device 001: ID 0000:0000
    Bus 002 Device 001: ID 0000:0000
    Bus 001 Device 010: ID 03f0:0f07 Hewlett-Packard
    Bus 001 Device 009: ID 0733:0401 ViewQuest Technologies, Inc. CS330 WebCam
    Bus 001 Device 008: ID 058f:9254 Alcor Micro Corp. Hub
    Bus 001 Device 001: ID 0000:0000

    dev/bus/usb/004/004 was change to a+w

    [email protected]:~$ scanimage -L
    device `v4l:/dev/video0′ is a Noname Intel Create and Share virtual device
    device `hp3900:libusb:004:004′ is a Hewlett-Packard Scanjet 3970 flatbed scanner

    [email protected]:~$ scanimage -T -d hp3900:libusb:004:004
    scanimage: scanning image of size 1×1 pixels at 24 bits/pixel
    scanimage: acquiring RGB frame, 8 bits/sample
    scanimage: reading one scanline, 3 bytes… PASS
    scanimage: reading one byte… FAIL Error: End of file

  24. Larry says:

    I used all you said and started it with the plustek driver…it worked however it will not be found by xsane…using ubuntu 7.10 is a canon 670 /676 Lide 20

  25. Andrés says:

    I have UBUNTU 8.10 – Scanner Canon Lide 25
    I did al the way:

    [email protected]:~# scanimage -L
    device `plustek:libusb:005:012′ is a Canon CanoScan LiDE25 flatbed scanner

    [email protected]:~# scanimage -T -d plustek:libusb:005:012
    scanimage: scanning image of size 202×150 pixels at 24 bits/pixel
    scanimage: acquiring RGB frame, 8 bits/sample
    scanimage: reading one scanline, 606 bytes… FAIL Error: Operation was cancelled

    what is this error ??

    When I used XSANE – i have the mesagge: failed creating archive, no permission (falló al crear el archivo, permiso denegado)

    Any help ??

  26. about to go says:

    After 3 years using Ubuntu as default operating system I’m seriously considering going back to Windows, with scanners being top of the list as reason to go.

    After every single upgrade (2 x per year) I had to spend a couple of days troubleshooting issues to get scanners working.

    Now again on 8.10 my BenQ/Acer 640BT. Most of the help on the net also make huge assumptions that everyone on the planet knows about where to get the “firmware” files for a particular scanner, knows everything about non-obvious security (being a member of groups such a “scanner” doesn’t give you the permission to use the scanner), references to directories that doesn’t exist, kernel settings for which there no way for the layman to check … and the list go on …..

    Maybe I can get diploma or degree in getting scanners to work on Ubuntu …..

Leave a Reply

  • Recent comments