Scanner not detected when connected after program start

Bug #499416 reported by Jeroen Hoek
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Simple Scan
Fix Released
Undecided
Unassigned
simple-scan (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Turning on my scanner when simple scan is already running does not make it show up in the list of scanners. Perhaps a "rescan devices" button can be added to the preferences if automatically detecting them isn't possible?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Simple scan should be checking every second for new scanners, can you please run simple-scan --debug and attach the output?

Changed in simple-scan:
importance: Undecided → Wishlist
status: New → Triaged
importance: Wishlist → Low
status: Triaged → Incomplete
Revision history for this message
staedtler-przyborski (staedtler-przyborski-deactivatedaccount) wrote :

My guess is:

This is a SCSI Scanner which can't be detected unless a re-scan of the SCSI bus is done.

Revision history for this message
Jeroen Hoek (mail-jeroenhoek) wrote :

#2:
No, this is a USB printer/scanner combination. Brother DCP-165C.

Robert:

freaknl@sakuya:~$ simple-scan --debug
** (simple-scan:3075): DEBUG: Restoring window to 931x719 pixels
** (simple-scan:3075): DEBUG: sane_init ()
** (simple-scan:3075): DEBUG: SANE version 1.0.20
** (simple-scan:3075): DEBUG: sane_get_devices ()
WARNING: Unhandled message: interface=org.freedesktop.DBus.Introspectable, path=/, member=Introspect
** (simple-scan:3075): DEBUG: sane_get_devices ()
** (simple-scan:3075): DEBUG: sane_get_devices ()
** (simple-scan:3075): DEBUG: sane_get_devices ()
[...]
** (simple-scan:3075): DEBUG: sane_get_devices ()
** (simple-scan:3075): DEBUG: Saving device cache
** (simple-scan:3075): DEBUG: Storing device 'v4l:/dev/video0' in cache
** (simple-scan:3075): DEBUG: Storing device 'v4l:/dev/video1' in cache
** (simple-scan:3075): DEBUG: Stopping scan thread
** (simple-scan:3075): DEBUG: sane_exit ()

The sane_get_devices() line is repeated until quitting the application. The scanner won't show up in the preferences dialogue though. It's there as soon as I close and restart simple-scan. The two v4l devices are webcams (built-in and external).

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Could you please try again with Simple Scan >0.9? Also please attach the full logs of when it does and doesn't detect the scanner:
simple-scan -d >scan.log
Thanks!

Revision history for this message
Jeroen Hoek (mail-jeroenhoek) wrote :

Same issue. The reverse appears to be true too; turning off the printer (with scanner component) doesn't make it disappear from the list. This is a Brother DCP-165C. Scanning works as expected when simple-scan is launched after turning on the device.

I'll try with my Canon USB scanner later today.

Revision history for this message
Jeroen Hoek (mail-jeroenhoek) wrote :

Output seen after turning the device on:

** (simple-scan:4941): DEBUG: Requesting redetection of scan devices
** (simple-scan:4941): DEBUG: Processing request
** (simple-scan:4941): DEBUG: sane_get_devices () -> SANE_STATUS_GOOD
** (simple-scan:4941): DEBUG: Device: name="v4l:/dev/video1" vendor="Noname" model="UVC Camera (046d:0992)" type="virtual device"
** (simple-scan:4941): DEBUG: Device: name="v4l:/dev/video0" vendor="Noname" model="USB2.0 1.3M UVC WebCam" type="virtual device"
** (simple-scan:4941): DEBUG: Stopping scan thread
** (simple-scan:4941): DEBUG: Processing request

Again, those are the two (internal laptop and external) webcams. They work as expected, although they make for lousy scanners.

Revision history for this message
Robert Ancell (robert-ancell) wrote : Re: Scanner not detected when connected [Brother DCP-165C]

Could you please run:
$ udevadm monitor
and connect and disconnect your scanner. Also check other USB devices generate events

summary: - Scanners turned on after simple scan is started don't show up in the
- list of scanners
+ Scanner not detected when connected [Brother DCP-165C]
Revision history for this message
Jeroen Hoek (mail-jeroenhoek) wrote :
Download full text (6.6 KiB)

Output for the USB printer/scanner (Brother DCP-165C)

monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

# Device turned on.

KERNEL[1266312220.140998] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1 (usb)
KERNEL[1266312220.142408] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.0 (usb)
KERNEL[1266312220.142459] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.1 (usb)
KERNEL[1266312220.142502] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2 (usb)
UDEV [1266312220.150625] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1 (usb)
UDEV [1266312220.163949] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.1 (usb)
KERNEL[1266312220.201168] add /module/usblp (module)
UDEV [1266312220.201395] add /module/usblp (module)
KERNEL[1266312220.205525] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.0/usb/lp0 (usb)
UDEV [1266312220.205574] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.0 (usb)
KERNEL[1266312220.205609] add /bus/usb/drivers/usblp (drivers)
UDEV [1266312220.213242] add /bus/usb/drivers/usblp (drivers)
UDEV [1266312220.214275] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.0/usb/lp0 (usb)
KERNEL[1266312220.230972] add /module/usb_storage (module)
UDEV [1266312220.231020] add /module/usb_storage (module)
KERNEL[1266312220.255697] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2/host5 (scsi)
UDEV [1266312220.255761] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2 (usb)
KERNEL[1266312220.255799] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2/host5/scsi_host/host5 (scsi_host)
KERNEL[1266312220.255833] add /bus/usb/drivers/usb-storage (drivers)
UDEV [1266312220.261505] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2/host5 (scsi)
UDEV [1266312220.261555] add /bus/usb/drivers/usb-storage (drivers)
UDEV [1266312220.261589] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2/host5/scsi_host/host5 (scsi_host)
KERNEL[1266312225.284441] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2/host5/target5:0:0 (scsi)
KERNEL[1266312225.284500] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2/host5/target5:0:0/5:0:0:0 (scsi)
KERNEL[1266312225.284537] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2/host5/target5:0:0/5:0:0:0/scsi_disk/5:0:0:0 (scsi_disk)
KERNEL[1266312225.284573] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2/host5/target5:0:0/5:0:0:0/scsi_device/5:0:0:0 (scsi_device)
KERNEL[1266312225.289318] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2/host5/target5:0:0/5:0:0:0/scsi_generic/sg2 (scsi_generic)
UDEV [1266312225.289368] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2/host5/target5:0:0 (scsi)
UDEV [1266312225.289407] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2/host5/target5:0:0/5:0:0:0 (scsi)
UDEV [1266312225.289442] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2/host5/target5:0:0/5:0:0:0/scsi_device/5:0:0:0 (scsi_device)
UDEV [1266312225.291273] add /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.2/hos...

Read more...

Revision history for this message
Jeroen Hoek (mail-jeroenhoek) wrote :

Attached output is what happens when I unplug and reattach a USB hub with four devices on it (webcam, keyboard, mouse, headset).?field.comment=Attached output is what happens when I unplug and reattach a USB hub with four devices on it (webcam, keyboard, mouse, headset).

Revision history for this message
Jeroen Hoek (mail-jeroenhoek) wrote :

Launchpad did something weird to the above comment when I added the attachment; ignore the duplicated bit after "?field".

Changed in simple-scan:
status: Incomplete → New
YannUbuntu (yannubuntu)
summary: - Scanner not detected when connected [Brother DCP-165C]
+ Scanner not detected when connected
Revision history for this message
YannUbuntu (yannubuntu) wrote : Re: Scanner not detected when connected

Same problem on Epson PM-A820 (multifunction). Simple Scan 2.31.91 :
1) when I start Simple Scan before pluggin my scanner, the scanner is not detected unless I restart SimpleScan.
2) If I plug my scanner, then start SimpleScan, everything is fine. Then if I unplug my scanner, after few seconds SimpleScan warns "No scanner detected", which I think is normal. Then if I plug again the scanner, the "No scanner detected" warning does not disappear, and if I click on the "Scan" button, the "Failed to scan" error message appears.

Revision history for this message
YannUbuntu (yannubuntu) wrote :

Complementary informations:
- my scanner is USB type

1) when I start Simple Scan before pluggin my scanner, the scanner is not detected :
$ LANG=C simple-scan --debug
** (simple-scan:3696): DEBUG: Starting Simple Scan 2.31.91, PID=3696
** (simple-scan:3696): DEBUG: Restoring window to 649x400 pixels
** (simple-scan:3696): DEBUG: sane_init () -> SANE_STATUS_GOOD
** (simple-scan:3696): DEBUG: SANE version 1.0.21
** (simple-scan:3696): DEBUG: Requesting redetection of scan devices
** (simple-scan:3696): DEBUG: Processing request
** (simple-scan:3696): DEBUG: sane_get_devices () -> SANE_STATUS_GOOD

Then if I plug my scanner:
** (simple-scan:3696): DEBUG: Requesting redetection of scan devices
** (simple-scan:3696): DEBUG: Processing request
** (simple-scan:3696): DEBUG: sane_get_devices () -> SANE_STATUS_GOOD

(I still have the "No scanner detected" message", and "Scan" button fails to scan)

2) If I plug my scanner then start SimpleScan:
$ LANG=C simple-scan --debug
** (simple-scan:3774): DEBUG: Starting Simple Scan 2.31.91, PID=3774
** (simple-scan:3774): DEBUG: Restoring window to 649x400 pixels
** (simple-scan:3774): DEBUG: sane_init () -> SANE_STATUS_GOOD
** (simple-scan:3774): DEBUG: SANE version 1.0.21
** (simple-scan:3774): DEBUG: Requesting redetection of scan devices
** (simple-scan:3774): DEBUG: Processing request
** (simple-scan:3774): DEBUG: sane_get_devices () -> SANE_STATUS_GOOD
** (simple-scan:3774): DEBUG: Device: name="epson2:libusb:001:013" vendor="Epson" model="PM-A820" type="flatbed scanner"

