# SD/MMC, Card Reader, automount, dbus, hal, kde - how?

## m1k0

After inserted card SD into card reader in laptop I want to see kde window which ask me what I want to do (Open in new window, cancel, etc).

USB stick works fine.

How configure my Gentoo with MMC ?

I can mount manually.

I have fresh gentoo 2007.0

Bellow I put some configs

1.  /var/log/messages after inserted card

2. udevinfo -a -p $(udevinfo -q path -n /dev/mmcblk0p1)

3. lshal

4. dbus-monitor --system

5. dmesg

6. lspci -vvv

7. emerge --info

1./var/log/messages after inserted card

```
Oct 24 21:04:51 laptok mmc0: new SD card at address 8ffd

Oct 24 21:04:51 laptok mmcblk0: mmc0:8ffd SD02G 2011136KiB (ro)

Oct 24 21:04:51 laptok mmcblk0: p1

Oct 24 21:04:51 laptok udevd[1343]: msg_queue_insert: seq 2363 forked, 'add' 'block'

Oct 24 21:04:51 laptok udevd[1343]: udev_event_run: seq 2363 forked, pid [15042], 'add' 'block', 0 seconds old

Oct 24 21:04:51 laptok udevd[1343]: msg_queue_insert: seq 2364 forked, 'add' 'block'

Oct 24 21:04:51 laptok udevd[1343]: msg_queue_insert: seq 2365 forked, 'add' 'mmc'

Oct 24 21:04:51 laptok udevd[1343]: udev_event_run: seq 2365 forked, pid [15043], 'add' 'mmc', 0 seconds old

Oct 24 21:04:51 laptok udevd-event[15042]: match_rule: set ENV 'DEVTYPE=disk'

Oct 24 21:04:51 laptok udevd-event[15042]: match_rule: set ENV 'ID_NAME=SD02G'

Oct 24 21:04:51 laptok udevd-event[15042]: match_rule: set ENV 'ID_SERIAL=0xa3ec316f'

Oct 24 21:04:51 laptok udevd-event[15042]: udev_rules_get_name: add symlink 'disk/by-id/mmc-SD02G_0xa3ec316f'

Oct 24 21:04:51 laptok udevd-event[15042]: run_program: 'path_id /block/mmcblk0'

Oct 24 21:04:51 laptok udevd-event[15043]: run_program: 'modprobe.sh mmc_block'

Oct 24 21:04:51 laptok udevd-event[15042]: run_program: '/lib/udev/path_id' (stdout) 'ID_PATH=pci-mmc0:8ffd-'

Oct 24 21:04:51 laptok udevd-event[15042]: run_program: '/lib/udev/path_id' returned with status 0

Oct 24 21:04:51 laptok udevd-event[15042]: udev_rules_get_name: add symlink 'disk/by-path/pci-mmc0:8ffd-'

Oct 24 21:04:51 laptok udevd-event[15042]: run_program: 'edd_id --export /dev/.tmp-179-0'

Oct 24 21:04:51 laptok edd_id[15048]: main: read id 0x00000000 from '/dev/.tmp-179-0'

Oct 24 21:04:51 laptok udevd-event[15042]: run_program: '/lib/udev/edd_id' (stderr) 'no EDD signature '/dev/.tmp-179-0''

Oct 24 21:04:51 laptok edd_id[15048]: main: '/dev/.tmp-179-0' signature is zero

Oct 24 21:04:51 laptok udevd-event[15042]: run_program: '/lib/udev/edd_id' returned with status 9

Oct 24 21:04:51 laptok udevd-event[15042]: udev_rules_get_name: no node name set, will use kernel name ''

Oct 24 21:04:51 laptok udevd-event[15042]: udev_db_get_device: no db file to read /dev/.udev/db/\x2fblock\x2fmmcblk0: No such file or directory

Oct 24 21:04:51 laptok udevd-event[15042]: udev_node_add: creating device node '/dev/mmcblk0', major=179, minor=0, mode=0660, uid=0, gid=6

Oct 24 21:04:51 laptok udevd-event[15042]: name_index: creating index: '/dev/.udev/names/disk\x2fby-id\x2fmmc-SD02G_0xa3ec316f/\x2fblock\x2fmmcblk0'

Oct 24 21:04:51 laptok udevd-event[15042]: name_index: creating index: '/dev/.udev/names/disk\x2fby-path\x2fpci-mmc0:8ffd-/\x2fblock\x2fmmcblk0'

Oct 24 21:04:51 laptok udevd-event[15042]: name_index: creating index: '/dev/.udev/names/mmcblk0/\x2fblock\x2fmmcblk0'

Oct 24 21:04:51 laptok udevd-event[15042]: udev_node_update_symlinks: update symlink 'disk/by-id/mmc-SD02G_0xa3ec316f' of '/block/mmcblk0'

Oct 24 21:04:51 laptok udevd-event[15042]: udev_db_get_devices_by_name: found index directory '/dev/.udev/names/disk\x2fby-id\x2fmmc-SD02G_0xa3ec316f'

Oct 24 21:04:51 laptok udevd-event[15042]: update_link: found 1 devices with name 'disk/by-id/mmc-SD02G_0xa3ec316f'

Oct 24 21:04:51 laptok udevd-event[15042]: update_link: found '/block/mmcblk0' for 'disk/by-id/mmc-SD02G_0xa3ec316f'

Oct 24 21:04:51 laptok udevd-event[15042]: update_link: compare (our own) priority of '/block/mmcblk0' 0 >= 0

Oct 24 21:04:51 laptok udevd-event[15042]: update_link: 'disk/by-id/mmc-SD02G_0xa3ec316f' with target 'mmcblk0' has the highest priority 0, create it

Oct 24 21:04:51 laptok udevd-event[15042]: node_symlink: creating symlink '/dev/disk/by-id/mmc-SD02G_0xa3ec316f' to '../../mmcblk0'

Oct 24 21:04:51 laptok udevd-event[15042]: udev_node_update_symlinks: update symlink 'disk/by-path/pci-mmc0:8ffd-' of '/block/mmcblk0'

Oct 24 21:04:51 laptok udevd-event[15042]: udev_db_get_devices_by_name: found index directory '/dev/.udev/names/disk\x2fby-path\x2fpci-mmc0:8ffd-'

Oct 24 21:04:51 laptok udevd-event[15042]: update_link: found 1 devices with name 'disk/by-path/pci-mmc0:8ffd-'

Oct 24 21:04:51 laptok udevd-event[15042]: update_link: found '/block/mmcblk0' for 'disk/by-path/pci-mmc0:8ffd-'

Oct 24 21:04:51 laptok udevd-event[15042]: update_link: compare (our own) priority of '/block/mmcblk0' 0 >= 0

Oct 24 21:04:51 laptok udevd-event[15042]: update_link: 'disk/by-path/pci-mmc0:8ffd-' with target 'mmcblk0' has the highest priority 0, create it

Oct 24 21:04:51 laptok udevd-event[15042]: node_symlink: creating symlink '/dev/disk/by-path/pci-mmc0:8ffd-' to '../../mmcblk0'

Oct 24 21:04:51 laptok udevd-event[15042]: pass_env_to_socket: passed 413 bytes to socket '/org/freedesktop/hal/udev_event',

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.799 [I] osspec.c:232: SEQNUM=2363, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/mmcblk0, DEVNAME=/dev/mmcblk0, IFINDEX=0

Oct 24 21:04:51 laptok udevd-event[15042]: pass_env_to_socket: passed -1 bytes to socket '/org/kernel/udev/monitor',

Oct 24 21:04:51 laptok udevd-event[15042]: udev_event_run: seq 2363 finished with 0

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.799 [I] osspec.c:892: hal_util_find_known_parent: '/sys/block/mmcblk0'->'/sys/devices/pci0000:00/0000:00:1e.0/0000:06:01.1/mmc_host/mmc0'

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.799 [I] blockdev.c:654: block_add: sysfs_path=/sys/block/mmcblk0 dev=/dev/mmcblk0 is_part=0, parent=0x080d5180

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.800 [W] blockdev.c:923: No physical device?

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.800 [W] blockdev.c:1160: Not adding device object

Oct 24 21:04:51 laptok udevd[1343]: udev_done: seq 2363, pid [15042] exit with 0, 0 seconds old

Oct 24 21:04:51 laptok udevd-event[15043]: run_program: '/lib/udev/modprobe.sh' returned with status 0

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.812 [I] osspec.c:232: SEQNUM=2365, ACTION=add, SUBSYSTEM=mmc, DEVPATH=/sys/devices/pci0000:00/0000:00:1e.0/0000:06:01.1/mmc_host/mmc0/mmc0:8ffd, DEVNAME=, IFINDEX=

0

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.812 [I] hotplug.c:134: /sys/devices/pci0000:00/0000:00:1e.0/0000:06:01.1/mmc_host/mmc0/mmc0:8ffd is a device (subsystem)

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.812 [I] osspec.c:892: hal_util_find_known_parent: '/sys/devices/pci0000:00/0000:00:1e.0/0000:06:01.1/mmc_host/mmc0/mmc0:8ffd'->'/sys/devices/pci0000:00/0000:00:1e.0/0000:06:01.1/mmc_host/mmc0'

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.812 [I] device.c:3319: add_dev: subsys=mmc sysfs_path=/sys/devices/pci0000:00/0000:00:1e.0/0000:06:01.1/mmc_host/mmc0/mmc0:8ffd dev= parent_dev=0x080d5180

Oct 24 21:04:51 laptok udevd-event[15043]: pass_env_to_socket: passed 255 bytes to socket '/org/freedesktop/hal/udev_event',

Oct 24 21:04:51 laptok udevd-event[15043]: pass_env_to_socket: passed -1 bytes to socket '/org/kernel/udev/monitor',

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.814 [E] device_info.c:274: Could not resolve keypath '@input.originating_device:info.linux.driver' on udi 'atkbd'

Oct 24 21:04:51 laptok udevd-event[15043]: udev_event_run: seq 2365 finished with 0

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.814 [E] device_info.c:274: Could not resolve keypath '@input.originating_device:info.linux.driver' on udi 'atkbd'

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.814 [E] device_info.c:274: Could not resolve keypath '@input.originating_device:info.linux.driver' on udi 'atkbd'

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.814 [E] device_info.c:274: Could not resolve keypath '@input.originating_device:info.linux.driver' on udi 'atkbd'

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.814 [I] device.c:3181: Add callouts completed udi=/org/freedesktop/Hal/devices/pci_1180_822_mmc_host_mmc_card_rca36861

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.814 [I] hald.c:107: Added device to GDL; udi=/org/freedesktop/Hal/devices/pci_1180_822_mmc_host_mmc_card_rca36861

Oct 24 21:04:51 laptok udevd[1343]: udev_done: seq 2365, pid [15043] exit with 0, 0 seconds old

Oct 24 21:04:51 laptok udevd[1343]: udev_event_run: seq 2364 forked, pid [15061], 'add' 'block', 0 seconds old

Oct 24 21:04:51 laptok udevd-event[15061]: match_rule: set ENV 'DEVTYPE=partition'

Oct 24 21:04:51 laptok udevd-event[15061]: udev_rules_get_name: add symlink 'disk/by-id/mmc-SD02G_0xa3ec316f-part1'

Oct 24 21:04:51 laptok udevd-event[15061]: udev_rules_get_name: add symlink 'disk/by-path/pci-mmc0:8ffd--part1'

Oct 24 21:04:51 laptok udevd-event[15061]: run_program: 'vol_id --export /dev/.tmp-179-1'

Oct 24 21:04:51 laptok vol_id[15062]: volume_id.c:351 probing at offset 0x0, size 0x7aab9a00

Oct 24 21:04:51 laptok vol_id[15062]: linux_raid.c:70 probing at offset 0x7aaa0000, size 0x7aab9a00

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x7aaa0000(2057961472), len 0x800

Oct 24 21:04:51 laptok vol_id[15062]: util.c:391 read seekbuf off:0x7aaa0000 len:0x800

Oct 24 21:04:51 laptok vol_id[15062]: linux_raid.c:124 probing at offset 0x7aab7000, size 0x7aab9a00

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x7aab7000(2058055680), len 0x800

Oct 24 21:04:51 laptok vol_id[15062]: util.c:391 read seekbuf off:0x7aab7000 len:0x800

Oct 24 21:04:51 laptok vol_id[15062]: linux_raid.c:124 probing at offset 0x0, size 0x7aab9a00

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x0(0), len 0x800

Oct 24 21:04:51 laptok vol_id[15062]: util.c:355 read sbbuf len:0x800

Oct 24 21:04:51 laptok vol_id[15062]: linux_raid.c:124 probing at offset 0x1000, size 0x7aab9a00

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x1000(4096), len 0x800

Oct 24 21:04:51 laptok vol_id[15062]: util.c:355 read sbbuf len:0x1800

Oct 24 21:04:51 laptok vol_id[15062]: ddf_raid.c:49 probing at offset 0x0, size 0x7aab9a00

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x7aab9800(2058065920), len 0x200

Oct 24 21:04:51 laptok vol_id[15062]: util.c:391 read seekbuf off:0x7aab9800 len:0x200

Oct 24 21:04:51 laptok vol_id[15062]: isw_raid.c:47 probing at offset 0x0, size 0x7aab9a00

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x7aab9600(2058065408), len 0x200

Oct 24 21:04:51 laptok vol_id[15062]: util.c:391 read seekbuf off:0x7aab9600 len:0x200

Oct 24 21:04:51 laptok vol_id[15062]: lsi_raid.c:42 probing at offset 0x0, size 0x7aab9a00

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x7aab9800(2058065920), len 0x200

Oct 24 21:04:51 laptok vol_id[15062]: util.c:391 read seekbuf off:0x7aab9800 len:0x200

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x7aab9800(2058065920), len 0x200

Oct 24 21:04:51 laptok vol_id[15062]: silicon_raid.c:57 probing at offset 0x0, size 0x7aab9a00

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x7aab9800(2058065920), len 0x200

Oct 24 21:04:51 laptok vol_id[15062]: nvidia_raid.c:45 probing at offset 0x0, size 0x7aab9a00

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x7aab9600(2058065408), len 0x200

Oct 24 21:04:51 laptok vol_id[15062]: util.c:391 read seekbuf off:0x7aab9600 len:0x200

Oct 24 21:04:51 laptok vol_id[15062]: promise_raid.c:46 probing at offset 0x0, size 0x7aab9a00

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x7aab1c00(2058034176), len 0x200

Oct 24 21:04:51 laptok vol_id[15062]: util.c:391 read seekbuf off:0x7aab1c00 len:0x200

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x7aa99c00(2057935872), len 0x200

Oct 24 21:04:51 laptok vol_id[15062]: util.c:391 read seekbuf off:0x7aa99c00 len:0x200

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x7aa99a00(2057935360), len 0x200

Oct 24 21:04:51 laptok vol_id[15062]: util.c:391 read seekbuf off:0x7aa99a00 len:0x200

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x7aab7a00(2058058240), len 0x200

Oct 24 21:04:51 laptok vol_id[15062]: util.c:391 read seekbuf off:0x7aab7a00 len:0x200

Oct 24 21:04:51 laptok vol_id[15062]: util.c:391 read seekbuf off:0x7aab9800 len:0x200

Oct 24 21:04:51 laptok vol_id[15062]: jmicron_raid.c:43 probing at offset 0x0, size 0x7aab9a00

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x7aab9800(2058065920), len 0x200

Oct 24 21:04:51 laptok vol_id[15062]: lvm.c:49 probing at offset 0x0

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x400(1024), len 0x800

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x0(0), len 0x800

Oct 24 21:04:51 laptok vol_id[15062]: highpoint.c:52 probing at offset 0x0

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x1200(4608), len 0x200

Oct 24 21:04:51 laptok vol_id[15062]: volume_id.c:382 probing at offset 0x0, size 0x7aab9a00

Oct 24 21:04:51 laptok vol_id[15062]: fat.c:273 probing at offset 0x0

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x0(0), len 0x400

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x3da00(252416), len 0x4000

Oct 24 21:04:51 laptok vol_id[15062]: util.c:391 read seekbuf off:0x3da00 len:0x4000

Oct 24 21:04:51 laptok vol_id[15062]: util.c:342 get buffer off 0x0(0), len 0x200

Oct 24 21:04:51 laptok udevd-event[15061]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_USAGE=filesystem'

Oct 24 21:04:51 laptok udevd-event[15061]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_TYPE=vfat'

Oct 24 21:04:51 laptok udevd-event[15061]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_VERSION=FAT16'

Oct 24 21:04:51 laptok udevd-event[15061]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_UUID='

Oct 24 21:04:51 laptok udevd-event[15061]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_UUID_ENC='

Oct 24 21:04:51 laptok udevd-event[15061]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_LABEL='

Oct 24 21:04:51 laptok udevd-event[15061]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_LABEL_ENC='

Oct 24 21:04:51 laptok udevd-event[15061]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_LABEL_SAFE='

Oct 24 21:04:51 laptok udevd-event[15061]: run_program: '/lib/udev/vol_id' returned with status 0

Oct 24 21:04:51 laptok udevd-event[15061]: udev_rules_get_name: no node name set, will use kernel name ''

Oct 24 21:04:51 laptok udevd-event[15061]: udev_db_get_device: no db file to read /dev/.udev/db/\x2fblock\x2fmmcblk0\x2fmmcblk0p1: No such file or directory

Oct 24 21:04:51 laptok udevd-event[15061]: udev_node_add: creating device node '/dev/mmcblk0p1', major=179, minor=1, mode=0660, uid=0, gid=6

Oct 24 21:04:51 laptok udevd-event[15061]: name_index: creating index: '/dev/.udev/names/disk\x2fby-id\x2fmmc-SD02G_0xa3ec316f-part1/\x2fblock\x2fmmcblk0\x2fmmcblk0p1'

Oct 24 21:04:51 laptok udevd-event[15061]: name_index: creating index: '/dev/.udev/names/disk\x2fby-path\x2fpci-mmc0:8ffd--part1/\x2fblock\x2fmmcblk0\x2fmmcblk0p1'

Oct 24 21:04:51 laptok udevd-event[15061]: name_index: creating index: '/dev/.udev/names/mmcblk0p1/\x2fblock\x2fmmcblk0\x2fmmcblk0p1'

Oct 24 21:04:51 laptok udevd-event[15061]: udev_node_update_symlinks: update symlink 'disk/by-id/mmc-SD02G_0xa3ec316f-part1' of '/block/mmcblk0/mmcblk0p1'

Oct 24 21:04:51 laptok udevd-event[15061]: udev_db_get_devices_by_name: found index directory '/dev/.udev/names/disk\x2fby-id\x2fmmc-SD02G_0xa3ec316f-part1'

Oct 24 21:04:51 laptok udevd-event[15061]: update_link: found 1 devices with name 'disk/by-id/mmc-SD02G_0xa3ec316f-part1'

Oct 24 21:04:51 laptok udevd-event[15061]: update_link: found '/block/mmcblk0/mmcblk0p1' for 'disk/by-id/mmc-SD02G_0xa3ec316f-part1'

Oct 24 21:04:51 laptok udevd-event[15061]: update_link: compare (our own) priority of '/block/mmcblk0/mmcblk0p1' 0 >= 0

Oct 24 21:04:51 laptok udevd-event[15061]: update_link: 'disk/by-id/mmc-SD02G_0xa3ec316f-part1' with target 'mmcblk0p1' has the highest priority 0, create it

Oct 24 21:04:51 laptok udevd-event[15061]: node_symlink: creating symlink '/dev/disk/by-id/mmc-SD02G_0xa3ec316f-part1' to '../../mmcblk0p1'

Oct 24 21:04:51 laptok udevd-event[15061]: udev_node_update_symlinks: update symlink 'disk/by-path/pci-mmc0:8ffd--part1' of '/block/mmcblk0/mmcblk0p1'

Oct 24 21:04:51 laptok udevd-event[15061]: udev_db_get_devices_by_name: found index directory '/dev/.udev/names/disk\x2fby-path\x2fpci-mmc0:8ffd--part1'

Oct 24 21:04:51 laptok udevd-event[15061]: update_link: found 1 devices with name 'disk/by-path/pci-mmc0:8ffd--part1'

Oct 24 21:04:51 laptok udevd-event[15061]: update_link: found '/block/mmcblk0/mmcblk0p1' for 'disk/by-path/pci-mmc0:8ffd--part1'

Oct 24 21:04:51 laptok udevd-event[15061]: update_link: compare (our own) priority of '/block/mmcblk0/mmcblk0p1' 0 >= 0

Oct 24 21:04:51 laptok udevd-event[15061]: update_link: 'disk/by-path/pci-mmc0:8ffd--part1' with target 'mmcblk0p1' has the highest priority 0, create it

Oct 24 21:04:51 laptok udevd-event[15061]: node_symlink: creating symlink '/dev/disk/by-path/pci-mmc0:8ffd--part1' to '../../mmcblk0p1'

Oct 24 21:04:51 laptok udevd-event[15061]: pass_env_to_socket: passed 587 bytes to socket '/org/freedesktop/hal/udev_event',

Oct 24 21:04:51 laptok udevd-event[15061]: pass_env_to_socket: passed -1 bytes to socket '/org/kernel/udev/monitor',

Oct 24 21:04:51 laptok udevd-event[15061]: udev_event_run: seq 2364 finished with 0

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.838 [I] osspec.c:232: SEQNUM=2364, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/mmcblk0/mmcblk0p1, DEVNAME=/dev/mmcblk0p1, IFINDEX=0

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.838 [E] util.c:190: Cannot open '/sys/block/mmcblk0/mmcblk0p1/range'

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.838 [I] blockdev.c:654: block_add: sysfs_path=/sys/block/mmcblk0/mmcblk0p1 dev=/dev/mmcblk0p1 is_part=1, parent=0x00000000

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.838 [I] blockdev.c:741: Ignoring hotplug event - no parent

Oct 24 21:04:51 laptok hald[5731]: 21:04:51.839 [W] blockdev.c:1160: Not adding device object

Oct 24 21:04:51 laptok udevd[1343]: udev_done: seq 2364, pid [15061] exit with 0, 0 seconds old

Oct 24 21:04:52 laptok orage: polling /dev/hdb (every 2 sec): [5746]: 21:04:52.632 [I] addon-storage.c:346: Checking whether device /dev/hdb is locked on HAL

Oct 24 21:04:52 laptok orage: polling /dev/hdb (every 2 sec): [5746]: 21:04:52.632 [I] addon-storage.c:354: ... device /dev/hdb is not locked on HAL

```

