However, I have failed to reliably get Vuescan, Linux and the Coolscan to
work together. This applies irrespective of the version of Vuescan and I've
used most of them that have been released over the past 6 weeks or so. Can
I ask for anyone else using this combination to share their experiences?
I was running SuSE 7.0 with an upgraded 2.2.19 kernel, but have now
upgraded to SuSE 7.3 with a 2.4.10 kernel (actually not really an upgrade,
as I did a clean installation after saving all my data). I could upgrade
this to a later 2.4.x kernel on the SuSE web site.
I have tried using both the uhci module and the usb-uhci module (the SuSE
web-site mentions a problem with the uhci module). (The chipset is Intel
and it is a UHCI USB chip.) The machine is a somewhat elderly home
assembled machine based on an Intel 440BX motherboard with Pentium-II
350MHz processor with 384MB memory.
The problems are much the same whether it is the 2.2.19 kernel or the
2.4.10 kernel and whether the uhci module or the usb-uhci module is used.
Typically messages appear in the system log as follows and vuescan hangs
with the scanner light flashing.
Feb 3 23:14:44 abacus kernel: usb_control/bulk_msg: timeout
Feb 3 23:14:44 abacus kernel: scanner.c: write_scanner: NAK received.
Feb 3 23:15:44 abacus kernel: usb_control/bulk_msg: timeout
Feb 3 23:15:44 abacus kernel: scanner.c: write_scanner: NAK received.
Feb 3 23:16:44 abacus kernel: usb_control/bulk_msg: timeout
Feb 3 23:16:44 abacus kernel: scanner.c: write_scanner: NAK received.
Feb 3 23:17:44 abacus kernel: usb_control/bulk_msg: timeout
Feb 3 23:17:44 abacus kernel: scanner.c: write_scanner: NAK received.
Feb 3 23:18:44 abacus kernel: usb_control/bulk_msg: timeout
Feb 3 23:18:44 abacus kernel: scanner.c: write_scanner: NAK received.
Feb 3 23:18:59 abacus kernel: scanner.c: write_scanner: NAK received.
Feb 3 23:18:59 abacus kernel: scanner.c: read_scanner(0): funky
result:-84. Please notify the maintainer.
Any help (or simply reference to a kernel known to work) would be
appreciated.
It pains me that I can make it work in Windows 98 but not Linux!
Stephen
have you tried xsane? what kind of error msg do you get?
jose
The Nikon is not supported by Sane AFAIK. That is why I'm using Vuescan.
The fact that Vuescan claims to support this scanner on Linux was one of
the reasons for choosing this scanner. It does sometimes work for a little
while, but then hangs.
Feb 3 23:14:44 abacus kernel: usb_control/bulk_msg: timeout
Feb 3 23:14:44 abacus kernel: scanner.c: write_scanner: NAK received.
After this I usually have to turn the scanner off and kill the Vuescan
programme.
Stephen
> On Mon, 04 Feb 2002 21:36:10 +0000, S Gooodenough
> <stephe...@no382.uklinux.net> wrote:
>
>>Feb 3 23:18:59 abacus kernel: scanner.c: read_scanner(0): funky
>>result:-84. Please notify the maintainer.
>
> So, did you notify him?
No, but that was partly because I was wondering whether others had had the
same problem or whether I should have updated to a later Linux kernel.
With SuSE7.3 updated to kernel 2.4.16-4GB (the latest available as an RPM
on the SuSE site) I am still getting usb_control/bulk_msg timeouts so I
shall follow that up with the Linux usb community. Although if Ed Hamrick
is lurking in this newsgroup, I would appreciate knowing which distribution
and kernel version he has used or indeed anyone else using this combination
successfully.
Stephen
I have just tried it on a laptop (still running SuSE Linux 7.0 with a
2.2.19 kernel. The behaviour is different in that it fails during a scan,
but the preview runs quickly and correctly. I have a suspicion that I
might have something strange on my machine.
I am having a similar problem with Mandrake 8.1 and Vuescan 7.5.
Initially it seemed to be working fine, then, after a short while it
started chocking on the first image I scan.
I have not looked at the logs yet, but the manifestations are like
this:
At some point during the scan, Vuescan seems to "hang" and stops
responding (no redrawing too). If I turn off the scanner, the Vuescan
dies and /dev/usb/scanner disappers. If I try to do "modprobe -r
scanner" it replies that device is busy. After the reboot it works
through the middle of the first scan.
Seems to be the same kind of problem. I expect in the logs you will find
usb bulk_msg errors or a scanner.o message about funky result or similar!
Just wish I knew how to cure it!
Stephen
> I have been very pleased with using Vuescan on Windows with my Nikon
> Coolscan, but would prefer to use it in Linux as I do most of my work on
> that OS.
>
> However, I have failed to reliably get Vuescan, Linux and the Coolscan
> to work together. This applies irrespective of the version of Vuescan
> and I've used most of them that have been released over the past 6 weeks
> or so. Can I ask for anyone else using this combination to share their
> experiences?
> .
>
> It pains me that I can make it work in Windows 98 but not Linux!
>
> Stephen
Have you tried sane/xsane? If that also doesn't work, the problem is
with the scanner module and not with Vuescan. Of course, that assumes
sane/xsane supports that scanner. You might also try loading the
scanner module with the arguments vendor=... product=... where you fill
in the ...'s appropriately. If you look in /proc/bus/usb/devices, it
should tell you if it recognized the scanner and it will give you the
vendor and product ids. They have to be entered in the form 0xNNNN
as hex numbers.
--
Leonard Evens l...@math.northwestern.edu 847-491-5537
Dept. of Mathematics, Northwestern Univ., Evanston, IL 60208
The scanner is not supported by sane/xsane. I have tried loading the
scanner module with the vendor and product arguments. The problem is that
the scanner will transfer some data (sometimes whole previews, for example)
but doesn't work reliably.
Hi,
same problem here. It seems to be very associated with memory
pressure:
janl@roke ~ $ free
total used free shared buffers cached
Mem: 642956 554396 88560 0 102672 239760
-/+ buffers/cache: 211964 430992
Swap: 995988 5864 990124
When free is lower than the memory vuescan needs for the images
vuescan is more likely to die. The prime reason seems to be that USB
sucks and is quite CPU consuming and timing-sensitive (much like IDE
in the IDE vs. SCSI debates). But the triggering factor is probably
that when you call malloc under Linux it does not mean that the memory
has really been allocated, it's only virtually available. Once
vuescan starts eating memory during scanning the Linux kernel has to
make good on it's promise of memory, and suddenly writing to memory
gets very slow as the kernel starts scanning for memory that can be
free'd up in order to give to vuescan. This trips up the USB stack's
timing, causing the lockups. I've written Ed about this, but have as
of yet not gotten an aswer.
You can do some experiments: Starting with the memory shown above, you
can run a perl command to force Linux to free memory. The amount of
memory freed is about double of the last number in the command
(2x250M=500M, right? :-)
janl@roke ~ $ perl -e '$foo="a"x(1024*1024*250);'
janl@roke ~ $ free
total used free shared buffers cached
Mem: 642956 145500 497456 0 11168 66252
-/+ buffers/cache: 68080 574876
Swap: 995988 60540 935448
Now run vuescan and lockups are much less probable. Try it for
yourself, and if you too find this to be the case please write and
explain it to Ed.
The lockups can be fixed too, if your USB is all loaded modules:
janl@roke ~ $ lsmod
Module Size Used by Not tainted
...
scanner 8576 0
usb-uhci 21280 0 (unused)
usbcore 48640 1 [scanner usb-uhci]
...
then the modules can be unloaded as root, and then reloaded:
janl@roke ~ $ cat /etc/init.d/usb
#! /bin/sh
case "$1" in
start)
modprobe usb-uhci
modprobe scanner
mount /proc/bus/usb
;;
stop)
umount /proc/bus/usb
rmmod scanner
rmmod usb-uhci
rmmod usbcore
;;
restart|reload|reset)
$0 stop
$0 start
;;
esac
If you adjust the module-names according to the list shown by your own
lsmod you should be able to reset the hang without rebooting. This
technique should work with all Linux distributions, unless you've been
compiling your own kernels with non-modular USB.
I've attempted to cure vuescan by meddeling in how it works, replacing
malloc allows us to allocate memory and then at once force Linux to
make good on the promise of memory by reading the memory's contents:
---
janl@roke ~ $ cat janl-malloc.c
#include <stdlib.h>
#include <stdio.h>
void *malloc(size_t size)
{
char *memory;
size_t ix=0;
unsigned char i;
if (size >= 40960) printf("jmalloc(%ld)\n", size);
memory = calloc(1,size);
if (memory == NULL || size < 4096) return memory;
/* Should do a page aligned read here, but, ... I feel to lazy to
figure out the expression for finding the offset */
for (ix=0; ix < size ; ix += 4096) {
i = memory[ix];
}
i = memory[size];
return (void *) memory;
}
---
Compile it:
janl@roke ~ $ gcc -shared janl-malloc.c -o janl-malloc.so
Use it:
janl@roke /local/vuescan $ LD_PRELOAD=~janl/janl-malloc.so ./vuescan
(Of course remember to set the other variables that vuescan needs too)
I haven't stressed this enough that I'm sure it helps though it
_should_, it's been good this far. A way to stress this is running
janl@roke ~ $ find / -type d -print >/dev/null 2>&1
janl@roke ~ $ free
total used free shared buffers cached
Mem: 642956 536572 106384 0 120876 72744
-/+ buffers/cache: 342952 300004
Swap: 995988 60428 935560
this will make Linux allocate memory for buffers and cache reducing
the available free memory. Which I'll be doing :-)
I hope Ed uses malloc and not any other memory allocation method :-)
Nicolai
Thanks for this detailed information. I'll try giving it a go and see what
my mileage is!
Stephen
Could you elaborate a little more how you got your setup to work (either
in the newsgroup or by mail)? I do have a nearly exact "copy" of you
system (Suse 7.3, PII-350, kernel 2.4.10, 384Mb, Nikon LS-40ED).
However, I never got the scanner to work. (more precisely, I got the
scanner to work once, however trying several settings/insmods/etc, and
after a reboot I was not able to get it recognized again...).
Jelle
just for the statistics:
I have a very similar setup with Suse Linux 7.3 and get exactly the same
error
messages.
I just asked Ed about which kernel version is needed to run vuescan and
LS-40.
He replied 'I don't own an LS-40 and I've never used one on Linux'.
I will also try the memory test ...
Andreas
"S Gooodenough" <stephe...@no382.uklinux.net> wrote in message
news:bsum3a...@abacus.computer...
> Feb 3 23:14:44 abacus kernel: usb_control/bulk_msg: timeout
> Feb 3 23:14:44 abacus kernel: scanner.c: write_scanner: NAK received.
> Feb 3 23:15:44 abacus kernel: usb_control/bulk_msg: timeout
> Feb 3 23:15:44 abacus kernel: scanner.c: write_scanner: NAK received.
> Feb 3 23:16:44 abacus kernel: usb_control/bulk_msg: timeout
> Feb 3 23:16:44 abacus kernel: scanner.c: write_scanner: NAK received.
> Feb 3 23:17:44 abacus kernel: usb_control/bulk_msg: timeout
> Feb 3 23:17:44 abacus kernel: scanner.c: write_scanner: NAK received.
> Feb 3 23:18:44 abacus kernel: usb_control/bulk_msg: timeout
> Feb 3 23:18:44 abacus kernel: scanner.c: write_scanner: NAK received.
> Feb 3 23:18:59 abacus kernel: scanner.c: write_scanner: NAK received.
> Feb 3 23:18:59 abacus kernel: scanner.c: read_scanner(0): funky
> result:-84. Please notify the maintainer.
>
> Any help (or simply reference to a kernel known to work) would be
> appreciated.
>
> It pains me that I can make it work in Windows 98 but not Linux!
>
> Stephen
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Mar 18 02:56:10 spoon kernel: usb_control/bulk_msg: timeout
Mar 18 02:56:10 spoon kernel: usb-uhci.c: interrupt, status 3, frame#
1150
Mar 18 02:56:10 spoon kernel: scanner.c: read_scanner(0): funky
result:-75. Consult Documentation/usb/scanner.txt.
Mar 18 02:57:10 spoon kernel: usb_control/bulk_msg: timeout
Mar 18 02:57:10 spoon kernel: usb-uhci.c: interrupt, status 3, frame#
1789
Mar 18 02:57:10 spoon kernel: scanner.c: read_scanner(0): funky
result:-75. Consult Documentation/usb/scanner.txt.
I can usually get one or two good scans after a reboot, before things
go south.
I tried using the malloc replacement below. There was little
noticeable difference, asside from things running a little slower so
memory could be read at allocation time. Same behavior, same error
messages. I don't suppose it would help you to see the messages from
the jmalloc pritf?
-Bam
Nicolai Langfeldt <ja...@tva.ifi.uio.no> wrote in message news:<w47pu32...@tva.ifi.uio.no>...
> ...
> I've attempted to cure vuescan by meddeling in how it works, replacing
> malloc allows us to allocate memory and then at once force Linux to
> make good on the promise of memory by reading the memory's contents:
>
> ---
> janl@roke ~ $ cat janl-malloc.c
> #include <stdlib.h>
> #include <stdio.h>
> ...
the jmalloc patch works for me (vuescan 7.5.10, Suse Linux 7.3, Athlon
800Mhz, 256Mb Ram, usb-uhci). I was now able to preview and scan with
max resolution etc. with vuescan. Thanks for this !
My understanding is that Ed Hamrick should do something in his code to
fix this problem in general, right ?!
I'm still having problems to get the very first scan going. I usually
play around with some options and keep trying to 'preview'. The scanner
starts to focus but in the moment the scan should start, it returns with
'scan ready' (beep and display of image size). If I keep trying suddenly
the scan starts; after the first scan has worked it keeps working ?!?!
Does anyone have an idea what the reason is for this ?
Cheers
Andreas
"Nicolai Langfeldt" <ja...@tva.ifi.uio.no> wrote in message
news:w47pu32...@tva.ifi.uio.no...
>
> this will make Linux allocate memory for buffers and cache reducing
> the available free memory. Which I'll be doing :-)
>
> I hope Ed uses malloc and not any other memory allocation method :-)
>
> Nicolai
I just found the coolscan2 project:
http://coolscan2.sourceforge.net/
which works on a sane backend for the LS-40. Maybe we should give it a
try if the problems with vuescan remain...
"S Gooodenough" <stephe...@no382.uklinux.net> wrote in message
news:1196274.q...@no382.uklinux.net...
> The Nikon is not supported by Sane AFAIK. That is why I'm using Vuescan.
--
Stephan Feder wrote:
> My system is 430HX/PIIX3 and no linux kernel (earliest 2.4.0, latest
> 2.4.18) ever worked (the usual "usb_control/bulk_msg: timeout" which is
> reported on the list over and over again). As you seem to have problems
> using a scanner I attached patches to scanner.c and usb-uhci.c that do
> the job for my setup. If you feel like experimenting just give it a try.
>
> Cheers
> Stephan
>
For the compilation of the modules I choose the following options:
#
CONFIG_USB_BANDWIDTH=y
CONFIG_USB_LONG_TIMEOUT=y
#
With these two options, the LS-40 works fine now (no jmalloc fix needed,
no
patching of the modules scanner.c and usb-uhci.c needed).
My system is an Athlon 800MHz, 256Mb ram, USB UHCI.
I hope this will help others to get their system working with the LS-40.
Good luck,
Andreas
PS: well, there is still a small problem (I think with VueScan this
time): I have to select Auto Focus ´Manual´ in Vuescan, then focus
using Ctrl-U, then preview or scan. If I select e.g. Auto Focus
´Preview´ the scanner is focused but then the preview scan will not
start.
> Stephen,
>
>
> Could you elaborate a little more how you got your setup to work (either
> in the newsgroup or by mail)? I do have a nearly exact "copy" of you
> system (Suse 7.3, PII-350, kernel 2.4.10, 384Mb, Nikon LS-40ED).
> However, I never got the scanner to work. (more precisely, I got the
> scanner to work once, however trying several settings/insmods/etc, and
> after a reboot I was not able to get it recognized again...).
>
>
Well, my problem is that I can get the scanner recognised but not to work
reliably, but elsewhere in this thread there now seems to be hope!
If the scanner isn't recognised, I suspect that the scanner module isn't
loaded and/or you haven't given the appropriate commands to set the
SCANNER0, SCANVID0 and SCANPID0 environment variables that vuescan looks
for. I find that I must (in bash) use the export commands precisely as
described in the vuescan help:
export SCANNER0="/dev/usbscanner"
export SCANVID0="04b0"
export SCANPID0="4000"
I also have the following lines in my /etc/modules.conf file:
options scanner vendor=0x04b0
options scanner product=0x4000
You also need to make sure that the START_USB is set to yes in SuSEconfig
or otherwise ensure that the usb subsystem is started. You may also need
to do (as root) "modprobe scanner" to ensure the scanner module is loaded.
With the above Vuescan certainly recognises the scanner. The problem that
I have as has been reported by others in this thread is that the usb system
produces bulk_msg timeouts and the scanner modules reports funky results!
However, looking at the other posts in this thread it looks as if the
jmalloc patch works for some and an upgrade to kernel 2.4.18 works for
others. The jmalloc patch did not seem to work for me.
Stephen
This didn't seem to give me any additional mileage :-(
Stephen
> Hi,
>
> I just found the coolscan2 project:
> http://coolscan2.sourceforge.net/
> which works on a sane backend for the LS-40. Maybe we should give it a
> try if the problems with vuescan remain...
>
> "S Gooodenough" <stephe...@no382.uklinux.net> wrote in message
> news:1196274.q...@no382.uklinux.net...
>
>> The Nikon is not supported by Sane AFAIK. That is why I'm using Vuescan.
>
>
Presumably if others are now working on a sane backend they may have to get
the similar USB problems sorted so that we might have vuescan AND a sane
backend :-) (One lives in hope ...)
Stephen
> I just asked Ed about which kernel version is needed to run vuescan and
> LS-40.
> He replied 'I don't own an LS-40 and I've never used one on Linux'.
>
Funny, that the Vuescan splash screen shows a scanner looking remarkably
like a Nikon LS-40 or something similar!
Stephen
Got to be worth a try!
Probably a job for next weekend when I might have some time ...
Stephen
> Hi,
> finally I have the LS-40 working with vuescan 7.5.11 under Suse Linux
> 7.3
> but upgraded to the 2.4.18 kernel.
>
> For the compilation of the modules I choose the following options:
> #
> CONFIG_USB_BANDWIDTH=y
> CONFIG_USB_LONG_TIMEOUT=y
> #
> With these two options, the LS-40 works fine now (no jmalloc fix needed,
> no
> patching of the modules scanner.c and usb-uhci.c needed).
> My system is an Athlon 800MHz, 256Mb ram, USB UHCI.
>
> I hope this will help others to get their system working with the LS-40.
>
> Good luck,
> Andreas
>
> PS: well, there is still a small problem (I think with VueScan this
> time): I have to select Auto Focus ?Manual? in Vuescan, then focus
> using Ctrl-U, then preview or scan. If I select e.g. Auto Focus
> ?Preview? the scanner is focused but then the preview scan will not
> start.
>
>
Hoorah, so there's hope!
I assume that 2.4.18 is available on the SuSE site? Presumably you needed
to recompile the kernel because the CONFIG_USB_BANDWIDTH (is this what was
called ENFORCE_USB_BANDWIDTH allocation in 2.4.16?) was turned off?
It's a while since I've dared to kernel builds, but I might pluck up
courage at the weekend if I've had time to do the long download by then!
Stephen
Jelle
So far in this thread there have been suggestions of memory management
problems that can be cured by patched jmalloc routines, modified usb
modules, and updating to 2.4.18 kernel. Others seem to have reported flaky
behaviour where by repeatedly doing previews they seem to get scans to work
and once a scan works it continues to work - which sounds another way of
creeping up on a possible memory allocation problem.
I hope that others have had better mileage than me - Andreas Kaufer seems
to have managed better for sure.
I have now tried all of these with no discernible improvement. This
weekend I updated to a vanilla 2.4.18 kernel downloaded from
www.kernel.org, compiled with effectively the same configuration as SuSE
uses, but with
CONFIG_USB_BANDWIDTH=y
CONFIG_USB_LONG_TIMEOUT=y
as suggested by Andreas.
If anything, the problem now seems more predictable. Previews work, but as
soon as I press the scan button there is a very brief noise from the
scanner followed by silence and the usual messages about funkyresult from
the scanner module and bulk_msg timeout from the usb module.
I have downloaded the very alpha sane backend release
(http://coolscan2.sourceforge.net/). I can get this to work, but it is no
substitute for vuescan yet. However, whilst this backend works fine in 8
bit mode, when I try 12 bit mode I get a couple of failure modes, one of
which is identical to the vuescan problem - namely there is an I/O error
almost immediately. I'm following this up with the author of this backend
and it might shed some light on the vuescan problems.
Stephen
sorry for the false alarm: after the long night with kernel upgrade etc.
things seemed
to work nicely - I was able to scan without problems a large number of
slides (running
gimp and netscape at the same time, both using lots of my 256 Mb memory
...). Now today I try again (after a one week break) and I get exactly
the
same problems and error messages as you describe them !!!
Looks like we are again stuck ... I really don't understand why it could
work perfectly
for a while and then fails again. Your experience that sane fails with
the same problems probably indicates that it's really a problem with the
Linux usb
support and has nothing to do with the scan software itself...
Sorry for making false hopes, I'm completely frustrated now (again) ...
Cheers
Andreas
> I hope that others have had better mileage than me - Andreas Kaufer seems
> to have managed better for sure.
>
> I have now tried all of these with no discernible improvement. This
> weekend I updated to a vanilla 2.4.18 kernel downloaded from
> www.kernel.org, compiled with effectively the same configuration as SuSE
> uses, but with
> CONFIG_USB_BANDWIDTH=y
> CONFIG_USB_LONG_TIMEOUT=y
> as suggested by Andreas.
>
> If anything, the problem now seems more predictable. Previews work, but as
> soon as I press the scan button there is a very brief noise from the
> scanner followed by silence and the usual messages about funkyresult from
> the scanner module and bulk_msg timeout from the usb module.
> Dear Stephen,
>
> sorry for the false alarm: after the long night with kernel upgrade etc.
> things seemed
> to work nicely - I was able to scan without problems a large number of
> slides (running
> gimp and netscape at the same time, both using lots of my 256 Mb memory
> ...). Now today I try again (after a one week break) and I get exactly
> the
> same problems and error messages as you describe them !!!
>
> Looks like we are again stuck ... I really don't understand why it could
> work perfectly
> for a while and then fails again. Your experience that sane fails with
> the same problems probably indicates that it's really a problem with the
> Linux usb
> support and has nothing to do with the scan software itself...
>
> Sorry for making false hopes, I'm completely frustrated now (again) ...
>
> Cheers
> Andreas
>
I agree with you that it looks very much like the usb support which
certainly seems fragile. I'm tempted to try patching to 2.4.18-pre6
because the changelogs show some usb modifications, but probably won't have
a chance before next weekend - I don't like fiddling with kernels when I
don't have a chance of a few undisturbed hours to make sure I do it right
and don't drop the system on the floor (so to speak).
What I find frustrating is that overall the behaviour seems to have got
worse as I've moved to later kernels. It may be wishful thinking now, but
I'm sure I successfully managed a few scans whilst I was still using SuSE
7.0 with a 2.2.x kernel!
Stephen