then unplug the scanner:
** (simple-scan:3774): DEBUG: Requesting redetection of scan devices
** (simple-scan:3774): DEBUG: Processing request
** (simple-scan:3774): DEBUG: sane_get_devices () -> SANE_STATUS_GOOD

then plug it again:
** (simple-scan:3774): DEBUG: Requesting redetection of scan devices
** (simple-scan:3774): DEBUG: Processing request
** (simple-scan:3774): DEBUG: sane_get_devices () -> SANE_STATUS_GOOD
** (simple-scan:3774): DEBUG: Device: name="epson2:libusb:001:013" vendor="Epson" model="PM-A820" type="flatbed scanner"

hee??? this time it worked. I repeated successfully twice. I tried again the procedure : at third time I had the following crash :

** (simple-scan:4028): DEBUG: Requesting redetection of scan devices
** (simple-scan:4028): DEBUG: Processing request
** (simple-scan:4028): DEBUG: sane_get_devices () -> SANE_STATUS_GOOD
** (simple-scan:4028): DEBUG: Requesting redetection of scan devices
** (simple-scan:4028): DEBUG: Processing request
Erreur de segmentation (core dumped)

(apport appeared but failed in opening a Launchpad page)

Revision history for this message
YannUbuntu (yannubuntu) wrote :
Download full text (9.3 KiB)

I close SimpleScan, disconnect the scanner, then launch "udevadm monitor" :
$ udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

Then I connect my scanner :
KERNEL[1288241931.390942] remove /devices/pci0000:00/0000:00:13.0/usb2/2-2/2-2:1.0/usb/hiddev0 (usb)
KERNEL[1288241931.391017] remove /class/usb (class)
KERNEL[1288241931.391065] remove /devices/pci0000:00/0000:00:13.0/usb2/2-2/2-2:1.0/0003:2101:0201.000E/hidraw/hidraw0 (hidraw)
KERNEL[1288241931.391194] remove /devices/pci0000:00/0000:00:13.0/usb2/2-2/2-2:1.0/0003:2101:0201.000E (hid)
KERNEL[1288241931.391250] remove /devices/pci0000:00/0000:00:13.0/usb2/2-2/2-2:1.0 (usb)
KERNEL[1288241931.391308] remove /devices/pci0000:00/0000:00:13.0/usb2/2-2 (usb)
UDEV [1288241931.397824] remove /devices/pci0000:00/0000:00:13.0/usb2/2-2/2-2:1.0/usb/hiddev0 (usb)
UDEV [1288241931.397886] remove /class/usb (class)
UDEV [1288241931.401398] remove /devices/pci0000:00/0000:00:13.0/usb2/2-2/2-2:1.0/0003:2101:0201.000E/hidraw/hidraw0 (hidraw)
UDEV [1288241931.406700] remove /devices/pci0000:00/0000:00:13.0/usb2/2-2/2-2:1.0/0003:2101:0201.000E (hid)
UDEV [1288241931.408624] remove /devices/pci0000:00/0000:00:13.0/usb2/2-2/2-2:1.0 (usb)
UDEV [1288241931.414562] remove /devices/pci0000:00/0000:00:13.0/usb2/2-2 (usb)
KERNEL[1288241932.040298] add /devices/pci0000:00/0000:00:13.2/usb1/1-3 (usb)
KERNEL[1288241932.048414] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.0 (usb)
KERNEL[1288241932.049055] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.1 (usb)
KERNEL[1288241932.057449] add /class/usb (class)
UDEV [1288241932.057511] add /class/usb (class)
KERNEL[1288241932.057562] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.1/usb/lp0 (usb)
KERNEL[1288241932.061697] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.2 (usb)
KERNEL[1288241932.078207] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.2/host16 (scsi)
KERNEL[1288241932.078284] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.2/host16/scsi_host/host16 (scsi_host)
UDEV [1288241932.095639] add /devices/pci0000:00/0000:00:13.2/usb1/1-3 (usb)
UDEV [1288241932.103123] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.2 (usb)
UDEV [1288241932.105058] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.2/host16 (scsi)
UDEV [1288241932.108403] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.2/host16/scsi_host/host16 (scsi_host)
UDEV [1288241932.128137] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.0 (usb)
UDEV [1288241932.149813] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.1 (usb)
UDEV [1288241932.191906] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.1/usb/lp0 (usb)
KERNEL[1288241937.084169] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.2/host16/target16:0:0 (scsi)
UDEV [1288241937.085726] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.2/host16/target16:0:0 (scsi)
KERNEL[1288241937.086324] add /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.2/host16/target16:0:0/16:0:0:0 (scsi)...