2.udevinfo -a -p $(udevinfo -q path -n /dev/mmcblk0p1)

```

Udevinfo starts with the device specified by the devpath and then

walks up the chain of parent devices. It prints for every device

found, all possible attributes in the udev rules key format.

A rule to match, can be composed by the attributes of the device

and the attributes from one single parent device.

  looking at device '/block/mmcblk0/mmcblk0p1':

    KERNEL=="mmcblk0p1"

    SUBSYSTEM=="block"

    DRIVER==""

    ATTR{stat}=="     133      133        0        0"

    ATTR{size}=="4019661"

    ATTR{start}=="243"

    ATTR{dev}=="179:1"

  looking at parent device '/block/mmcblk0':

    KERNELS=="mmcblk0"

    SUBSYSTEMS=="block"

    DRIVERS==""

    ATTRS{capability}=="10"

    ATTRS{stat}=="      12      126      173       20        0        0        0        0        0       20       20"

    ATTRS{size}=="4022272"

    ATTRS{removable}=="0"

    ATTRS{range}=="8"

    ATTRS{dev}=="179:0"

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:06:01.1/mmc_host/mmc0/mmc0:8ffd':

    KERNELS=="mmc0:8ffd"

    SUBSYSTEMS=="mmc"

    DRIVERS=="mmcblk"

    ATTRS{serial}=="0xa3ec316f"

    ATTRS{oemid}=="0x544d"

    ATTRS{name}=="SD02G"

    ATTRS{manfid}=="0x000002"

    ATTRS{hwrev}=="0x2"

    ATTRS{fwrev}=="0x8"

    ATTRS{date}=="02/2007"

    ATTRS{scr}=="01a5000016020202"

    ATTRS{csd}=="002d00325b5a83d5fefbff8016800000"

    ATTRS{cid}=="02544d534430324728a3ec316f007200"

    ATTRS{type}=="SD"

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:06:01.1/mmc_host/mmc0':

    KERNELS=="mmc0"

    SUBSYSTEMS=="mmc_host"

    DRIVERS==""

    ATTRS{uevent}==""

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:06:01.1/mmc_host':

    KERNELS=="mmc_host"

    SUBSYSTEMS==""

    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:06:01.1':

    KERNELS=="0000:06:01.1"

    SUBSYSTEMS=="pci"

    DRIVERS=="sdhci"

    ATTRS{msi_bus}==""

    ATTRS{broken_parity_status}=="0"

    ATTRS{enable}=="1"

    ATTRS{modalias}=="pci:v00001180d00000822sv00001043sd00008264bc08sc05i00"

    ATTRS{local_cpus}=="3"

    ATTRS{irq}=="21"

    ATTRS{class}=="0x080500"

    ATTRS{subsystem_device}=="0x8264"

    ATTRS{subsystem_vendor}=="0x1043"

    ATTRS{device}=="0x0822"

    ATTRS{vendor}=="0x1180"

  looking at parent device '/devices/pci0000:00/0000:00:1e.0':

    KERNELS=="0000:00:1e.0"

    SUBSYSTEMS=="pci"

    DRIVERS==""

    ATTRS{msi_bus}=="1"

    ATTRS{broken_parity_status}=="0"

    ATTRS{enable}=="1"

    ATTRS{modalias}=="pci:v00008086d00002448sv00000000sd00000000bc06sc04i01"

    ATTRS{local_cpus}=="3"

    ATTRS{irq}=="0"

    ATTRS{class}=="0x060401"

    ATTRS{subsystem_device}=="0x0000"

    ATTRS{subsystem_vendor}=="0x0000"

    ATTRS{device}=="0x2448"

    ATTRS{vendor}=="0x8086"

  looking at parent device '/devices/pci0000:00':

    KERNELS=="pci0000:00"

    SUBSYSTEMS==""

    DRIVERS==""

    ATTRS{uevent}==""

```

