You are not logged in.

#1 2008-04-18 09:31:43

fettouhi
Member
Registered: 2007-05-07
Posts: 745

[SOLVED] libmtp problems

I'm having problem with libmtp on my Arch Linux installation (32-bit). I have a Creative Zen Vision M:60 GB mp3 player and that uses the mtp protocol to sync with my machine. The problem I'm having with libmtp is that if I plugin my mp3 player and try to sync with Amarok or Gnomad2 nothing happens. If I run Amarok or Gnomad2 as root then it works. I checked that my user is a member of the "audio" group and I set the policies in udev.rules so that the "audio" group can use libmtp but still I can only sync as root UNTIL I restart the machine or plug the player in before I can start my PC. I have no clue what's wrong here, why I have to restart my pc in order sync my mp3 player as a user.

Regards

André

Last edited by fettouhi (2008-04-23 16:48:46)

Offline

#2 2008-04-18 16:41:07

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] libmtp problems

I used to be able to sync my iRiver Clix through Amarok just fine (dunno how that was for you). On this new laptop however I had a similar problem. I tried to assign the device to the storage group (it gets assigned to 'camera', but only the root device), but the subdevices still get assigned to a different group somehow. I ended up just assigning it to my user (I am the only one using the device anyway, and it's just me on this laptop too).

# iRiver Clix - seems we need it after all...
SUBSYSTEMS=="usb", ATTRS{manufacturer}=="iriver Limited", ATTRS{product}=="iriver clix", SYMLINK+="libmtp-%k", OWNER="stijn", GROUP="storage", MODE="0660"

Kind of hackish, but it surely works. I presume something has changed in the stock rules that Arch ships with over time and I'm too lazy to go find out, frankly.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2008-04-18 20:32:27

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: [SOLVED] libmtp problems

Already tried that already and it doesn't work. I still have to restart my machine if I want to sync my mp3 player as a user.

Regards

André

Offline

#4 2008-04-18 23:26:30

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] libmtp problems

Well then you need to show us how your perms are. Care to list them on the device, and show us your udev rules? I presume you tried unplugging the device and plugging it back in?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2008-04-19 12:07:19

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: [SOLVED] libmtp problems

Yes I tried that wink. Here is the udev rules for my device.

# Creative ZEN Vision:M (DVP-HD0004)
ATTR{idVendor}=="041e", ATTR{idProduct}=="4151", SYMLINK+="libmtp-%k", MODE="666", GROUP="audio"

Regards

André

Offline

#6 2008-04-19 21:50:36

Kurous
Member
From: Victoria BC
Registered: 2006-08-07
Posts: 36

Re: [SOLVED] libmtp problems

I'm having this exact same problem with my Creative Zen Vision: M 30gb

running:

sudo /etc/start_udev

makes my Zen Vision:M viewable by mtp-detect once again but it breaks my openGL so I'd rather it just work on boot.

my udev rule:

ATTRS{idVendor}=="041e", ATTRS{idProduct}=="413e", SYMLINK+="libmtp-%k", MODE="666", GROUP="audio"

No fix yet, this had worked no problem for over a year.


I just want to be a moderately intelligent monkey that wears a suit.... That's why I've enrolled in business school!

Offline

#7 2008-04-19 23:07:41

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] libmtp problems

That's probably due to your chmod 666 rather than to your audio group. I had it assigned to groups I belong to (first camera, then storage) and none of it worked. Try resetting the perms on your device to 660 and see how it goes wink.

@ Fettouhi: did you try setting the OWNER= variable?

Last edited by B (2008-04-19 23:11:03)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#8 2008-04-20 07:25:56

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: [SOLVED] libmtp problems

@ B: I'll try that again.

Regards

André

Offline

#9 2008-04-20 07:41:11

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: [SOLVED] libmtp problems

Well, that didn't change anything. mtp-detect gives

[af@andre ~]$ mtp-detect
libmtp version: 0.2.5

Attempting to connect device(s)
usb_claim_interface(): Operation not permitted
LIBMTP PANIC: Unable to initialize device 1
LIBMTP PANIC: configure_usb_devices() error code: 7 on line 1561
Detect: There has been an error connecting. Exiting

