[Nut-upsuser] Re: MGE Protection Center and Suse

arnaud.quette at mgeups.com arnaud.quette at mgeups.com
Wed Jul 27 07:42:38 UTC 2005


[mail blocked in my draft pool for some time]

> Am 21.07.2005 um 10:51 schrieb arnaud.quette at mgeups.com:
> > So, 2 things:
> > 1) why this hasn't been set?
> > I really don't know! but check this:
> > - /etc/hotplug/libhidups should be 755 (rwxr-xr-x)

did you checked the permissions on that file?
(ie below "/etc/hotplug/usb/libhidups")

> > - hotplug should call libhidups when the USB cord
> > is plugged back (try to unplug / replug the USB cord
> > and check the syslog)
>
> Jul 21 11:13:26 backup kernel: usb 2-1: new low speed USB device using
> ohci_hcd and address 2
> Jul 21 11:13:27 backup syslog-ng[3731]: Changing permissions on special
> file /dev/xconsole
> Jul 21 11:13:27 backup syslog-ng[3731]: Changing permissions on special
> file /dev/tty10
> Jul 21 11:13:27 backup kernel: usbhid: probe of 2-1:1.0 failed with
> error -5

that last "error" is void, and due to the fact that we ask
usbhid to ignore MGE devices.

> > 2) simple tests
> > - call "export ACTION=add && export TYPE=USB && export
> > DEVICE=/proc/bus/usb/001/002 && /etc/hotplug/libhidups"
> > The result must be that /proc/bus/usb/001/002" is set to "660
> > root:nobody"
>
> backup:~ # export ACTION=add && export TYPE=USB && export
> DEVICE=/proc/bus/usb/001/002 && /etc/hotplug/libhidups
> -bash: /etc/hotplug/libhidups: No such file or directory

mea culpa: should be "/etc/hotplug/usb/libhidups"

> > Note that you need to adapt "001/002" as it changes
> > upon unplug/replug. You can check it with "lsusb"
> >
> backup:~ # lsusb
> ...
> Bus 002 Device 002: ID 0463:ffff MGE UPS Systems UPS

this tells us that the MGE device is available under
/proc/bus/usb/002/002

> > - if the above is ok, then start newhidups in verbose mode
> > (having done an "export USB_DEBUG=3" before to get
> > libusb trace)
>
> backup:~ # ls -lR /proc/bus/usb/
> ...
> /proc/bus/usb/002:
> ...
> -rw-r--r--  1 root root 52 Jul 21 11:13 002

but still not applied!
Note that the permissions can be applied up to
10 seconds after the USB cable is plugged back
(FYI, the performance problem is addressed with
hotplug-ng, which is a binary, not a script)

> > One thing is fine is that we are now sure that this is a hotplug
> > problem. The only remaining point is "how to solve this", and
> > it depends on "why this hasn't been set"...
>
> hope you got an idea ;)

always ;-)

- is hotplug running: "/etc/init.d/hotplug status"
- is "/etc/hotplug/usb/libhidups" executable (rwxr-xr-x)?
- are there message about hotplug in the syslog after
you replug the USB cord?

The solution to this issue is simply to find why libhidups
isn't called, and to correct it.

Arnaud





More information about the Nut-upsuser mailing list