3. lshal

```
udi = '/org/freedesktop/Hal/devices/pci_1180_822_mmc_host'

  info.capabilities = {'mmc_host'} (string list)

  info.category = 'mmc_host'  (string)

  info.parent = '/org/freedesktop/Hal/devices/pci_1180_822'  (string)

  info.product = 'MMC/SD Host Adapter'  (string)

  info.udi = '/org/freedesktop/Hal/devices/pci_1180_822_mmc_host'  (string)

  linux.hotplug_type = 2  (0x2)  (int)

  linux.subsystem = 'mmc_host'  (string)

  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1e.0/0000:06:01.1/mmc_host/mmc0'  (string)

  mmc_host.host = 0  (0x0)  (int)

udi = '/org/freedesktop/Hal/devices/pci_1180_822_mmc_host_mmc_card_rca36861'

  info.bus = 'mmc'  (string)

  info.linux.driver = 'mmcblk'  (string)

  info.parent = '/org/freedesktop/Hal/devices/pci_1180_822_mmc_host'  (string)

  info.product = 'SD02G'  (string)

  info.subsystem = 'mmc'  (string)

  info.udi = '/org/freedesktop/Hal/devices/pci_1180_822_mmc_host_mmc_card_rca36861'  (string)

  info.vendor = 'Unknown (2)'  (string)

  linux.hotplug_type = 2  (0x2)  (int)

  linux.subsystem = 'mmc'  (string)

  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1e.0/0000:06:01.1/mmc_host/mmc0/mmc0:8ffd'  (string)

  mmc.cid = '02544d534430324728a3ec316f007200'  (string)

  mmc.csd = '002d00325b5a83d5fefbff8016800000'  (string)

  mmc.date = '02/2007'  (string)

  mmc.fwrev = 8  (0x8)  (int)

  mmc.hwrev = 2  (0x2)  (int)

  mmc.oem = 'Unknown (21581)'  (string)

  mmc.rca = 36861  (0x8ffd)  (int)

  mmc.scr = '01a5000016020202'  (string)

  mmc.serial = 2147483647  (0x7fffffff)  (int)

  mmc.vendor = 'Unknown (2)'  (string)

```

