Opened 21 months ago

Last modified 8 weeks ago

#13644 new bug

Canon multifunction printer - Scan freezes

Reported by: vidrep Owned by: phoudoin
Priority: normal Milestone: Unscheduled
Component: Printing Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #13495
Has a Patch: no Platform: All

Description

hrev51328 x86_64

Canon MP620 Series Multifunction printer

Scanning a page with Sanity front end freezes at about 90% and stays in a loop

Attached screenshot1.png

Attached syslog

Attached listusb

Attachments (7)

screenshot1.png (776.5 KB) - added by vidrep 21 months ago.
syslog (1.3 KB) - added by vidrep 21 months ago.
listusb (2.6 KB) - added by vidrep 21 months ago.
Sanity-1140-debug-07-08-2017-22-51-27.report (53.2 KB) - added by vidrep 21 months ago.
Sanity_terminal.txt (7.6 KB) - added by vidrep 8 months ago.
libusb_terminal.txt (524.3 KB) - added by vidrep 8 months ago.
libusb_debug.txt (1.2 MB) - added by vidrep 8 months ago.

Change History (21)

Changed 21 months ago by vidrep

Attachment: screenshot1.png added

comment:1 Changed 21 months ago by vidrep

Has a Patch: set

Changed 21 months ago by vidrep

Attachment: syslog added

Changed 21 months ago by vidrep

Attachment: listusb added

comment:2 Changed 21 months ago by vidrep

Below is typical output running sane_backend from the CLI:

Welcome to the Haiku shell.

~> scanimage --list-devices device `pixma:04A9172F_164654' is a CANON Canon PIXMA MP620 multi-function peripheral

~> scanimage --format=tiff --verbose --progress > test.tiff

scanimage: scanning image of size 638x877 pixels at 24 bits/pixel

scanimage: acquiring RGB frame

Progress: 93.4%

comment:3 Changed 21 months ago by diver

This is probably a bug in libusb?

comment:4 Changed 21 months ago by pulkomandy

libusb does not do much but forward things to Haiku's USB driver. So it's quite possibly on our side as well.

comment:5 Changed 21 months ago by vidrep

I was able to attach the debugger to Sanity and debug all but one thread. I have attached the report.

comment:6 Changed 21 months ago by pulkomandy

Has a Patch: unset

comment:7 Changed 8 months ago by vidrep

Tested hrev52212 x86_64 using usb_raw driver built from source patchset on Gerrit https://review.haiku-os.org/#/c/haiku/+/453/ and running Sanity from terminal.

With usb_raw driver blacklisted, and custom driver loaded per syslog: KERN: loaded driver /boot/system/non-packaged/add-ons/kernel/drivers/dev/bus/usb_raw

Canon multifunction detects scanner, and now produces a full scan of the document. It no longer sticks at 93.4% complete. However, after completing the scan, it gets stuck in a loop, and the "save as" button is never activated. The scanned document CAN be saved from the File->Save as... drop down menu. The printer LCD readout indicates "scanning..." in a perpetual loop. The saved document appears to be complete.

This is a positive step forward, but not a complete fix of the issue.

Sanity_terminal.txt attached

Changed 8 months ago by vidrep

Attachment: Sanity_terminal.txt added

comment:8 Changed 8 months ago by vidrep

Running scanimage from terminal results in the same as before, so maybe not better...

Welcome to the Haiku shell.

~> scanimage --list-devices device `pixma:04A9172F_164654' is a CANON Canon PIXMA MP620 multi-function peripheral ~> scanimage --format=tiff --verbose --progress > test.tiff scanimage: scanning image of size 638x877 pixels at 24 bits/pixel scanimage: acquiring RGB frame Progress: 93.4%

comment:9 Changed 8 months ago by pulkomandy

Now I'm confused. The driver changes are only a first step. The new ioctl is not used by anything, so at this point is is just dead code and shouldn't change anything to the result. Only when this get merged, and then I update libusb to use it, we will have visible results from this change.

As I mentionned on IRC, running LIBUSB_DEBUG=9 someCommand will get us libusb debug logs in the terminal. This may provide some hints as to what goes wrong.

comment:10 Changed 8 months ago by vidrep

The confusion was mine...

comment:11 Changed 8 months ago by vidrep

I've attached a pair of logs using libusb built from latest souce in haikuports, and running the following commands:

LIBUSB_DEBUG=9 Sanity (selecting all of the visible output in the terminal and pasting to a text file)

LIBUSB_DEBUG=9 Sanity > libusb.txt 2>&1

libusb_terminal.txt for the first instance

libusb_debug.txt for the redirected instance

Changed 8 months ago by vidrep

Attachment: libusb_terminal.txt added

Changed 8 months ago by vidrep

Attachment: libusb_debug.txt added

comment:12 Changed 8 months ago by vidrep

In listusb_terminal.txt "Option 1 - Option 17 load very quickly, then the process stalls for a while before Option 18 - Option 25 complete loading. Only after that is it possible to start the scan, which then freezes at about 95% complete. At this point the only way to kill the process is to power off the printer.

Last edited 8 months ago by vidrep (previous) (diff)

comment:13 Changed 8 weeks ago by vidrep

I believe this is a duplicate ticket of: https://dev.haiku-os.org/ticket/13495

comment:14 Changed 8 weeks ago by pulkomandy

Blocking: 13495 added
Note: See TracTickets for help on using tickets.