3

I'm running a nut server connected to a Tripp Lite SMART1500LCD by USB. The device is behaving unexpectedly and I can see these kernel messages:

user@host:~ $ dmesg -T
[Wed Dec  4 13:24:24 2019] usb 1-1.5: USB disconnect, device number 91
[Wed Dec  4 13:24:25 2019] usb 1-1.5: new low-speed USB device number 92 using dwc_otg
[Wed Dec  4 13:24:25 2019] usb 1-1.5: New USB device found, idVendor=09ae, idProduct=2012, bcdDevice= 0.09
[Wed Dec  4 13:24:25 2019] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[Wed Dec  4 13:24:25 2019] usb 1-1.5: Product: Tripp Lite UPS
[Wed Dec  4 13:24:25 2019] usb 1-1.5: Manufacturer: Tripp Lite
[Wed Dec  4 13:24:25 2019] hid-generic 0003:09AE:2012.15157: hiddev96,hidraw0: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on usb-3f980000.usb-1.5/input0
[Wed Dec  4 13:24:39 2019] usb 1-1.5: USB disconnect, device number 92
[Wed Dec  4 13:24:40 2019] usb 1-1.5: new low-speed USB device number 93 using dwc_otg
[Wed Dec  4 13:24:40 2019] usb 1-1.5: New USB device found, idVendor=09ae, idProduct=2012, bcdDevice= 0.09
[Wed Dec  4 13:24:40 2019] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[Wed Dec  4 13:24:40 2019] usb 1-1.5: Product: Tripp Lite UPS
[Wed Dec  4 13:24:40 2019] usb 1-1.5: Manufacturer: Tripp Lite
[Wed Dec  4 13:24:40 2019] hid-generic 0003:09AE:2012.15158: hiddev96,hidraw0: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on usb-3f980000.usb-1.5/input0
[Wed Dec  4 13:24:54 2019] usb 1-1.5: USB disconnect, device number 93
[Wed Dec  4 13:24:55 2019] usb 1-1.5: new low-speed USB device number 94 using dwc_otg
[Wed Dec  4 13:24:55 2019] usb 1-1.5: New USB device found, idVendor=09ae, idProduct=2012, bcdDevice= 0.09
[Wed Dec  4 13:24:55 2019] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[Wed Dec  4 13:24:55 2019] usb 1-1.5: Product: Tripp Lite UPS
[Wed Dec  4 13:24:55 2019] usb 1-1.5: Manufacturer: Tripp Lite
[Wed Dec  4 13:24:55 2019] hid-generic 0003:09AE:2012.15159: hiddev96,hidraw0: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on usb-3f980000.usb-1.5/input0

You can see the device number increments each time the UPS reconnects.

I have replaced the USB cable and tried different USB ports but that did not affect anything.

Also, I can see this error every 22s.

user@host:~ $ sudo systemctl status nut-driver
libusb_get_interrupt: error submitting URB: No such device

The driver config:

# /etc/nut/ups.conf

[ups]
    driver = usbhid-ups
    port = auto
    desc = "Tripp Lite SMART1500LCD"
    vendorid = 09ae
    productid = 2012

If I manually run the driver this is the output with the UPS power summary removed:

user@host:~ $ sudo /lib/nut/usbhid-ups -DD -a ups
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
   0.000000     debug level is '2'
   0.001893     upsdrv_initups...
   0.003138     Checking device (09AE/2012) (001/106)
   0.016572     - VendorID: 09ae
   0.016729     - ProductID: 2012
   0.016847     - Manufacturer: Tripp Lite
   0.016963     - Product: Tripp Lite UPS
   0.017080     - Serial Number: unknown
   0.017196     - Bus: 001
   0.017314     - Device release number: 0009
   0.017430     Trying to match device
   0.017736     Device matches
   0.021374     HID descriptor length 662
   0.111731     Report Descriptor size = 662
   0.113247     Using subdriver: TrippLite HID 0.82
   0.113406     74 HID objects found
   0.174949     refresh_report_buffer: expected 5 bytes, but got 2 instead
   0.176949     refresh_report_buffer: expected 5 bytes, but got 2 instead
   0.188951     libusb_get_report: No error
   0.189102     Can't retrieve Report c1: Operation not permitted
   0.192948     libusb_get_report: No error
   0.193087     Can't retrieve Report 9a: Operation not permitted
   0.212168     Report descriptor retrieved (Reportlen = 662)
   0.212289     Found HID device
   0.212410     Detected a UPS: Tripp Lite /Tripp Lite UPS
   0.224046     find_nut_info: unknown info type: load.on.delay
   0.224178     find_nut_info: unknown info type: load.on.delay
   0.224333     upsdrv_initinfo...
   0.224474     upsdrv_updateinfo...
   0.253472     Got 1 HID objects...
   0.253783     Quick update...
   0.255248     dstate_init: sock /var/run/nut/usbhid-ups-ups open on fd 5
   0.255424     upsdrv_updateinfo...
   0.317491     Got 1 HID objects...
   0.317854     Quick update...
   2.257413     upsdrv_updateinfo...
   2.397465     Got 8 HID objects...
   2.398955     Quick update...
   4.258846     upsdrv_updateinfo...
   4.477447     Got 1 HID objects...
   4.477793     Quick update...
   6.260665     upsdrv_updateinfo...
   6.511167     libusb_get_interrupt: Connection timed out
   6.511357     Got 0 HID objects...
   6.511485     Quick update...
   8.262452     upsdrv_updateinfo...
   8.512913     libusb_get_interrupt: Connection timed out
   8.513114     Got 0 HID objects...
   8.513243     Quick update...
  10.264242     upsdrv_updateinfo...
  10.514689     libusb_get_interrupt: Connection timed out
  10.514874     Got 0 HID objects...
  10.515005     Quick update...
  12.266027     upsdrv_updateinfo...
  12.516595     libusb_get_interrupt: Connection timed out
  12.516789     Got 0 HID objects...
  12.516919     Quick update...
  14.267817     upsdrv_updateinfo...
  14.518422     libusb_get_interrupt: Connection timed out
  14.518605     Got 0 HID objects...
  14.518795     Quick update...
  16.269609     upsdrv_updateinfo...
  16.520214     libusb_get_interrupt: Connection timed out
  16.520317     Got 0 HID objects...
  16.520357     Quick update...
  18.271398     upsdrv_updateinfo...
  18.522023     libusb_get_interrupt: Connection timed out
  18.523212     Got 0 HID objects...
  18.524242     Quick update...
  20.273176     upsdrv_updateinfo...
  20.273330     libusb_get_interrupt: error submitting URB: No such device
  22.275225     upsdrv_updateinfo...
  22.275328     Got to reconnect!
  22.276163     Checking device (09AE/2012) (001/107)
  22.289479     - VendorID: 09ae
  22.289538     - ProductID: 2012
  22.289571     - Manufacturer: Tripp Lite
  22.289600     - Product: Tripp Lite UPS
  22.289629     - Serial Number: unknown
  22.289658     - Bus: 001
  22.289689     - Device release number: 0009
  22.289717     Trying to match device
  22.289791     Device matches
  22.289845     failed to claim USB device: could not claim interface 0: Device or resource busy
  22.291291     detached kernel driver from USB device...
  22.343257     Got 8 HID objects...
  22.345208     Quick update...
  24.277201     upsdrv_updateinfo...
  24.423254     Got 1 HID objects...
  24.423658     Quick update...
  26.279093     upsdrv_updateinfo...
  26.503245     Got 1 HID objects...
  26.503660     Quick update...
  28.281009     upsdrv_updateinfo...
  28.531523     libusb_get_interrupt: Connection timed out
  28.531717     Got 0 HID objects...
  28.531851     Quick update...
  30.282799     upsdrv_updateinfo...
  30.533325     libusb_get_interrupt: Connection timed out
  30.533523     Got 0 HID objects...
  30.533656     Quick update...
  32.284587     upsdrv_updateinfo...
  32.535043     libusb_get_interrupt: Connection timed out
  32.535232     Got 0 HID objects...
  32.535365     Full update...
  34.286352     upsdrv_updateinfo...
  34.536823     libusb_get_interrupt: Connection timed out
  34.537012     Got 0 HID objects...
  34.537147     Quick update...
  36.288143     upsdrv_updateinfo...
  36.538698     libusb_get_interrupt: Connection timed out
  36.538785     Got 0 HID objects...
  36.538828     Quick update...
  38.289947     upsdrv_updateinfo...
  38.540189     libusb_get_interrupt: Connection timed out
  38.540268     Got 0 HID objects...
  38.540290     Quick update...
  40.291736     upsdrv_updateinfo...
  40.542062     libusb_get_interrupt: Connection timed out
  40.542250     Got 0 HID objects...
  40.542385     Quick update...
  42.293530     upsdrv_updateinfo...
  42.293653     libusb_get_interrupt: error submitting URB: No such device
  44.295581     upsdrv_updateinfo...
  44.295686     Got to reconnect!
  44.296444     Checking device (09AE/2012) (001/108)
  44.308695     - VendorID: 09ae
  44.308755     - ProductID: 2012
  44.308786     - Manufacturer: Tripp Lite
  44.308815     - Product: Tripp Lite UPS
  44.308844     - Serial Number: unknown
  44.308872     - Bus: 001
  44.308901     - Device release number: 0009
  44.308929     Trying to match device
  44.309004     Device matches
  44.309057     failed to claim USB device: could not claim interface 0: Device or resource busy
  44.310209     detached kernel driver from USB device...
  44.354048     Got 1 HID objects...
  44.354356     Quick update...
  46.295743     upsdrv_updateinfo...
  46.434020     Got 1 HID objects...
  46.434127     Quick update...
  48.297648     upsdrv_updateinfo...
  48.514023     Got 8 HID objects...
  48.521768     Quick update...
  50.299455     upsdrv_updateinfo...
  50.550294     libusb_get_interrupt: Connection timed out
  50.551469     Got 0 HID objects...
  50.552351     Quick update...
  52.301216     upsdrv_updateinfo...
  52.551366     libusb_get_interrupt: Connection timed out
  52.551926     Got 0 HID objects...
  52.552348     Quick update...
  54.303005     upsdrv_updateinfo...
  54.554668     libusb_get_interrupt: Connection timed out
  54.555685     Got 0 HID objects...
  54.556498     Quick update...
  56.304783     upsdrv_updateinfo...
  56.556273     libusb_get_interrupt: Connection timed out
  56.557219     Got 0 HID objects...
  56.558026     Quick update...
  58.306562     upsdrv_updateinfo...
  58.557815     libusb_get_interrupt: Connection timed out
  58.558925     Got 0 HID objects...
  58.559737     Quick update...
  60.308337     upsdrv_updateinfo...
  60.559706     libusb_get_interrupt: Connection timed out
  60.560734     Got 0 HID objects...
  60.561550     Quick update...
  62.310103     upsdrv_updateinfo...
  62.561592     libusb_get_interrupt: Connection timed out
  62.562574     Got 0 HID objects...
  62.563361     Quick update...
  64.315103     upsdrv_updateinfo...
  64.316416     libusb_get_interrupt: error submitting URB: No such device
  66.317149     upsdrv_updateinfo...
  66.318179     Got to reconnect!
  66.319960     Checking device (09AE/2012) (001/109)
  66.331430     - VendorID: 09ae
  66.332261     - ProductID: 2012
  66.333030     - Manufacturer: Tripp Lite
  66.333799     - Product: Tripp Lite UPS
  66.334102     - Serial Number: unknown
  66.334415     - Bus: 001
  66.334543     - Device release number: 0009
  66.334665     Trying to match device
  66.335015     Device matches
  66.335322     failed to claim USB device: could not claim interface 0: Device or resource busy
  66.336510     detached kernel driver from USB device...
  66.378838     Got 1 HID objects...
  66.378973     Full update...

What is causing the UPS to keep disconnecting?

Layne
  • 61
  • 1
  • 6

2 Answers2

3

Inspired by this post, the solution for me so far has been to create a new udev rule:

# /etc/udev/rules.d/62-nut-usbups.rules

SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end"

# TrippLite
#  e.g. TrippLite SMART1500LCD - usbhid-ups
ACTION=="add|change", SUBSYSTEM=="usb|usb_device", SUBSYSTEMS=="usb|usb_device", ATTR{idVendor}=="09ae", ATTR{idProduct}=="2012", MODE="664", GROUP="nut", RUN+="/sbin/upsdrvctl stop; /sbin/upsdrvctl start"

LABEL="nut-usbups_rules_end"

And change the pollinterval in my ups.conf:

# /etc/nut/ups.conf

pollinterval = 1

[ups]
    driver = usbhid-ups
    port = auto
    desc = "Tripp Lite SMART1500LCD"
    vendorid = 09ae
    productid = 2012

So far, 24 hours in, there have been no USB disconnects nor UPS stale data warnings.

There may be more graceful solutions out there but this works for now.

Layne
  • 61
  • 1
  • 6
  • 1
    Your answer here work for my situation, a Debian 10 workstation with an Eaton Pro 1000 UPS. I edited my `/etc/udev/rules.d/62-nut-usbups.rules` to add the RUN commands `RUN+="/sbin/upsdrvctl stop; /sbin/upsdrvctl start"` to the end of the Eaton lines that already existed. Then added in `ups.conf`: `pollinternval = 1`. After manually disconnecting and reconnecting the UPS, I believe it is stable. – ender.qa May 28 '20 at 16:22
  • This solution worked for my Cyberpower CP425SLG (vendor id 0764, productid 0501) – Ryan Feb 22 '22 at 21:40
  • This solution worked for my Cyberpower CPS CP1500PFCLCD. – securelpb Aug 16 '22 at 15:30
0

I also had this problem and I tried setting the pollinterval. It didn't help. But using the -DDDDDDDD argument and looking at the code, I determined that the problem might be the interrupts.

Try adding pollonly = "enabled" to your config in /etc/nut/ups.conf (possibly the file is elsewhere on your system). I did this and took out the pollinterval and, whereas I used to have a hang within an hour, now I've been going for a couple hours with a problem.

https://github.com/networkupstools/nut/issues/1029

Eyal
  • 341
  • 2
  • 5