[arch-general] Do packages built on libusb need rebuilding on libusbx? upsd won't stay connected over usb.

David C. Rankin drankinatty at suddenlinkmail.com
Fri Jun 8 16:13:27 EDT 2012


Guys,

 Update yesterday caused network-ups-tools to fail (upsd). I have 2 x86_64
servers running upsd. The one I did not update continues to work, but the one I
updated yesterday does not. So I have a working install to compare to. The
install that fails -- starts just fine, but then loses communication with the
ups for some reason:

Jun  8 11:16:51 nirvana upsd[13963]: listening on 192.168.6.17 port 3493
Jun  8 11:16:51 nirvana upsd[13963]: listening on 127.0.0.1 port 3493
Jun  8 11:16:51 nirvana upsd[13964]: Startup successful
Jun  8 11:16:51 nirvana upsmon[13966]: Startup successful
Jun  8 11:16:56 nirvana upsmon[13967]: Communications with UPS
nirvana_ups at localhost lost
Jun  8 11:16:56 nirvana wall[13969]: wall: user nut broadcasted 1 lines (52 chars)
Jun  8 11:17:01 nirvana upsmon[13967]: UPS nirvana_ups at localhost is unavailable
Jun  8 11:17:01 nirvana wall[13972]: wall: user nut broadcasted 1 lines (42 chars)

  It uses the usbhid module and it is successfully loaded:

11:39 nirvana:~/arch/pkg/bld> lsmod | grep usbhid
usbhid                 36142  1
hid                    84549  1 usbhid
usbcore               146847  5 ehci_hcd,ohci_hcd,usbhid

  However, when I try and talk to the ups, I get:

11:39 nirvana:~/arch/pkg/bld> upsc nirvana_ups
Error: Driver not connected

  The network-ups-tools wiki mentions that an incorrect state path could cause
this problem. I checked before updating yesterday and /var/lock and /var/run
were both proper symlinks before running the filesystem update with --force.

  That leaves me looking at either libusb -> libusbx or udev/smartd-tools issues.

  It looks like there is an issue with the way usb is now handled. Running:

$ sudo usbhid-ups -u root -DD -a nirvana_ups

<snip>
Trying to match device
Device matches
failed to claim USB device: Device or resource busy
detached kernel driver from USB device...
HID descriptor length 387
Report Descriptor size = 387
Using subdriver: CyberPower HID 0.2
Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x01, Offset: 0, Size:
8, Value: 1.000000
Path: UPS.PowerSummary.iSerialNumber, Type: Feature, ReportID: 0x02, Offset: 0,
Size: 8, Value: 2.000000
Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x03, Offset:
0, Size: 8, Value: 4.000000
<snip>

  upsd connects fine, gets the correct value from the UPS and then doesn't stay
connected? Does this sound like a libusb -> libusbx issue? If so, what do I need
to do to fix it? Rebuild against libusbx, bug report? What say the gurus?

-- 
David C. Rankin, J.D.,P.E.


More information about the arch-general mailing list