4. dbus-monitor --system

```
signal sender=:1.1 -> dest=(null destination) path=/org/freedesktop/Hal/Manager; interface=org.freedesktop.Hal.Manager; member=DeviceAdded

   string "/org/freedesktop/Hal/devices/pci_1180_822_mmc_host_mmc_card_rca36861"

signal sender=:1.1 -> dest=(null destination) path=/org/freedesktop/Hal/Manager; interface=org.freedesktop.Hal.Manager; member=DeviceRemoved

   string "/org/freedesktop/Hal/devices/pci_1180_822_mmc_host_mmc_card_rca36861"

```

5. dmesg

```
mmc0: new SD card at address 8ffd

mmcblk0: mmc0:8ffd SD02G 2011136KiB (ro)

 mmcblk0: p1

mmc0: card 8ffd removed

mmc0: new SD card at address 8ffd

mmcblk0: mmc0:8ffd SD02G 2011136KiB (ro)

 mmcblk0: p1

mmc0: card 8ffd removed

```

6. lspci -vvv

```
06:01.1 Generic system peripheral [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)

        Subsystem: ASUSTeK Computer Inc. Unknown device 8264

        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-

        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-

        Latency: 64, Cache Line Size: 32 bytes

        Interrupt: pin B routed to IRQ 21

        Region 0: Memory at fbfff000 (32-bit, non-prefetchable) [size=256]

        Capabilities: [80] Power Management version 2

                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+)

                Status: D0 PME-Enable- DSel=0 DScale=2 PME-

```

7. emerge --info

