Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insaned freezes the scanner software from time to time #10

Open
MikeX7 opened this issue Jan 11, 2018 · 2 comments
Open

Insaned freezes the scanner software from time to time #10

MikeX7 opened this issue Jan 11, 2018 · 2 comments
Assignees
Labels

Comments

@MikeX7
Copy link

MikeX7 commented Jan 11, 2018

I am not sure what is causing is. It usually happens after I install some unrelated updates with apt get upgrade.
Basically, insaned freezes the scanning tools.
When I try to run scanimage -A or any other command like that, which accesses the scanner, that command will hang forever and never finish. Rebooting the computer doesn't help.

The only way to fix the problem is to remove and then reinstall the insaned with dpkg.

So far it happened twice.

I can't tell you how to duplicate this, because I am not sure what exactly triggers this problem, but I don't have anything unusual installed on the computer, just run of the mill software from official ubuntu repos.

@abusenius
Copy link
Owner

I never have experienced such freezes. I've noticed that only one process can access the scanner at once, e.g. if I try to open scanner dialog in gimp exactly at the time when insaned checks for button presses, gimp cannot connect and shows an error, but it works if I try again afterwards.

Could you please post the output of insaned -L and scanimage -A at the moment when there is no freeze?

It might be that the issue is unrelated to the upgrades and just randomly happens from time to time and you just happened to notice it twice. I have seen random failures during scanning because the scanner pulled too much energy from USB port when USB camera was in use at the same time. Plugging the scanner into an externally powered USB hub helped.

Please follow these steps next time such freeze happens:

  • try to check if insaned is still working by pressing some scanner buttons
  • wait for at least 1 minute
  • then restart insaned to see if it unfreezes everything: sudo systemctl restart insaned
  • if this does not help, try to unplug and plug back again the scanner or turn off and on its power supply if it has one
  • please save the output of commands dmesg and journalctl -xe` afterwards and post the last bunch of messages starting from a few minutes before the freeze happened

@abusenius abusenius self-assigned this Jan 13, 2018
@MikeX7
Copy link
Author

MikeX7 commented Jan 14, 2018

I have discovered the last freeze because I was trying to scan and the buttons didn't do anything. But this doesn't really mean they weren't working, since the buttons trigger a scanimage command line, which if triggered would hang, so I am not sure if the insaned triggered the script or not.
I also replugged the scanner but that did nothing as well.

Next time the freeze happens I will try the dmesg and journalctl, but I am not sure if it will have anything useful, since it can be more than a day before I notice it froze, since I don't scan that often.

 insaned -L
List of sensors for device 'genesys:libusb:001:004':
    copy        [no]
    email       [no]
    file        [no]
    scan        [no]

scanimage -A

All options specific to device `genesys:libusb:001:004':
  Scan Mode:
    --mode Color|Gray|Lineart [Gray]
        Selects the scan mode (e.g., lineart, monochrome, or color).
    --source Flatbed|Transparency Adapter [inactive]
        Selects the scan source (such as a document-feeder).
    --preview[=(yes|no)] [no]
        Request a preview-quality scan.
    --depth 8|16 [8]
        Number of bits per sample, typical values are 1 for "line-art" and 8
        for multibit scans.
    --resolution 4800|2400|1200|600|300|150|100|75dpi [75]
        Sets the resolution of the scanned image.
  Geometry:
    -l 0..216mm [0]
        Top-left x position of scan area.
    -t 0..300mm [0]
        Top-left y position of scan area.
    -x 0..216mm [216]
        Width of scan-area.
    -y 0..300mm [300]
        Height of scan-area.
  Enhancement:
    --custom-gamma[=(yes|no)] [no]
        Determines whether a builtin or a custom gamma-table should be used.
    --gamma-table 0..65535,... [inactive]
        Gamma-correction table.  In color mode this option equally affects the
        red, green, and blue channels simultaneously (i.e., it is an intensity
        gamma table).
    --red-gamma-table 0..65535,... [inactive]
        Gamma-correction table for the red band.
    --green-gamma-table 0..65535,... [inactive]
        Gamma-correction table for the green band.
    --blue-gamma-table 0..65535,... [inactive]
        Gamma-correction table for the blue band.
    --swdeskew[=(yes|no)] [no]
        Request backend to rotate skewed pages digitally
    --swcrop[=(yes|no)] [no]
        Request backend to remove border from pages digitally
    --swdespeck[=(yes|no)] [no]
        Request backend to remove lone dots digitally
    --despeck 1..9 (in steps of 1) [inactive]
        Maximum diameter of lone dots to remove from scan
    --swskip 0..100% (in steps of 1) [0]
        Request driver to discard pages with low numbers of dark pixels
    --swderotate[=(yes|no)] [no]
        Request driver to detect and correct 90 degree image rotation
    --brightness -100..100 (in steps of 1) [0]
        Controls the brightness of the acquired image.
    --contrast -100..100 (in steps of 1) [0]
        Controls the contrast of the acquired image.
  Extras:
    --lamp-off-time 0..60 [15]
        The lamp will be turned off after the given time (in minutes). A value
        of 0 means, that the lamp won't be turned off.
    --lamp-off-scan[=(yes|no)] [no]
        The lamp will be turned off during scan.
    --threshold 0..100% (in steps of 1) [50]
        Select minimum-brightness to get a white point
    --threshold-curve 0..127 (in steps of 1) [50]
        Dynamic threshold curve, from light to dark, normally 50-65
    --disable-dynamic-lineart[=(yes|no)] [no]
        Disable use of a software adaptive algorithm to generate lineart
        relying instead on hardware lineart.
    --disable-interpolation[=(yes|no)] [no]
        When using high resolutions where the horizontal resolution is smaller
        than the vertical resolution this disables horizontal interpolation.
    --color-filter Red|Green|Blue [Green]
        When using gray or lineart this option selects the used color.
    --calibration-file <string> [/home/mike/.sane/canon-lide-120.cal]
        Specify the calibration file to use
    --expiration-time -1..30000 (in steps of 1) [60]
        Time (in minutes) before a cached calibration expires. A value of 0
        means cache is not used. A negative value means cache never expires.
  Sensors:
    --scan[=(yes|no)] [no] [hardware]
        Scan button
    --file[=(yes|no)] [no] [hardware]
        File button
    --email[=(yes|no)] [no] [hardware]
        Email button
    --copy[=(yes|no)] [no] [hardware]
        Copy button
  Buttons:
    --clear-calibration
        Clear calibration cache

@abusenius abusenius added the bug label Jul 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants