not mountable digital camera (Sony Cybershot DSC-S40)

Bug #569332 reported by Maciej Pilichowski
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Incomplete
Undecided
Unassigned
linux (openSUSE)
Unknown
High

Bug Description

First time I found out that this camera is not mountable in OpenSuse. It seems a lot of Linux distributions while moving up to newer kernels dropped support for valid, connected via USB, cameras.

Facts:
* Sony Cybershot DSC-S40
* new Ubuntu 10.04 RC

The camera should be seen as external "drive" for the system, and it is is listed in connected devices list, for example:
dir /dev/disk/by-id/

But when you try to mount it, it gives an error that user is supposed to give filesystem (it is vfat), when this parameter is added to mount (-t vfat) then mount complains it cannot read superblock.

Please note, that all older Linux distribution could mount and use this camera, I don't which version for Ubuntu it was though.

Revision history for this message
In , Meissner-novell (meissner-novell) wrote :

please run:

hwinfo --disk
hwinfo --usb

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Created an attachment (id=265568)
hwinfo.usb

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Created an attachment (id=265569)
hwinfo.disk

Revision history for this message
In , Guenther-burgstaller (guenther-burgstaller) wrote :

I don't know if I have the same issue but plugging in any digital camera leads to no response by my system. In opensuse 11.0 I was used to an automount of everything. The only automount which works now with 11.1 is usb-sticks, even cd's or dvd's don't work when not mounted manually. The only thing I can remember that my system hung when I installed the last hal update. After the restart the new hal package showed up in yast so I didn't heed this hang-up.

Revision history for this message
In , Dkukawka (dkukawka) wrote :

Please provide full lshal output with the affected device attached to your machine. Also the part of /var/log/messages since plugging in the device would be useful.

Revision history for this message
In , Dkukawka (dkukawka) wrote :

And please check if it makes a difference if you stop hal before plugging in the camera. Do you get a mountable device?

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

For the latter -- no, it says:
mount: I could not determine the filesystem type, and none was specified

In 10.3 I made the same steps (without shutting down HAL) and it worked.

Logs follow.

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Created an attachment (id=276516)
messages

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Created an attachment (id=276517)
lshal

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Danny, maybe it is somehow common:
https://bugzilla.novell.com/attachment.cgi?id=276443
This is from report you took look at already;
https://bugzilla.novell.com/show_bug.cgi?id=467174

Revision history for this message
In , Dkukawka (dkukawka) wrote :

With all those errors in /var/log/messages, it looks to me like a kernel or Hardware problem. And since a manual mount isn't possible (because of a not detectable filesystem type) it is no HAL, but a system problem. Reassign to kernel.

Revision history for this message
In , Gregkh (gregkh) wrote :

Ugh, sony still hasn't fixed the firmware in these devices. I'll go knock up a patch for this...

Revision history for this message
In , Gregkh (gregkh) wrote :

Can you test a kernel patch? Or do you need a fully built kernel rpm to test with?

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Greg, I would very much prefer built kernel (3 files, right?) -- I am pretty scared of installing test kernels, so patching it myself... ;-) heart attack. Thank you in advance.

Revision history for this message
In , Gregkh (gregkh) wrote :

Ok, will get you a kernel build...

Revision history for this message
In , Gregkh (gregkh) wrote :

Ok, this is now checked into the SLE11_BRANCH and HEAD kernel branches. A pre-built kernel will show up in the kernel-of-the-day repository tomorrow with this change in it.

You can find the repo at:
  http://ftp.suse.com/pub/projects/kernel/kotd/

