Hi, after upgrading from Ubuntu 10.04 (lucid, libsane-1.0.20-13ubuntu2) to ubuntu 12.04 (precise, libsane-1.0.22-7ubuntu1), the scan head of my Scanner stopped returning to its starting position after each scan.
I traced the problem down in sane-backends to commit eba438b9 don't wait head to be parked at end of scan to improve scan speed - issue slow_back_home without wait flag at end of scan - ensure head is parked at scan start and at close - issue slow_back_home before doing digital processing The problem appears to be caused by diff --git a/backend/genesys.c b/backend/genesys.c index f01bb6b..ecdec48 100644 --- a/backend/genesys.c +++ b/backend/genesys.c @@ -8029,7 +8029,7 @@ sane_cancel (SANE_Handle handle) /* park head if flatbed scanner */ if (s->dev->model->is_sheetfed == SANE_FALSE) { - status = s->dev->model->cmd_set->slow_back_home (s->dev, 1); + status = s->dev->model->cmd_set->slow_back_home (s->dev, s->dev->model->flags & GENESYS_FLAG_MUST_WAIT); if (status != SANE_STATUS_GOOD) { DBG (DBG_error, which should probably read status = s->dev->model->cmd_set->slow_back_home (s->dev, s->dev->model->flags && GENESYS_FLAG_MUST_WAIT); The latter reproducibly fixes the problem for me. For completeness I attached two patches: fix-lidescan60-regression-orig-eba438b9.patch -> Fixes the bug where it was originally introduced (commit eba438b9) fix-lidescan60-regression-master_2012-11-19-eb9af2d4.patch -> Fixes the bug in the current master branch (commit eb9af2d4a3) Tested for Canon Lidescan 60 % sane-find-scanner [...] found USB scanner (vendor=0x04a9 [Canon], product=0x221c [CanoScan], chip=GL842) at libusb:002:009 [...] % lsb_release -a LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch:cxx-3.0-ia32:cxx-3.0-noarch:cxx-3.1-ia32:cxx-3.1-noarch:cxx-3.2-ia32:cxx-3.2-noarch:cxx-4.0-ia32:cxx-4.0-noarch:desktop-3.1-ia32:desktop-3.1-noarch:desktop-3.2-ia32:desktop-3.2-noarch:desktop-4.0-ia32:desktop-4.0-noarch:graphics-2.0-ia32:graphics-2.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch:graphics-3.1-ia32:graphics-3.1-noarch:graphics-3.2-ia32:graphics-3.2-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-3.2-ia32:printing-3.2-noarch:printing-4.0-ia32:printing-4.0-noarch:qt4-3.1-ia32:qt4-3.1-noarch Distributor ID: Ubuntu Description: Ubuntu 12.04.1 LTS Release: 12.04 Codename: precise % uname -a Linux georg-ubuntu 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 i686 i386 GNU/Linux There is also a bug report in the tracker #313909 https://alioth.debian.org/tracker/index.php?func=detail&aid=313909&group_id=30186&atid=410366 Thank you for developing sane! Regards, Georg -- PGP-Key: 0x1E320E65 D150 7783 A0D1 7507 1266 C5B3 BBF1 9C42 1E32 0E65 -------------- next part -------------- A non-text attachment was scrubbed... Name: fix-lidescan60-regression-master_2012-11-19-eb9af2d4.patch Type: text/x-patch Size: 563 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20121119/5563cc45/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: fix-lidescan60-regression-orig-eba438b9.patch Type: text/x-patch Size: 522 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20121119/5563cc45/attachment-0001.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 553 bytes Desc: OpenPGP digital signature URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20121119/5563cc45/attachment.pgp>