Banshee doesn't mount Creative Zen player OpenSuse 11.2

When logged in as my normal userid to OpenSuse 11.2, I cannot get Banshee to recognize my Creative Zen MP3 player. The player does appear as a device on the desktop and I can access files on the player through that icon, but cannot get Banshee to recognize it so it can be managed in Banshee.

If however, I log on as root, Banshee recognizes the device without a problem.

The log file in ~/.config/banshee-1 shows the following:
libusb couldn’t open USB device /dev/bus/usb/001/004: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn’t open USB device /dev/bus/usb/003/002: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn’t open USB device /dev/bus/usb/004/002: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn’t open USB device /dev/bus/usb/004/003: Permission denied.
libusb requires write access to USB device nodes.
usb_claim_interface(): Device or resource busy
LIBMTP PANIC: Unable to initialize device
[Warn 07:45:48.562] Caught an exception - Connecting (in `Mtp’)
at Mtp.Error.CheckError (ErrorCode errorCode) [0x00000]
at Mtp.MtpDevice.GetConnectedDevices (System.IntPtr& list) [0x00000]
at Mtp.MtpDevice.Detect () [0x00000]
at Banshee.Dap.Mtp.MtpSource.DeviceInitialize (IDevice device) [0x00000]

I have tried changing the owner and the permissions for the devices in /dev/bus/usb but that has not changed the behavior. Any suggestions as to how I fix the permissions to access this outside of root?

Is it always the same error each time? I’m having problems with Banshee and a Creative Zen under 11.2 that worked fine in 11.1. Annoyingly I just wiped the Zen and now can’t get my music back on! Most of the time it’ll either not get recognised at all and error with the following on the console:

PTP_ERROR_IO: Trying again after re-initializing USB interface
[Warn 19:46:13.762] Caught an exception - Object reference not set to an instance of an object (in `Mtp’)
at (wrapper unknown) Mtp.TrackStruct:PtrToStructure (intptr,object)
at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:PtrToStructure (intptr,System.Type)
at Mtp.MtpDevice.GetAllTracks (Mtp.ProgressFunction callback) [0x00000]
at Banshee.Dap.Mtp.MtpSource.LoadFromDevice () [0x00000]

but I’ve also had

PTP_ERROR_IO: Trying again after re-initializing USB interface
inep: usb_get_endpoint_status(): Input/output error
outep: usb_get_endpoint_status(): Input/output error
usb_clear_halt() on IN endpoint: Numerical result out of range
usb_clear_halt() on OUT endpoint: Numerical result out of range
usb_clear_halt() on INTERRUPT endpoint: Numerical result out of range
LIBMTP PANIC: Could not open session! (Return code 767)
  Try to reset the device.
