Skip to content

Update 2.7.4 to 2.8.4 CP UPS driver disconnect (nut_libusb_get_report: No such device) #3385

@drankinatty

Description

@drankinatty
OS:   Archlinux
NUT:  nut 2.8.4-3

A few days ago, I updated an Arch server from NUT 2.7.4 to 2.8.4. The CP1350PFCLCD had been running for 8-9 years without a single driver disconnect, not one.

Upon update to 2.8.4 and moving config from /etc/ups to /etc/nut and making the various "master/slave" changes to "primary", 2.8.4 started and recognized the driver without issue. However, overnight, NUT lost contact with the UPS and then forced a commanded shutdown as a result. That's shouldn't have happened and something I've never experienced before. On the next kernel update/reboot, the driver established communication and was happy for several hours, before disconnecting again. Something is not right.

The UPS had roughly 1/2 life (30 min. of runtime on batteries before shutdown), so I decided to swap the UPS for a CP1350AVRLCDa with new batteries and full runtime (about an hour). I had also added the suggested "pollonly" option to the ups.conf within the driver section to possibly help with CyberPower disconnect/reconnect race conditions (though I had not seen any such race of disconnect/reconnect -- my problems was disconnect, never reconnect):

maxretry = 3
[valkyrie_ups]
        driver = usbhid-ups
        port = auto
        desc = "Valkyrie CP1350PFCLCD UPS"
        pollonly = enabled

After the UPS swap and boot, the new UPS was online and communicating with no issue:

$ upsc valkyrie_ups
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 20
battery.mfr.date: CPS
battery.runtime: 3869
battery.runtime.low: 300
battery.status: 100%
battery.type: PbAcid
battery.voltage: 27.1
battery.voltage.nominal: 24
device.mfr: CPS
device.model: CP1350AVRLCDa
device.serial: CDNJN2000560
device.type: ups
driver.debug: 0
driver.flag.allow_killpower: 0
driver.name: usbhid-ups
driver.parameter.interrupt_pipe_no_events_tolerance: -1
driver.parameter.pollfreq: 12
driver.parameter.pollinterval: 2
driver.parameter.pollonly: enabled
driver.parameter.port: auto
driver.parameter.synchronous: auto
driver.state: quiet
driver.version: 2.8.4
driver.version.data: CyberPower HID 0.84
driver.version.internal: 0.67
driver.version.usb: libusb-1.0.29 (API: 0x0100010B)
input.sensitivity: normal
input.transfer.high: 139
input.transfer.low: 100
input.voltage: 121.0
input.voltage.nominal: 120
output.voltage: 121.0
ups.beeper.status: enabled
ups.delay.shutdown: 60
ups.delay.start: 120
ups.firmware: BF01511BA
ups.load: 11
ups.mfr: CPS
ups.model: CP1350AVRLCDa
ups.power: 95
ups.power.nominal: 1350
ups.productid: 0501
ups.realpower: 89
ups.realpower.nominal: 815
ups.serial: CDNJN2000560
ups.status: OL
ups.test.result: No test initiated
ups.timer.shutdown: -60
ups.timer.start: -60
ups.vendorid: 0764

All good I thought. This UPS had the same disconnect approximately 11 minutes later even though "pollonly" was set. The journal entries show the following from this last boot with the new UPS:

Mar 30 00:05:41 valkyrie systemd[1]: nut-udev-settle.service: Deactivated successfully.
Mar 30 00:05:47 valkyrie nut-driver@valkyrie_ups[749]: Network UPS Tools upsdrvctl - UPS driver controller 2.8.4 release
Mar 30 00:05:47 valkyrie nut-driver@valkyrie_ups[832]: Network UPS Tools 2.8.4 release - Generic HID driver 0.67
Mar 30 00:05:47 valkyrie nut-driver@valkyrie_ups[832]: USB communication driver (libusb 1.0) 0.50
Mar 30 00:05:47 valkyrie nut-driver@valkyrie_ups[832]: Using subdriver: CyberPower HID 0.84
Mar 30 00:05:47 valkyrie nut-driver-enumerator[748]: Keeping systemd service instance 'valkyrie_ups' whose section 'valkyrie_ups' in config file has changed: live reload sufficed. Saving updated info into service properties.
Mar 30 00:05:47 valkyrie nut-driver@valkyrie_ups[832]: Defaulting 'pollfreq' to 12 for CPS devices
Mar 30 00:05:47 valkyrie nut-driver@valkyrie_ups[832]: Listening on socket /var/lib/nut/usbhid-ups-valkyrie_ups
Mar 30 00:05:48 valkyrie nut-driver-enumerator[748]: OK
Mar 30 00:05:48 valkyrie systemd[1]: Reload requested from client PID 922 ('systemctl') (unit nut-driver-enumerator.service)...
Mar 30 00:05:48 valkyrie nut-driver-enumerator[748]: === The currently defined service instances are:
Mar 30 00:05:48 valkyrie nut-driver-enumerator[748]: valkyrie_ups
Mar 30 00:05:48 valkyrie nut-driver-enumerator[748]: === The currently defined configurations in '/etc/nut/ups.conf' are:
Mar 30 00:05:48 valkyrie nut-driver-enumerator[748]: valkyrie_ups
Mar 30 00:05:48 valkyrie nut-driver-enumerator[748]: Mon Mar 30 05:05:48 AM UTC 2026 : OK: No more changes to reconcile between systemd service instances and device configurations in '/etc/nut/ups.conf'
Mar 30 00:05:48 valkyrie systemd[1]: nut-driver-enumerator.service: Deactivated successfully.
Mar 30 00:05:51 valkyrie nut-server[1042]: Limit                     Soft Limit           Hard Limit           Units
Mar 30 00:05:51 valkyrie nut-server[1042]: Max open files            1048576              1048576              files
Mar 30 00:05:51 valkyrie nut-server[1041]: Network UPS Tools upsd 2.8.4 release
Mar 30 00:05:51 valkyrie nut-server[1041]: listening on ::1 port 3493
Mar 30 00:05:51 valkyrie nut-server[1041]: listening on 127.0.0.1 port 3493
Mar 30 00:05:51 valkyrie upsd[1041]: listening on ::1 port 3493
Mar 30 00:05:51 valkyrie upsd[1041]: listening on 127.0.0.1 port 3493
Mar 30 00:05:52 valkyrie nut-server[1041]: Connected to UPS [valkyrie_ups]: usbhid-ups-valkyrie_ups
Mar 30 00:05:52 valkyrie nut-server[1041]: Found 1 UPS defined in ups.conf
Mar 30 00:05:52 valkyrie upsd[1041]: Connected to UPS [valkyrie_ups]: usbhid-ups-valkyrie_ups
Mar 30 00:05:52 valkyrie upsd[1041]: Found 1 UPS defined in ups.conf
Mar 30 00:05:52 valkyrie nut-server[1041]: Running as foreground process, not saving a PID file
Mar 30 00:05:52 valkyrie nut-server[1041]: upsnotify: notify about state NOTIFY_STATE_READY_WITH_PID with libsystemd: was requested, but not running as a service unit now, will not spam more about it
Mar 30 00:05:52 valkyrie nut-server[1041]: upsnotify: failed to notify about state NOTIFY_STATE_READY_WITH_PID: no notification tech defined, will not spam more about it
Mar 30 00:05:52 valkyrie nut-server[1041]: upsnotify: logged the systemd watchdog situation once, will not spam more about it
Mar 30 00:05:52 valkyrie upsd[1041]: Running as foreground process, not saving a PID file
Mar 30 00:05:52 valkyrie upsd[1041]: upsnotify: notify about state NOTIFY_STATE_READY_WITH_PID with libsystemd: was requested, but not running as a service unit now, will not spam more about it
Mar 30 00:05:52 valkyrie upsd[1041]: upsnotify: failed to notify about state NOTIFY_STATE_READY_WITH_PID: no notification tech defined, will not spam more about it
Mar 30 00:05:52 valkyrie upsd[1041]: upsnotify: logged the systemd watchdog situation once, will not spam more about it
Mar 30 00:05:52 valkyrie nut-monitor[1058]: Network UPS Tools upsmon 2.8.4 release
Mar 30 00:05:52 valkyrie nut-monitor[1058]: UPS: valkyrie_ups@localhost (primary) (power value 1)
Mar 30 00:05:52 valkyrie nut-monitor[1058]: Using power down flag file /etc/killpower
Mar 30 00:05:52 valkyrie nut-monitor[1058]: Warning: no custom notification command defined, just so you know
Mar 30 00:05:52 valkyrie nut-monitor[1063]: upsnotify: notify about state NOTIFY_STATE_READY_WITH_PID with libsystemd: was requested, but not running as a service unit now, will not spam more about it
Mar 30 00:05:52 valkyrie nut-monitor[1063]: upsnotify: failed to notify about state NOTIFY_STATE_READY_WITH_PID: no notification tech defined, will not spam more about it
Mar 30 00:05:55 valkyrie nut-monitor[1063]: upsmon: initialized OS integration for sleep inhibitor
Mar 30 00:05:55 valkyrie nut-monitor[1063]: upsmon: initialized OS integration for sleep/wake monitoring
Mar 30 00:05:55 valkyrie nut-monitor[1063]: upsnotify: logged the systemd watchdog situation once, will not spam more about it
Mar 30 00:05:55 valkyrie nut-server[1041]: User david@::1 logged into UPS [valkyrie_ups]
Mar 30 00:05:55 valkyrie upsd[1041]: User david@::1 logged into UPS [valkyrie_ups]
Mar 30 02:16:55 valkyrie usbhid-ups[912]: nut_libusb_get_report: No such device (it may have been disconnected)
Mar 30 02:17:14 valkyrie nut-server[1041]: Data for UPS [valkyrie_ups] is stale - check driver
Mar 30 02:17:14 valkyrie upsd[1041]: Data for UPS [valkyrie_ups] is stale - check driver
Mar 30 02:17:15 valkyrie nut-monitor[1063]: Poll UPS [valkyrie_ups@localhost] failed - Data stale
Mar 30 02:17:15 valkyrie nut-monitor[1063]: Communications with UPS valkyrie_ups@localhost lost
Mar 30 02:17:20 valkyrie nut-monitor[1063]: Poll UPS [valkyrie_ups@localhost] failed - Data stale
Mar 30 02:17:25 valkyrie nut-monitor[1063]: Poll UPS [valkyrie_ups@localhost] failed - Data stale
Mar 30 02:17:30 valkyrie nut-monitor[1063]: Poll UPS [valkyrie_ups@localhost] failed - Data stale
Mar 30 02:17:35 valkyrie nut-monitor[1063]: Poll UPS [valkyrie_ups@localhost] failed - Data stale
Mar 30 02:17:40 valkyrie nut-monitor[1063]: Poll UPS [valkyrie_ups@localhost] failed - Data stale
<snip every 5 second spamming log that continues until the driver is restarted>
Mar 30 02:22:10 valkyrie nut-monitor[1063]: Poll UPS [valkyrie_ups@localhost] failed - Data stale
Mar 30 02:22:10 valkyrie nut-monitor[1063]: UPS valkyrie_ups@localhost is unavailable
Mar 30 02:22:15 valkyrie nut-monitor[1063]: Poll UPS [valkyrie_ups@localhost] failed - Data stale
<snip more 5 second spamming>
Mar 30 02:47:51 valkyrie nut-monitor[1063]: Poll UPS [valkyrie_ups@localhost] failed - Data stale
Mar 30 02:47:56 valkyrie nut-server[1041]: Send ping to UPS [valkyrie_ups] failed: Resource temporarily unavailable
Mar 30 02:47:56 valkyrie upsd[1041]: Send ping to UPS [valkyrie_ups] failed: Resource temporarily unavailable
Mar 30 02:47:56 valkyrie nut-monitor[1063]: Poll UPS [valkyrie_ups@localhost] failed - Variable not supported by UPS
Mar 30 02:47:56 valkyrie nut-server[1041]: Connected to UPS [valkyrie_ups]: usbhid-ups-valkyrie_ups
Mar 30 02:47:56 valkyrie upsd[1041]: Connected to UPS [valkyrie_ups]: usbhid-ups-valkyrie_ups
Mar 30 02:48:01 valkyrie nut-monitor[1063]: Communications with UPS valkyrie_ups@localhost established
Mar 30 02:48:01 valkyrie nut-monitor[1063]: UPS valkyrie_ups@localhost: has at least one unclassified status token: [WAIT]
Mar 30 02:48:13 valkyrie nut-server[1041]: Data for UPS [valkyrie_ups] is stale - check driver
Mar 30 02:48:13 valkyrie upsd[1041]: Data for UPS [valkyrie_ups] is stale - check driver
Mar 30 02:48:16 valkyrie nut-monitor[1063]: Poll UPS [valkyrie_ups@localhost] failed - Data stale
Mar 30 02:48:16 valkyrie nut-monitor[1063]: Communications with UPS valkyrie_ups@localhost lost
Mar 30 02:48:21 valkyrie nut-monitor[1063]: Poll UPS [valkyrie_ups@localhost] failed - Data stale
Mar 30 02:48:26 valkyrie nut-monitor[1063]: Poll UPS [valkyrie_ups@localhost] failed - Data stale
<snip more 5 second spamming>
Mar 30 02:55:38 valkyrie sudo[7577]:    david : TTY=pts/0 ; PWD=/home/david ; USER=root ; COMMAND=/usr/bin/systemctl restart nut-driver@valkyrie_ups
Mar 30 02:55:38 valkyrie nut-driver@valkyrie_ups[7585]: Network UPS Tools upsdrvctl - UPS driver controller 2.8.4 release
Mar 30 02:55:42 valkyrie nut-monitor[1063]: Poll UPS [valkyrie_ups@localhost] failed - Data stale
Mar 30 02:55:43 valkyrie nut-driver@valkyrie_ups[7585]: Stopping /run/nut/usbhid-ups-valkyrie_ups.pid failed, retrying harder: Success
Mar 30 02:55:43 valkyrie nut-server[1041]: Can't connect to UPS [valkyrie_ups] (/var/lib/nut/usbhid-ups-valkyrie_ups): Connection refused
Mar 30 02:55:43 valkyrie upsd[1041]: Can't connect to UPS [valkyrie_ups] (/var/lib/nut/usbhid-ups-valkyrie_ups): Connection refused
Mar 30 02:55:43 valkyrie systemd[1]: nut-driver@valkyrie_ups.service: Main process exited, code=killed, status=9/KILL
Mar 30 02:55:44 valkyrie systemd[1]: nut-driver@valkyrie_ups.service: Failed with result 'signal'.
Mar 30 02:55:44 valkyrie systemd[1]: nut-driver@valkyrie_ups.service: Consumed 1.946s CPU time over 2h 49min 57.511s wall clock time, 6.1M memory peak.
Mar 30 02:55:44 valkyrie systemd[1]: nut-udev-settle.service: Deactivated successfully.
Mar 30 02:55:44 valkyrie nut-driver@valkyrie_ups[7610]: Network UPS Tools upsdrvctl - UPS driver controller 2.8.4 release
Mar 30 02:55:44 valkyrie nut-driver@valkyrie_ups[7627]: Network UPS Tools 2.8.4 release - Generic HID driver 0.67
Mar 30 02:55:44 valkyrie nut-driver@valkyrie_ups[7627]: USB communication driver (libusb 1.0) 0.50
Mar 30 02:55:44 valkyrie nut-driver@valkyrie_ups[7627]: Using subdriver: CyberPower HID 0.84
Mar 30 02:55:44 valkyrie nut-driver@valkyrie_ups[7627]: Defaulting 'pollfreq' to 12 for CPS devices
Mar 30 02:55:44 valkyrie nut-driver@valkyrie_ups[7627]: Listening on socket /var/lib/nut/usbhid-ups-valkyrie_ups
Mar 30 02:55:45 valkyrie nut-server[1041]: Connected to UPS [valkyrie_ups]: usbhid-ups-valkyrie_ups
Mar 30 02:55:45 valkyrie upsd[1041]: Connected to UPS [valkyrie_ups]: usbhid-ups-valkyrie_ups
Mar 30 02:55:47 valkyrie nut-monitor[1063]: Communications with UPS valkyrie_ups@localhost established
Mar 30 02:55:52 valkyrie nut-monitor[1063]: UPS valkyrie_ups@localhost has no unclassified status tokens anymore

