[Nut-upsuser] POWERCOM UPS USB : UPS Shutdown

Alexey Korobeinikov alexey at fseafood.com
Thu May 15 09:27:50 BST 2025


I have a problem with start driver (UPS has VendorID: 0d9f ProductID: 0004):

# /usr/local/ups/bin/usbhid-ups -DDD -a UPS -u root
Network UPS Tools 2.8.3.1 (development iteration after 2.8.3) - Generic 
HID driver 0.63
USB communication driver (libusb 1.0) 0.50
   0.000000     [D1] upsdrv_makevartable...
   0.000066     [D1] Using USB implementation: libusb-1.0.26 (API: 
0x01000109)
   0.000229     [D3] main_arg: var='driver' val='usbhid-ups'
   0.000248     [D3] main_arg: var='vendorid' val='0d9f'
   0.000266     [D3] main_arg: var='productid' val='0004'
   0.000284     [D3] main_arg: var='port' val='auto'
   0.000305     [D3] main_arg: var='pollinterval' val='2'
   0.000317     [D3] main_arg: var='pollfreq' val='30'
   0.000336     [D3] main_arg: var='offdelay' val='30'
   0.000349     [D3] main_arg: var='ondelay' val='60'
   0.000364     [D3] main_arg: var='allow_killpower' val='<null>'
   0.000376     [D3] main_arg: var='ignorelb' val='<null>'
   0.000390     [D3] main_arg: var='override.battery.charge.low' val='70'
   0.000419     [D1] Built-in default or configured user for drivers 
'nut' was ignored due to 'root' specified on command line
   0.000431     [D1] Network UPS Tools version 2.8.3.1 (development 
iteration after 2.8.3), 64-bit build for x86_64, built with gcc (Debian 
12.2.0-14) 12.2.0 and configured with flags: --wi
th-usb --with-user=nut --with-group=nut --with-libusb=1.0 
--with-statepath=/run/nut --with-pidpath=/run/nut
   0.000447     [D1] debug level is '3'
   0.000739     [D1] Succeeded to become_user(root): now UID=0 GID=0
   0.000764     [D1] Signalling UPS [UPS]: driver.exit (quietly, no fuss 
if no driver is running or responding)
   0.000789     Can't open /run/nut/usbhid-ups-UPS: No such file or 
directory
   0.000801     [D1] Request for other driver to exit returned code -1
   0.000812     [D1] Socket dialog with the other driver instance (may 
be absent) failed: No such file or directory
   0.000842     [D1] upsdrv_initups (non-SHUT)...
   0.000854     [D2] Initializing an USB-connected UPS with library 