```
Portage 2.1.3.9 (default-linux/x86/2007.0/desktop, gcc-4.2.2, glibc-2.6.1-r0, 2.6.23-gentoo i686)

=================================================================

System uname: 2.6.23-gentoo i686 Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz

Timestamp of tree: Wed, 24 Oct 2007 20:00:01 +0000

app-shells/bash:     3.2_p17

dev-java/java-config: 1.3.7, 2.0.33-r1

dev-lang/python:     2.4.4-r5

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselayout: 1.12.9-r2

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.61-r1

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.17-r1, 2.18-r1

sys-devel/gcc-config: 1.3.16

sys-devel/libtool:   1.5.24

virtual/os-headers:  2.6.23

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /opt/openjms/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"

CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LANG="pl_PL.UTF-8"

LC_ALL="pl_PL.UTF-8"

LINGUAS="pl pl_PL"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="7zip X Xaw3d a52 aac aalib acl acpi addbookmarks aio alsa amr amrnb amrwb apache2 arts bash-completion berkdb bigpatch bindist bitmap-fonts bluetooth branding bzip2 cairo caps cdda cddb cdr cli cracklib crypt css cups curl cvs daap dbus dc1394 dga dhcp directfb divx doc dri dts dv dvb dvd dvdnav dvdr dvdread ecc eds emboss enca encode evo expat fam ffmpeg firefox flac fltk fontconfig fortran fpx ftp gcj gd gdbm geos gif gimp glitz gnokii gnutls gpac gphoto2 gpm graphviz gs gsm gstreamer gtk gtkhtml guile hal hdri history httpd ical iconv idea ieee1394 imagemagick imap imlib ipw4965 isdnlog jabber jack java java5 javamail javascript jbig jce jingle jms jmx jpeg jpeg2k jpgraph jython kde kdepim kerberos keyring ladspa lame lcms ldap libnotify libsamplerate libvisual log4j logrotate lzo mad matroska midi mikmod mjpeg mmx mmxext mng mod modplug mozdevelop mp3 mp4 mp4live mpeg mpeg2 mpi mplayer mudflap multicall multislot multiuser musepack musicbrainz mysql mysqli ncurses nls nptl nptlonly nsplugin ntfs nvram obex odk ogg openal openexr opengl openmp pam pango parse-clocks pcmcia pcre pda pdf perl php plotutils png postgres povray pppd proj python q32 q8 qt3 qt3support qt4 quicktime rar readline real realmedia reflection rhino rle rtc rtsp samba sasl script sdl sensord servlet-2_4 servletapi session skins smp sms sndfile sound soundtouch sox speech speex spell spl sql srt sse sse2 ssl ssse3 statistics stream subversion svg symlink syslog tcpd tga theora threads threadsafe tiff tivo tools tordns truetype truetype-fonts type1-fonts unicode upnp urandom usb v4l v4l2 vcd vlm vorbis wavpack webdav wifi win32codecs winbind wmf wmp x264 x86 xanim xforms xine xml xorg xosd xpm xprint xv xvid xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl pl_PL" USERLAND="GNU" VIDEO_CARDS="nvidia"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

----------

## m1k0

I added small swich in kernel, but I don't why  :Wink: 

```
Device Drivers ---> 

 SCSI device support ---> 

 [*] Probe all LUNs on each SCSI device 

```

I still have error

```
Oct 28 00:16:22 laptok hald[5823]: 00:16:22.858 [E] util.c:190: Cannot open '/sys/block/mmcblk0/mmcblk0p1/range' 
```

 Maybe this is clue? 

/var/log/message

```
Oct 28 00:16:22 laptok udevd-event[8977]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_USAGE=filesystem' 

 Oct 28 00:16:22 laptok udevd-event[8977]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_TYPE=vfat' 

 Oct 28 00:16:22 laptok udevd-event[8977]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_VERSION=FAT16' 

 Oct 28 00:16:22 laptok udevd-event[8977]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_UUID=' 

 Oct 28 00:16:22 laptok udevd-event[8977]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_UUID_ENC=' 

 Oct 28 00:16:22 laptok udevd-event[8977]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_LABEL=' 

 Oct 28 00:16:22 laptok udevd-event[8977]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_LABEL_ENC=' 

 Oct 28 00:16:22 laptok udevd-event[8977]: run_program: '/lib/udev/vol_id' (stdout) 'ID_FS_LABEL_SAFE=' 

 Oct 28 00:16:22 laptok udevd-event[8977]: run_program: '/lib/udev/vol_id' returned with status 0 

 Oct 28 00:16:22 laptok udevd-event[8977]: udev_rules_get_name: no node name set, will use kernel name '' 

 Oct 28 00:16:22 laptok udevd-event[8977]: udev_db_get_device: no db file to read /dev/.udev/db/\x2fblock\x2fmmcblk0\x2fmmcblk0p1: No such file or directory 

 Oct 28 00:16:22 laptok udevd-event[8977]: udev_node_add: creating device node '/dev/mmcblk0p1', major=179, minor=1, mode=0660, uid=0, gid=6 

 Oct 28 00:16:22 laptok udevd-event[8977]: name_index: creating index: '/dev/.udev/names/disk\x2fby-id\x2fmmc-SD02G_0xa3ec316f-part1/\x2fblock\x2fmmcblk0\x2fmmcblk0p1' 

 Oct 28 00:16:22 laptok udevd-event[8977]: name_index: creating index: '/dev/.udev/names/disk\x2fby-path\x2fpci-mmc0:8ffd--part1/\x2fblock\x2fmmcblk0\x2fmmcblk0p1' 

 Oct 28 00:16:22 laptok udevd-event[8977]: name_index: creating index: '/dev/.udev/names/mmcblk0p1/\x2fblock\x2fmmcblk0\x2fmmcblk0p1' 

 Oct 28 00:16:22 laptok udevd-event[8977]: udev_node_update_symlinks: update symlink 'disk/by-id/mmc-SD02G_0xa3ec316f-part1' of '/block/mmcblk0/mmcblk0p1' 

 Oct 28 00:16:22 laptok udevd-event[8977]: udev_db_get_devices_by_name: found index directory '/dev/.udev/names/disk\x2fby-id\x2fmmc-SD02G_0xa3ec316f-part1' 

 Oct 28 00:16:22 laptok udevd-event[8977]: update_link: found 1 devices with name 'disk/by-id/mmc-SD02G_0xa3ec316f-part1' 

 Oct 28 00:16:22 laptok udevd-event[8977]: update_link: found '/block/mmcblk0/mmcblk0p1' for 'disk/by-id/mmc-SD02G_0xa3ec316f-part1' 

 Oct 28 00:16:22 laptok udevd-event[8977]: update_link: compare (our own) priority of '/block/mmcblk0/mmcblk0p1' 0 >= 0 

 Oct 28 00:16:22 laptok udevd-event[8977]: update_link: 'disk/by-id/mmc-SD02G_0xa3ec316f-part1' with target 'mmcblk0p1' has the highest priority 0, create it 

 Oct 28 00:16:22 laptok udevd-event[8977]: node_symlink: creating symlink '/dev/disk/by-id/mmc-SD02G_0xa3ec316f-part1' to '../../mmcblk0p1' 

 Oct 28 00:16:22 laptok udevd-event[8977]: udev_node_update_symlinks: update symlink 'disk/by-path/pci-mmc0:8ffd--part1' of '/block/mmcblk0/mmcblk0p1' 

 Oct 28 00:16:22 laptok udevd-event[8977]: udev_db_get_devices_by_name: found index directory '/dev/.udev/names/disk\x2fby-path\x2fpci-mmc0:8ffd--part1' 

 Oct 28 00:16:22 laptok udevd-event[8977]: update_link: found 1 devices with name 'disk/by-path/pci-mmc0:8ffd--part1' 

 Oct 28 00:16:22 laptok udevd-event[8977]: update_link: found '/block/mmcblk0/mmcblk0p1' for 'disk/by-path/pci-mmc0:8ffd--part1' 

 Oct 28 00:16:22 laptok udevd-event[8977]: update_link: compare (our own) priority of '/block/mmcblk0/mmcblk0p1' 0 >= 0 

 Oct 28 00:16:22 laptok udevd-event[8977]: update_link: 'disk/by-path/pci-mmc0:8ffd--part1' with target 'mmcblk0p1' has the highest priority 0, create it 

 Oct 28 00:16:22 laptok udevd-event[8977]: node_symlink: creating symlink '/dev/disk/by-path/pci-mmc0:8ffd--part1' to '../../mmcblk0p1' 

 Oct 28 00:16:22 laptok udevd-event[8977]: pass_env_to_socket: passed 587 bytes to socket '/org/freedesktop/hal/udev_event', 

 Oct 28 00:16:22 laptok hald[5823]: 00:16:22.858 [I] osspec.c:232: SEQNUM=2382, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/mmcblk0/mmcblk0p1, DEVNAME=/dev/mmcblk0p1, IFINDEX=0 

 Oct 28 00:16:22 laptok udevd-event[8977]: pass_env_to_socket: passed -1 bytes to socket '/org/kernel/udev/monitor', 

 Oct 28 00:16:22 laptok hald[5823]: 00:16:22.858 [E] util.c:190: Cannot open '/sys/block/mmcblk0/mmcblk0p1/range' 

 Oct 28 00:16:22 laptok udevd-event[8977]: udev_event_run: seq 2382 finished with 0 

 Oct 28 00:16:22 laptok hald[5823]: 00:16:22.858 [I] blockdev.c:654: block_add: sysfs_path=/sys/block/mmcblk0/mmcblk0p1 dev=/dev/mmcblk0p1 is_part=1, parent=0x00000000 

 Oct 28 00:16:22 laptok hald[5823]: 00:16:22.858 [I] blockdev.c:741: Ignoring hotplug event - no parent 

 Oct 28 00:16:22 laptok hald[5823]: 00:16:22.858 [W] blockdev.c:1160: Not adding device object 

 Oct 28 00:16:22 laptok udevd[1343]: udev_done: seq 2382, pid [8977] exit with 0, 0 seconds old 
