[Nut-upsuser] CyberPower usbhid-ups continuously disconnects/reconnect

Arnaud Quette aquette.dev at gmail.com
Mon Oct 8 17:42:16 UTC 2012


Hi SirG(ent?)

2012/10/6 SirG <nut-upsuser at gleizer.net>

> I have had a similar problem to many other people for the last few
> months with my Cyberpower UPS. It was working properly after reboot
> about one in five times; the rest of the time it  would endlessly
> disconnect and reconnect, according to syslog messages.
>
> The latest I was able to find towards a solution is
>
> http://www.mail-archive.com/nut-upsuser@lists.alioth.debian.org/msg06671.html
>
> The root cause is identified as a Cyberpower firmware behavior, that
> disconnects the box, unless a driver claims it within 20 seconds of
> connection. Since the driver is started by an rc script only at boot,
> if that boot script does not run at the right time, the only recovery
> is to run 'upsdrvctl start' manually - which is what I had been doing.
>
> The suggestion in the above article is to re-arrange the boot scripts
> to have nut start earlier.
>
> In my case this was a bit harder to control (Ubuntu uses upstart) and
> did not seem very robust; I came up with an alternative solution for
> systems that use udev.
>
> The solution is to have udev run 'upsdrvctl start' when this device
> connects. To do so, add ", RUN+="/sbin/upsdrvctl start" to the end of
> the udev config line for your device. Mine looks like this:
>
> #  Dynex DX-800U?, aloso 825AVRLCD  - usbhid-ups
> ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", MODE="664",
> GROUP="nut", RUN+="/sbin/upsdrvctl start"
>
> In Ubuntu, the recommended way to do this is described in
> /etc/udev/rules.d/README. I  copied
> /lib/udev/rules.d/*-nut-usbups.rules to
> /etc/udev/rules.d/nut-usbups.rules and modified my device's line as
> shown above.
>
> Works like a charm, very stable, and, as a fringe benefit, I can
> hotplug my UPS, if I need to rearrange my USB cables.
>

thanks for sharing this solution with the list.

Side questions:
- have you (and others) reported this issue to CyberPower, and asked for a
fix.
- do you know (at least approx.) which firmware/models are impacted.

Side comment: your solution has some limitations.
Mainly, whenever or (SW or HW) disconnection will happen, another instance
of usbhid-ups will be started.
So you may either create a wrapper script or use the following line:
/sbin/upsdrvctl stop ; /sbin/upsdrvctl start
or
/usr/bin/killall -9 usbhid-ups ; /sbin/upsdrvctl start

cheers
Arnaud
-- 
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20121008/fa786b18/attachment.html>


More information about the Nut-upsuser mailing list