XSane scans correctly, scanimage do NOT!

Forum rules
Before you post please read this
Post Reply
dwarflord
Level 1
Level 1
Posts: 3
Joined: Thu May 07, 2015 2:16 pm

XSane scans correctly, scanimage do NOT!

Post by dwarflord »

I stumbled upon a strange problem. After reading the man pages and tweaking I got my Mustek A3 2400S scanner to communicate with Linux Mint 32-bit (Rebecca). Further tweaking lets me scan properly in XSane GUI. However, when trying scanimage from the command-line the scanner goes berserk, making strange sounds etc. Almost as it's trying to override the hardware specs, and I read that Mustek don't have this "safety protection" in Linux - so you have to be careful. And of course, no actual scan.

So how come XSane manages to scan properly whereas scanimage CLI will not? Does XSane use some paramters/driver not included in my scanimage command? Help appreciated!
User avatar
phd21
Level 19
Level 19
Posts: 9943
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: XSane scans correctly, scanimage do NOT!

Post by phd21 »

dwarflord wrote:I stumbled upon a strange problem. After reading the man pages and tweaking I got my Mustek A3 2400S scanner to communicate with Linux Mint 32-bit (Rebecca). Further tweaking lets me scan properly in XSane GUI. However, when trying scanimage from the command-line the scanner goes berserk, making strange sounds etc. Almost as it's trying to override the hardware specs, and I read that Mustek don't have this "safety protection" in Linux - so you have to be careful. And of course, no actual scan.

So how come XSane manages to scan properly whereas scanimage CLI will not? Does XSane use some paramters/driver not included in my scanimage command? Help appreciated!
HI dwarflord,

What edition (distro) of Linux Mint are you using, Cinnamon, Mate, KDE (my fav), or Xfce? It would help to have some more hardware info too, like some hardware specs (inxi -Fx). Not sure why you had to do any "tweaking" to get "XSane" to work because it usually works great without any changes. What tweaking did you do? Why do you want to use a command line, like "scanimage", for instead of the Xsane Gui or another programs Gui? What are you trying to do?

If Xsane is working, then other programs that have a scan interface, like Gimp (File->create), and "gscan2pdf" should work well.

From a console terminal prompt, type in or copy and paste the line below to see if scanner is listed:

sudo scanimage --list-devices


Link to article on this: FYI: most commands from this article require root command sudo to work..
http://tldp.org/HOWTO/Scanner-HOWTO/testing.html

Scanning
http://community.linuxmint.com/software/browse/26

Hope this helps ...
Phd21: Mint 20 and 19.2 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
dwarflord
Level 1
Level 1
Posts: 3
Joined: Thu May 07, 2015 2:16 pm

Re: XSane scans correctly, scanimage do NOT!

Post by dwarflord »

Thanks for the prompt reply, phd21.

I didn't really do any tweaks to XSane itself, it probably works just great - but in order to make the Mustek A3 2400S scanner to function I hade to overwrite the SANE backend with Mustek's driver. And by default it only talked to the scanner when being root, so I had to assing myself to the "scanner" group and change USB permissions (to 0666) in udev (50-udev-default.rules). After that, it kicked in for XSane and scanned perfectly. But I don't want to use a GUI, I'm writing a bash script for batch processing so making "scanimages" work is essential.

sudo scanimage --list-devices returns:

Code: Select all

device `astra_5800:libusb:001:005' is a A3F A3F 2400 flatbed scanner
I assume scanimages and XSane uses that same device so I have no idea what's going on here.

I'm using MATE. Here's my computer spec:

Code: Select all

System:    Host: mbox Kernel: 3.13.0-37-generic i686 (32 bit, gcc: 4.8.2) Desktop: N/A Distro: Linux Mint 17.1 Rebecca
Machine:   System: LENOVO product: 96902KG version: Lenovo 3000
           Mobo: LENOVO model: LENOVO version: 0.1 Bios: LENOVO version: 2TKT53AUS date: 10/25/2007
CPU:       Dual core Intel Core2 Duo CPU E4500 (-MCP-) cache: 2048 KB flags: (lm nx sse sse2 sse3 ssse3) bmips: 8778.12 
           Clock Speeds: 1: 1600.00 MHz 2: 1200.00 MHz
Graphics:  Card: Intel 82945G/GZ Integrated Graphics Controller bus-ID: 00:02.0 
           X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1280x1024@60.0hz 
           GLX Renderer: Mesa DRI Intel 945G x86/MMX/SSE2 GLX Version: 1.4 Mesa 10.1.3 Direct Rendering: Yes
Audio:     Card: Intel NM10/ICH7 Family High Definition Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture ver: k3.13.0-37-generic
Network:   Card-1: Realtek RTL8101E/RTL8102E PCI Express Fast Ethernet controller 
           driver: r8169 ver: 2.3LK-NAPI port: d800 bus-ID: 02:00.0
           IF: eth0 state: down mac: 00:1e:37:2b:78:c6
           Card-2: ASUSTek WL-167G v3 802.11n Adapter [Realtek RTL8188SU] driver: r8712u usb-ID: 0b05:1791
           IF: wlan0 state: up mac: 08:60:6e:e3:a9:d3
Drives:    HDD Total Size: 2000.4GB (0.3% used) 1: id: /dev/sda model: WDC_WD20EARS size: 2000.4GB 
Partition: ID: / size: 1.4T used: 4.9G (1%) fs: ext4 ID: swap-1 size: 5.00GB used: 0.00GB (0%) fs: swap 
RAID:      No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors:   None detected - is lm-sensors installed and configured?
Info:      Processes: 146 Uptime: 23 min Memory: 340.2/2894.9MB Runlevel: 2 Gcc sys: 4.8.2 Client: Shell inxi: 1.8.4
pdc_2
Level 8
Level 8
Posts: 2425
Joined: Mon May 11, 2009 1:21 am

please join the sane development mailing list

Post by pdc_2 »

Hi dwarflord; that looks like a mighty fine scanner you have there;

can I suggest you join what is called the sane development mail list http://lists.alioth.debian.org/mailman/ ... sane-devel as this is where the experts on sane are to be found: they are a helpful and active group; you have the hardware; they have the software expertise; what a perfect blend;

you could run some sample tests for them that would benefit the linux community as your device is not clearly written up on the list of hardware they know about; and can offer advice on;

http://www.sane-project.org/lists/sane- ... l#Z-MUSTEK

please join up and you can help others advance things along
dwarflord
Level 1
Level 1
Posts: 3
Joined: Thu May 07, 2015 2:16 pm

Re: XSane scans correctly, scanimage do NOT!

Post by dwarflord »

What a wonderful idea, pdc_2. I'd love to contribute!
I'll send out an email to that mailing list then. The SANE docs/driver really need an update for the A3 2400S, which is in fact a pretty cheap A3 scanner compared to other brands. Thanks for the suggestion!
User avatar
phd21
Level 19
Level 19
Posts: 9943
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: XSane scans correctly, scanimage do NOT!

Post by phd21 »

Hi dwarflord,

I think that is a good idea too that user pdc_2 suggested.

What I still do not understand is why are you trying to write a script and choosing not to use the available GUI scanning programs? You still did not tell me, or us here in the forum, what you are trying to do. You scanner is not a multiple sheet feed scanner, so anything you scan is going to be one at a time anyway; so, why the need, or desire, to write a script?
Phd21: Mint 20 and 19.2 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
User avatar
phd21
Level 19
Level 19
Posts: 9943
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: XSane scans correctly, scanimage do NOT!

Post by phd21 »

Hi dwarflord,

Just FYI:
Install VueScan 9.4.32 in Ubuntu, Linux Mint using instructions in the web link below.

"VueScan is one of the most widely used scanning application available on for the Linux platforms. It works with most high-quality flatbed and film scanners to produce scans that have excellent color fidelity and color balance. It has advanced features for restoring faded colors, batch scanning, and other features used by professional photographers."

http://www.sysads.co.uk/2014/05/install ... inux-mint/
Phd21: Mint 20 and 19.2 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
User avatar
phd21
Level 19
Level 19
Posts: 9943
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: XSane scans correctly, scanimage do NOT!

Post by phd21 »

Hi dwarflord,

FYI: I found a lot more information regarding scanning and Linux Mint that you might find useful.

Linux Scanner SANE project
http://www.sane-project.org/sane-frontends.html

3 tools that make scanning on the Linux desktop quick and easy
http://opensource.com/life/14/8/3-tools ... ux-desktop

Recent post on scanning
http://forum.linuxmint.com/viewtopic.ph ... 9#p1019449
Phd21: Mint 20 and 19.2 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS's, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.
Post Reply

Return to “Printers & Scanners”