libusb-1.0.26 (API: 0x01000109) (NUT subdriver name='USB communication 
driver (libusb 1.0)' ver='0.50')
   0.004814     [D2] Checking device 1 of 10 (1D6B/0001)
   0.077764     [D1] nut_libusb_open: invalid libusb bus number 0
   0.078007     [D2] - VendorID: 1d6b
   0.078024     [D2] - ProductID: 0001
   0.078040     [D2] - Manufacturer: Linux 6.1.0-32-amd64 ohci_hcd
   0.078051     [D2] - Product: OHCI PCI host controller
   0.078060     [D2] - Serial Number: 0000:00:14.5
   0.078074     [D2] - Bus: 007
   0.078082     [D2] - Bus Port: unknown
   0.078090     [D2] - Device: 001
   0.078101     [D2] - Device release number: 0601
   0.078111     [D2] Trying to match device
   0.078122     [D2] match_function_subdriver (non-SHUT mode): matching 
a device...
   0.078142     [D2] match_function_subdriver (non-SHUT mode): failed to 
match a subdriver to vendor and/or product ID
   0.078157     [D2] Device does not match - skipping
   0.078318     [D2] Checking device 2 of 10 (1D6B/0002)
   0.105765     [D1] nut_libusb_open: invalid libusb bus number 0
   0.105987     [D2] - VendorID: 1d6b
   0.106004     [D2] - ProductID: 0002
   0.106021     [D2] - Manufacturer: Linux 6.1.0-32-amd64 ehci_hcd
   0.106032     [D2] - Product: EHCI Host Controller
   0.106039     [D2] - Serial Number: 0000:00:13.2
   0.106053     [D2] - Bus: 002
   0.106063     [D2] - Bus Port: unknown
   0.106071     [D2] - Device: 001
   0.106081     [D2] - Device release number: 0601
   0.106090     [D2] Trying to match device
   0.106108     [D2] match_function_subdriver (non-SHUT mode): matching 
a device...
   0.106129     [D2] match_function_subdriver (non-SHUT mode): failed to 
match a subdriver to vendor and/or product ID
   0.106139     [D2] Device does not match - skipping
   0.106436     [D2] Checking device 3 of 10 (09DA/2268)
   0.114757     [D2] - VendorID: 09da
   0.114797     [D2] - ProductID: 2268
   0.114803     [D2] - Manufacturer: SONiX
   0.114809     [D2] - Product: USB Keyboard
   0.114814     [D2] - Serial Number: unknown
   0.114820     [D2] - Bus: 006
   0.114825     [D2] - Bus Port: 003
   0.114831     [D2] - Device: 002
   0.114836     [D2] - Device release number: 0112
   0.114841     [D2] Trying to match device
   0.114850     [D2] match_function_subdriver (non-SHUT mode): matching 
a device...
   0.114875     [D2] match_function_subdriver (non-SHUT mode): failed to 
match a subdriver to vendor and/or product ID
   0.114889     [D2] Device does not match - skipping
   0.114928     [D2] Checking device 4 of 10 (0D9F/0004)
   0.116698     [D1] nut_usb_get_string_descriptor: string descriptor 0 
request failed, retrying...
   0.167795     [D1] nut_usb_get_string_descriptor: string descriptor 0 
request failed, retrying...
   0.218666     [D1] nut_libusb_open: get Manufacturer string failed
   0.220703     [D1] nut_usb_get_string_descriptor: string descriptor 0 
request failed, retrying...
   0.271791     [D1] nut_usb_get_string_descriptor: string descriptor 0 
request failed, retrying...
   0.322793     [D1] nut_libusb_open: get Product string failed
   0.324842     [D1] nut_usb_get_string_descriptor: string descriptor 0 
request failed, retrying...
   0.375664     [D1] nut_usb_get_string_descriptor: string descriptor 0 
request failed, retrying...
   0.426756     [D1] nut_libusb_open: get Serial Number string failed
   0.426799     [D2] - VendorID: 0d9f
   0.426806     [D2] - ProductID: 0004
   0.426812     [D2] - Manufacturer: unknown
   0.426818     [D2] - Product: unknown
   0.426824     [D2] - Serial Number: unknown
   0.426829     [D2] - Bus: 006
   0.426835     [D2] - Bus Port: 002
   0.426841     [D2] - Device: 003
   0.426846     [D2] - Device release number: 0002
   0.426851     [D2] Trying to match device
   0.426868     [D2] match_function_subdriver (non-SHUT mode): matching 
a device...
   0.426896     [D3] match_function_regex: matching a device...
   0.426971     [D2] Device matches
   0.426987     [D2] Reading configuration descriptor 1 of 1
   0.427014     [D3] libusb_kernel_driver_active() returned 0: Success
   0.427058     [D2] Claimed interface 0 successfully
   0.427076     [D3] nut_libusb_set_altinterface: skipped 
libusb_set_interface_alt_setting(udev, 0, 0)
   0.428753     [D2] Unable to get HID descriptor (Input/Output Error)
   0.428844     [D3] HID descriptor length (method 1) -1
   0.428878     [D3] HID descriptor, method 2: (9 bytes) => 09 21 00 01 
00 01 22 e4 03
   0.428897     [D3] HID descriptor length (method 2) 996
   0.428908     [D2] HID descriptor length 996
   0.430652     [D2] Unable to get Report descriptor: Resource 
temporarily unavailable
   0.430724     [D2] Checking device 5 of 10 (1D6B/0001)
   0.430774     [D1] nut_libusb_open: invalid libusb bus number 0
   0.430934     [D2] - VendorID: 1d6b
   0.430945     [D2] - ProductID: 0001
   0.430956     [D2] - Manufacturer: Linux 6.1.0-32-amd64 ohci_hcd
   0.430964     [D2] - Product: OHCI PCI host controller
   0.430973     [D2] - Serial Number: 0000:00:13.0
   0.430981     [D2] - Bus: 006
   0.430992     [D2] - Bus Port: unknown
   0.431000     [D2] - Device: 001
   0.431008     [D2] - Device release number: 0601
   0.431026     [D2] Trying to match device
....



13.05.2025 18:31, Jim Klimov:
> Check https://github.com/networkupstools/nut/pull/2955 please.
>
> Jim
>
> On Mon, May 12, 2025 at 12:04 PM Jim Klimov <jimklimov+nut at gmail.com 
> <mailto:jimklimov%2Bnut at gmail.com>> wrote:
>
>     Hoped to look into this just today, if nobody beat me to it yet.
>
>     Jim
>
>     On Mon, May 12, 2025 at 11:54 AM Alexey Korobeinikov
>     <alexey at fseafood.com> wrote:
>
>         Are there any chances that this error can be fixed?
>
>         06.05.2025 18:19, Alexey Korobeinikov:
>>         Hi! Thank You!
>>
>>         The UPS behavior are chages with NUT v.2.8.2 but more strange
>>
>>         After this command (if power cord unpluged)
>>         /usr/local/ups/bin/usbhid-ups -DDDD -a UPS -k
>>
>>         ....
>>         0.188173     [D4] string_to_path: depth = 3
>>            0.188187     [D4] string_to_path: depth = 3
>>            0.188199     [D4] string_to_path: depth = 3
>>            0.188211     [D4] string_to_path: depth = 3
>>            0.188246     [D2] find_nut_info: unknown info type:
>>         load.off.delay
>>            0.188267     [D2] find_nut_info: unknown info type:
>>         load.off.delay
>>            0.188280     Initiating UPS shutdown
>>            0.188290     [D1] upsdrv_shutdown...
>>            0.188298     [D1] instcmd(shutdown.return, [NULL])
>>            0.188316     [D3] instcmd: using Path
>>         'UPS.PowerSummary.DelayBeforeShutdown'
>>            0.188332     [D3] powercom_shutdown_nuf: value = (null),
>>         command = 5E00
>>            0.224970     [D3] Report[set]: (3 bytes) => 0f 00 5e
>>            0.225003     [D4] Set report succeeded
>>            0.225012     [D3] instcmd: SUCCEED
>>
>>         The UPS are start double beeping every 2 seconds, but didn't
>>         turn off himself ( 2 minutes wait )
>>         UPS are still beeping if power are restored
>>
>>         Status are:
>>         # upsc ups at localhost
>>         battery.charge: 100
>>         battery.charge.low: 70
>>         battery.charge.warning: 30
>>         battery.mfr.date: 2014/01/15
>>         battery.runtime: 800
>>         battery.type: PbAc
>>         device.mfr: POWERCOM Co.,LTD
>>         device.model: HID UPS Battery
>>         device.serial: 004-0D9F-000
>>         device.type: ups
>>         driver.debug: 0
>>         driver.flag.allow_killpower: 0
>>         driver.flag.ignorelb: enabled
>>         driver.name <http://driver.name>: usbhid-ups
>>         driver.parameter.offdelay: 30
>>         driver.parameter.ondelay: 60
>>         driver.parameter.override.battery.charge.low: 70
>>         driver.parameter.pollfreq: 30
>>         driver.parameter.pollinterval: 2
>>         driver.parameter.port: auto
>>         driver.parameter.productid: 0004
>>         driver.parameter.synchronous: auto
>>         driver.parameter.vendorid: 0d9f
>>         driver.state: quiet
>>         driver.version: 2.8.2
>>         driver.version.data: PowerCOM HID 0.7
>>         driver.version.internal: 0.53
>>         driver.version.usb: libusb-1.0.26 (API: 0x1000109)
>>         input.frequency: 50.0
>>         input.voltage: 224.0
>>         input.voltage.nominal: 220
>>         output.frequency: 50.0
>>         output.voltage: 224.0
>>         output.voltage.nominal: 220
>>         ups.beeper.status: enabled
>>         ups.date: 2014/01/15
>>         ups.delay.shutdown: 30
>>         ups.delay.start: 60
>>         ups.load: 1
>>         ups.mfr: POWERCOM Co.,LTD
>>         ups.model: HID UPS Battery
>>         ups.productid: 0004
>>         ups.serial: 004-0D9F-000
>>         ups.status: OL
>>         ups.test.result: Done and passed
>>         ups.timer.shutdown: 269
>>         ups.timer.start: 0
>>         ups.vendorid: 0d9f
>>         root at vTEMPLATE8:/var/log# upsc ups at localhost
>>         battery.charge: 100
>>         battery.charge.low: 70
>>         battery.charge.warning: 30
>>         battery.mfr.date: 2014/01/15
>>         battery.runtime: 800
>>         battery.type: PbAc
>>         device.mfr: POWERCOM Co.,LTD
>>         device.model: HID UPS Battery
>>         device.serial: 004-0D9F-000
>>         device.type: ups
>>         driver.debug: 0
>>         driver.flag.allow_killpower: 0
>>         driver.flag.ignorelb: enabled
>>         driver.name <http://driver.name>: usbhid-ups
>>         driver.parameter.offdelay: 30
>>         driver.parameter.ondelay: 60
>>         driver.parameter.override.battery.charge.low: 70
>>         driver.parameter.pollfreq: 30
>>         driver.parameter.pollinterval: 2
>>         driver.parameter.port: auto
>>         driver.parameter.productid: 0004
>>         driver.parameter.synchronous: auto
>>         driver.parameter.vendorid: 0d9f
>>         driver.state: quiet
>>         driver.version: 2.8.2
>>         driver.version.data: PowerCOM HID 0.7
>>         driver.version.internal: 0.53
>>         driver.version.usb: libusb-1.0.26 (API: 0x1000109)
>>         input.frequency: 50.0
>>         input.voltage: 224.0
>>         input.voltage.nominal: 220
>>         output.frequency: 50.0
>>         output.voltage: 224.0
>>         output.voltage.nominal: 220
>>         ups.beeper.status: enabled
>>         ups.date: 2014/01/15
>>         ups.delay.shutdown: 30
>>         ups.delay.start: 60
>>         ups.load: 1
>>         ups.mfr: POWERCOM Co.,LTD
>>         ups.model: HID UPS Battery
>>         ups.productid: 0004
>>         ups.serial: 004-0D9F-000
>>         ups.status: OL
>>         ups.test.result: Done and passed
>>         ups.timer.shutdown: 89
>>         ups.timer.start: 0
>>         ups.vendorid: 0d9f
>>         root at vTEMPLATE8:/var/log# upsc ups at localhost
>>         battery.charge: 100
>>         battery.charge.low: 70
>>         battery.charge.warning: 30
>>         battery.mfr.date: 2014/01/15
>>         battery.runtime: 800
>>         battery.type: PbAc
>>         device.mfr: POWERCOM Co.,LTD
>>         device.model: HID UPS Battery
>>         device.serial: 004-0D9F-000
>>         device.type: ups
>>         driver.debug: 0
>>         driver.flag.allow_killpower: 0
>>         driver.flag.ignorelb: enabled
>>         driver.name <http://driver.name>: usbhid-ups
>>         driver.parameter.offdelay: 30
>>         driver.parameter.ondelay: 60
>>         driver.parameter.override.battery.charge.low: 70
>>         driver.parameter.pollfreq: 30
>>         driver.parameter.pollinterval: 2
>>         driver.parameter.port: auto
>>         driver.parameter.productid: 0004
>>         driver.parameter.synchronous: auto
>>         driver.parameter.vendorid: 0d9f
>>         driver.state: quiet
>>         driver.version: 2.8.2
>>         driver.version.data: PowerCOM HID 0.7
>>         driver.version.internal: 0.53
>>         driver.version.usb: libusb-1.0.26 (API: 0x1000109)
>>         input.frequency: 50.0
>>         input.voltage: 226.0
>>         input.voltage.nominal: 220
>>         output.frequency: 50.0
>>         output.voltage: 226.0
>>         output.voltage.nominal: 220
>>         ups.beeper.status: enabled
>>         ups.date: 2014/01/15
>>         ups.delay.shutdown: 30
>>         ups.delay.start: 60
>>         ups.load: 1
>>         ups.mfr: POWERCOM Co.,LTD
>>         ups.model: HID UPS Battery
>>         ups.productid: 0004
>>         ups.serial: 004-0D9F-000
>>         ups.status: OL
>>         ups.test.result: Done and passed
>>         ups.timer.shutdown: 3148
>>         ups.timer.start: 0
>>         ups.vendorid: 0d9f
>>
>>         And strange with timer parametr that are changes cycling:
>>         ups.timer.shutdown: 3570
>>         ups.timer.shutdown: 2430
>>         ups.timer.shutdown: 1710
>>         ...
>>         ups.timer.shutdown: 870
>>         ups.timer.shutdown: 3629
>>         ups.timer.shutdown: 2729
>>         ups.timer.shutdown: 1829
>>         ...
>>         ups.timer.shutdown: 89
>>         ups.timer.shutdown: 3148
>>         ...
>>
>>         the ups.conf are:
>>         [UPS]
>>             driver = usbhid-ups
>>             vendorid = 0d9f
>>             productid = 0004
>>         #    powercom_sdcmd_byte_order_fallback
>>             port = auto
>>         #    pollonly = enabled
>>             pollinterval = 2
>>             pollfreq = 30
>>             offdelay = 30
>>             ondelay = 60
>>             allow_killpower
>>             ignorelb
>>             override.battery.charge.low = 70
>>         #    override.battery.runtime.low = 600
>>
>>         06.05.2025 01:49, Jim Klimov:
>>>         At least the "shutdown.return requires a parameter" part
>>>         *may* be a regression of the new "sdcommands" change in
>>>         v2.8.3,though I don't think older code passed any. Maybe
>>>         something got lost in mass-edit changes though.
>>>
>>>         Can you please double-check with 2.8.2 if its older approach
>>>         to UPS shutdown behaved better?
>>>
>>>         Jim Klimov
>>>
>>>         On Tue, May 6, 2025, 00:41 Alexey Korobeinikov
>>>         <alexey at fseafood.com> wrote:
>>>
>>>             Hi, my UPS Model Powercom BNT400AP ( made 2017.12 ) on
>>>             Linux Devuan
>>>             Daedalus and NUT v2.8.3 (install from source tarball
>>>             with "configure
>>>             --with-usb --with-user=nut --with-group=nut
>>>             --with-libusb=1.0
>>>             --with-statepath=/run/nut --with-pidpath=/run/nut"
>>>             options) didn't
>>>             shutdown itself after OS is shuting down by signal of
>>>             UPS battary is low.
>>>
>>>             ...
>>>
>>>                0.184242     Initiating UPS [UPS] shutdown
>>>                0.184257     [D1] loop_shutdown_commands: call
>>>             do_loop_shutdown_commands() with driver-default sdcommands
>>>                0.184267     [D1] Starting
>>>             do_loop_shutdown_commands(shudown.default), call depth 1...
>>>                0.184280     [D1] upsdrv_shutdown...
>>>                0.184289     [D1] Starting
>>>             do_loop_shutdown_commands(shutdown.return,shutdown.reboot,load.off.delay,shutdown.stayoff),
>>>
>>>             call depth 2...
>>>                0.184299     [D1] instcmd(shutdown.return, [NULL])
>>>                0.184313     [D3] instcmd: using Path
>>>             'UPS.PowerSummary.DelayBeforehutdown'
>>>                0.184321     [D2] instcmd: shutdown.return requires
>>>             an explicit
>>>             parameter
>>>
>>>                0.184331     [D1] instcmd(shutdown.reboot, [NULL])
>>>                0.184348     [D2] find_nut_info: unknown info type:
>>>             shutdown.reboot
>>>                0.184358     [D3] instcmd: cmdname 'shutdown.reboot'
>>>             not found;
>>>             checking for alternatives
>>>                0.184371     [D2] instcmd: info element unavailable
>>>             shutdown.reboot
>>>
>>>                0.184387     [D1] instcmd(load.off.delay, [NULL])
>>>                0.184398     [D2] find_nut_info: unknown info type:
>>>             load.off.delay
>>>                0.184407     [D3] instcmd: cmdname 'load.off.delay'
>>>             not found;
>>>             checking for alternatives
>>>                0.184418     [D2] instcmd: info element unavailable
>>>             load.off.delay
>>>
>>>                0.184428     [D1] instcmd(shutdown.stayoff, [NULL])
>>>                0.184438     [D3] instcmd: using Path
>>>             'UPS.PowerSummary.DelayBeforehutdown'
>>>                0.184449     [D2] instcmd: shutdown.stayoff requires
>>>             an explicit
>>>             parameter
>>>
>>>                0.184462     [D1] Ending
>>>             do_loop_shutdown_commands(shutdown.return,shutdown.reboot,load.off.delay,shutdown.stayoff),
>>>
>>>             call
>>>             depth 2: return-code 2
>>>                0.184471     Shutdown failed!
>>>                0.184483     [D1] set_exit_flag: raising exit flag
>>>             due to signal -1
>>>                0.184493     [D1] do_loop_shutdown_commands(): command
>>>             'shutdown.default' was handled successfully
>>>                0.184502     [D1] Ending
>>>             do_loop_shutdown_commands(shutdown.default),
>>>             call depth 1: return-code 0
>>>                0.184512     UPS [UPS]: shutdown request was
>>>             successful with
>>>             'shutdown.default'
>>>                0.184523     [D1] set_exit_flag: raising exit flag
>>>             due to
>>>             programmatic abort: EXIT_FAILURE
>>>                0.184540     [D1] upsdrv_cleanup...
>>>                0.184899     [D1] upsnotify: failed to notify about
>>>             state
>>>             NOTIFY_STATE_STOPPING: no notification tech defined,
>>>             will not spam more about it
>>>                0.184936     [D1] On systems without service units,
>>>             consider `export
>>>             NUT_QUIET_INIT_UPSNOTIFY=true`
>>>
>>>             I try to use "powercom_sdcmd_byte_order_fallback"
>>>             option, with same effect.
>>>
>>>             Wat's wrong with my UPS/NUT ?
>>>             Thank You!
>>>
>>>             -- 
>>>             Oleksii Korobeinikov
>>>
>>>
>>>
>>>
>>>             _______________________________________________
>>>             Nut-upsuser mailing list
>>>             Nut-upsuser at alioth-lists.debian.net
>>>             https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
>>>
>>
>>         -- 
>>         З Повагою
>>         Коробейніков Олексій
>>         Системний адміністратор
>>
>>         ТОВ "Флагман Сіфуд"
>>         вул. Броварська 152, смт Велика Димерка
>>         Київська область, 07442
>>         р.+38 044 495-88-00
>>         вн.6101
>>         м.+38 067 994-40-48
>>
>>         _______________________________________________
>>         Nut-upsuser mailing list
>>         Nut-upsuser at alioth-lists.debian.net
>>         https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
>
>         -- 
>         З Повагою
>         Коробейніков Олексій
>         Системний адміністратор
>
>         ТОВ "Флагман Сіфуд"
>         вул. Броварська 152, смт Велика Димерка
>         Київська область, 07442
>         р.+38 044 495-88-00
>         вн.6101
>         м.+38 067 994-40-48
>

-- 
З Повагою
Коробейніков Олексій
Системний адміністратор

ТОВ "Флагман Сіфуд"
вул. Броварська 152, смт Велика Димерка
Київська область, 07442
р.+38 044 495-88-00
вн.6101
м.+38 067 994-40-48
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20250515/fdec3c3d/attachment-0001.htm>


More information about the Nut-upsuser mailing list