```

----------

## m1k0

ok, I can see mounted SD cards in konqueror (media:/) but only after reboot.

When I remove and insert SD card into laptop I don't see any more mounted card in konqueror and anywhere.

proper (after reboot)

```
/var/log/message

Oct 28 15:49:19 laptok hald[5828]: 15:49:19.665 [I] coldplug.c:213: pool_num_freed = 880 (of 882)

Oct 28 15:49:19 laptok hald[5828]: 15:49:19.665 [E] util.c:190: Cannot open '/sys/block/sda/sda3/range'

Oct 28 15:49:19 laptok hald[5828]: 15:49:19.665 [I] osspec.c:892: hal_util_find_known_parent: '/sys/block/sda/sda3'->'/sys/block/sda'

Oct 28 15:49:19 laptok hald[5828]: 15:49:19.665 [I] blockdev.c:654: block_add: sysfs_path=/sys/block/sda/sda3 dev=/dev/sda3 is_part=1, parent=0x081b5910

Oct 28 15:49:19 laptok hald[5828]: 15:49:19.667 [I] hald_dbus.c:4766: ***************************

Oct 28 15:49:19 laptok hald[5828]: 15:49:19.667 [I] hald_dbus.c:4767: ********* got a connection 8177860

Oct 28 15:49:19 laptok hald[5828]: 15:49:19.667 [I] hald_dbus.c:4768: ***************************

Oct 28 15:49:19 laptok hald-probe-volume: [5849]: 15:49:19.667 [D] probe-volume.c:381: Doing probe-volume for /dev/sda3

Oct 28 15:49:19 laptok hald-probe-volume: [5849]: 15:49:19.667 [D] probe-volume.c:392: volume.block_size = 512

Oct 28 15:49:19 laptok hald-probe-volume: [5849]: 15:49:19.667 [D] probe-volume.c:396: volume.size = 158920634880

Oct 28 15:49:19 laptok hald-probe-volume: [5849]: 15:49:19.668 [I] probe-volume.c:625: invoking volume_id_probe_all, offset=0, size=0
```

and after removed and inserted

```
/var/log/message

Oct 28 15:53:27 laptok hald[5828]: 15:53:27.998 [I] osspec.c:232: SEQNUM=2361, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/mmcblk0/mmcblk0p1, DEVNAME=/dev/mmcblk0p1, IFINDEX=0

Oct 28 15:53:27 laptok hald[5828]: 15:53:27.998 [E] util.c:190: Cannot open '/sys/block/mmcblk0/mmcblk0p1/range'

Oct 28 15:53:27 laptok hald[5828]: 15:53:27.998 [I] blockdev.c:654: block_add: sysfs_path=/sys/block/mmcblk0/mmcblk0p1 dev=/dev/mmcblk0p1 is_part=1, parent=0x00000000

Oct 28 15:53:27 laptok hald[5828]: 15:53:27.998 [I] blockdev.c:741: Ignoring hotplug event - no parent

Oct 28 15:53:27 laptok hald[5828]: 15:53:27.998 [W] blockdev.c:1160: Not adding device object

Oct 28 15:53:27 laptok udevd-event[9476]: pass_env_to_socket: passed 587 bytes to socket '/org/freedesktop/hal/udev_event',

Oct 28 15:53:27 laptok udevd-event[9476]: pass_env_to_socket: passed -1 bytes to socket '/org/kernel/udev/monitor',

Oct 28 15:53:27 laptok udevd-event[9476]: udev_event_run: seq 2361 finished with 0

Oct 28 15:53:27 laptok udevd[1347]: udev_done: seq 2361, pid [9476] exit with 0, 0 seconds old

```

----------

## michel7

For RICOH R5C822 controller you may need this kernel patch to get MMC working!

http://lkml.org/lkml/2007/10/1/375

On my laptop SD/MMC reader (the same controller as yours) everything was working fine, but MMC. After patching the kernel SD and MMC work. You just need to select Ricoh MMC Controller Disabler after patching your kernel.

----------

## m1k0

This patch is for 2.6.22

I have 2.6.23 kernel

----------

## michel7

 *m1k0 wrote:*   

> This patch is for 2.6.22
> 
> I have 2.6.23 kernel

 

i have 2.6.23 kernel too   :Laughing:   :Laughing:   :Laughing: 

----------

## m1k0

OK, after patching nothing changed

```
dmesg

mmc0: SDHCI at 0xfbfff000 irq 21 DMA

ricoh-mmc: Ricoh MMC Controller disabling driver

ricoh-mmc: Copyright(c) Philip Langdale

ricoh-mmc: Ricoh MMC controller found at 0000:06:01.2 [1180:0843] (rev 12)

ricoh-mmc: Controller is now disabled.

...

mmc0: card 8ffd removed

mmc0: new SD card at address 8ffd

mmcblk0: mmc0:8ffd SD02G 2011136KiB (ro)

 mmcblk0: p1

mmc0: card 8ffd removed

mmc0: new SD card at address 8ffd

mmcblk0: mmc0:8ffd SD02G 2011136KiB (ro)

 mmcblk0: p1

```

KDE can see SD card only after rebot.

----------

## m1k0

 *m1k0 wrote:*   

> 
> 
> 2.udevinfo -a -p $(udevinfo -q path -n /dev/mmcblk0p1)
> 
> ```
> ...

 

maybe there is error. Maybe should be =="1"?

----------

## tundra

I am having this same problem since upgrading to 2.6.23-r3.  It worked fine up until now, with KDE recognizing when the card was inserted and asking me what to do with it.  Now it is silent.  I can manually mount the card and read it, but I would like to get back to the old behaviour as it is way more convenient!  Anybody?

----------

## tundra

Looking at my logs and using lshal, it is clear that it recognizes that a card is being inserted or removed, but before the upgrade (from 2.6.22-r9, I think it was) there was messages from hald that it was mounting and unmounting the device.  Now no such messages appear.  I tried everything here

http://gentoo-wiki.com/HOWTO_D-BUS%2C_HAL%2C_KDE_media:/#Tips_.26_Tricks

but nothing works for me.

Here is some output from hald --daemon-no --verbose=yes when a card is inserted:

```
12:47:11.686 [I] osspec.c:232: SEQNUM=2081, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/mmcblk0, DEVNAME=/dev/mmcblk0, IFINDEX=0

12:47:11.686 [I] osspec.c:892: hal_util_find_known_parent: '/sys/block/mmcblk0'->'/sys/class/mmc_host/mmc0'

12:47:11.686 [I] blockdev.c:645: block_add: sysfs_path=/sys/block/mmcblk0 dev=/dev/mmcblk0 is_part=0, parent=0x0809bd50

12:47:11.686 [W] blockdev.c:914: No physical device?

12:47:11.686 [W] blockdev.c:1151: Not adding device object

12:47:11.707 [I] osspec.c:232: SEQNUM=2083, ACTION=add, SUBSYSTEM=mmc, DEVPATH=/sys/class/mmc_host/mmc0/mmc0:1234, DEVNAME=, IFINDEX=0

12:47:11.707 [I] hotplug.c:134: /sys/class/mmc_host/mmc0/mmc0:1234 is a device (subsystem)

12:47:11.707 [I] osspec.c:892: hal_util_find_known_parent: '/sys/class/mmc_host/mmc0/mmc0:1234'->'/sys/class/mmc_host/mmc0'

12:47:11.707 [I] device.c:3319: add_dev: subsys=mmc sysfs_path=/sys/class/mmc_host/mmc0/mmc0:1234 dev= parent_dev=0x0809bd50

12:47:11.708 [I] device.c:3181: Add callouts completed udi=/org/freedesktop/Hal/devices/pci_1180_822_mmc_host_mmc_card_rca4660

12:47:11.708 [I] hald.c:107: Added device to GDL; udi=/org/freedesktop/Hal/devices/pci_1180_822_mmc_host_mmc_card_rca4660

12:47:11.731 [I] osspec.c:232: SEQNUM=2082, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/mmcblk0/mmcblk0p1, DEVNAME=/dev/mmcblk0p1, IFINDEX=0

12:47:11.731 [E] util.c:190: Cannot open '/sys/block/mmcblk0/mmcblk0p1/range'

12:47:11.731 [I] blockdev.c:645: block_add: sysfs_path=/sys/block/mmcblk0/mmcblk0p1 dev=/dev/mmcblk0p1 is_part=1, parent=0x00000000

12:47:11.731 [I] blockdev.c:732: Ignoring hotplug event - no parent

12:47:11.731 [W] blockdev.c:1151: Not adding device object

[11772]: 12:47:12.399 [I] addon-storage.c:346: Checking whether device /dev/hdb is locked on HAL

[11772]: 12:47:12.400 [I] addon-storage.c:354: ... device /dev/hdb is not locked on HAL

```

What does all this mean?

----------

## Onip

I've got the same problem as tundra.

Any news?

----------

## mar_rud

I have(had?) same problem too.

On gentoo-2.6.23-r1, -r3, -r5 and vanilla-2.6.24-rc6 usb pendrives (/dev/sdb1) are Auto detected and mounted by KDE and sd-cards in reader using sdhci+mmc_block modules aren't (/dev/mmcblk0p1). In 2.6.22* it was working fine in both cases. Anyway I can still mount it with mount and /ets/fstab entry it's only not visible as new device in system:/media

Recently I've discovered that reloading mmc_block module automagically allows kde to discover and mount card. Unfortunately it is only one time solution (needed every time card is removed). I've wrote some udev rule to do it, but it's rather workaround then real fix of bug (kernel bug or "feature", that kde doesn't know yet).

Rule to be placed in some file in /etc/udev/rules.d:

```
ACTION=="remove", KERNEL=="mmcblk0", RUN+="/root/scripts/mmc_remove.sh"
```

and script in /root/scripts/mmc_remove.sh:

```
#!/bin/sh

/bin/umount -l /mnt/usb

/sbin/rmmod mmc_block
```

/mnt/usb is my mount point for /dev/mmcblk0p1 in /etc/fstab.

If unmount fails (ie. open application using card), then rmmod will fail too and in next insert card will not be visible in kde. Just close app and insert/remove card few times until it is finally detected.

----------

## lindegur

I did not made special things but it required some time until I had every thig running well. Local customized udev stuff I put into /etc/udev/rules.d/10-local.rules . The names below I found via udevmonitor, it is a multi card reader having 4 slots, CF, MS, MMC/SD and Smart media

```

BUS=="scsi", KERNEL=="sd*", SYSFS{model}=="IC1210        CF", NAME="cflash%n"

BUS=="scsi", KERNEL=="sd*", SYSFS{model}=="IC1210        MS", NAME="mstick%n"

BUS=="scsi", KERNEL=="sd*", SYSFS{model}=="IC1210    MMC/SD", NAME="mmcsd%n"

BUS=="scsi", KERNEL=="sd*", SYSFS{model}=="IC1210        SM", NAME="smedia%n"

```

This should produce the dev files with names that I understand. 

For the multi card reader probing multiple LUNs has to be set in the kernel.

In /etc/fstab I have

```

#apacer card reader

/dev/cflash1      /mnt/cflash1   auto      noauto,user,rw   0 0

/dev/mmcsd1      /mnt/mmcsd1   auto      noauto,user,rw   0 0

/dev/mstick1      /mnt/mstick1   auto      noauto,user,rw   0 0

/dev/smedia1      /mnt/smedia1   auto      noauto,user,rw   0 0

```

Finally hal and dbus have to be emerged and installed

```

rc-update add hald default

rc-update add dbus default

```

Last but not least tell kde what it has to do using KDE's Control Center> Desktop>Behaviour>Device Icon. I don't know if everything is necessary but now everything works well in kde, just some minor details are not perfect, disks with multiple partitions behave a bit strange and sometimes the device icons pop up where they want.

----------

## tundra

I finally found time to look at this some more.  Using advice found here and elsewhere, I put this in /etc/udev/rules.d/10-mmc.rules

```
ACTION=="add" KERNEL=="mmcblk[0-9]p[0-9]", RUN+="/usr/bin/pmount %k KODAK"

ACTION=="remove" KERNEL=="mmcblk[0-9]p[0-9]", RUN+="/usr/bin/pumount %k"
```

Now it happily mounts the card automagically on the specified mountpoint (/media/KODAK) in this case.  There are still issues with KDE reacting to the insertion, and with accessing it via digikam, but I have not tried yet to sort any of that out.

The problem is that this only works the first time.  If I remove and reinsert the card, nothing.  I have mmc_block as part of a monolithic kernel, so I cannot remove and reinsert the module.  Does no one out there have any help for us?  I am not even sure where this problem is, is it the kernel, hal, ...?

----------

## lindegur

Do you have dbus and hal emerged and added to the runlevel?

As I said it runs without problems on my computer(s)!

Are the /dev files being created as expected? I do not understand much about udev so I do not understand your rules, I read that the personalized rules should be in /etc/udev/rules.d/10-local.rules. Anyway plug in in a regular usb memory stick should pop up a window without udev rules as well.

As far as I understand plug in and out memory cards produce no udev events, so hal and dbus are required. 

I had the same unreliable behavior, but after I installed hal and dbus everything went well.

I do not use automount, as far as I understand it is for file systems somewhere on the network.

----------

## tundra

 *lindegur wrote:*   

