diff -Nru sane-backends-1.0.27/debian/changelog sane-backends-1.0.27/debian/changelog --- sane-backends-1.0.27/debian/changelog 2019-04-05 15:53:53.000000000 +0000 +++ sane-backends-1.0.27/debian/changelog 2019-08-08 18:27:00.000000000 +0000 @@ -1,3 +1,11 @@ +sane-backends (1.0.27-3.2ubuntu2) eoan; urgency=medium + + * debian/patches/git-fix-discolored-bar-issue.patch: + - Upstream commit to fix issue with discolored bar on Genesys GL847 + scanners (LP: #1731459). + + -- Gunnar Hjalmarsson Thu, 08 Aug 2019 20:27:00 +0200 + sane-backends (1.0.27-3.2ubuntu1) disco; urgency=low * Merge from Debian unstable. Remaining changes: diff -Nru sane-backends-1.0.27/debian/patches/git-fix-discolored-bar-issue.patch sane-backends-1.0.27/debian/patches/git-fix-discolored-bar-issue.patch --- sane-backends-1.0.27/debian/patches/git-fix-discolored-bar-issue.patch 1970-01-01 00:00:00.000000000 +0000 +++ sane-backends-1.0.27/debian/patches/git-fix-discolored-bar-issue.patch 2019-08-08 17:13:33.000000000 +0000 @@ -0,0 +1,91 @@ +Description: Discolored bar on scan CanoLide 200 from 1.0.25 onwards +Origin: https://gitlab.com/sane-project/backends/commit/4354fc7f + Committed upstream 2019-01-21 and included in version 1.0.28 +Bug-Ubuntu: https://launchpad.net/bugs/1731459 +Bug-upstream: https://gitlab.com/sane-project/backends/issues/7 + + +From d609de285b710ca0a9c76c653abee4b8f4315f57 Mon Sep 17 00:00:00 2001 +From: Olaf Meeuwissen +Date: Sun, 16 Dec 2018 21:56:52 +0900 +Subject: [PATCH 1/2] Restore slow_back_home use, disable rewind for gl847 + +See #7. +--- + backend/genesys.c | 12 ++++++++---- + backend/genesys_gl847.c | 2 +- + 2 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/backend/genesys.c b/backend/genesys.c +index 196b2a65..35696261 100644 +--- a/backend/genesys.c ++++ b/backend/genesys.c +@@ -2070,11 +2070,15 @@ genesys_white_shading_calibration (Genesys_Device * dev) + dev->model->cmd_set->set_lamp_power (dev, dev->calib_reg, SANE_TRUE); + dev->model->cmd_set->set_motor_power (dev->calib_reg, motor); + +- /* if needed, go back before doin next scan, by using rewind, registers and +- * slopes table are kept intact from previous scan */ +- if (dev->model->flags & GENESYS_FLAG_SHADING_REPARK && dev->model->cmd_set->rewind) ++ /* if needed, go back before doing next scan */ ++ if (dev->model->flags & GENESYS_FLAG_SHADING_REPARK) + { +- status = dev->model->cmd_set->rewind (dev); ++ /* rewind keeps registers and slopes table intact from previous ++ scan but is not available on all supported chipsets (or may ++ cause scan artifacts, see #7) */ ++ status = (dev->model->cmd_set->rewind ++ ? dev->model->cmd_set->rewind (dev) ++ : dev->model->cmd_set->slow_back_home (dev, SANE_TRUE)); + } + + status = +diff --git a/backend/genesys_gl847.c b/backend/genesys_gl847.c +index 3f9d067a..a9a5163a 100644 +--- a/backend/genesys_gl847.c ++++ b/backend/genesys_gl847.c +@@ -3793,7 +3793,7 @@ static Genesys_Command_Set gl847_cmd_set = { + gl847_led_calibration, + + gl847_slow_back_home, +- gl847_rewind, ++ NULL, /* disable gl847_rewind, see #7 */ + + sanei_genesys_bulk_write_register, + NULL, +-- +2.21.0 + + +From 00d31e14f8a5339a2756af29697ec3c2ff6e7d4d Mon Sep 17 00:00:00 2001 +From: Olaf Meeuwissen +Date: Sun, 16 Dec 2018 22:25:12 +0900 +Subject: [PATCH 2/2] genesys: fix [-Wunused-function] compiler warning + +--- + backend/genesys_gl847.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/backend/genesys_gl847.c b/backend/genesys_gl847.c +index a9a5163a..378c1295 100644 +--- a/backend/genesys_gl847.c ++++ b/backend/genesys_gl847.c +@@ -1934,6 +1934,7 @@ gl847_end_scan (Genesys_Device * dev, Genesys_Register_Set * reg, + * @param dev device to rewind + * @returns SANE_STATUS_GOOD on success + */ ++#if 0 /* disabled to fix #7 */ + GENESYS_STATIC + SANE_Status gl847_rewind(Genesys_Device * dev) + { +@@ -1965,6 +1966,7 @@ SANE_Status gl847_rewind(Genesys_Device * dev) + DBGCOMPLETED; + return SANE_STATUS_GOOD; + } ++#endif + + /** Park head + * Moves the slider to the home (top) position slowly +-- +2.21.0 + diff -Nru sane-backends-1.0.27/debian/patches/series sane-backends-1.0.27/debian/patches/series --- sane-backends-1.0.27/debian/patches/series 2019-03-23 22:14:40.000000000 +0000 +++ sane-backends-1.0.27/debian/patches/series 2019-08-08 17:14:19.000000000 +0000 @@ -25,3 +25,4 @@ #0130-usb-timeout.patch 0715-20-sane.hwdb_multi-arch.patch 0720-mustek_usb2-Avoid-stack-smashing.patch +git-fix-discolored-bar-issue.patch