Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 166375 - media-gfx/sane-backends - xscanimge scans timeout in black; scanimage works
Summary: media-gfx/sane-backends - xscanimge scans timeout in black; scanimage works
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Patrick Kursawe (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-11 17:27 UTC by Johannes Niess
Modified: 2007-04-26 09:35 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Sane bug log ([sane-Bugs][304367] xscanimge scans timeout in black; scanimage works,70.14 KB, text/plain)
2007-02-11 17:29 UTC, Johannes Niess
Details
strace xscanimage (xscanimage.strace,341.52 KB, text/plain)
2007-02-12 20:52 UTC, Johannes Niess
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Niess 2007-02-11 17:27:42 UTC
Hardware: Canon Lide25.
Rejected as sane-bug [#304367].
Maintainer says bug is specific to Gentoo.  Please see attachment for description and sane bug log.
Ebuilds and sources don't work for me.
Comment 1 Johannes Niess 2007-02-11 17:29:43 UTC
Created attachment 109862 [details]
Sane bug log
Comment 2 Johannes Niess 2007-02-11 17:31:34 UTC
Gentoo Base System version 1.12.6
Portage 2.1.1-r2 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.4-r4, 2.6.20 i686)
=================================================================
System uname: 2.6.20 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Last Sync: Sat, 10 Feb 2007 18:50:02 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -mtune=pentium4"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O3 -mtune=pentium4"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache confcache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://pandemonium.tiscali.de/pub/gentoo/ http://85.25.128.62 http://pandemonium.tiscali.de/pub/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ ftp://213.186.33.38/gentoo-distfiles/"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/mnt/data/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 acpi alsa alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1 alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol arts bash-completion berkdb bitmap-fonts bzip2 cdparanoia cdr cli cracklib crypt css cups dba dbase dbm dga dio dlloader dri dvd dvdr dvdread elibc_glibc emacs encode exif fam ffmpeg foomaticdb ftp gd gdbm gif gimp gnutls gphoto2 gpm graphviz gstreamer hal iconv idn imagemagick imap imlib innodb input_devices_keyboard input_devices_mouse ipv6 isdnlog jbig jpeg jpeg2k kde kdeenablefinal kernel_linux lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text libg++ libwww linguas_de lirc lirc_devices_serial lm_sensors logrotate maildir mbox midi mikmod mime mozilla mp3 mpeg ncurses nls nptl nptlonly nsplugin odbc offensive ogg opengl pam pcre pda pdf perl png posix ppds pppd python qt3 readline recode reflection scanner session sharedmem sockets sox spell spl sqlite3 sse2 ssl svg tcpd tetex threads tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU v4l video_cards_radeon vorbis xine xinerama xorg xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 3 Patrick Kursawe (RETIRED) gentoo-dev 2007-02-12 09:11:51 UTC
Could you please check if http://bugs.gentoo.org/show_bug.cgi?id=165315#c3 makes a change for you?
Comment 4 Johannes Niess 2007-02-12 20:52:59 UTC
Created attachment 109995 [details]
strace xscanimage
Comment 5 Johannes Niess 2007-02-12 20:57:27 UTC
That bug triggered me trying old versions. But nothing changed for sources or
ebuilds.

Scanner detection was never a problem for me. The "scanimage" application works
as advertised, including scaning. It is only the frontends (xscanimage, xsane)
that fail. Taking the different ways of working into account should narrow down
the trouble spot. "strace"ing xscanimage has a lot of these lines: "ioctl(6,
USBDEVFS_REAPURBNDELAY, 0xbfe2caa8) = -1 EAGAIN (Resource temporarily
unavailable)". File is attached. I've no idea whether this is expected behavior.
Comment 6 Patrick Kursawe (RETIRED) gentoo-dev 2007-02-26 12:17:26 UTC
I also find a lot of
EACCES (Permission denied)
and
EPERM (Operation not permitted)

You are using both (X frontends and scanimage) from the same user account?
Comment 7 Patrick Kursawe (RETIRED) gentoo-dev 2007-04-24 19:22:31 UTC
I know, I am not the fastest when it comes to replying, but an answer after two months would be nice. Please re-open if you still have the problem and can help.
Comment 8 Johannes Niess 2007-04-25 19:11:19 UTC
Thanks for reminding me. Your question was buried and forgotten when returning from vacation. I'm willing to help but currently I've no clue what could be wrong.

I'm using the same account for scanimage and sane-frontends like xscanimage. The strace looks the same at the end (EAGAIN) for both "root" and "niess" (my not priveledged account). I get the same delay and black scans for both accounts.

Can you shortly describe communication between scanimage and the hardware?
How is it different from the backend/frontend communication? That might give me a clue why one works and the other fails. The sane standard and the 1998 journal article don't help me. I want to make sure I'm not missing something stupid, like access rights, missing sockets, etc.
Comment 9 Johannes Niess 2007-04-25 19:51:41 UTC
I've googled a possible reason why sane developers see this as Gentoo specific.  The kernel selective usb suspend might be the culprit: 
http://lists.alioth.debian.org/pipermail/sane-devel/2007-April/019006.html

Ubuntu users have the same problem and better documentation.
https://launchpad.net/ubuntu/+source/sane-backends/+bug/85488 :

Binary package hint: libsane
In Feisty, using xsane or Kooka, my Canon Lide25 scanner, which uses the plustek backend, does not produce any scanned image, though both gui applications go through the motions (progress dialogs, etc) and produce a black preview. Using the command line 'scanimage' does produce a scan correctly
The scanner works correctly in Edgy.
Fix= disable "usb selective suspend/resume' in linux-source

Now compiling the recommended workaround...
Gentoo should watch and ask for upstream resolution (Kernel or sane-backends)
Comment 10 Johannes Niess 2007-04-25 20:17:16 UTC
CONFIG_SOFTWARE_SUSPEND=y
# CONFIG_USB_SUSPEND is not set

fixes my problems. I was using a self compiled kernel. I'm not shure what gentoo default kernels use. I'm leaving resolution at "reopened" for Patrik to choose.
Comment 11 Patrick Kursawe (RETIRED) gentoo-dev 2007-04-26 09:35:07 UTC
So, I hereby declare this an UPSTREAM problem.
See https://alioth.debian.org/tracker/?group_id=30186&atid=410366&func=detail&aid=304132