Can you try the kernel there and let me know if it solves your problem or not? Make sure you see the following in the changelog entry to verify that the patch is in there:
  - patches.drivers/usb-storage-increase-the-bcd-range-in-sony-s-bad-device-table.patch:
      USB: storage: increase the bcd range in Sony's bad device
      table. (bnc#466554).

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Things got worse -- with this special kernel (thank you!) camera is not even seen in /dev/disk/by-id/ _BUT_ when I "came back" not to the kernel I used before installing special one, but to the downloaded from regular repo (right now), I don't see camera either.

So now it is not only it is not mountable, but it is not even seen.

I checked USB modem, pendrive -- those work.

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

I messed up with the regular repo, so the above report once again:

* kernel from HEAD (containing sony patch) does not even list the camera

* regular kernel (2.6.27.29-0.1.1) does not mount camera, but it is listed as device and partition (sdb and sdb1)

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

PS. I use kernel-default, *-base, *-extra, but in HEAD repo the extra package is missing. Could it be the cause?

Revision history for this message
In , Gregkh (gregkh) wrote :

no, extra is not needed anymore.
but the device should still show up.

What does the kernel log show when you plug your device into the system?

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

You mean
/var/log/messages
right?

Revision history for this message
In , Gregkh (gregkh) wrote :

No, 'dmesg' output.

Before you plug in your device, as root run:
  dmesg -c
which clears the log out.

then plug your device in and attach the output of 'dmesg'

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Created an attachment (id=315381)
regular kernel -- just for comparison

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Created an attachment (id=315383)
and testing kernel

Revision history for this message
In , Gregkh (gregkh) wrote :

Very wierd, I'm confused here.

Can you send this info to the <email address hidden> mailing list? They will also want you to use the usbmon tool to try to figure out the problem. I'd recommend using a kernel without my fix. I'll post my proposed patch to the list after you send your report so that the developers there can see what we tried to do to fix this issue.

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Done. What is the usbmon, I cannot find this utility --
http://software.opensuse.org/search?q=usbmon
0 hits.

Also nothing in Yast/SM.

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Created an attachment (id=315848)
opensuse 11.1 sony camera usb trace

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Created an attachment (id=315849)
opensuse 10.3 all usb devices trace

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Created an attachment (id=315858)
opensuse 11.1 ext. trace

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Created an attachment (id=315859)
opensuse 10.3 ext. trace

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Just for the record:

"
Okay, this shows the source of the problem.  In fact it's a combination
of things: a bug in the camera and changes in udev and hal -- which
explains why OpenSuSE 10.3 worked and 11.3 doesn't.

The camera reports initially that it has 63424 sectors of storage (31.7
MB).  Although old versions of udev and hal didn't do this, newer
versions try reading the sectors near the end to check for a RAID
signature.  In your case, udev tried to read 8 sectors starting at
sector 63408.  Although this should have worked, it didn't -- the
camera reported a Medium Error (unrecoverable read error) and then
basically stopped working.  Every attempted read after that got a Not
Ready (medium not present) error; even reads for sectors nowhere near
the end.  Presumably the same thing would have happened with the older
OS if it had tried to read sectors so close to the end.

That's the reason the mount failed.  You'd think by now Sony could use
properly-designed USB interfaces for their cameras, but apparently they
can't.
"
-- Alan Stern

Revision history for this message
In , Gregkh (gregkh) wrote :

Ok, this is a udev issue in accessing these types of devices.

Kay, is there some way to blacklist these devices from being probed for raid?

Revision history for this message
In , Kasievers (kasievers) wrote :

No, there is no such list. Today we have no single entry for usb storage devices in userspace, they are all in the kernel.

Revision history for this message
In , Meissner-novell (meissner-novell) wrote :

We have just released a SLE11/openSUSE 11.1 kernel update fixing/mentioning this bugreport, which has the version 2.6.27.37-0.1.1.

Revision history for this message
In , Swamp-suse (swamp-suse) wrote :

Update released for: cluster-network-kmp-default, cluster-network-kmp-xen, ext4dev-kmp-default, ext4dev-kmp-xen, kernel-default, kernel-default-base, kernel-default-debuginfo, kernel-default-debugsource, kernel-default-extra, kernel-ec2, kernel-ec2-base, kernel-ec2-debuginfo, kernel-ec2-debugsource, kernel-ec2-extra, kernel-source, kernel-source-debuginfo, kernel-syms, kernel-xen, kernel-xen-base, kernel-xen-debuginfo, kernel-xen-debugsource, kernel-xen-extra
Products:
SLE-DEBUGINFO 11 (x86_64)
SLE-DESKTOP 11 (x86_64)
SLE-HAE 11 (x86_64)
SLE-SDK 11 (x86_64)
SLE-SERVER 11 (x86_64)
SLE-SERVER 11-EC2 (x86_64)

Revision history for this message
In , Kasievers (kasievers) wrote :

Closing as fixed. Thanks!

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

linux-kernel-headers-2.6.27-2.28
kernel-default-base-2.6.27.37-0.1.1
kernel-default-extra-2.6.27.37-0.1.1
kernel-default-2.6.27.37-0.1.1
kernel-source-2.6.27.37-0.1.1

Unfortunately there is no change in behaviour with camera -> reopening.

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

PS. "No change" comparing to the test kernel (#17) -- camera currently is not even visible in the system. In original report I couldn't mount it but it was detected and listed as device.

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Opensuse 11.2 KDE Live 64bit -- camera is visible in the system, yet it is not mountable. So generally it is the same state as in 11.1.

Btw. I changed the importance to Major = "Major loss of function" (here it is complete loss of function).

Revision history for this message
In , Mackendw (mackendw) wrote :

Has there been any updates to the kernel fix for this? I just switched my sister-in-law from windoze XP to OpenSUSE 11.2 and her Sony SureShot digital Cam wouldn't mount also. Same symptoms as above.

Appreciate an update as to when/if it'll be fixed.

Revision history for this message
In , Kasievers (kasievers) wrote :

Not sure if this issue still exists with current systems. I'm not working on this issue, and sorry, have no idea what to fix. Reassigning to default.

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

What about info I got from kernel-usb ML?

Revision history for this message
Maciej Pilichowski (bluedzins) wrote :

First time I found out that this camera is not mountable in OpenSuse. It seems a lot of Linux distributions while moving up to newer kernels dropped support for valid, connected via USB, cameras.

Facts:
* Sony Cybershot DSC-S40
* new Ubuntu 10.04 RC

The camera should be seen as external "drive" for the system, and it is is listed in connected devices list, for example:
dir /dev/disk/by-id/

But when you try to mount it, it gives an error that user is supposed to give filesystem (it is vfat), when this parameter is added to mount (-t vfat) then mount complains it cannot read superblock.

Please note, that all older Linux distribution could mount and use this camera, I don't which version for Ubuntu it was though.

Revision history for this message
Maciej Pilichowski (bluedzins) wrote :

Just in case the link to the counterpart report for opensuse with some info from kernel usb ML
https://bugzilla.novell.com/show_bug.cgi?id=466554

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

11.3 M5 fails too. Could the part responsible for mounting be compared between 10.3 and 11.1? After all, it worked, so the solution is out there.

Revision history for this message
In , Gregkh (gregkh) wrote :

Can you provide the kernel log messages for 11.3 Milestone whatever-is-latest?

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Just in case -- I've read your comment right away, but I am simply waiting for M7 (it was scheduled at 05-21, nomen omen).

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Created an attachment (id=365658)
dmesg output

11.3 M7.

Revision history for this message
Fabio Marconi (fabiomarconi) wrote :

Hello
Is this problem present with the latest updated Lucid's or Maverick's packages?
Thanks in advance
Fabio

Changed in ubuntu:
status: New → Incomplete
Revision history for this message
Maciej Pilichowski (bluedzins) wrote :

I tried Ubuntu 10.10, no change in behaviour.

Changed in ubuntu:
status: Incomplete → New
tags: added: lucid maverick regression-release
affects: ubuntu → linux (Ubuntu)
Revision history for this message
In , Jeffm-novell (jeffm-novell) wrote :

Are you able to reproduce this with kernel-vanilla or with the Factory kernel?

Changed in linux (openSUSE):
importance: Unknown → High
status: Unknown → Incomplete
Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Yes, openSUSE 11.4 RC1. Only the error is changed:

can't read superblock

The effect is the same, I cannot mount it.

Changed in linux (openSUSE):
status: Incomplete → Confirmed
Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Just for the record -- to fix this bug NO new code is required, all the code required to mount the digital camera is within 10.3 kernel.

Brad Figg (brad-figg)
tags: removed: maverick
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 569332

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
In , Oneukum (oneukum) wrote :

Yes, this is not a kernel problem. At least on 11.3. But to be sure we should check 11.4 fails for the same reason. Could you provide the output of dmesg on 11.4?

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Created an attachment (id=479770)
dmesg 11.4

@Oliver, "Yes, this is not a kernel problem." -- what are you referring to ("yes")?

Revision history for this message
In , Oneukum (oneukum) wrote :

Your device reports that no medium is present. The kernel reacts to that like it should. Your device has a buggy firmware. The bug in the firmware is not triggered by the kernel. It is triggered by udev as Alan showed in comment#31. The trace you provided shows that the problem in 11.4 is the same problem as in 11.3

I could introduce a kernel quirk to reduce the disk size reported to user space, but I don't know by how much. The clean fix would be introduce a blacklist for udev to stop probing for raid devices.

Does your camera have internal memory or does it use an external medium?

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

> The clean fix would be introduce a
> blacklist for udev to stop probing for raid devices.

I didn't know I have raid device :-) Of course any general workaround would be better, because the more hardware is supported, the better for Linux.

> Does your camera have internal memory or does it use an external medium?

This type of camera in general uses both, but my camera has only internal memory.

Revision history for this message
In , Oneukum (oneukum) wrote :

(In reply to comment #53)

> This type of camera in general uses both, but my camera has only internal
> memory.

Good, then I'll make a patch to cut off a bit off the space on your camera. But I need to determine how much. Could you do:

killproc /sbin/udevd
fdisk -l /dev/sdc

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

I tested it on OS 12.1 -- nothing happened.

In order to test it on OS 11.4 I need to know how this affects other disks in the system, and if I can continue working, or should I restart my computer.

Revision history for this message
In , Oneukum (oneukum) wrote :

(In reply to comment #55)
> I tested it on OS 12.1 -- nothing happened.

There was no output from fdisk?

> In order to test it on OS 11.4 I need to know how this affects other disks in
> the system, and if I can continue working, or should I restart my computer.

It does nothing to the other disks. But hotplugging will be disabled by such a test. You need to restart udev after the test.

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

> There was no output from fdisk?

Nope. Same story with 11.4 -- no output, just next command prompt.

> You need to restart udev after the test.

How to do it?

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

I executed "udevd &" as root, and quit the shell. I hope it was OK.

Revision history for this message
In , Oneukum (oneukum) wrote :

The output of "fdisk -l" please

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

I already wrote this twice. There is no output. Output is none. Output is empty. There is no data in output. Null. Zero.

Thus, I cannot attach any output, because there is no output -- see above.

Revision history for this message
In , Oneukum (oneukum) wrote :

(In reply to comment #60)
> I already wrote this twice. There is no output. Output is none. Output is
> empty. There is no data in output. Null. Zero.
>
> Thus, I cannot attach any output, because there is no output -- see above.

Can you try a LiveCD of the release that could read from the device?

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

I have 10.3 installed on USB flash memory card for such purpose. It is minimal system (console only), and can mount the camera.

I hope USB is still working.

What should I do with it.

Revision history for this message
In , Oneukum (oneukum) wrote :

(In reply to comment #62)
> I have 10.3 installed on USB flash memory card for such purpose. It is minimal
> system (console only), and can mount the camera.
>
> I hope USB is still working.
>
> What should I do with it.

Please provide the output of "fdisk -l /dev/sdX" with sdX replaced with the device name of your camera

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Disk /dev/sdb: 32MB, 32473088 bytes
4 heads, 16 sectors/track, 991 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 990 31670+ 1 FAT12

Revision history for this message
In , Jeffm-9 (jeffm-9) wrote :

With the coming release of openSUSE 12.2, openSUSE kernel developers are focusing their efforts there. Reports against openSUSE 11.4 and prior will not get the attention needed to resolve them before openSUSE 12.2 is release and openSUSE 11.4 becomes unmaintained.

Please re-test with openSUSE 12.1 or openSUSE RC2+ and re-open with an updated Product if you still encounter your issue.

We apologize for this issue not getting the attention it deserves but we are focusing our resources in the area where they will have the most impact for our users. We're working hard to make openSUSE 12.2 the best openSUSE release yet!

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

openSUSE 11.4 is the oldest distro with this bug, 12.1 also has this bug, and I guess 12.2 will also have this bug, but since I don't have a spare machine to test it (virtual one is no good here), I have to wait for stable release.

Please note, this bug is regression. openSUSE supported those cameras once.

Revision history for this message
In , Jeffm-9 (jeffm-9) wrote :

Please update the product field on re-opened bugs or they will be automatically re-closed as outdated.

Revision history for this message
In , Oneukum (oneukum) wrote :

Created an attachment (id=501804)
patch to shrink device

Revision history for this message
In , Oneukum (oneukum) wrote :

Could you test the kernel patch in comment#68 ?

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

I would be happy to do so, but please tell me what _exactly_ should I do (steps). Thank you in advance.

Revision history for this message
In , Oneukum (oneukum) wrote :

Install the kernel sources: zypper in kernel-source
You may already have them installed.

Apply the patch:
cd /usr/src/linux
patch -p1 < $HOME/name_you_saved_patch_as

you install gcc: zypper in gcc
You may already have installed it

You compile the kernel:
make

You install the kernel as root:
make modules_install ; make install ; sync

And then you reboot the test kernel

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

I am testing this on openSUSE 12.1 with kernel 3.1.9 and 3.1.10, in both cases I cannot pass patch step. Here is the error:

patching file drivers/scsi/sd.c
Hunk #1 succeeded at 1869 (offset -99 lines).
patching file drivers/usb/storage/scsiglue.c
Hunk #1 succeeded at 203 (offset 11 lines).
patching file drivers/usb/storage/unusual_devs.h
patching file include/linux/usb_usual.h
Hunk #1 FAILED at 66.
1 out of 1 hunk FAILED -- saving rejects to file include/linux/usb_usual.h.rej
patching file include/scsi/scsi_device.h
Hunk #1 succeeded at 144 (offset -2 lines).

Revision history for this message
In , Oneukum (oneukum) wrote :

Created an attachment (id=503118)
patch to shrink device

Against the correct kernel tree this time

Revision history for this message
In , Oneukum (oneukum) wrote :

Can you try with the patch of comment#73 ?

Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Sure, this time I managed to move some steps forward. So, I applied the patch, I executed 'make' but it complained about missing config file, so I executed 'make menuconfig', I switched some option on and then off, to make sure, the config will be created. I executed 'again'.

After quite some time, it hit error however:

drivers/usb/storage/scsiglue.c: In function ‘slave_configure’:
drivers/usb/storage/scsiglue.c:207:20: error: ‘US_FL_FIX_CAPACITY12’ undeclared (first use in this function)
drivers/usb/storage/scsiglue.c:207:20: note: each undeclared identifier is reported only once for each function it appears in

Kernel, and all other related files with 3.1.10 version.

Revision history for this message
In , Oneukum (oneukum) wrote :

Created an attachment (id=515588)
fixed version of last patch

Revision history for this message
In , Oneukum (oneukum) wrote :

Please try the patch from comment#75

Changed in linux (openSUSE):
status: Confirmed → Incomplete
Revision history for this message
In , Maciej Pilichowski (bluedzins) wrote :

Thank you for the patch, however soon I will stop using this camera, so I will no longer be able to test it. Maybe we should close it for now, until other user will appear interested in OS and the same camera (or with the same issue, because I guess there would be several models affected, not just one).

Changed in linux (openSUSE):
status: Incomplete → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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