[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Trouble with eject and USB devices



> I know that at least Ubuntu and Fedora have 
> > figured out how to properly communicate with an IPod so that it can be 
> > safely removed (i.e. that warning goes away and my battery icon comes 
> > on).   Maybe looking into how Ubuntu and Fedora fixed this might shed 
> > some light on how to what's wrong. 

Trying Ubuntu is a good idea. I will download a live CD and see if I can
find anything interesting.

> While I can't claim to know whether this is the "official" solution,
> from personal experience with setting this up on my system, it seems
> that one of the tests that the Ipod uses to determine whether it can be
> unplugged or not is whether or not a USB connection is still
> established, regardless of the filesystem status. The only reliable way
> I've found to get the Ipod to SAY that it's safe to unplug it is to
> unload the appropriate kernel module and thereby deactivate the USB
> port. (This would probably be one of (ehci|uhci|ohci)-hcd in the
> 2.6-series kernels)
> 
> I don't believe this is a very good solution however since unloading
> that module would also cause any other device using that particular USB
> connection to lose connectivity. It would definitely be interesting to
> see how Ubuntu and Fedora addressed this. Perhaps there's a way to send
> a signal to a single USB port telling it to shut off?

AFAIK, the Ipod waits for ioctl CDROM_EJECT sent by eject[0], not umount
which is why HAL is configured to use eject for Ipod and similar
devices[1]. 

Like I said before, this works if I explicitly run "eject /dev/sdb2" as
root. The device is unmounted, eject and the display lights up telling
me it's safe to remove.

I'm not sure why this doesn't work as a normal user, can this be a
problem with the way udev or HAL is configured?


0.
http://mail.gnome.org/archives/desktop-devel-list/2006-September/msg00482.html
1. /usr/share/hal/fdi/information/10freedesktop/10-usb-music-players.fdi
-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 760BDD22

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: