Comment 10 for bug 362182

Revision history for this message
c.h. (wryfi) wrote : Re: [Bug 362182] Re: Amarok 2 lost support for iPhone-like devices - Choice between 2 and 1.4?

On 04/27/2009 10:54 PM, Nico wrote:
> This is exactly what I descibe in the bug.
>

The upstream bug was very limited in scope. Look at its title. It was
not intended to address the solid/hal issue, but to replace an internal
recognition function that had been removed in amarok2 ("Probably a good
first step is to get isIpod to return true for iPhone."). They fixed
the bug, as it was reported to them (getting the amarok function isIpod
to return true for iPhone), though they did not fix the underlying
problem you reported here (amarok2 doesn't recognize an sshfs mounted
iphone).

> iFuse is just like SSHFS. Both use FUSE, and fuse does not declare
> volumes in HAL.
>

ifuse is different because it is over a hardwired USB connection.

Note that ntfs-3g also uses fuse and its volumes are reported perfectly
by HAL. HAL recognition of fuse volumes was implemented circa 2006
(search the bug database at freedesktop.org).

The reason sshfs volumes are not detected by HAL has nothing to do with
fuse. It is because sshfs volumes are not hardware. HAL is the
HARDWARE abstraction layer. If there is no hardware involved, HAL is
not involved. You wouldn't expect an NFS or SMB volume to show up in
HAL, either. ;-)

Moreover, HAL most certainly *does* detect USB iphone connections. You
can prove this to yourself by running `lshal -m` and watching while you
plug in your iphone.

> This fdi file is for when HAL detects the USB device. It is no
> declaration of the FUSE volume.
>

You are correct that the fdi file is for when HAL detects the iphone
over USB; however, the fdi file most certainly does contain hal
declarations for the ifuse volume. The debian helper script (which was
adapted from fedora) even assigns major and minor numbers to the device
to facilitate this functionality. I've gotten it partially working, but
in my case hal is still slightly confused between the ifuse volume and
the ptp-class camera device. (The fdi file contains some <remove>
directives related to camera keys, but they don't seem to be working for
me. Or they're not applying to the right usb device. It's a little
hard to tell.)

The main problem I'm seeing is that the <match> directives in the ifuse
fdi file don't directly match the attributes reported from my iphone-3g
to the kernel to hal. The fdi file is out-of-date relative to some
combination of (1) my kernel (2.6.29.1), (2) my device (iphone 3g),
and/or (3) my hal version (0.5.12git20090406).

It's worth noting that the ifuse home page implies that iphone 3g
support is uncertain. I am able to mount my 3g via ifuse, however, so
hal support should be just a matter of tweaking the fdi directives to
properly match the hardware info the 3g is sending to hal via the kernel.

> I even tried compiling it from source, just in case I was wrong. I was
> not.

The problem isn't with compilation. The fdi directives are provided by
upstream or the package maintainer. Play more with tweaking the fdi
file and watching the results (after restarting hald) in the full output
of lshal.