Package: xsane
Version: 0.999-5
Severity: normal
Hello!
Last night, I scanned an image using xsane with my USB-connected
printer without difficulty. This morning, I upgraded some packages
with aptitude, and now I can't do so. Here's what I changed:
** Aptitude log:
Aptitude 0.8.10: log report
Mon, Jun 11 2018 18:07:26 +0100
IMPORTANT: this log only lists intended actions; actions which fail
due to dpkg problems may not be completed.
Will install 57 packages, and remove 1 packages.
613 kB of disk space will be used
========================================
[REMOVE, NOT USED] libmaa3:amd64 1.3.2-3+b2
[INSTALL, DEPENDENCIES] libmaa4:amd64 1.4.2-1
[UPGRADE] cups:amd64 2.2.7-5 -> 2.2.8-2
[UPGRADE] cups-bsd:amd64 2.2.7-5 -> 2.2.8-2
[UPGRADE] cups-client:amd64 2.2.7-5 -> 2.2.8-2
[UPGRADE] cups-common:amd64 2.2.7-5 -> 2.2.8-2
[UPGRADE] cups-core-drivers:amd64 2.2.7-5 -> 2.2.8-2
[UPGRADE] cups-daemon:amd64 2.2.7-5 -> 2.2.8-2
[UPGRADE] cups-ipp-utils:amd64 2.2.7-5 -> 2.2.8-2
[UPGRADE] cups-ppdc:amd64 2.2.7-5 -> 2.2.8-2
[UPGRADE] cups-server-common:amd64 2.2.7-5 -> 2.2.8-2
[UPGRADE] default-jdk:amd64 2:1.10-66 -> 2:1.10-67
[UPGRADE] default-jdk-headless:amd64 2:1.10-66 -> 2:1.10-67
[UPGRADE] default-jre:amd64 2:1.10-66 -> 2:1.10-67
[UPGRADE] default-jre-headless:amd64 2:1.10-66 -> 2:1.10-67
[UPGRADE] dict:amd64 1.12.1+dfsg-4 -> 1.12.1+dfsg-4+b1
[UPGRADE] dictd:amd64 1.12.1+dfsg-4 -> 1.12.1+dfsg-4+b1
[UPGRADE] dictzip:amd64 1.12.1+dfsg-4 -> 1.12.1+dfsg-4+b1
[UPGRADE] docbook-to-man:amd64 1:2.0.0-41 -> 1:2.0.0-42
[UPGRADE] encfs:amd64 1.9.2-2+b1 -> 1.9.5-1
[UPGRADE] fonts-urw-base35:amd64 20170801-2 -> 20170801.1-2
[UPGRADE] foomatic-db-compressed-ppds:amd64 20180306-1 -> 20180604-1
[UPGRADE] gap-grape:amd64 4r7+ds-3 -> 4r8+ds-1
[UPGRADE] java-common:amd64 0.66 -> 0.67
[UPGRADE] libcups2:amd64 2.2.7-5 -> 2.2.8-2
[UPGRADE] libcups2:i386 2.2.7-5 -> 2.2.8-2
[UPGRADE] libcupscgi1:amd64 2.2.7-5 -> 2.2.8-2
[UPGRADE] libcupsimage2:amd64 2.2.7-5 -> 2.2.8-2
[UPGRADE] libcupsmime1:amd64 2.2.7-5 -> 2.2.8-2
[UPGRADE] libcupsppdc1:amd64 2.2.7-5 -> 2.2.8-2
[UPGRADE] libdate-manip-perl:amd64 6.71-1 -> 6.72-1
[UPGRADE] libgif7:amd64 5.1.4-2 -> 5.1.4-3
[UPGRADE] libimage-exiftool-perl:amd64 10.97-1 -> 11.00-1
[UPGRADE] liblouis-bin:amd64 3.5.0-2 -> 3.5.0-3
[UPGRADE] liblouis-data:amd64 3.5.0-2 -> 3.5.0-3
[UPGRADE] liblouis14:amd64 3.5.0-2 -> 3.5.0-3
[UPGRADE] libpstoedit0c2a:amd64 3.72-1 -> 3.73-1
[UPGRADE] libx264-155:amd64 3:0.155.2901+git7d0ff22-dmo2 ->
3:0.155.2901+git7d0ff22-dmo3
[UPGRADE] libx264-155:i386 3:0.155.2901+git7d0ff22-dmo2 ->
3:0.155.2901+git7d0ff22-dmo3
[UPGRADE] mencoder:amd64 4:1.3.0~20171022.svn37997-dmo9 ->
4:1.3.0~20171022.svn37997-dmo10
[UPGRADE] mplayer:amd64 4:1.3.0~20171022.svn37997-dmo9 ->
4:1.3.0~20171022.svn37997-dmo10
[UPGRADE] mplayer-doc:amd64 4:1.3.0~20171022.svn37997-dmo9 ->
4:1.3.0~20171022.svn37997-dmo10
[UPGRADE] node-yallist:amd64 2.0.0-1 -> 3.0.2-1
[UPGRADE] psf-unifont:amd64 1:10.0.07-1 -> 1:11.0.01-1
[UPGRADE] pstoedit:amd64 3.72-1 -> 3.73-1
[UPGRADE] python-numpy:amd64 1:1.14.3-2 -> 1:1.14.4-1
[UPGRADE] python-numpy-dbg:amd64 1:1.14.3-2 -> 1:1.14.4-1
[UPGRADE] python-psutil:amd64 5.4.2-1 -> 5.4.6-1
[UPGRADE] python3-numpy:amd64 1:1.14.3-2 -> 1:1.14.4-1
[UPGRADE] python3-numpy-dbg:amd64 1:1.14.3-2 -> 1:1.14.4-1
[UPGRADE] python3-psutil:amd64 5.4.2-1 -> 5.4.6-1
[UPGRADE] python3-redis:amd64 2.10.6-3 -> 2.10.6-4
[UPGRADE] ruby-jekyll-watch:amd64 1.3.0-1 -> 2.0.0-1
[UPGRADE] schroot:amd64 1.6.10-4 -> 1.6.10-5
[UPGRADE] schroot-common:amd64 1.6.10-4 -> 1.6.10-5
[UPGRADE] ttf-unifont:amd64 1:10.0.07-1 -> 1:11.0.01-1
[UPGRADE] unifont:amd64 1:10.0.07-1 -> 1:11.0.01-1
[UPGRADE] xfonts-unifont:amd64 1:10.0.07-1 -> 1:11.0.01-1
========================================
Now, I'm assuming that it is most likely to be something in one of the
cups packages which has caused the problem.
When I start xsane, it offers me two scanners, matching those reported
by scanimage -L:
device `brother4:net1;dev0' is a Brother HomePrinter DCP-9020CDW
device `brother4:bus1;dev3' is a Brother DCP-9020CDW USB scanner
These are the same physical device, but I am trying to use the USB
one. The device is owned by lp:
erdos:~ $ ls -l /dev/bus/usb/002/003
crw-rw-r--+ 1 root lp 189, 130 Jun 11 22:29 /dev/bus/usb/002/003
I am a member of the lp and scanner groups:
erdos:~ $ groups
jdg lp [...] scanner [...]
I looked on the internet for ideas, and figured that it might be a
permissions issue. I already have brscan4 and brscan-skey installed:
$ dpkg -l br\*
[...]
ii brscan-skey 0.2.4-1 amd64 Brother Linux scanner S-KEY tool
ii brscan4 0.4.3-3 amd64 Brother Scanner Driver
So I installed the package from Brother brother-udev-rule-type1 which
adds the following:
/etc/udev/rules.d/60-brother-libsane-type1.rules:
========
#
# udev rules sample for Brother MFP
# version 1.0.0-1
#
# Copyright (C) 2012 Brother. Industries, Ltd.
#
# copy to /etc/udev/rules.d or /lib/udev/rules.d
#
ACTION!="add", GOTO="brother_mfp_end"
SUBSYSTEM=="usb", GOTO="brother_mfp_udev_1"
SUBSYSTEM!="usb_device", GOTO="brother_mfp_end"
LABEL="brother_mfp_udev_1"
SYSFS{idVendor}=="04f9", GOTO="brother_mfp_udev_2"
ATTRS{idVendor}=="04f9", GOTO="brother_mfp_udev_2"
GOTO="brother_mfp_end"
LABEL="brother_mfp_udev_2"
# ATTRS{bInterfaceNumber}=="01", GOTO="brother_mfp_udev_3"
# ATTRS{bInterfaceNumber}=="02", GOTO="brother_mfp_udev_3"
# ATTRS{bInterfaceNumber}=="03", GOTO="brother_mfp_udev_3"
# GOTO="brother_mfp_end"
# LABEL="brother_mfp_udev_3"
ATTRS{bInterfaceClass}!="0ff", GOTO="brother_mfp_end"
ATTRS{bInterfaceSubClass}!="0ff", GOTO="brother_mfp_end"
ATTRS{bInterfaceProtocol}!="0ff", GOTO="brother_mfp_end"
#MODE="0666"
#GROUP="scanner"
ENV{libsane_matched}="yes"
#SYMLINK+="scanner-%k"
LABEL="brother_mfp_end"
========
and as that didn't help (even after rebooting), I added two lines to
the standard libsane rules:
--- /lib/udev/rules.d/60-libsane.rules~ 2017-05-21 09:04:48.000000000 +0100
+++ /lib/udev/rules.d/60-libsane.rules 2018-06-11 21:48:58.448798363 +0100
@@ -1793,6 +1793,8 @@
ATTRS{idVendor}=="413c", ATTRS{idProduct}=="5250", ENV{libsane_matched}="yes"
# Dell Dell 1235cn
ATTRS{idVendor}=="413c", ATTRS{idProduct}=="5310", ENV{libsane_matched}="yes"
+# Brother scanners
+ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"
# The following rule will disable USB autosuspend for the device
ENV{libsane_matched}=="yes", RUN+="/bin/sh -c 'if test -e
/sys/$env{DEVPATH}/power/control; then echo on >
/sys/$env{DEVPATH}/power/control; elif test -e /sys/$env{DEVPATH}/power/level;
then echo on > /sys/$env{DEVPATH}/power/level; fi'"
That didn't help either (even after a reboot). xsane starts fine, but
then when attempting to scan, it says:
Failed to start scanner: Invalid argument
Running the scanimage command works fine however:
erdos:~ $ scanimage -d 'brother4:bus1;dev3' -x 210mm -y 297mm > Desktop/out.ppm
scanimage: rounded value of br-x from 210 to 209.981
scanimage: rounded value of br-y from 297 to 296.973
Running chmod as root to change /dev/bus/usb/002/003 to have
permissions 0666 doesn't make a difference to the xsane failure.
So I'm really stumped.
(Incidentally, I can't open the network variant of the printer even
with scanimage, and I have never been able to do so with xsane - I
have no recollection of trying with scanimage before:
erdos:~ $ scanimage -x 210mm -y 297mm > Desktop/out1.ppm
scanimage: open of device brother4:net1;dev0 failed: Invalid argument
That's why I have used a USB connection until this point.)
Do you have any ideas on what might have changed that is invalidating
the USB connection to the scanner from xsane specifically?
Best wishes,
Julian
-- System Information:
Debian Release: buster/sid
APT prefers stretch
APT policy: (500, 'stretch'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.14.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8) (ignored: LC_ALL
set to en_GB.UTF-8), LANGUAGE=en_GB.utf8 (charmap=UTF-8) (ignored: LC_ALL set
to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages xsane depends on:
ii libc6 2.27-3
ii libgimp2.0 2.8.22-1
ii libglib2.0-0 2.56.1-2
ii libgtk2.0-0 2.24.32-1
ii libjpeg62-turbo 1:1.5.2-2+b1
ii liblcms2-2 2.9-1
ii libpng16-16 1.6.34-1
ii libsane 1.0.25-4.1
ii libtiff5 4.0.9-5
ii xsane-common 0.999-5
ii zlib1g 1:1.2.11.dfsg-1
Versions of packages xsane recommends:
ii cups-client 2.2.8-2
ii elinks [www-browser] 0.12~pre6-13
ii epiphany-browser [www-browser] 3.28.2.1-1
ii firefox [www-browser] 60.0.1-5
ii firefox-esr [www-browser] 52.8.1esr-1~deb9u1
ii google-chrome-stable [www-browser] 67.0.3396.79-1
ii links [www-browser] 2.14-5
ii links2 [www-browser] 2.14-5
ii lynx [www-browser] 2.8.9dev19-1
ii w3m [www-browser] 0.5.3-36+b1
Versions of packages xsane suggests:
ii gimp 2.8.22-1
ii gocr 0.49-2+b1
ii gv 1:3.7.4-1+b1
pn hylafax-client | mgetty-fax <none>
ii tesseract-ocr 4.00~git2481-555f6ffc-1
-- no debconf information