You are not logged in.
Pages: 1
Hello, I have an internal usb card reader. It works but not perfectly.
The problem that I have is that udev does not recognise media insertion/removal. It only recognises the usb device insertion/removal.
I can make it work by emulating a usb device insertion/removal by giving it to a VirtualBox Windows VM (where, incidentally, it "just works"). Upon releasing the device from the VM the host regains it and creates a device node for any inserted media at that time.
It does not sense any removal/insert of media after that. To force it I have to emulate a device removal/insert as above.
I have tried a "udevadm control restart" but this does not detect any inserted media.
My workaround is ok but somewhat cumbersome. Is there something that I am missing here that I need to do? Please any help appreciated...
Last edited by starfry (2011-03-27 07:21:27)
Offline
Did you try this: https://wiki.archlinux.org/index.php/Ud … t_SD_cards ?
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline
That's just for auto-mounting, if I understand correctly?
The problem I have is that the device files for the media aren't created so even mounting manually is impossible.
What I need is for something to trigger udev when a medium is added or removed from the card reader (not when the card reader itself is added or removed from the computer).
Windows does this flawlessly, surely we can...?
Offline
udev does not recognise media insertion/removal
So have you tried udev's logging, or not?
Offline
So have you tried udev's logging, or not?
Yes. I enabled logging with
udevadm control --log-priority=debug
Lots of stuff in log file for device insertion/removal. Nothing in log for media insertion/removal.
Offline
Did you try this: https://wiki.archlinux.org/index.php/Ud … t_SD_cards ?
Thanks! Solved my problems.
File: /etc/udev/rules.d/11-sd-cards-auto-mount.rules
KERNEL!="mmcblk[0-9]p[0-9]", GOTO="sd_cards_auto_mount_end"
# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem specific options
ACTION=="add", IMPORT{program}="/sbin/blkid -o udev -p %N"
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"ACTION=="add", RUN+="/bin/mkdir -p /media/sd-%k", RUN+="/bin/ln -s /media/sd-%k /mnt/sd-%k", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/sd-%k"
ACTION=="remove", RUN+="/bin/umount -l /media/sd-%k", RUN+="/bin/rmdir /media/sd-%k"
LABEL="sd_cards_auto_mount_end"
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
The problem I have is that the device files for the media aren't created so even mounting manually is impossible.
What I need is for something to trigger udev when a medium is added or removed from the card reader (not when the card reader itself is added or removed from the computer).
I have just the same problem with the card reader on my laptop. Udev doesn't register card insertion/removal at all: no device nodes show up under /dev/sd* or /dev/mmcblk*
One solution that works for me is to use hal instead. I don't use hal for anything else, but it's easy enough to "/etc/rc.d/hal start", and then upon insertion the card shows up under /dev/sd*. The problem, long term, is that hal is deprecated and is going away, and that there doesn't seem to be any udev-based solution, at least with this hardware.
Edit: FWIW, the laptop in question is a Lenovo Thinkpad Edge 13
Last edited by moose jaw (2011-04-24 18:52:28)
Offline
Pages: 1