> Do you have dbus and hal emerged and added to the runlevel?
> 
> As I said it runs without problems on my computer(s)!

 

Thanks for the help.  I do have both hald and dbus running.  After some more playing around I found that the problem was pumount, which claimed to have unmounted the device, but mount thought otherwise.  Changing pumount to just umount now automatically mounts it and unmounts it correctly on every insertion.  This is, in itself, a huge step forward!  What I am missing now is KDE automatically detecting it and asking me what to do ... any help here?

----------

## lindegur

In  KDE control center go to Desktop behavior and then the tab Device icon. There you can select all the icons that will appear on the desktop in the mounted and unmounted condition.

----------

## tundra

 *lindegur wrote:*   

> In  KDE control center go to Desktop behavior and then the tab Device icon. There you can select all the icons that will appear on the desktop in the mounted and unmounted condition.

 

Thanks for that tip, but that is not really what I want to do.  Before all this happened KDE would recognise that the card had been inserted, and pop up a window asking me what application I would like to use to handle it.  So, for instance, I could choose digikam to start automatically to download my pictures.  If you know how to do that I would be very grateful indeed!

----------

## Onip

I managed to work around this problem.

a) compile mmc things in kernel as modules.

b) add a specific udev rule

```

#Fix for mmc automount

KERNEL=="mmcblk[0-9]" , ACTION=="remove" , RUN+="/sbin/rmmod -f mmc_block"

```

I wrote this in /etc/udev/rules.d/99-mmc_hack.rules

When you'll insert a pen then hal (or udev, i don't know) would load automatically mmc_block module and hald will detect the newly inserted media and automount it. I'm using gnome and icon shows on desktop, i guess kde will do it too.

Later, if I find enaough time I'll try to bugreport this and see what happens.

Bye

p.s. this solution is cleaner then other posted because now the de behaves as used to do before.

----------

## tundra

Something has changed ... I emerged the new ~x86 NetworkManager and the ~x86 hal that it required, and now KDE Daemon is popping up the window and asking me what to do ... but only the first time around.  So something is still broken too.  Interestingly, the messages in /var/log/messages when the card is inserted or removed are from NetworkManager.

----------

## Onip

try to reload mmc_block with the card in

```

# rmmod mmc_block

# modprobe mmc_block

```

If kde pops the window then your problem is tha same as mine was: just add the udev rule.

----------

## tundra

 *Onip wrote:*   

> try to reload mmc_block with the card in
> 
> ```
> 
> # rmmod mmc_block
> ...

 

Thanks for your help, but there is still something weird going on.  I recompiled my kernel with all mmc stuff in modules (vs monolithic as before), and put in your udev rule.  Everything still works on the first insertion ... but not after that, unless I manually rmmod mmc_block.  The rule seems properly formed, it just does not have any effect.  Why?  A clue might be buried in the fact that sometimes hal does not unmount the device successfully, so manually doing rmmod fails until I do a manual umount.  But even when the device is successfully unmounted by hal, the module persist until I do a manual rmmod.  Is the hal-driven unmount too slow, so the udev-driven rmmod fails?  I don't know ...

----------

## Onip

my rule just removes mmc_block module if you phisically remove the card from the drive, so really after (compared to pc times) you umount it. On my note it works correctly. I did this way because gnome still has an icon for umounted but not removed devices ( under computer:// ) so to mount it again I just need to double click on it.

Anyway if you want to force rmmod you can change the rule to

```
rmmod -f mmc_block
```

Yesterday I upgraded to hal-0.5.10 for tha same reason but didn't try mmc things yet. Later I will.

EDIT:

tested and works fine.

----------

## energyman76b

hi,

are you sure that this mmc stuff is really needed?

I have a couple of (micro)sd cards and I can read them fine in my reader - just with usb-storage, scsi-disk and probe-all-luns support.

----------

## Onip

 *energyman76b wrote:*   

> hi,
> 
> are you sure that this mmc stuff is really needed?
> 
> I have a couple of (micro)sd cards and I can read them fine in my reader - just with usb-storage, scsi-disk and probe-all-luns support.

 

It is what they state here.

What reader are you talking about? Those usb ones? Our problems are about notenook integrated readers.

----------

## energyman76b

 *Onip wrote:*   

>  *energyman76b wrote:*   hi,
> 
> are you sure that this mmc stuff is really needed?
> 
> I have a couple of (micro)sd cards and I can read them fine in my reader - just with usb-storage, scsi-disk and probe-all-luns support. 
> ...

 

ah, ok, sorry - missed that part.

Yes, I am using an usb-reader.

----------

## tundra

 *Onip wrote:*   

> my rule just removes mmc_block module if you phisically remove the card from the drive, so really after (compared to pc times) you umount it. On my note it works correctly. I did this way because gnome still has an icon for umounted but not removed devices ( under computer:// ) so to mount it again I just need to double click on it.
> 
> Anyway if you want to force rmmod you can change the rule to
> 
> ```
> ...

 

Sorry, I was not clear.  I am physically inserting and removing the card.  hald seems to mount it just fine on insertion now, and on removal I see messages in /var/log/messages saying that it is unmounting the card, but sometimes mount still shows it mounted.  Either way, mmc_block is never removed unless I do it manually, even with the -f flag.  udev is definitely seeing the rule, because if I make a malformed rule (only by deliberate mistake, of course!  :Smile: ) it complains.

----------

## Onip

I think you should do just as you do with usb key:

First umount

Then remove

At least, I do this way.

----------

## mamac

Onip,

Should we report a bug for that?

----------

## Onip

 *mamac wrote:*   

> Onip,
> 
> Should we report a bug for that?

 

I think someone should. I wanted to investigate more on this and then report, but university started...

In any case I've read somewhere that this should be an udev fault reporting the device as not removable, but I didn't check.

----------

## mamac

I'm not sure it's a bug, SD card management works perfectly with a Ubuntu live cd (didn't check the udev version). With this live cd mmc_block module is never unloaded, I'll try to investigate Ubuntu live cd configuration, maybe we miss something in the kernel conf.

----------

## ppurka

Has there been any solution for this SD card problem? It seems that the main reason is probably the fact that udev reports that the device is not removable ATTRS{removable}=="0", when in fact it is.  And because of that pmount fails to mount the device.

EDIT: I added the device node to fstab. Now hal mounts the sd card automatically.

----------

## mamac

Not that I know of... still using the fix above. Found this bug: https://bugs.gentoo.org/show_bug.cgi?id=205376

----------

## ppurka

I realized why the automounting was not working. Apparently it was because of a kernel option which would result in not making some device files in /sys. pmount would fail if it could not find those device files.

The kernel option I had to enable was

```
CONFIG_SYSFS_DEPRECATED=y

CONFIG_SYSFS_DEPRECATED_V2=y
```

This can be found in (using 2.6.25)

General Setup --> Create Deprecated Sysfs files

----------

## mamac

No need to update the kernel for me and it works now without any quick fix on my both laptops.

Using kernel 2.6.24-r3 and r4 and udev-119. Updates might have fix the bug.

Thank you developers!

----------

## tundra

I just checked and I too am no longer having troubles with this in kernel gentoo-sources-2.6.24-r8 (I did not check for a while, so it may have worked under other recent versions too).  I do not have to play with kernel modules or use any special udev rules or fstab entries.  When I put the card in hal mounts it, when I take it out hal unmounts it, just like it used to several kernels ago.  So thanks to whoever fixed this!

----------

## Cheesebaron

Are you in the plugdev group?

----------

## tundra

 *Cheesebaron wrote:*   

> Are you in the plugdev group?

 

I am.

----------

## Onip

Same happens for me. Removed udev rule posted above and automount/umount/autoremount work as expected.

----------

