# Camera freeze:"waiting for device to settle before scanning"

## NoOrdinary

Hi

I have Panasonic Lumix DMC-FZ8 digital camera that used to work just fine in Gentoo. I haven't transfered any pictures for quite some time now (month or so) and I guess something important changed in that time, but I can't figure what. If I plug and power on camera now it appear in lsusb while dmesg ends with "usb-storage: waiting for device to settle before scanning" and that's. Camera stay at "connecting to PC..." that should normally take just couple of seconds.

```
pikmin ~ # lsusb

Bus 001 Device 001: ID 0000:0000

Bus 002 Device 004: ID 04da:2372 Panasonic (Matsushita) Lumix DMC-FZ10 Camera

Bus 002 Device 002: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Bus 002 Device 001: ID 0000:0000
```

(it's normal that it appear as DMC-FZ10, it worked anyway)

```
pikmin ~ # dmesg | tail -n 5

usb 2-6: new full speed USB device using ohci_hcd and address 4

usb 2-6: configuration #1 chosen from 1 choice

scsi5 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 4

usb-storage: waiting for device to settle before scanning
```

Other USB devices such as iPod are working and I can connect camera on same PC, same USB port in windows without problems, except that it's barely usable because extremely bad transfer rate in Vista.

I upgraded kernel yesterday because that security exploit so I double checked all options and recompiled kernel again, then I tried and booted into old kernel that used to work 100%, same thing. I have all USB drivers (EHCI,OHCI), mass storage support, SCSI disk /generic support... enabled. I'm running stable amd64 arch (no system package is from ~arch).

```
pikmin package.keywords # cat keywords

kde-misc/kdmtheme

x11-misc/electricsheep

app-emulation/vmware-server

dev-util/kdevelop

kde-misc/katapult

net-www/netscape-flash

media-video/vlc

media-libs/faad2

net-www/nspluginwrapper
```

I also tried to upgrade (and downgrade) udev and libgphoto2, same result, just yesterday after I upgraded libgphoto2 camera actually  got connected, but with error "attempt to access beyond end of device", however today I can't reproduce that, and I have downgraded and upgraded libgphoto2 again.

Thanks for any help, I'm kinda without ideas.

----------

## NoOrdinary

Small update. 

I have found cause of problem is KDE, but don't know what part. It make sense, because one of updates was also 3.5.7 -> 3.5.8. If I log out from KDE session and power on camera I can mount it from console, access files on it ect., if I leave it mounted and log back to KDE "mass storage device" icon appear on desktop but as soon as I click it or I want to download pictures with digikam it just disappear.

I want to fill bug report, just I'm kinda clueless about what  :Smile:  Just KDE in general, what info do I need to provide? Any help appreciated (even better would be solution to problem).

And dunno, should this be moved to Desktop Environments?

----------

## NoOrdinary

Still same problem with kernel 2.6.24-gentoo-r4 and kde 4.0.3. "Connectiong to PC" message on camera, KDE pop-up what I want to do, but whatever option I chose same happen, can't connect, check if camera is connected... It's really annoying me, I haven't transfered any pictures on computer for ages. Should I annoy kernel or KDE ppl with this problem, where/what to look for?

----------

## stanislaw

Hi NoOrdinary,

I seem to have the same problem with a Panasonic DMC-FX01. It appeared since I installed digikam (with all it's pulled in dependencies). Before that, transferring via normal USB Mass Storage was no problem.

Tell me, how I can help you.

If nothing helps, I'm going to unmerge digikam again.

----------

## stanislaw

An

```

emerge --unmerge digikam

```

and removing it's dependencies afterwards with

```

emerge -a --unmerge dcraw libgphoto2 kgamma libkipi kamera media-libs/libkexiv2 media-libs/libkdcraw

```

seemed to help. I'll confirm, after restarting KDE.

----------

## stanislaw

Ok, I can partitially confirm, that this works. But now KDE fails to offer me a dialog, what I want to do with the plugged in camera (Lumix plugged in, turned on, chosen "PC access"). I have to mount it manually as root. I've to admit, that I didn't try a lot. Hopefully the packages above I mentioned can help you to sort out your problem. Let me know, if you did!

[EDIT]After a complete reboot, KDE now offers me a dialog, where I can choose to open the medium. It works again.[/EDIT]

----------

## msmyth

I also ran into the same problem, with the same symptoms as the other two posters have described. I happen to have two different computer systems, one of which had this problem and one which didn't. The systems are different, but they do have all the same versions of the libraries/digikam that I would suspect as causing this new problem of not recognizing my camera. 

Looking in more detail, I found that the system that is not working I had plugdev group permission for my user account, and on the system that was working I did not.

I removed plugdev group permissions for every user except haldaemon on the system that was not working (if you haven't done this before, just edit /etc/group, log out and back in), and now the system correctly recognizes my camera when I plug it in.

I'm not sure why this fixed the problem. I'm guessing something or other was running from user account when I log into KDE that was interfering with recognizing my camera. By removing permissions, my guess is whatever this process is no longer can cause this problem.

I'd be interested if anybody has a better explanation for why removing plugdev permissions fixes this problem.

----------

## stanislaw

Before removing my username from the plugdev group, do I have to add my username to the haldaemon group instead? Or something else?

----------

## msmyth

No, you can just remove your username from plugdev without adding it to any other groups.

----------

## stanislaw

I think, I found something interesting, after emerging digikam:

```

 * Messages for package media-libs/libgphoto2-2.4.1:

 * NOTICE: Upstream will not support you if you do not compile all camera drivers first

 * Don't forget to add yourself to the plugdev group

 * if you want to be able to access your camera.

```

I suppose, that's why I'm in this group.

I'm going to try to access the camera. Let's see ...

----------

## stanislaw

Ok, here is what I experienced, in chronological order:

 emerging digikam:

```

# emerge -va digikam

These are the packages that would be merged, in order:

Calculating dependencies... done![/list]

[ebuild  N    ] media-libs/libgphoto2-2.4.1  USE="-doc -exif hal nls" CAMERAS="-adc65 -agfa_cl20 -aox -barbie -canon -casio_qv -clicksmart310 -digigr8 -digita -dimagev -dimera3500 -directory -enigma13 -fuji -gsmart300 -hp215 -iclick -jamcam -jd11 -kodak_dc120 -kodak_dc210 -kodak_dc240 -kodak_dc3200 -kodak_ez200 -konica -konica_qm150 -largan -lg_gsm -mars -mustek -panasonic_coolshot -panasonic_dc1000 -panasonic_dc1580 -panasonic_l859 -pccam300 -pccam600 -polaroid_pdc320 -polaroid_pdc640 -polaroid_pdc700 -ptp2 -ricoh -ricoh_g3 -samsung -sierra -sipix_blink -sipix_blink2 -sipix_web2 -smal -sonix -sony_dscf1 -sony_dscf55 -soundvision -spca50x -sq905 -stv0674 -stv0680 -sx330z -template -toshiba_pdrm11" 3,412 kB

[ebuild  N    ] media-libs/libkipi-0.1.5  USE="arts -debug -kdehiddenvisibility xinerama" 0 kB

[ebuild  N    ] media-libs/libkexiv2-0.1.5  USE="arts -debug xinerama" 0 kB

[ebuild  N    ] kde-base/kgamma-3.5.9  USE="arts -debug -kdeenablefinal xinerama" 0 kB

[ebuild  N    ] media-gfx/dcraw-8.73  USE="gimp" 0 kB

[ebuild  N    ] media-libs/libkdcraw-0.1.1  USE="arts -debug xinerama" 0 kB

[ebuild  N    ] kde-base/kamera-3.5.9  USE="arts -debug -kdeenablefinal xinerama" 0 kB

[ebuild  N    ] media-gfx/digikam-0.9.2  USE="arts -debug -doc -kdeenablefinal -kdehiddenvisibility -nfs xinerama" LINGUAS="-ar -bg -br -ca -cs -cy -da de -el -en_GB -es -et -fa -fi -fr -gl -he -hu -is -it -ja -ka -lt -mk -ms -mt -nb -nds -nl -nn -pa -pl -pt -pt_BR -ro -ru -rw -sk -sl -sr -sr@Latn -sv -ta -th -tr -uk -vi -zh_CN -zh_TW" 0 kB

Total: 8 packages (8 new), Size of downloads: 3,412 kB

```

 plug camera in, switch on: everything ok, when opening it as usb device or opening it in digikam

 log in and out: also everything ok

 reboot: doen't work anymore, same problem as mentioned above in this thread

 removed my username from the plugdev group, logged out and in again, following happens: first appears an error (after telling the kde dialog to open it in konqueror): "A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.freedesktop.Hal.Device.Volume" member "Mount" error "(unset)" destination "org.freedesktop.Hal")". It seems, it tries to mount the camera as /media/sdb1. Later on a second kde dialog asks me, what I want to do with an "USB Mass Storage Interface". This also doesn't work. This time it seems, kde tries to mount the camera as /media/camera. Normally I experience, that the camera is mounted as /media/VOLUMENAME.

So it seems, that removing the username from the plugdev group isn't everything, to solve this problem.

Tell me, if I can further help you to solve this problem. I'm also interested in it. Meanwhile I'm going to unmerge the packages above again (I only need digikam occasionally).

[EDIT] I have to add me to plugdev again, after unmerging above packages. Without being in this group, the same error message "... security policy ..." appears. [/EDIT]

----------

## d-fens

Same problem here, it worked with kde 3.5.7, after updating world it hangs after

```
usb-storage: waiting for device to settle before scanning
```

disabling kde services for camera/devices seemed to be connected to this issue but thats still vage.

Running 2.6.24-tuxonice-r3, amd64, lumix lx2 and kde 3.5.9

----------

## msmyth

Hmm, there doesn't seem to be anything different between what you did and what I did. I'm not sure why removing the username from plugdev worked for me but not for you. I wish we knew what the underlying problem was.

----------

## msmyth

For what is is worth, here is a link a discussion about what looks like the same problem in Ubuntu: https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/155788

----------

## d-fens

after unmerging kamera everything worked again - 

```

May 29 13:51:39 d-partment usb 2-1: new full speed USB device using ohci_hcd and address 3

May 29 13:51:39 d-partment usb 2-1: configuration #1 chosen from 1 choice

May 29 13:51:39 d-partment scsi6 : SCSI emulation for USB Mass Storage devices

May 29 13:51:39 d-partment usb-storage: device found at 3

May 29 13:51:39 d-partment usb-storage: waiting for device to settle before scanning

May 29 13:51:44 d-partment scsi 6:0:0:0: Direct-Access     MATSHITA DMC-LX2          0100 PQ: 0 ANSI: 2

May 29 13:51:44 d-partment sd 6:0:0:0: [sdb] 3970047 512-byte hardware sectors (2033 MB)

May 29 13:51:44 d-partment sd 6:0:0:0: [sdb] Write Protect is off

May 29 13:51:44 d-partment sd 6:0:0:0: [sdb] Mode Sense: 04 00 00 00

May 29 13:51:44 d-partment sd 6:0:0:0: [sdb] Assuming drive cache: write through

May 29 13:51:44 d-partment sd 6:0:0:0: [sdb] 3970047 512-byte hardware sectors (2033 MB)

May 29 13:51:44 d-partment sd 6:0:0:0: [sdb] Write Protect is off

May 29 13:51:44 d-partment sd 6:0:0:0: [sdb] Mode Sense: 04 00 00 00

May 29 13:51:44 d-partment sd 6:0:0:0: [sdb] Assuming drive cache: write through

May 29 13:51:44 d-partment sdb: sdb1

May 29 13:51:44 d-partment sdb: p1 exceeds device capacity

May 29 13:51:44 d-partment sd 6:0:0:0: [sdb] Attached SCSI removable disk

May 29 13:51:44 d-partment sd 6:0:0:0: Attached scsi generic sg1 type 0

May 29 13:51:44 d-partment usb-storage: device scan complete

May 29 13:51:44 d-partment attempt to access beyond end of device

May 29 13:51:44 d-partment sdb: rw=0, want=3970048, limit=3970047

May 29 13:51:44 d-partment Buffer I/O error on device sdb1, logical block 3969798

.... some more lumix lx2 related partion errors ...

May 29 13:52:08 d-partment hald: mounted /dev/sdb1 on behalf of uid 1000

```

no more camera:// but i didn't use this anyway with my usb style connection, window pops up and dikicam etc works

----------

## stanislaw

Ah, thank you for tracking it down to "kamera".

I normally only use usb style connection (with my Panasonic Lumix), and therefore actually don't need "digikam", which itself pulls in the dependency "kamera". So, normally I woudn't have to mess around with my configuration, if I just connect, open the camera as an usb mass storage device and copy over the pictures (and movies) with Konqueror.

But for occasionally visits of a friend, who uses a Canon EOS 400 or 450 (?), USB style connection doesn't work AFAIK. I need digikam to read the images. And that's where the problem started: I don't want to emerge digikam every time, he visits me   :Sad: 

So my questions: Uninstalling "kamera" solved the problem for you, but are you using digikam, which seems to rely on kamera? Are you still able to use PTP (as I suppose the Canon EOS does), when uninstalling kamera?

----------

## d-fens

hi,

unmerging kamera is only a partial fix for usb style cameras and PTP won't work then, although i can't test it as i have no PTP cam.

updating digikam would pull kamera back in, so this is no real fix of the issue and a kde bug should be filed:

```

d-partment user # emerge digikam -1avD

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N    ] kde-base/kamera-3.5.9  USE="-arts -debug -kdeenablefinal -xinerama" 0 kB

[ebuild   R   ] media-gfx/digikam-0.9.4_beta4  USE="-arts -debug -doc -kdeenablefinal -kdehiddenvisibility -nfs -xinerama" LINGUAS="de -ar -bg -br -ca -cs -cy -da -el -en_GB -es -et -fa -fi -fr -gl -he -hu -is -it -ja -ka -lt -mk -ms -mt -nb -nds -nl -nn -pa -pl -pt -pt_BR -ro -ru -rw -sk -sl -sr -sr@Latn -sv -ta -th -tr -uk -vi -zh_CN -zh_TW" 0 kB

```

----------

## NoOrdinary

Thanks for help guys and kudos to the one who reported bug to KDE. (link if someone want to add anything http://bugs.kde.org/show_bug.cgi?id=162883).

I agree unmerging kamera is partial solution, but at least there is option to transfer pictures from camera.

----------

