Hy Russel,

2007/5/31, Russel Winder <[EMAIL PROTECTED]>:
> Arnaud,
>
> Thanks for getting back on this one quickly.  Much appreciated.
>
> > just a question: have plugged your UPS USB cord before or after having
> > installed nut?
> > the udev script is there to do the job, but I've recently made a
> > change to the package to fire up the udev restart upon install.
> > Otherwise, if the UPS USB cord was already plugged in, the device is
> > not reachable for the nut user... QED
>
> To be honest I cannot remember.  I suspect I plugged all the hardware
> in, and then found I didn't have nut installed, so installed it.  In the
> past I had an APC Smart UPS and was using apcupsd (on a serial cable).
> There has been one Ubuntu upgrade (Edgy -> Feisty) in between my
> installing the hardware and nut, and actually getting round to seeing
> how to get nut working.

I suspect you've hit the "previously plugged" case.
the package fix is simple, though not applied on the 2.0.x branches
(since I'm finishing the upstream 2.2.0 release, along with the
according debs):
* add in "nut.postinst -> configure" the following

    # restart udev to apply the USB rules to the already plugged devices
    [ -x /etc/init.d/udev ] && /etc/init.d/udev restart

> I have yet to understand when the /dev/bus/XXX/YYY changes -- the XXX is
> always the same but the YYY changes on each removal and reinsert of the
> cable (to be expected) but also when I stop and restart upsd.

XXX is the USB bus on which the device is plugged. It's stable since
physically linkde.
YYY is the device number. Each time the device is plugged, or the bus
reseted, the system gives to each devices a new incremented number
(starting from 1).

both can be guessed using lsusb

> After /etc/init.d/nut stop, I sometimes have to go in and check the YYY
> and if it has changed set the group permission.  Once
> done /etc/init.d/nut start appears to do all the right things, and upsc
> gives me a status report.

another test is to call "invoke-rc.d udev restart" and check the perms.

> Now all I have to do is find out how to put all the actual actions in
> place.  Actually though my biggest problem is that I am getting a `data
> stale' report every 2-3s:
>
> May 31 07:07:37 balin upsd[27902]: Data for UPS [balin] is stale - check
> driver
> May 31 07:07:37 balin upsd[27902]: UPS [balin] data is no longer stale
> May 31 07:07:39 balin upsd[27902]: Data for UPS [balin] is stale - check
> driver
> May 31 07:07:39 balin upsd[27902]: UPS [balin] data is no longer stale
> May 31 07:07:41 balin upsd[27902]: Data for UPS [balin] is stale - check
> driver
> May 31 07:07:41 balin upsd[27902]: UPS [balin] data is no longer stale
> May 31 07:07:44 balin upsd[27902]: Data for UPS [balin] is stale - check
> driver
> May 31 07:07:44 balin upsd[27902]: UPS [balin] data is no longer stale
> May 31 07:07:46 balin upsd[27902]: Data for UPS [balin] is stale - check
> driver
> May 31 07:07:46 balin upsd[27902]: UPS [balin] data is no longer stale
> May 31 07:07:48 balin upsd[27902]: Data for UPS [balin] is stale - check
> driver
> May 31 07:07:48 balin upsd[27902]: UPS [balin] data is no longer stale

please contact us through the nut user mailing list with all these info:
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

there might be a problem, though if it's only the driver that take a
bit more time to update, you can avoid it by adding +5 sec to
upsd.conf/MAXAGE  (ie 20 instead of 15)

> > > This may be just that the Nut documentation isn't good enough, but I
> > > thought I would report this as it is definitely not the case that Ubuntu
> > > "just works".
> >
> > side notes:
> > - yeah, nut doc is a mess. I've tried several time to launch a project
> > to make a good docbook doc, but each time, the doc writers have
> > silently gone...
>
> Do people still use Docbook/XML for authoring?  I thought that had died.

quite franckly, I'm not a doc writer. eric s. raymond has joined us,
and will work on that.
imo, docbook isn't dead.

> > - the HAL support is also coming with 2.2.0 (for USB only). This means
> > that having the package (nut-hal-drivers) installed (and I'll lobby
> > for an inclusion in the base system), you don't have to configure nor
> > do anything apart plugging your UPS USB cord once. Then, HAL and
> > Gnome-Power-manager fires up and do the job... I have feisty packages
> > underhand if you're interested in (and I'm interested in feedback ;-))
>
> I am prone to working close to the bleeding edge, but I cannot get
> involved in experiments that involve actual downtime -- I have deadlines
> to get books to publishers!  I have a standard Ubuntu 7.04 Feisty Fawn
> installation, and am happy to try running software (as long as it won't
> damage the UPS or the machine :-) and report back observations.

no downtime here. the only thing is to remove your classic nut
packages, install the nut-hal-drivers one, unplug / replug your USB
cord, and check for gnome-power-manager and hal-device-manager
reports...

the package is there: http://opensource.mgeups.com/beta/nut-hal/

the info needed are:
- an upsc output before install nut-hal-drivers
- an "lshal -lu <device-udi>". the device UDI can be found doing first
a lshal and checking for your device...
- does the g-p-m pops when the device is plugged?

Arnaud
-- 
Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/
OpenSource Developer - http://arnaud.quette.free.fr/

-- 
Incorrect group for USB device in NUT
https://bugs.launchpad.net/bugs/117519
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to