sdhci cards aren't mounted automaticly.

Bug #429752 reported by Maxim Levitsky
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
obsolete
Fix Released
Medium
devicekit-disks (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

Binary package hint: devicekit-disks

If I plug in my sdhci card in, it isn't mounted automaticly.
On the other hand, usb/cdrom devices are

Revision history for this message
Maxim Levitsky (maximlevitsky) wrote :

Don't know how much this will take to fix, but here is the problem:

in 95-devkit-disks.rules, it sets DKD_PRESENTATION_NOPOLICY to 1 for everything but disks and cdroms.

changing that to

KERNEL=="sd*|hd*|sr*|mmc*", ENV{DKD_PRESENTATION_NOPOLICY}="0"

fixes that issue for me

Revision history for this message
In , Maxim Levitsky (maximlevitsky) wrote :

The core of this problem lies in:

 /lib/udev/rules.d/95-devkit-disks.rules:

ENV{DKD_PRESENTATION_NOPOLICY}="1"
KERNEL=="sd*|hd*|sr*", ENV{DKD_PRESENTATION_NOPOLICY}="0"

Thus, DKD_PRESENTATION_NOPOLICY is set on anything but hard disks and cdroms (and this includes usb drives)

However MMC/SD devices are reported as mmcblk*. There are also so called memstick devices, that are reported as mspblk*

So lets change those lines to:

ENV{DKD_PRESENTATION_NOPOLICY}="1"
KERNEL=="sd*|hd*|sr*|mmcblk*|mspblk*", ENV{DKD_PRESENTATION_NOPOLICY}="0"

Also there might be other devices, like floppy and maybe more.

The above change works for me

Changed in devicekit:
status: Unknown → Confirmed
Revision history for this message
In , Martin Pitt (pitti) wrote :

Indeed, this makes sense. For the record, this is a complete dk-disks --dump which shows the problem:

http://launchpadlibrarian.net/33354340/devkit_dump.txt

Revision history for this message
In , Martin Pitt (pitti) wrote :

Created an attachment (id=30217)
git formatted patch

Trivial patch, but with nice changelog, and with Maxim set as author. For David's convenience of just doing git am. :-)

Revision history for this message
In , Zeuthen (zeuthen) wrote :

(In reply to comment #2)
> Created an attachment (id=30217) [details]
> git formatted patch
>
> Trivial patch, but with nice changelog, and with Maxim set as author. For
> David's convenience of just doing git am. :-)

Looks good. I've committed this with a different Subject line and added your name to the Signed-off-by line too. Thanks.

Revision history for this message
Martin Pitt (pitti) wrote :

Sounds reasonable. To confirm, can you please do

  devkit-disks --dump > /tmp/dk.txt

and attach /tmp/dk.txt here? (With SDHCI card being plugged in). Thanks!

Changed in devicekit-disks (Ubuntu):
status: New → Incomplete
Revision history for this message
Maxim Levitsky (maximlevitsky) wrote :

Sure thing

Revision history for this message
Maxim Levitsky (maximlevitsky) wrote :

Like I told in freedesktop bugreport, probably better to change even to

KERNEL=="sd*|hd*|sr*|mmcblk*|mspblk*", ENV{DKD_PRESENTATION_NOPOLICY}="0"

Since memstick devices are similar to sd cards.

However I don't know if there are additional device names that should be handled as well.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks a lot!

Changed in devicekit-disks (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Incomplete → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Created a git-formatted patch (with you as author), sent to upstream, and applied to Debian package git. Will upload by karmic final.

Thanks!

Changed in devicekit-disks (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package devicekit-disks - 007-2

---------------
devicekit-disks (007-2) experimental; urgency=low

  * debian/rules: Enable quilt patch system. Add quilt build dependency.
  * Add 01-mkfs-tempdir.patch: Daemon does not create /var/run/DeviceKit-disks/,
    so mkfs jobs fail. Just create the directory in /tmp, this is what /tmp is
    for, after all. (See https://bugs.freedesktop.org/show_bug.cgi?id=24265)
  * Add 00git-fix-inhibit.patch: Actually make Inhibit() work again. Taken
    from upstream git head. (LP: #428133)
  * Add 02-unlock-CD-trays-after-mounting.patch: Unlike in the hal world, we
    do not have a daemon polling CD drives for eject button presses. In order
    to make hardware tray eject buttons work, unlock the tray after
    mounting a CD. This is pretty much equivalent to yanking out USB sticks,
    which we already handle reasonably (detecting disappeared device,
    force-unmounting). (https://bugs.freedesktop.org/show_bug.cgi?id=24052,
    LP: #397734)
  * Add 03-fix-subsystem-check-for-firewire.patch: Firewire subsystem is
    called "ieee1394" in current Linux. Now check for both "ieee1394" and
    "firewire". This fixes firewire drives to not be considered system
    internal any more. (https://bugs.freedesktop.org/show_bug.cgi?id=24351,
    LP: #442604)
  * Add 04-mount-vfat-with-shortname-mixed-by-default.patch: The previous
    default, shortname=lower, breaks all-uppercase file names ("touch
    FOO" creates "foo"), thus breaks rsync, and Windows compatibility. The
    default was changed in the Linux kernel for 2.6.32 as well.
    (https://bugs.freedesktop.org/show_bug.cgi?id=24129, LP: #428174)
  * Add 00git-crash-on-removing-NULL-value-from-hash.patch: Properly handle
    the situtation where we're processing a 'change' event but the 'remove'
    event has happened but is still queued up in our own process. Also handle
    device file renames and 'move' uevents.
    (http://bugs.freedesktop.org/show_bug.cgi?id=24264, LP: #414407)
  * Add 06-show-MMC-MemStick-cards-by-default.patch: Show MMC/MemStick cards
    by default; the previous whitelist in the udev rules ignored them.
    (https://bugs.freedesktop.org/show_bug.cgi?id=24053, LP: #429752)
  * Add 05-german-translations.patch: Add German translations.
    (https://bugs.freedesktop.org/show_bug.cgi?id=2024420)

 -- Martin Pitt <email address hidden> Fri, 09 Oct 2009 17:52:20 +0200

Changed in devicekit-disks (Ubuntu):
status: Fix Committed → Fix Released
Changed in devicekit:
status: Confirmed → Fix Released
Revision history for this message
John McCabe-Dansted (gmatht) wrote :

Note that a list of kernel device names is available at:
  http://www.mjmwired.net/kernel/Documentation/devices.txt

I have filtered out non-block devices and cut down duplicates (You don't need to know all the exact names of the various devices that match /dev/sd.*), and attached this file as Linux_block_devices3. However it is still quite large:

$ cat Linux_block_devices3 | grep -o '/dev/[^[:space:]]*' | wc -l
166

I am guessing that we don't want to automatically mount /dev/ram*, and we probably don't care whether RiscPC devices are mounted (I doubt that Ubuntu officially supports them), but it seems that most of the devices on that list should be automatically mounted (e.g. why someone would use a pre-ADAPI cdrom these days I don't know, but since the kernel supports them so should Ubuntu). One of the more important device types that seems to missing from the list above is scd*.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 429752] Re: sdhci cards aren't mounted automaticly.

John McCabe-Dansted [2009-10-13 10:26 -0000]:
> One of the more important device types that seems to missing from
> the list above is scd*.

We don't use scd* any more, it's now finally called sr*. So I think
that one is fine to skip.

Thanks for the thorough check!

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Changed in devicekit:
importance: Unknown → Medium
Changed in devicekit:
importance: Medium → Unknown
Changed in devicekit:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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