Read more...

Revision history for this message
Michael Nagel (nailor) wrote :

I am currently sorting all Simple Scan bugs, and would like to know if this is still an issue. Any news?

Changed in simple-scan:
status: New → Incomplete
Revision history for this message
Jeroen Hoek (mail-jeroenhoek) wrote :

Can reproduce; I have to plug in the scanner before launching Simple Scan. Unplugging while Simple Scan is open crashes Simple Scan. Plugging it in when Simple Scan is running does nothing, and Simple Scan does not see the scanner until the application is restarted.

Revision history for this message
Michael Nagel (nailor) wrote :

OK, it seems Simple Scan device detection only works on startup. but adding/removing scanners at runtime goes unnoticed, even though there is code that should handle this.

Is this code completely broken as in "never worked in the first place" or is it failing under certain circumstances/only for specific hardware? Has anyone seen adding/removing scanners work with Simple Scan?

Revision history for this message
Jeroen Hoek (mail-jeroenhoek) wrote :

I reported the orignal bug based on my experience with a USB-printer/scanner combo from Brother (DCP 165C), but although that printer still works, I have not managed to get the scanner driver working again since Maverick. My other scanner however, a USB Canon which is supported by the open-source sane drivers rather than Brother's broken proprietary stuff, shows the same behaviour though, now and then.

Revision history for this message
Rochelle McIntosh (kittenf37) wrote :

I need to know if i have a virus on my computer and if so can you get rid of it please and thankyou

affects: simple-scan → ubuntu
Changed in ubuntu:
assignee: nobody → Rochelle McIntosh (kittenf37)
status: Incomplete → New
status: New → Invalid
Revision history for this message
Philip Muškovac (yofel) wrote :

Resetting the status

affects: ubuntu → simple-scan (Ubuntu)
Changed in simple-scan (Ubuntu):
assignee: Rochelle McIntosh (kittenf37) → nobody
status: Invalid → Incomplete
Michael Nagel (nailor)
summary: - Scanner not detected when connected
+ Scanner not detected when connected after program start
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for simple-scan (Ubuntu) because there has been no activity for 60 days.]

Changed in simple-scan (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Lalo Martins (lalo.martins) wrote :

How did this expire? IMO it's the most important bug of “simple scan”; it's the only one I ever noticed, and it kind of defeats the “simple” description. Most of the time I open the program first and *then* turn the scanner on… there's no reason why that shouldn't be supported.

Note, the original description no longer applies 100% — there's no “list of scanners” anymore, anywhere in the UI. It simply says there are no scanners, and if you turn it on or connect after the app is running, there's no way to detect it.

Changed in simple-scan (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Robert Ancell (robert-ancell) wrote :

@lalo.martins - this bug refers to behaviour in an old version of simple-scan. Could you please open a new bug if you have issues with recent versions of simple-scan and your scanner.

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

Other bug subscribers

Related questions

Bug attachments

Remote bug watches

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