Bightness and contrast settings have no effect

Bug #1327801 reported by Heiko L
90
This bug affects 17 people
Affects Status Importance Assigned to Milestone
sane-backends
Fix Released
Unknown
sane-backends (Debian)
Fix Released
Unknown
sane-backends (Ubuntu)
Fix Released
Undecided
Unassigned
simple-scan (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Scanner: Canon, Inc. CanoScan N1240U/LiDE 30
Ubuntu 14.04, Simple Scan version 3.12.1.

Adjusting the settings of brightness and contrast has no effect.

With the default for scanning in "text" mode being too bright, this makes "Simple Scan" in text mode unusable for me.
Brightness and contrast settings don't work in "foto" mode, too. But the default of the foto mode is usable.

Brightness setting does work in program "Skanlite".

Revision history for this message
Ivan Lucchese (ivan-lucchese) wrote :

Scanner: Acer Acerscan 620S, SCSI scanner
Ubuntu 14.04, Simple Scan version 3.12.1

Same here.
In xsane and gscan2pdf brightness and contrast do work.
Adding as attachment an error-log

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in simple-scan (Ubuntu):
status: New → Confirmed
tags: added: brightness contrast
Revision history for this message
Ivan Lucchese (ivan-lucchese) wrote :

As reported in Bug #1340161 (marked as duplicate), the same problem happens with the following scanners:

-Canon Canoscan LIDE 110 (thanks Rik Shaw )
-Canon CanoScan 9000F Mark II (thanks Alexandre (ipipomme) )

Changed in simple-scan:
status: New → Confirmed
Revision history for this message
Etamuk (trmfach) wrote :

I can confirm the problem on this scanners:

Canon Lide 25 (Flat bed scanner
Canon MX 925 (Multi function device)

Simple Scan is great and easy to use. But i miss good scan results for color-scans.

Revision history for this message
penalvch (penalvch) wrote :

Heiko L, thank you for reporting this and helping make Ubuntu better.

To see if this is already resolved, could you please test http://cdimage.ubuntu.com/daily-live/current/ and advise to the results?

no longer affects: simple-scan (Ubuntu)
affects: simple-scan → simple-scan (Ubuntu)
Changed in simple-scan (Ubuntu):
status: Confirmed → Incomplete
importance: Undecided → Low
Revision history for this message
Heiko L (hl1) wrote :

Sorry for the late response.
I tested today's cdimage (daily-live).
Unfortunately, the issue has not changed.
Still: Brightness and contrast settings have no effect.
(Tested with the same old scanner "Canon, Inc. CanoScan N1240U/LiDE 30".)

penalvch (penalvch)
tags: added: trusty yakkety
Changed in simple-scan (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Julien (jlab) wrote :

Hello,
Same problem for me with Canon MP550 (scanner + printer) with Ubuntu Gnome 16.10.
Regards.

Revision history for this message
Rik Shaw (rik-shaw) wrote :

As reported at Bug #1340161 the problem is solved for a Canon LiDE 110 scanner using Ubuntu 16.04 and simple-scan 3.20.0=0ubuntu1

Revision history for this message
Eldon McGuinness (eldon.mcguinness) wrote :

I have the same issue on an HP Photosmart C4795. As mentioned, xsane works just fine.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

I cannot confirm this in bionic with a Canon LiDE 35.

If you are still affected in bionic or later, please speak up.

Revision history for this message
Johann Schoonees (johann-m) wrote :

Same issue in Brother MFC-J470DW: brightness and contrast settings have no effect.
Xubuntu 16.04 LTS 4.4.0-128-generic #154-Ubuntu SMP i686
Simple Scan 3.20.0

Revision history for this message
Light Templar (lighttemplar) wrote :

Same here. Canon MX395,
Ubuntu Bionic, Sane over network,
Simple Scan: 3.28.0 and 3.32.0 - both no effect on those setting.
Skanlite do work.

Revision history for this message
Light Templar (lighttemplar) wrote :
Revision history for this message
Mike Bugaj (mickeybug) wrote :

I have the same problem. I am using Simple Scan 3.28.0 with a Canon PIXMA 2522 printer/scanner. The lighter/darker and contrast sliders do nothing. Printing is fine.

I have swapped the PIXMA with a Canon LIDE60 flatbed scanner and the sliders work perfectly.I have also downloaded ScanGear from Canon and the lighter/darker/contrast sliders work fine with the PIXMA 2522 but I'd rather be using Simple Scan.

I'm using Mint 19.2 Tina w/Cinnamon.

Revision history for this message
Martin (w-martin-h) wrote :

I can confirm this issue with Epson Workforce WF-2835.

Revision history for this message
Martin (w-martin-h) wrote :

It is only an issue with the out of the box drivers, installing the proper Epson drivers and importantly, configuring the Network Plugin, solves the matter for me.
http://download.ebz.epson.net/man/linux/imagescanv3_e.html#sec6-1

Revision history for this message
Michael Glaz (mikeglaz) wrote :

I have the CanonScan LiDE 60 Scanner which I've had for a very long time. The SimpleScan software always worked great out of the box with this scanner...until I upgraded to Ubuntu 20.04. And now, neither the brightness nor the contrast sliders have any effects on my scans.

Revision history for this message
Foo Bar (ub71a5bwcb7kuu1-ekf7jn-b69y0hv8hgzdev3) wrote :

After updating to Mint 20, I have the same issue with my Lide 60. It worked before, and now brightness and contrast settings are ignored.

Revision history for this message
Florian (lokokoze) wrote :

I have the same Problem with my LiDE 60 like Michael.

Revision history for this message
Pat Suwalski (pat-suwalski) wrote :

Like Michael in #17, I noticed that since around 20.04 my Canon LiDE 35 has no brightness-contrast control, making simple-scan unusable for me.

I've worked around by using other software, but it's starting to bug me as more stuff needs to be submitted online in today's world.

Revision history for this message
Pat Suwalski (pat-suwalski) wrote :

Here is some debug output when a scan is initiated.

The brightness and contrast values do seem to apply from the front-end:

[+16.68s] DEBUG: scanner.vala:1674: Scanner.scan ("genesys:libusb:001:010", dpi=600, scan_mode=ScanMode.GRAY, depth=2, type=single, paper_width=2159, paper_height=2794, brightness=-100, contrast=100, delay=3000ms)

(I did set -100 and 100 respectively for this test).

Revision history for this message
Pat Suwalski (pat-suwalski) wrote :

I have tracked the issue down to an upstream issue with sane-backends, with a fix here:

https://gitlab.com/sane-project/backends/-/issues/271

This is not a simple-scan bug.

Changed in simple-scan (Ubuntu):
status: Triaged → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sane-backends (Ubuntu):
status: New → Confirmed
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for your research, Pat. However, on the upstream issue it's stated that the problem is not present on sane-backends 1.0.29, while you say you see it on Ubuntu 20.04 (which includes sane-backends 1.0.29). Are they different issues?

Revision history for this message
Pat Suwalski (pat-suwalski) wrote :

Hi Gunnar,

Perhaps there is a mistake in that report. I certainly witnessed it in 1.0.29 on Ubuntu 20.04 and 20.10. I don't think it was an issue before that version, and it's unlikely to have been, as the revision that broke it was put in October 17, 2019; not certain about which specific release it made it into, though.

My testing is on focal with sane-backends_1.0.29-0ubuntu5.2.dsc, updated with the suggested changes.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I see now that the change which is said to cause the issue was committed on 2019-10-17 while 1.0.29 was released on 2020-02-02. So yes, it's probably a mistake in the issue description.

I tried to apply the change proposed in the upstream issue, but it does not compile: SCAN_FLAG_DISABLE_GAMMA not declared. Can you please let us know exactly how you applied it. Did you possibly compile without warnings?

Revision history for this message
Pat Suwalski (pat-suwalski) wrote :

Sure, I used `dpkg-buildpackage -b``` to build it.

The change was just to remove the offending condition as was suggested:

diff -ur sane-backends-1.0.29.orig/backend/genesys/low.cpp sane-backends-1.0.29/backend/genesys/low.cpp
--- sane-backends-1.0.29.orig/backend/genesys/low.cpp 2021-02-16 17:18:42.000000000 -0500
+++ sane-backends-1.0.29/backend/genesys/low.cpp 2021-02-16 11:10:24.655216925 -0500
@@ -650,12 +650,6 @@
     if ((session.params.flags & ScanFlag::DISABLE_GAMMA) != ScanFlag::NONE) {
         return false;
     }
- if (sensor.gamma[0] == 1.0f || sensor.gamma[1] == 1.0f || sensor.gamma[2] == 1.0f) {
- return false;
- }
- if (session.params.depth == 16)
- return false;
-
     return true;
 }

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks, that's what I thought (which is not exactly the same as in the upstream issue...).

Anyway, I built for focal with that change in this PPA:

https://launchpad.net/~gunnarhj/+archive/ubuntu/sane-backends/+packages

That built successfully. However, the very same change in a fork of the upstream repo results in some failures:

https://gitlab.com/gunnarhj/backends/-/pipelines/257247218

Not sure why they fail. Are you able to tell?

Revision history for this message
Pat Suwalski (pat-suwalski) wrote :

Just looking at the log, it seems that unused-parameter error is enabled. I don't know how your pipeline works, but it's not dpkg-buildpackage, so it makes sense that the default CFLAGS (or CXXFLAGS) is set.

genesys/low.cpp:636:76: error: unused parameter 'sensor' [-Werror=unused-parameter]

You can either change the compiler flags or change the function signature from:

bool should_enable_gamma(const ScanSession& session, const Genesys_Sensor& sensor)

to:

bool should_enable_gamma(const ScanSession& session, const Genesys_Sensor&)

and it should be happy. If that fails too, a less elegant solution is to leave the if condition that uses it in, and make it return true instead of false.

But I don't think that build is important to the distro issue.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Well, it's not my pipeline, it's upstream's ditto.

On 2021-02-17 06:41, Pat Suwalski wrote:
> genesys/low.cpp:636:76: error: unused parameter 'sensor' [-Werror
> =unused-parameter]
>
> You can either change the compiler flags or change the function
> signature from:
>
> bool should_enable_gamma(const ScanSession& session, const
> Genesys_Sensor& sensor)
>
> to:
>
> bool should_enable_gamma(const ScanSession& session, const
> Genesys_Sensor&)

Yep, that's it. Thanks a lot! (I failed to find the actual log yesterday.)

> But I don't think that build is important to the distro issue.

Right, it apparently isn't. But I'm disinclined to propose a fix in Ubuntu only which is not present in Debian and/or upstream. So I submitted a merge request:

https://gitlab.com/sane-project/backends/-/merge_requests/597

Once that (or something to the same effect) has been committed upstream, we can include it in Ubuntu 20.04+.

Revision history for this message
Pat Suwalski (pat-suwalski) wrote :

Ideally, whoever wrote the original patch would be involved, because I assume his gamma fix was pertinent to some piece of hardware available to him, just happened to break the Canon LiDE scanners.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Agreed. Hopefully the merge request will encourage him to attend to the issue. :)

Revision history for this message
Pat Suwalski (pat-suwalski) wrote :

Thank you for doing that.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@Pat: This issue got upstream's attention at last. The upstream fix consists of two commits, and they apply fine in jammy (tested in the PPA), but would require some work for focal.

Changed in sane-backends (Debian):
status: Unknown → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sane-backends - 1.0.32-4ubuntu2

---------------
sane-backends (1.0.32-4ubuntu2) jammy; urgency=medium

  * d/p/genesys-Enable-gamma-setting-when-contrast-or-brightness-.patch,
    d/p/genesys-Store-contrast-and-brightness-adjustments-in-.patch:
    - Fixes brightness and contrast issue (LP: #1327801)
  * Refresh and re-enable d/p/0125-multiarch_dll_search_path.patch
    - Issue described in Debian bug #1002704
    - Fixes regression introduced in Ubuntu 21.10

 -- Gunnar Hjalmarsson <email address hidden> Tue, 28 Dec 2021 18:57:06 +0100

Changed in sane-backends (Ubuntu):
status: Confirmed → Fix Released
Changed in sane-backends (Debian):
status: Confirmed → Fix Released
Changed in sane-backends:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.