but doing sudo mtp-detect connects to my ZEN.

Regards

Offline

#10 2008-04-20 11:45:47

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] libmtp problems

Ok - maybe you can try the 2.6.1 package (don't think it should change anything but heck, who knows?):

Get it here (i686 package).


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#11 2008-04-20 15:25:24

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: [SOLVED] libmtp problems

Nope, doesn't change a thing upgrading libmtp. There must something wrong with dbus or hal in my installation because my GNOME installation is all screwy. I was running KDEmod before and then I installed GNOME 2.22 and since then my desktop has been a mess. Here is my modules list from rc.conf

MODULES=(forcedeth slhc ac97_bus snd-mixer-oss snd-pcm-oss snd-seq-oss snd-seq-device snd-seq-midi-event snd-seq snd-page-alloc snd-pcm snd-rawmidi snd-timer snd snd-mpu401-uart snd-mpu401 snd-ac97-codec snd-intel8x0 soundcore fuse vboxdrv)

and daemon list

DAEMONS=(syslog-ng network netfs crond alsa hal fam wicd cups samba stbd).

Regards

André

Offline

#12 2008-04-22 16:48:27

Kurous
Member
From: Victoria BC
Registered: 2006-08-07
Posts: 36

Re: [SOLVED] libmtp problems

I think this is a problem with UDEV, not lib mtp. I've been hacking apart the rules with no luck so far.

The fact that it works after a UDEV restart, and that apparently it works if the device is plugged in when the computer is turned on... seems to be an issue with hotplug functionality.


I just want to be a moderately intelligent monkey that wears a suit.... That's why I've enrolled in business school!

Offline

#13 2008-04-22 17:10:06

uastasi
Member
From: Salento - Italy
Registered: 2007-11-27
Posts: 247

Re: [SOLVED] libmtp problems

Try in this way:

cd /etc/udev/rules.d/
mv udev.rules.pacsave udev.rules
killall udevd
/etc/start_udev

Till the last battle, till the last bottle.
aur - twitter

Offline

#14 2008-04-23 06:38:19

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: [SOLVED] libmtp problems

The libmtp source package includes a complete set of udev rules for libmtp devices, which are installed by a script called hotplug.sh. The script is rather interactive and proposes to install also the old hotplug stuff and the support for hal (which would create an unwanted dep)., so I guess that it can not used in the package, but perhaps the udev rules could be installed explicitly in the PKGBUILD in /etc/udev/rules.d. If I am not the only one to think that this is a good idea (something like this is already done for analogous libraries, such as libnjb) I can post a bug.


Mortuus in anima, curam gero cutis

Offline

#15 2008-04-23 09:12:37

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] libmtp problems

Definitely. If it comes with udev rules, the PKGBUILD should install them into the package in a verbose manner imho.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#16 2008-04-23 14:47:46

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: [SOLVED] libmtp problems

uastasi wrote:

Try in this way:

cd /etc/udev/rules.d/
mv udev.rules.pacsave udev.rules
killall udevd
/etc/start_udev

AWESOME!!!! Now it works smile smile smile. THANK YOU!!!

Regards

André

Offline

#17 2008-04-23 14:56:40

uastasi
Member
From: Salento - Italy
Registered: 2007-11-27
Posts: 247

Re: [SOLVED] libmtp problems

fettouhi wrote:
uastasi wrote:

Try in this way:

cd /etc/udev/rules.d/
mv udev.rules.pacsave udev.rules
killall udevd
/etc/start_udev

AWESOME!!!! Now it works smile smile smile. THANK YOU!!!

Regards

André

Please, mark it as [Solved] wink


Till the last battle, till the last bottle.
aur - twitter

Offline

#18 2008-04-23 16:41:42

Kurous
Member
From: Victoria BC
Registered: 2006-08-07
Posts: 36

Re: [SOLVED] libmtp problems

Fixed here as well. Why was udev.rules removed??


I just want to be a moderately intelligent monkey that wears a suit.... That's why I've enrolled in business school!

Offline

#19 2008-04-23 17:41:18

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] libmtp problems

o_O

I have no such thing, not even after a reinstall:

[root@hermes stijn]# ls /etc/udev/rules.d/
05-personal.rules                           60-cdrom_id.rules                           75-persistent-net-generator.rules.optional
05-udev-early.rules                         60-persistent-input.rules                   80-drivers.rules
40-pilot-links.rules                        60-persistent-storage-tape.rules            90-hal.rules
50-udev-default.rules                       60-persistent-storage.rules                 95-udev-late.rules
51-arch.rules                               61-persistent-storage-edd.rules             99-fuse.rules
53-sane.rules                               64-device-mapper.rules                      bluetooth.rules
54-gphoto.rules                             64-md-raid.rules                            device-mapper.rules
55-hpmud.rules                              75-cd-aliases-generator.rules.optional

Edit: wait - that means the new rules broke the permissions. Can someone diff both files? I guess my box (and thus my install) is too new to have any of those udev pacsave files...

Would be very much appreciated smile.

Last edited by B (2008-04-23 17:48:02)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#20 2008-04-23 18:11:25

Kurous
Member
From: Victoria BC
Registered: 2006-08-07
Posts: 36

Re: [SOLVED] libmtp problems

I never had the udev.rules file before either, I simply copied over the pacsave file.

rules.d]$ ls
05-udev-early.rules               61-persistent-storage-edd.rules
40-pilot-links.rules              64-device-mapper.rules
#45-libnjb.rules#                 64-md-raid.rules
45-libnjb.rules                   75-cd-aliases-generator.rules.optional
45-libnjb.rules~                  75-persistent-net-generator.rules.optional
50-udev-default.rules             80-drivers.rules
50-udev-default.rules~            90-hal.rules
51-arch.rules                     95-udev-late.rules
53-sane.rules                     99-fuse.rules
54-gphoto.rules                   gphoto.rules~
60-cdrom_id.rules                 #libmtp.rules#
60-pcmcia.rules                   libmtp.rules
60-persistent-input.rules         libmtp.rules~
60-persistent-storage.rules       udev.rules
60-persistent-storage-tape.rules  udev.rules.pacsave

I just want to be a moderately intelligent monkey that wears a suit.... That's why I've enrolled in business school!

Offline

#21 2008-04-23 21:07:22

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] libmtp problems

Hrm... I just had the udev.rules, nothing else. I checked the cvs of the udev package, the differences with previous versions of the udev.rules files, but nothing that seems to relate (at least not directly).


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#22 2008-04-29 13:21:01

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: [SOLVED] libmtp problems

I just did a fresh install of Arch and I don't have the udev.rules or udev.rules.pacsave at all. Can someone post the udev.rules file please?

Regards

André

Offline

#23 2008-04-29 14:32:00

uastasi
Member
From: Salento - Italy
Registered: 2007-11-27
Posts: 247

Re: [SOLVED] libmtp problems

fettouhi wrote:

I just did a fresh install of Arch and I don't have the udev.rules or udev.rules.pacsave at all. Can someone post the udev.rules file please?

Regards

André

http://pastebin.com/m5f5a53ad
wink


Till the last battle, till the last bottle.
aur - twitter

Offline

#24 2008-06-10 23:11:16

cautha
Member
From: Kingston, Ontario
Registered: 2008-06-02
Posts: 115
Website

Re: [SOLVED] libmtp problems

Re: the above link:

Unknown post id, it may have expired or been deleted

How do I check what the rules are for my device (a Zen V+)? Presumably, I should be able to add myself to the right group if I figure out which one it wants me to be in.

Running gnomad2 as root is the only way the system will allow me to access it, at this point. As a normal user, I get:

usb_claim_interface(): Operation not permitted
LIBMTP PANIC: Unable to initialize device 1
LIBMTP PANIC: configure_usb_devices() error code: 7 on line 1599
LIBMTP_Get_First_Device: Error Connecting
PDE device NULL.

How can I fix this? Sorry if my question seems noobish roll

Harry

Offline

#25 2008-06-10 23:53:44

cautha
Member
From: Kingston, Ontario
Registered: 2008-06-02
Posts: 115
Website

Re: [SOLVED] libmtp problems

Problem solved! Look here.

Offline

Board footer

Powered by FluxBB