David Zomaya
2019-Jun-21  18:54 UTC
[Nut-upsdev] [EXTERNAL] Fixing Drops With SMART1500LCDXL & USB-HID Driver
Ok, so I have made some progress that seems to suggest the initial “fix” I
stumbled upon isn’t required. I haven’t yet worked backwards to figure out
reasons why our customers have had similar complaints or solve the problem on
the CentOS VM yet, but that is on the todo list. I am hoping it ends up just
being not enabling the service on startup, but I can’t say that explains away
all the symptoms just yet.
For now, below is where I am at after testing with CentOS 7.6 and the same
SMART1500LCDXL (SM886B) UPS on an HP Compaq Pro 6305.
·         No special udev rules seemed to be needed.
·         I did not need to add “pollinterval = 1” to the ups.conf.
·         It seemed that starting upsd and the driver would fix the drops, but
they would return after reboots of the operating system.
·         Enabling NUT to start with:
$ sudo systemctl enable nut-server.service
$ sudo systemctl enable nut-monitor.service
Seemed to make the drops go away completely.
These leaves me with the questions of “why are we dropping in the first place?”
(obviously not a NUT problem and maybe not as big a deal now that it seems to
work) and “why has it been impacting users ability to use this model and a
similar model?”. I am hoping to better understand this as I go back and dig into
the other issues. Any inputs are appreciated.
Below are the details from the system, UPS, and version of NUT.
Kernel:
3.10.0-957.el7.x86_64
CentOS info:
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
Network UPS Tools (installed from EPEL repo using “yum install nut”) version:
Network UPS Tools upsd 2.7.2
Messages in /var/log/messages when UPS was dropping (note that you were correct
about the serial number reporting “0”):
Jun 21 11:34:49 localhost kernel: usb 8-2: USB disconnect, device number 103
Jun 21 11:34:49 localhost kernel: usb 8-2: new low-speed USB device number 104
using xhci_hcd
Jun 21 11:34:49 localhost kernel: usb 8-2: New USB device found, idVendor=09ae,
idProduct=2012
Jun 21 11:34:49 localhost kernel: usb 8-2: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 21 11:34:49 localhost kernel: usb 8-2: Product: Tripp Lite UPS
Jun 21 11:34:49 localhost kernel: usb 8-2: Manufacturer: Tripp Lite
Jun 21 11:34:50 localhost kernel: hid-generic 0003:09AE:2012.1027:
hiddev0,hidraw0: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:00:10.1-2/input0
Jun 21 11:35:04 localhost kernel: usb 8-2: USB disconnect, device number 104
Jun 21 11:35:04 localhost kernel: usb 8-2: new low-speed USB device number 105
using xhci_hcd
Jun 21 11:35:05 localhost kernel: usb 8-2: New USB device found, idVendor=09ae,
idProduct=2012
Jun 21 11:35:05 localhost kernel: usb 8-2: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 21 11:35:05 localhost kernel: usb 8-2: Product: Tripp Lite UPS
Jun 21 11:35:05 localhost kernel: usb 8-2: Manufacturer: Tripp Lite
Jun 21 11:35:05 localhost kernel: hid-generic 0003:09AE:2012.1028:
hiddev0,hidraw0: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:00:10.1-2/input0
Jun 21 11:35:19 localhost kernel: usb 8-2: USB disconnect, device number 105
Jun 21 11:35:19 localhost kernel: usb 8-2: new low-speed USB device number 106
using xhci_hcd
Jun 21 11:35:20 localhost kernel: usb 8-2: New USB device found, idVendor=09ae,
idProduct=2012
Jun 21 11:35:20 localhost kernel: usb 8-2: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 21 11:35:20 localhost kernel: usb 8-2: Product: Tripp Lite UPS
Jun 21 11:35:20 localhost kernel: usb 8-2: Manufacturer: Tripp Lite
Jun 21 11:35:20 localhost kernel: hid-generic 0003:09AE:2012.1029:
hiddev0,hidraw0: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:00:10.1-2/input0
/etc/ups/ups.conf
[TrippLiteUPS]
    driver = usbhid-ups
    port = auto
    desc = "SMART1500LCD"
sudo lsusb –v output for UPS
Bus 008 Device 098: ID 09ae:2012 Tripp Lite
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x09ae Tripp Lite
  idProduct          0x2012
  bcdDevice            0.09
  iManufacturer           1 Tripp Lite
  iProduct                2 Tripp Lite UPS
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     662
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              40
Device Status:     0x0001
  Self Powered
****************************
On a related note:
Charles,
This
“I keep meaning to put together a diagram to help with this, but in the mean
time:
UPS <-- driver <-- upsd <-- clients (upsc, upsmon, NUT Monitor GUI,
etc.)
"upsc -l" is making a TCP connection to upsd localhost:3493 (no sudo
needed here), so a "Connection refused" is likely due to upsd not
running. (If it were over the network, I'd recommend first logging into the
master system and running "upsc" there, then check for the LISTEN
address in upsd.conf, and any firewalls in between the systems running upsd and
upsc.)
You should be able to get it working for testing with a quick "sudo
upsd", though it is probably some sort of startup script issue. I do not
know exactly how openSUSE's packages interact with their init system- maybe
others on the list can help. (A quick search of nut-upsuser indicates that 42.3
is using systemd, so if 15.1 does as well, maybe "systemctl | grep
^nut" will show a unit that just needs to be restarted.)”
Was very helpful in conceptualizing and working through the setup. Thank you.
****************************
Thank you,
David Zomaya
Tripp Lite
-----Original Message-----
From: Charles Lepple <clepple at gmail.com>
Sent: Thursday, June 20, 2019 7:47 AM
To: David Zomaya <David_Zomaya at tripplite.com>
Cc: nut-upsdev at alioth-lists.debian.net; Jonathan Manzanilla
<Jonathan_Manzanilla at tripplite.com>; Eric Cobb <Eric_Cobb at
tripplite.com>
Subject: Re: [EXTERNAL] [Nut-upsdev] Fixing Drops With SMART1500LCDXL &
USB-HID Driver
On Jun 19, 2019, at 4:16 PM, David Zomaya wrote:
>
> Interestingly, I did some tinkering with openSUSE 15.1 Leap on a physical
box and saw the same drops there, but was able to get them to stop after
installing NUT and just doing the “standard” configuration. However, I ran into
some connection refused messages, e.g.:
>
> user at linux-nxmm:/dev/bus> sudo upsc -l
> Error: Connection failure: Connection refused
>
I keep meaning to put together a diagram to help with this, but in the mean
time:
UPS <-- driver <-- upsd <-- clients (upsc, upsmon, NUT Monitor GUI,
etc.)
"upsc -l" is making a TCP connection to upsd localhost:3493 (no sudo
needed here), so a "Connection refused" is likely due to upsd not
running. (If it were over the network, I'd recommend first logging into the
master system and running "upsc" there, then check for the LISTEN
address in upsd.conf, and any firewalls in between the systems running upsd and
upsc.)
You should be able to get it working for testing with a quick "sudo
upsd", though it is probably some sort of startup script issue. I do not
know exactly how openSUSE's packages interact with their init system- maybe
others on the list can help. (A quick search of nut-upsuser indicates that 42.3
is using systemd, so if 15.1 does as well, maybe "systemctl | grep
^nut" will show a unit that just needs to be restarted.)
________________________________
This message is for the addressee's use only. It may contain confidential
information. If you receive this message in error, please delete it and notify
the sender. Tripp Lite disclaims all warranties and liabilities, and assumes no
responsibility for viruses which may infect an email sent to you from Tripp Lite
and which damage your electronic systems or information. It is your
responsibility to maintain virus detection systems to prevent damage to your
electronic systems and information.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20190621/352cbf9d/attachment-0001.html>
David Zomaya
2019-Jun-26  22:11 UTC
[Nut-upsdev] [EXTERNAL] Fixing Drops With SMART1500LCDXL & USB-HID Driver
To try and work through the initial drops, I repeated the previous steps that
worked on the physical machine on the CentOS 7.6  virtual machine.
The drops continued to occur, but it seems that the driver always reconnects. My
initial inclination is to work through and see at what point I get the drops to
stop, and I think I will do that next (inputs welcome).
From a standpoint of “how much does this impact functionality?”, it seems like
the driver goes stale then quickly reconnects. So, if I understand correctly,
the user would get a bunch of nuisance messages and some data may be lost in
this case. Does that sound right?
I am also trying to work through if the virtual machine problem is an important
problem to solve. If physical boxes work, maybe not. But since we have had
reports of physical boxes not working, I will try to get to a point of
confirming the fix here and then having this as a fallback if it comes up again.
Below is output from the virtual machine:
[npg at localhost ~]$ uname -r
3.10.0-957.el7.x86_64
[npg at localhost ~]$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 014: ID 09ae:2012 Tripp Lite
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[npg at localhost ~]$ upsd -V
Network UPS Tools upsd 2.7.2
[npg at localhost ~]$ upsc TrippLiteUPS
battery.charge: 100
battery.runtime: 3840
battery.type: PbAC
battery.voltage: 27.5
battery.voltage.nominal: 24.0
device.mfr: Tripp Lite
device.model: Tripp Lite UPS
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.7.2
driver.version.data: TrippLite HID 0.81
driver.version.internal: 0.38
input.frequency: 59.8
input.voltage: 116.9
input.voltage.nominal: 120
output.frequency.nominal: 60
output.voltage: 116.8
output.voltage.nominal: 120
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.load: 0
ups.mfr: Tripp Lite
ups.model: Tripp Lite UPS
ups.power: 0.0
ups.power.nominal: 1500
ups.productid: 2012
ups.status: OL
ups.timer.reboot: 65535
ups.timer.shutdown: 65535
ups.vendorid: 09ae
ups.watchdog.status: 0
[npg at localhost ~]$ sudo tail -f /var/log/messages
Jun 26 18:03:53 localhost chronyd[5553]: Selected source 45.33.84.208
Jun 26 18:03:53 localhost upsd[6777]: Data for UPS [TrippLiteUPS] is stale -
check driver
Jun 26 18:03:55 localhost kernel: usb 2-2.1: new low-speed USB device number 15
using uhci_hcd
Jun 26 18:03:55 localhost kernel: usb 2-2.1: New USB device found,
idVendor=09ae, idProduct=2012
Jun 26 18:03:55 localhost kernel: usb 2-2.1: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 26 18:03:55 localhost kernel: usb 2-2.1: Product: Tripp Lite UPS
Jun 26 18:03:55 localhost kernel: usb 2-2.1: Manufacturer: Tripp Lite
Jun 26 18:03:55 localhost kernel: hid-generic 0003:09AE:2012.000D:
hiddev0,hidraw1: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:02:02.0-2.1/input0
Jun 26 18:03:57 localhost upsd[6777]: UPS [TrippLiteUPS] data is no longer stale
Jun 26 18:04:14 localhost kernel: usb 2-2.1: USB disconnect, device number 15
Jun 26 18:04:15 localhost upsd[6777]: Data for UPS [TrippLiteUPS] is stale -
check driver
Jun 26 18:04:17 localhost kernel: usb 2-2.1: new low-speed USB device number 16
using uhci_hcd
Jun 26 18:04:17 localhost kernel: usb 2-2.1: New USB device found,
idVendor=09ae, idProduct=2012
Jun 26 18:04:17 localhost kernel: usb 2-2.1: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 26 18:04:17 localhost kernel: usb 2-2.1: Product: Tripp Lite UPS
Jun 26 18:04:17 localhost kernel: usb 2-2.1: Manufacturer: Tripp Lite
Jun 26 18:04:17 localhost kernel: hid-generic 0003:09AE:2012.000E:
hiddev0,hidraw1: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:02:02.0-2.1/input0
Jun 26 18:04:19 localhost upsd[6777]: UPS [TrippLiteUPS] data is no longer stale
Jun 26 18:04:36 localhost kernel: usb 2-2.1: USB disconnect, device number 16
Jun 26 18:04:37 localhost upsd[6777]: Data for UPS [TrippLiteUPS] is stale -
check driver
Jun 26 18:04:39 localhost kernel: usb 2-2.1: new low-speed USB device number 17
using uhci_hcd
Jun 26 18:04:39 localhost kernel: usb 2-2.1: New USB device found,
idVendor=09ae, idProduct=2012
Jun 26 18:04:39 localhost kernel: usb 2-2.1: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 26 18:04:39 localhost kernel: usb 2-2.1: Product: Tripp Lite UPS
Jun 26 18:04:39 localhost kernel: usb 2-2.1: Manufacturer: Tripp Lite
Jun 26 18:04:39 localhost kernel: hid-generic 0003:09AE:2012.000F:
hiddev0,hidraw1: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:02:02.0-2.1/input0
Thank you,
David Zomaya
Technical Support
[cid:image001.png at 01D52C42.3535F550]
1111 W. 35th Street  |  Chicago, IL 60609 USA
773.869.1156  |  david_zomaya at tripplite.com
[cid:image002.png at 01D52C42.3535F550]<http://www.tripplite.com/>
From: David Zomaya <David_Zomaya at tripplite.com>
Sent: Friday, June 21, 2019 1:54 PM
To: Charles Lepple <clepple at gmail.com>
Cc: nut-upsdev at alioth-lists.debian.net; Jonathan Manzanilla
<Jonathan_Manzanilla at tripplite.com>; Eric Cobb <Eric_Cobb at
tripplite.com>
Subject: RE: [EXTERNAL] [Nut-upsdev] Fixing Drops With SMART1500LCDXL &
USB-HID Driver
Ok, so I have made some progress that seems to suggest the initial “fix” I
stumbled upon isn’t required. I haven’t yet worked backwards to figure out
reasons why our customers have had similar complaints or solve the problem on
the CentOS VM yet, but that is on the todo list. I am hoping it ends up just
being not enabling the service on startup, but I can’t say that explains away
all the symptoms just yet.
For now, below is where I am at after testing with CentOS 7.6 and the same
SMART1500LCDXL (SM886B) UPS on an HP Compaq Pro 6305.
·         No special udev rules seemed to be needed.
·         I did not need to add “pollinterval = 1” to the ups.conf.
·         It seemed that starting upsd and the driver would fix the drops, but
they would return after reboots of the operating system.
·         Enabling NUT to start with:
$ sudo systemctl enable nut-server.service
$ sudo systemctl enable nut-monitor.service
Seemed to make the drops go away completely.
These leaves me with the questions of “why are we dropping in the first place?”
(obviously not a NUT problem and maybe not as big a deal now that it seems to
work) and “why has it been impacting users ability to use this model and a
similar model?”. I am hoping to better understand this as I go back and dig into
the other issues. Any inputs are appreciated.
Below are the details from the system, UPS, and version of NUT.
Kernel:
3.10.0-957.el7.x86_64
CentOS info:
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
Network UPS Tools (installed from EPEL repo using “yum install nut”) version:
Network UPS Tools upsd 2.7.2
Messages in /var/log/messages when UPS was dropping (note that you were correct
about the serial number reporting “0”):
Jun 21 11:34:49 localhost kernel: usb 8-2: USB disconnect, device number 103
Jun 21 11:34:49 localhost kernel: usb 8-2: new low-speed USB device number 104
using xhci_hcd
Jun 21 11:34:49 localhost kernel: usb 8-2: New USB device found, idVendor=09ae,
idProduct=2012
Jun 21 11:34:49 localhost kernel: usb 8-2: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 21 11:34:49 localhost kernel: usb 8-2: Product: Tripp Lite UPS
Jun 21 11:34:49 localhost kernel: usb 8-2: Manufacturer: Tripp Lite
Jun 21 11:34:50 localhost kernel: hid-generic 0003:09AE:2012.1027:
hiddev0,hidraw0: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:00:10.1-2/input0
Jun 21 11:35:04 localhost kernel: usb 8-2: USB disconnect, device number 104
Jun 21 11:35:04 localhost kernel: usb 8-2: new low-speed USB device number 105
using xhci_hcd
Jun 21 11:35:05 localhost kernel: usb 8-2: New USB device found, idVendor=09ae,
idProduct=2012
Jun 21 11:35:05 localhost kernel: usb 8-2: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 21 11:35:05 localhost kernel: usb 8-2: Product: Tripp Lite UPS
Jun 21 11:35:05 localhost kernel: usb 8-2: Manufacturer: Tripp Lite
Jun 21 11:35:05 localhost kernel: hid-generic 0003:09AE:2012.1028:
hiddev0,hidraw0: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:00:10.1-2/input0
Jun 21 11:35:19 localhost kernel: usb 8-2: USB disconnect, device number 105
Jun 21 11:35:19 localhost kernel: usb 8-2: new low-speed USB device number 106
using xhci_hcd
Jun 21 11:35:20 localhost kernel: usb 8-2: New USB device found, idVendor=09ae,
idProduct=2012
Jun 21 11:35:20 localhost kernel: usb 8-2: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 21 11:35:20 localhost kernel: usb 8-2: Product: Tripp Lite UPS
Jun 21 11:35:20 localhost kernel: usb 8-2: Manufacturer: Tripp Lite
Jun 21 11:35:20 localhost kernel: hid-generic 0003:09AE:2012.1029:
hiddev0,hidraw0: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:00:10.1-2/input0
/etc/ups/ups.conf
[TrippLiteUPS]
    driver = usbhid-ups
    port = auto
    desc = "SMART1500LCD"
sudo lsusb –v output for UPS
Bus 008 Device 098: ID 09ae:2012 Tripp Lite
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x09ae Tripp Lite
  idProduct          0x2012
  bcdDevice            0.09
  iManufacturer           1 Tripp Lite
  iProduct                2 Tripp Lite UPS
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     662
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              40
Device Status:     0x0001
  Self Powered
****************************
On a related note:
Charles,
This
“I keep meaning to put together a diagram to help with this, but in the mean
time:
UPS <-- driver <-- upsd <-- clients (upsc, upsmon, NUT Monitor GUI,
etc.)
"upsc -l" is making a TCP connection to upsd localhost:3493 (no sudo
needed here), so a "Connection refused" is likely due to upsd not
running. (If it were over the network, I'd recommend first logging into the
master system and running "upsc" there, then check for the LISTEN
address in upsd.conf, and any firewalls in between the systems running upsd and
upsc.)
You should be able to get it working for testing with a quick "sudo
upsd", though it is probably some sort of startup script issue. I do not
know exactly how openSUSE's packages interact with their init system- maybe
others on the list can help. (A quick search of nut-upsuser indicates that 42.3
is using systemd, so if 15.1 does as well, maybe "systemctl | grep
^nut" will show a unit that just needs to be restarted.)”
Was very helpful in conceptualizing and working through the setup. Thank you.
****************************
Thank you,
David Zomaya
Tripp Lite
-----Original Message-----
From: Charles Lepple <clepple at gmail.com<mailto:clepple at
gmail.com>>
Sent: Thursday, June 20, 2019 7:47 AM
To: David Zomaya <David_Zomaya at tripplite.com<mailto:David_Zomaya at
tripplite.com>>
Cc: nut-upsdev at alioth-lists.debian.net<mailto:nut-upsdev at
alioth-lists.debian.net>; Jonathan Manzanilla <Jonathan_Manzanilla at
tripplite.com<mailto:Jonathan_Manzanilla at tripplite.com>>; Eric Cobb
<Eric_Cobb at tripplite.com<mailto:Eric_Cobb at tripplite.com>>
Subject: Re: [EXTERNAL] [Nut-upsdev] Fixing Drops With SMART1500LCDXL &
USB-HID Driver
On Jun 19, 2019, at 4:16 PM, David Zomaya wrote:
>
> Interestingly, I did some tinkering with openSUSE 15.1 Leap on a physical
box and saw the same drops there, but was able to get them to stop after
installing NUT and just doing the “standard” configuration. However, I ran into
some connection refused messages, e.g.:
>
> user at linux-nxmm:/dev/bus> sudo upsc -l
> Error: Connection failure: Connection refused
>
I keep meaning to put together a diagram to help with this, but in the mean
time:
UPS <-- driver <-- upsd <-- clients (upsc, upsmon, NUT Monitor GUI,
etc.)
"upsc -l" is making a TCP connection to upsd localhost:3493 (no sudo
needed here), so a "Connection refused" is likely due to upsd not
running. (If it were over the network, I'd recommend first logging into the
master system and running "upsc" there, then check for the LISTEN
address in upsd.conf, and any firewalls in between the systems running upsd and
upsc.)
You should be able to get it working for testing with a quick "sudo
upsd", though it is probably some sort of startup script issue. I do not
know exactly how openSUSE's packages interact with their init system- maybe
others on the list can help. (A quick search of nut-upsuser indicates that 42.3
is using systemd, so if 15.1 does as well, maybe "systemctl | grep
^nut" will show a unit that just needs to be restarted.)
________________________________
This message is for the addressee's use only. It may contain confidential
information. If you receive this message in error, please delete it and notify
the sender. Tripp Lite disclaims all warranties and liabilities, and assumes no
responsibility for viruses which may infect an email sent to you from Tripp Lite
and which damage your electronic systems or information. It is your
responsibility to maintain virus detection systems to prevent damage to your
electronic systems and information.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20190626/b2b6a1ae/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 13506 bytes
Desc: image001.png
URL:
<http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20190626/b2b6a1ae/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 2661 bytes
Desc: image002.png
URL:
<http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20190626/b2b6a1ae/attachment-0003.png>
David Zomaya
2019-Jul-03  00:01 UTC
[Nut-upsdev] [EXTERNAL] Fixing Drops With SMART1500LCDXL & USB-HID Driver
It seems that if I let the virtual machine run long enough, the driver gives up
on trying to reconnect and the data stays stale when I do a “upsc TrippLiteUPS”.
Restarting the driver (sudo upsdrvctl start) refreshes the data.
The attached log file (compressed as a gz file) contains the syslog (only today
July 2nd is relevant output, the upsc attempt, and the driver restart fixing
it).
This would explain why the udev rule that restarted the driver on a reconnect
may have been needed. My next step is to work on proving that.
I now believe the problem can be stated as:
“In some environments, a virtual machine in this specific case, there are repeat
drops of USB communication and eventually these drops can lead to stale data in
Network UPS Tools”
I’ll provide updates more updates as I test further.
I did not forget about the open protocol topic either and plan to follow up.
Thank you,
David Zomaya
Technical Support
[cid:image001.png at 01D53108.821CC2C0]
1111 W. 35th Street  |  Chicago, IL 60609 USA
773.869.1156  |  david_zomaya at tripplite.com
[cid:image002.png at 01D53108.821CC2C0]<http://www.tripplite.com/>
From: David Zomaya <David_Zomaya at tripplite.com>
Sent: Wednesday, June 26, 2019 5:12 PM
To: Charles Lepple <clepple at gmail.com>; nut-upsdev at
alioth-lists.debian.net
Cc: Jonathan Manzanilla <Jonathan_Manzanilla at tripplite.com>; Eric Cobb
<Eric_Cobb at tripplite.com>
Subject: RE: [EXTERNAL] [Nut-upsdev] Fixing Drops With SMART1500LCDXL &
USB-HID Driver
To try and work through the initial drops, I repeated the previous steps that
worked on the physical machine on the CentOS 7.6  virtual machine.
The drops continued to occur, but it seems that the driver always reconnects. My
initial inclination is to work through and see at what point I get the drops to
stop, and I think I will do that next (inputs welcome).
From a standpoint of “how much does this impact functionality?”, it seems like
the driver goes stale then quickly reconnects. So, if I understand correctly,
the user would get a bunch of nuisance messages and some data may be lost in
this case. Does that sound right?
I am also trying to work through if the virtual machine problem is an important
problem to solve. If physical boxes work, maybe not. But since we have had
reports of physical boxes not working, I will try to get to a point of
confirming the fix here and then having this as a fallback if it comes up again.
Below is output from the virtual machine:
[npg at localhost ~]$ uname -r
3.10.0-957.el7.x86_64
[npg at localhost ~]$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 014: ID 09ae:2012 Tripp Lite
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[npg at localhost ~]$ upsd -V
Network UPS Tools upsd 2.7.2
[npg at localhost ~]$ upsc TrippLiteUPS
battery.charge: 100
battery.runtime: 3840
battery.type: PbAC
battery.voltage: 27.5
battery.voltage.nominal: 24.0
device.mfr: Tripp Lite
device.model: Tripp Lite UPS
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.7.2
driver.version.data: TrippLite HID 0.81
driver.version.internal: 0.38
input.frequency: 59.8
input.voltage: 116.9
input.voltage.nominal: 120
output.frequency.nominal: 60
output.voltage: 116.8
output.voltage.nominal: 120
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.load: 0
ups.mfr: Tripp Lite
ups.model: Tripp Lite UPS
ups.power: 0.0
ups.power.nominal: 1500
ups.productid: 2012
ups.status: OL
ups.timer.reboot: 65535
ups.timer.shutdown: 65535
ups.vendorid: 09ae
ups.watchdog.status: 0
[npg at localhost ~]$ sudo tail -f /var/log/messages
Jun 26 18:03:53 localhost chronyd[5553]: Selected source 45.33.84.208
Jun 26 18:03:53 localhost upsd[6777]: Data for UPS [TrippLiteUPS] is stale -
check driver
Jun 26 18:03:55 localhost kernel: usb 2-2.1: new low-speed USB device number 15
using uhci_hcd
Jun 26 18:03:55 localhost kernel: usb 2-2.1: New USB device found,
idVendor=09ae, idProduct=2012
Jun 26 18:03:55 localhost kernel: usb 2-2.1: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 26 18:03:55 localhost kernel: usb 2-2.1: Product: Tripp Lite UPS
Jun 26 18:03:55 localhost kernel: usb 2-2.1: Manufacturer: Tripp Lite
Jun 26 18:03:55 localhost kernel: hid-generic 0003:09AE:2012.000D:
hiddev0,hidraw1: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:02:02.0-2.1/input0
Jun 26 18:03:57 localhost upsd[6777]: UPS [TrippLiteUPS] data is no longer stale
Jun 26 18:04:14 localhost kernel: usb 2-2.1: USB disconnect, device number 15
Jun 26 18:04:15 localhost upsd[6777]: Data for UPS [TrippLiteUPS] is stale -
check driver
Jun 26 18:04:17 localhost kernel: usb 2-2.1: new low-speed USB device number 16
using uhci_hcd
Jun 26 18:04:17 localhost kernel: usb 2-2.1: New USB device found,
idVendor=09ae, idProduct=2012
Jun 26 18:04:17 localhost kernel: usb 2-2.1: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 26 18:04:17 localhost kernel: usb 2-2.1: Product: Tripp Lite UPS
Jun 26 18:04:17 localhost kernel: usb 2-2.1: Manufacturer: Tripp Lite
Jun 26 18:04:17 localhost kernel: hid-generic 0003:09AE:2012.000E:
hiddev0,hidraw1: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:02:02.0-2.1/input0
Jun 26 18:04:19 localhost upsd[6777]: UPS [TrippLiteUPS] data is no longer stale
Jun 26 18:04:36 localhost kernel: usb 2-2.1: USB disconnect, device number 16
Jun 26 18:04:37 localhost upsd[6777]: Data for UPS [TrippLiteUPS] is stale -
check driver
Jun 26 18:04:39 localhost kernel: usb 2-2.1: new low-speed USB device number 17
using uhci_hcd
Jun 26 18:04:39 localhost kernel: usb 2-2.1: New USB device found,
idVendor=09ae, idProduct=2012
Jun 26 18:04:39 localhost kernel: usb 2-2.1: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 26 18:04:39 localhost kernel: usb 2-2.1: Product: Tripp Lite UPS
Jun 26 18:04:39 localhost kernel: usb 2-2.1: Manufacturer: Tripp Lite
Jun 26 18:04:39 localhost kernel: hid-generic 0003:09AE:2012.000F:
hiddev0,hidraw1: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:02:02.0-2.1/input0
Thank you,
David Zomaya
Technical Support
[cid:image007.png at 01D53106.E38337D0]
1111 W. 35th Street  |  Chicago, IL 60609 USA
773.869.1156  |  david_zomaya at tripplite.com<mailto:david_zomaya at
tripplite.com>
[cid:image008.png at 01D53106.E38337D0]<http://www.tripplite.com/>
From: David Zomaya <David_Zomaya at tripplite.com<mailto:David_Zomaya at
tripplite.com>>
Sent: Friday, June 21, 2019 1:54 PM
To: Charles Lepple <clepple at gmail.com<mailto:clepple at
gmail.com>>
Cc: nut-upsdev at alioth-lists.debian.net<mailto:nut-upsdev at
alioth-lists.debian.net>; Jonathan Manzanilla <Jonathan_Manzanilla at
tripplite.com<mailto:Jonathan_Manzanilla at tripplite.com>>; Eric Cobb
<Eric_Cobb at tripplite.com<mailto:Eric_Cobb at tripplite.com>>
Subject: RE: [EXTERNAL] [Nut-upsdev] Fixing Drops With SMART1500LCDXL &
USB-HID Driver
Ok, so I have made some progress that seems to suggest the initial “fix” I
stumbled upon isn’t required. I haven’t yet worked backwards to figure out
reasons why our customers have had similar complaints or solve the problem on
the CentOS VM yet, but that is on the todo list. I am hoping it ends up just
being not enabling the service on startup, but I can’t say that explains away
all the symptoms just yet.
For now, below is where I am at after testing with CentOS 7.6 and the same
SMART1500LCDXL (SM886B) UPS on an HP Compaq Pro 6305.
·         No special udev rules seemed to be needed.
·         I did not need to add “pollinterval = 1” to the ups.conf.
·         It seemed that starting upsd and the driver would fix the drops, but
they would return after reboots of the operating system.
·         Enabling NUT to start with:
$ sudo systemctl enable nut-server.service
$ sudo systemctl enable nut-monitor.service
Seemed to make the drops go away completely.
These leaves me with the questions of “why are we dropping in the first place?”
(obviously not a NUT problem and maybe not as big a deal now that it seems to
work) and “why has it been impacting users ability to use this model and a
similar model?”. I am hoping to better understand this as I go back and dig into
the other issues. Any inputs are appreciated.
Below are the details from the system, UPS, and version of NUT.
Kernel:
3.10.0-957.el7.x86_64
CentOS info:
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
Network UPS Tools (installed from EPEL repo using “yum install nut”) version:
Network UPS Tools upsd 2.7.2
Messages in /var/log/messages when UPS was dropping (note that you were correct
about the serial number reporting “0”):
Jun 21 11:34:49 localhost kernel: usb 8-2: USB disconnect, device number 103
Jun 21 11:34:49 localhost kernel: usb 8-2: new low-speed USB device number 104
using xhci_hcd
Jun 21 11:34:49 localhost kernel: usb 8-2: New USB device found, idVendor=09ae,
idProduct=2012
Jun 21 11:34:49 localhost kernel: usb 8-2: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 21 11:34:49 localhost kernel: usb 8-2: Product: Tripp Lite UPS
Jun 21 11:34:49 localhost kernel: usb 8-2: Manufacturer: Tripp Lite
Jun 21 11:34:50 localhost kernel: hid-generic 0003:09AE:2012.1027:
hiddev0,hidraw0: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:00:10.1-2/input0
Jun 21 11:35:04 localhost kernel: usb 8-2: USB disconnect, device number 104
Jun 21 11:35:04 localhost kernel: usb 8-2: new low-speed USB device number 105
using xhci_hcd
Jun 21 11:35:05 localhost kernel: usb 8-2: New USB device found, idVendor=09ae,
idProduct=2012
Jun 21 11:35:05 localhost kernel: usb 8-2: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 21 11:35:05 localhost kernel: usb 8-2: Product: Tripp Lite UPS
Jun 21 11:35:05 localhost kernel: usb 8-2: Manufacturer: Tripp Lite
Jun 21 11:35:05 localhost kernel: hid-generic 0003:09AE:2012.1028:
hiddev0,hidraw0: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:00:10.1-2/input0
Jun 21 11:35:19 localhost kernel: usb 8-2: USB disconnect, device number 105
Jun 21 11:35:19 localhost kernel: usb 8-2: new low-speed USB device number 106
using xhci_hcd
Jun 21 11:35:20 localhost kernel: usb 8-2: New USB device found, idVendor=09ae,
idProduct=2012
Jun 21 11:35:20 localhost kernel: usb 8-2: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 21 11:35:20 localhost kernel: usb 8-2: Product: Tripp Lite UPS
Jun 21 11:35:20 localhost kernel: usb 8-2: Manufacturer: Tripp Lite
Jun 21 11:35:20 localhost kernel: hid-generic 0003:09AE:2012.1029:
hiddev0,hidraw0: USB HID v1.10 Device [Tripp Lite  Tripp Lite UPS ] on
usb-0000:00:10.1-2/input0
/etc/ups/ups.conf
[TrippLiteUPS]
    driver = usbhid-ups
    port = auto
    desc = "SMART1500LCD"
sudo lsusb –v output for UPS
Bus 008 Device 098: ID 09ae:2012 Tripp Lite
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x09ae Tripp Lite
  idProduct          0x2012
  bcdDevice            0.09
  iManufacturer           1 Tripp Lite
  iProduct                2 Tripp Lite UPS
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     662
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              40
Device Status:     0x0001
  Self Powered
****************************
On a related note:
Charles,
This
“I keep meaning to put together a diagram to help with this, but in the mean
time:
UPS <-- driver <-- upsd <-- clients (upsc, upsmon, NUT Monitor GUI,
etc.)
"upsc -l" is making a TCP connection to upsd localhost:3493 (no sudo
needed here), so a "Connection refused" is likely due to upsd not
running. (If it were over the network, I'd recommend first logging into the
master system and running "upsc" there, then check for the LISTEN
address in upsd.conf, and any firewalls in between the systems running upsd and
upsc.)
You should be able to get it working for testing with a quick "sudo
upsd", though it is probably some sort of startup script issue. I do not
know exactly how openSUSE's packages interact with their init system- maybe
others on the list can help. (A quick search of nut-upsuser indicates that 42.3
is using systemd, so if 15.1 does as well, maybe "systemctl | grep
^nut" will show a unit that just needs to be restarted.)”
Was very helpful in conceptualizing and working through the setup. Thank you.
****************************
Thank you,
David Zomaya
Tripp Lite
-----Original Message-----
From: Charles Lepple <clepple at gmail.com<mailto:clepple at
gmail.com>>
Sent: Thursday, June 20, 2019 7:47 AM
To: David Zomaya <David_Zomaya at tripplite.com<mailto:David_Zomaya at
tripplite.com>>
Cc: nut-upsdev at alioth-lists.debian.net<mailto:nut-upsdev at
alioth-lists.debian.net>; Jonathan Manzanilla <Jonathan_Manzanilla at
tripplite.com<mailto:Jonathan_Manzanilla at tripplite.com>>; Eric Cobb
<Eric_Cobb at tripplite.com<mailto:Eric_Cobb at tripplite.com>>
Subject: Re: [EXTERNAL] [Nut-upsdev] Fixing Drops With SMART1500LCDXL &
USB-HID Driver
On Jun 19, 2019, at 4:16 PM, David Zomaya wrote:
>
> Interestingly, I did some tinkering with openSUSE 15.1 Leap on a physical
box and saw the same drops there, but was able to get them to stop after
installing NUT and just doing the “standard” configuration. However, I ran into
some connection refused messages, e.g.:
>
> user at linux-nxmm:/dev/bus> sudo upsc -l
> Error: Connection failure: Connection refused
>
I keep meaning to put together a diagram to help with this, but in the mean
time:
UPS <-- driver <-- upsd <-- clients (upsc, upsmon, NUT Monitor GUI,
etc.)
"upsc -l" is making a TCP connection to upsd localhost:3493 (no sudo
needed here), so a "Connection refused" is likely due to upsd not
running. (If it were over the network, I'd recommend first logging into the
master system and running "upsc" there, then check for the LISTEN
address in upsd.conf, and any firewalls in between the systems running upsd and
upsc.)
You should be able to get it working for testing with a quick "sudo
upsd", though it is probably some sort of startup script issue. I do not
know exactly how openSUSE's packages interact with their init system- maybe
others on the list can help. (A quick search of nut-upsuser indicates that 42.3
is using systemd, so if 15.1 does as well, maybe "systemctl | grep
^nut" will show a unit that just needs to be restarted.)
________________________________
This message is for the addressee's use only. It may contain confidential
information. If you receive this message in error, please delete it and notify
the sender. Tripp Lite disclaims all warranties and liabilities, and assumes no
responsibility for viruses which may infect an email sent to you from Tripp Lite
and which damage your electronic systems or information. It is your
responsibility to maintain virus detection systems to prevent damage to your
electronic systems and information.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20190703/c6ed325a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 13506 bytes
Desc: image007.png
URL:
<http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20190703/c6ed325a/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 2661 bytes
Desc: image008.png
URL:
<http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20190703/c6ed325a/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 13506 bytes
Desc: image001.png
URL:
<http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20190703/c6ed325a/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 2661 bytes
Desc: image002.png
URL:
<http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20190703/c6ed325a/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: see the centos drops.log.gz
Type: application/x-gzip
Size: 77613 bytes
Desc: see the centos drops.log.gz
URL:
<http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20190703/c6ed325a/attachment-0001.bin>
Seemingly Similar Threads
- [EXTERNAL] Re: Fixing Drops With SMART1500LCDXL & USB-HID Driver
 - Fixing Drops With SMART1500LCDXL & USB-HID Driver
 - [EXTERNAL] Re: Fixing Drops With SMART1500LCDXL & USB-HID Driver
 - [EXTERNAL] Fixing Drops With SMART1500LCDXL & USB-HID Driver
 - Fixing Drops With SMART1500LCDXL & USB-HID Driver