[Warn  20:29:56.163] Caught an exception - Connecting (in `Mtp')
  at Mtp.Error.CheckError (ErrorCode errorCode) [0x00000] 
  at Mtp.MtpDevice.GetConnectedDevices (System.IntPtr& list) [0x00000] 
  at Mtp.MtpDevice.Detect () [0x00000] 
  at Banshee.Dap.Mtp.MtpSource.DeviceInitialize (IDevice device) [0x00000] 

and times when it complains about permissions but still picks up in Banshee (it saw it and saw disk usage, but not the actual tracks), but exceptions as it hits the end of the first song transfer.

I’ve built a patched version of Banshee with the libmtp patch from this ticket. It seems a bit more stable, but still not perfect. If I copy across M4A (iTunes+) tracks then banshee copies them and lists them, and they show up on the Zen, but they error when you play them. If I copy across MP3s then it seems to freeze after the first track without any kind of error. The annoying thing is that Gnomad2 seems to show the same behaviour, so it could be a libmtp or Zen issue rather than Banshee :\

&^%$*$%&(**&^% editing limit. If it wasn’t for that stupid time limit I wouldn’t have to keep double-posting like this…

Hmmm, Banshee fails to transfer properly, and Gnomad failed, but seemingly Rhythmbox worked okay (with the exception of an error about “PTP Layer error a803: LIBMTP_Send_Representative_Sample(): could not send sample data”, which doesn’t seem to have affected anything). They should all be using libmtp, so it seems odd that two apps fail and one succeeds :\

I’ve started up a separate topic for the transfer failure, since it is a different issue to connection failure. If you’re running 64-bit then giving my patched build a try might help.

As it is I still keep getting the occasional error where Banshee won’t connect. Normally the output is:

PTP_ERROR_IO: Trying again after re-initializing USB interface
inep: usb_get_endpoint_status(): Input/output error
outep: usb_get_endpoint_status(): Input/output error
usb_clear_halt() on IN endpoint: Numerical result out of range
usb_clear_halt() on OUT endpoint: Numerical result out of range
usb_clear_halt() on INTERRUPT endpoint: Numerical result out of range
usb_claim_interface(): Device or resource busy
LIBMTP PANIC: Could not open session on device
[Warn  19:21:25.251] Caught an exception - Connecting (in `Mtp')
  at Mtp.Error.CheckError (ErrorCode errorCode) [0x00000] 
  at Mtp.MtpDevice.GetConnectedDevices (System.IntPtr& list) [0x00000] 
  at Mtp.MtpDevice.Detect () [0x00000] 
  at Banshee.Dap.Mtp.MtpSource.DeviceInitialize (IDevice device) [0x00000] 

The way that seems to work best is to have the device off and then connect it, although it isn’t fool-proof. Sometimes resetting it or using “mtp-detect” from the mtp-tools package kicks it in to life as well, although quite often the mtp-detect fails to actually make the connection:

libmtp version: 1.0.1

Listing raw device(s)
   Found 1 device(s):
   Creative: ZEN X-Fi (041e:4162) @ bus 1, dev 8
Attempting to connect device(s)
usb_claim_interface(): Device or resource busy
LIBMTP PANIC: Unable to initialize device
Unable to open raw device 0
OK.

It isn’t ideal to have to keep plugging and unplugging it, or to poke it with mtp-detect until it works, but I guess it works for now (for me at least).

   Creative: ZEN X-Fi (041e:4162) @ bus 1, dev 8
Attempting to connect device(s)
usb_claim_interface(): Device or resource busy

It is possible to detect what program is using the device with lsof, like this

lsof /dev/bus/usb/001/008

Note, the numbers comes from above (bus 1 => 001, dev 8 => 008)

Thanks, I’ll check that out the next time I encounter it. I suspect it might be HAL or Nautilus holding it indefinitely, even though Nautilus doesn’t pop up its “what do you want to do with the new device?” box and it doesn’t show up as mounted.

It looks like “gvfs-gpho” is capturing the device at the same time as Banshee and not releasing it (even though Nautilus and GVFS don’t pop anything up to tell me that it has it). I’ll try a bit of investigation and see what I can find…

I just hooked my Zen up, Nautilus prompted me what to do with it straight away and Banshee picked it up as well. Looks like either Nautilus/gvfs got a fix or Banshee 1.6 handles things better now. Check the Build Service, if you’re not using it already.

Hello,

I’ve got a Creative Zen and the newest Banshee version (1.6.1, downloaded directly from their website). For the first few times, it connected instantly and I could read the contents of my Zen; however, when I tried to transfer my music from my computer to my Zen, it stopped on the first song and didn’t go any further. After that, I installed Banshee anew, and since that, it doesn’t recognize my player at all anymore. Now it only appears in Nautillus as a device, but neither Banshee nor Rhythmbox recognize it.
I tried running mtp-detect, this is the output:

libmtp version: 1.0.1

Listing raw device(s)
libusb couldn't open USB device /dev/bus/usb/001/002: Permission denied.
libusb requires write access to USB device nodes.
   Found 1 device(s):
   Creative: ZEN (041e:4157) @ bus 1, dev 4
Attempting to connect device(s)
usb_claim_interface(): Device or resource busy
LIBMTP PANIC: Unable to initialize device
Unable to open raw device 0
OK.

It seems to be about permission issues, but I don’t know how to change them. And would it be of any use at all, since for grizliez it didn’t make any difference?
Help would be much appreciated. :slight_smile:

I was just reading the Banshee mailing list and saw this relevant post. It’s the problem that I’ve had before and it sounds like it could be the problem that you have. Basically, it won’t mount the player because part of Gnome grabs it and won’t release it. I’ve normally fixed it by unmounting the device from within Nautilus. Occasionally I’ve needed to kill a gphoto daemon as well.

I’m currently running Banshee 1.7.1 from the Unstable repo on the OBS (well, it’s actually my own custom build with a couple of patches on top of Unstable) and I’ve found that it works a bit better with my Zen. The only down side is that 1.7.1 has decided that my Zen can’t support M4As and so it converts them all on the fly to MP3s, where as 1.5 definitely just threw the M4As on it and they worked (because they’re iTunes M4As).