Now the driver is up and running again after the restart at Mar 30 02:55:38, but for how long?

Something is not right with the driver communication for either CyberPower CP1350PFCLCD or CP1350AVRLCDa as far as the diver remaining in communication with NUT. With 2.7.4 this was never an issue over 8-10 years of using NUT. Now with the upgrade it looks like there is a regression somewhere. This is a simple "standalone" install. In addition to the ups.conf provided above, the hosts and ups config are (the noc command is just a "no comment" script that strips empty and comment lines from output just to show the configuration lines):

$ noc hosts.conf
MONITOR valkyrie_ups@localhost "Valkyrie CP1350PFCLCD UPS"
$ noc nut.conf
MODE=standalone

The upsd.conf is empty and upsmon.conf (sanitized) is:

# noc upsmon.conf
MONITOR valkyrie_ups@localhost 1 myuser mypass primary
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG "/etc/killpower"
OFFDURATION 30
OVERDURATION -1
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
ALARMCRITICAL 1

I'm not sure what else you need me to provide, but ask and I'm happy to get it. The bottom-line issue is why is nut 2.8.4 having problems dropping communication with the usbhid-ups driver where for a decade before the 2.7 version never had any issue whatsoever. Keep up to good work, even with Arjen gone, and let me know what else I can provide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Connection stability issuesIssues about driver<->device and/or networked connections (upsd<->upsmon...) going AWOL over timeCyberPower (CPS)USBimpacts-release-2.8.4Issues reported against NUT release 2.8.4 (maybe vanilla or with minor packaging tweaks)impacts-release-2.8.5Issues reported against NUT release 2.8.5 (maybe vanilla or with minor packaging tweaks)

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions