hotplug scripts are not installed

Bug #1497 reported by Jelmer Graafstra
10
Affects Status Importance Assigned to Milestone
Gnomad2
Incomplete
Undecided
Unassigned
gnomad2 (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

The hotplug scripts provided with the gnomad2 source (or an alternative) are not installed with the package. As a result, file permissions are not set correctly when the player is plugged in, so only user 'root' will be able to access it.

Changed in gnomad2:
assignee: nobody → motu
Revision history for this message
Douglas Anderson (douglas-anderson) wrote :

I think the severity level should get bumped up, considering that doing 'sudo apt-get install gnomad2' is just about guaranteed to install a broken program. It has been a recurring problem for me throughout multiple installs.

Running Gnomad2 from the applications menu after a flawless install still throws the "Could not open jukebox:usb_set_configuration: Operation not permitted" error.

Though the workaround is simple enough, for people not familiar with searching forums and bug trackers, the program and their mp3 player is rendered useless. Big problem.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

We don't use hotplug anymore. I close this bug. Feel free to reopen it (or open a new one) if the application is still broken.

Changed in gnomad2:
status: Unconfirmed → Rejected
Revision history for this message
Richard Quirk (quirky) wrote :

Adding the appropriate /etc/hotplug/usb scripts by hand fixes the "root only" problem, so it seems Dapper does still use hotplug.

Changed in gnomad2:
status: Rejected → Confirmed
Revision history for this message
Richard Quirk (quirky) wrote :

OK. So I've been investigating a bit. The apropriate udev scripts are present in /etc/udev/rules.d/45-libnjb.rules.

These correctly set the permissions on /dev/bus/usb/00x/00y to root:plugdev and 0660 and my user is in the group plugdev. I can't seem to repeat the problem after having used the old hotplug scripts, even though I have removed them now. But the first time I plugged the zen in, it gave this error message.

Revision history for this message
Richard Quirk (quirky) wrote :

The problem is now only seen if you start the PC with the device plugged in. Once you unplug it and re-insert it, then the correct udev rule is called, device (/dev/bus/usb/N/M) changed correctly, etc.
i.e. Works as expected in Dapper.

Changed in gnomad2:
status: Confirmed → Rejected
Revision history for this message
Linus Walleij (triad) wrote : Re: [Bug 1497] Re: hotplug scripts are not installed

On Sat, 15 Jul 2006, RichardQuirk wrote:

> But the first time I plugged the zen in,
> it gave this error message.

You have to let the kernel experience a hotplug event (deplug/replug)
before any hotplug/udev scripts take action. They only run when the
device is attached.

Linus

Revision history for this message
Linus Walleij (triad) wrote :

On Sun, 16 Jul 2006, RichardQuirk wrote:

> The problem is now only seen if you start the PC with the device plugged in.

This means there is no script that performs "coldplug" i.e. check for
present USB-devices when the machine is turned on. Fedora calls all udev
scripts once during boot, it might be that Dapper doesn't.

Linus

Revision history for this message
Stefano Pedretti (stefano-pedretti) wrote :

Bug still here in feisty fawn 7.04

Need to be fixed adding this file : /etc/udev/rules.d/nomad.rules

# Creative Zen V Plus
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”4152″, GROUP=”plugdev”, MODE=”0660″
# Creative Zen V
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”4150″, GROUP=”plugdev”, MODE=”0660″

Tested with Zen V

Revision history for this message
Stefano Pedretti (stefano-pedretti) wrote :

Extended list of nomad devices:

# Creative Zen Sleek
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”4136″, MODE=”666″
# Creative Nomad Jukebox Zen Touch
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”411b”, MODE=”666″
# Creative Nomad Jukebox Zen Micro
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”411e”, MODE=”666″
# Creative Zen (Zen Micro variant)
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”411d”, MODE=”666″
# Creative Nomad Jukebox Zen Xtra
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”4110″, MODE=”666″
# Creative Nomad Jukebox
SYSFS{idVendor}==”0471″, SYSFS{idProduct}==”0222″, MODE=”666″
# Creative Nomad Jukebox 2
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”4100″, MODE=”666″
# Creative Nomad Jukebox 3
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”4101″, MODE=”666″
# Creative Nomad Jukebox Zen
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”4108″, MODE=”666″
# Creative Nomad Jukebox Zen USB 2.0
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”410b”, MODE=”666″
# Creative Nomad Jukebox Zen NX
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”4109″, MODE=”666″
# Creative Nomad Jukebox Zen MicroPhoto
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”413c”, MODE=”666″
# Creative Zen Sleek Photo
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”413d”,GROUP=”plugdev”, MODE=”0660″
# Creative Zen Nano Plus
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”4139″, SYMLINK+=”libmtp-%k”, MODE=”666″
# Creative Zen V Plus
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”4152″, GROUP=”plugdev”, MODE=”0660″
# Creative Zen V
SYSFS{idVendor}==”041e”, SYSFS{idProduct}==”4150″, GROUP=”plugdev”, MODE=”0660″

Revision history for this message
dstoian (dstoian) wrote :

I am using dapper with gnomad2 version 2.9.0 installed from source (together with the latest libnjb and libmtp, of course). the scripts are installed, but libmtp.rules or nomad.rules are missing the entry for my Creative Zen Micro 6GB, for which I was able to find the numbers, using lsusb command, and then added the appropriate line(s).

The problem is that gnomad2 will run only in superuser mode, i.e. when I run from terminal for example:
sudo gnomad2
or in a launcher:
gksudo gnomad2.

================

here's more:

when i run as normal user i get "No jukeboxes found on USB bus".
but when i run as superuser gnomad2 works fine.

here's my command-line output when i try to run gnomad2 from console:

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

=================

and even more:

well, when i run gnomad2 as user, i tail those messages with:

tail -f /var/log/messages

i get:

usb 4-3: new high speed USB device using ehci_hcd and address 2

and, when i run as superuser/sudo, i get:

usb 4-3: reset high speed USB device using ehci_hcd and address 2

See the difference? It's just one word.
In case of a normal user is "new", while as a superuser is "reset".

===========

now, please let's find out the problem, because I've tried everything posted in this thread and many others, and I could not make gnomad2 run in normal user mode - only in superuser mode.

thank you very much for understanding.

Revision history for this message
Linus Walleij (triad) wrote :

On Wed, 30 Jan 2008, dstoian wrote:

> (together with the latest libnjb and libmtp, of course). the scripts are
> installed, but libmtp.rules or nomad.rules are missing the entry for my
> Creative Zen Micro 6GB,

This is the real problem.

* Which version of libmtp are you using? (if < 0.2.5, upgrade)
* If installed from source, did you run hotplug.sh after install?

Linus

Revision history for this message
dstoian (dstoian) wrote :

thanks for the reply, Linus!

i have libmtp version 0.2.5, libnjb version 2.2.6, and gnomad2 version 2.9.0.

yes, i did run the hotplug.sh script - and i have the libmtp.rules and nomad.rules files under: /etc/udev/rules.d

one or the other "rules" file was missing an entry for my device Creative Zen Micro has device id 4130 so i had to add it where it was missing.

i found my device id like so: lsusb | grep Creative
which returns: Bus 004 Device 006: ID 041e:4130 Creative Technology, Ltd
so vendor id is 041e and device id is 4130.

any more thoughts? so many people out there have the same problem, i've read about this on so many forum threads.

thank you,
dan

Revision history for this message
Linus Walleij (triad) wrote :

On Wed, 30 Jan 2008, dstoian wrote:

> one or the other "rules" file was missing an entry for my device
> Creative Zen Micro has device id 4130 so i had to add it where it was
> missing.

Only libmtp.rules should have this device, it is MTP only, libnjb.rules
has no use for it. And it should have that entry.

> any more thoughts? so many people out there have the same problem, i've
> read about this on so many forum threads.

The problem is somewhere in your distributions hotplug/udev mechanisms. I
don't know enough of Ubuntu to know how it is set up, this is distribution
specific to a large extent, sorry.

Linus

Revision history for this message
dstoian (dstoian) wrote :

that's ok, i can live with it for now.

just a note: there is no "libnjb.rules": only these two:
- libmtp..rules. and
- nomad.rules.

thanks

Revision history for this message
Brian Pitts (bpitts) wrote :

This still occurs the first time you attach a nomad jukebox in gutsty.

Revision history for this message
mozgreen (moz-quaver) wrote :
komputes (komputes)
Changed in gnomad2:
status: Invalid → Confirmed
Revision history for this message
dstoian (dstoian) wrote :

I found out recently that Amarok can do a very good job at managing MTP devices. Hmmm! Nice.
I tried it in Ubuntu 8.04 and it works fine with my Creative Zen Micro.

http://amarok.kde.org/wiki/Media_Device:MTP

Revision history for this message
Alessio Treglia (quadrispro) wrote :

Removed from Maverick.
Closing.

Changed in gnomad2 (Ubuntu):
assignee: MOTU (motu) → nobody
status: Confirmed → Invalid
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. We are sorry that we do not always have the capacity to look at all reported bugs in a timely manner. There have been many changes in Ubuntu since that time you reported the bug and your problem may have been fixed with some of the updates. It would help us a lot if you could test it on a currently supported Ubuntu version. When you test it and it is still an issue, kindly upload the updated logs by running apport-collect <bug #> and any other logs that are relevant for this particular issue.

Changed in gnomad2:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.