<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Correct - the faulty system uses the older packaged NUT. The working setup in FreeBSD (actually XigmaNAS v12.3.0.4.9848) uses NUT v2021.12.09, which I am guessing is whatever they pulled from Github on that date.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Unfortunately, I can only verify that the faulty one (Linux) uses libusb-0.1 and cannot find anything on the libusb for the working FreeBSD. Looking at the changelog for NUT, it seems though that libusb-1.0 were not merged into main NUT codebase until 2022.01.12.
So I would guess it is still on libusb-0.1.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I took a look at the parameters for usbhid-ups. It seems the most relevant ones would be pollreq, pollonly, interruptonly, interruptsize. Is the strategy here just trial and error since the error log is not showing anything? However, the config used between
the two systems are identical so would it still be relevant?</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Jim Klimov <jimklimov+nut@gmail.com><br>
<b>Sent:</b> February 11, 2022 12:31 AM<br>
<b>To:</b> Gary <digimon0327@msn.com><br>
<b>Cc:</b> Arnaud Quette via Nut-upsuser <nut-upsuser@alioth-lists.debian.net><br>
<b>Subject:</b> Re: [Nut-upsuser] usbhid-ups becomes unresponsive after extended period</font>
<div> </div>
</div>
<div>
<div dir="auto">
<div>So just to clarify - the faulty system uses the older packaged NUT (in Linux) and the newer build of master (in FreeBSD) works better?
<div dir="auto"><br>
</div>
<div dir="auto">Does the newer one also use libusb-1.0 dependency (vs. 0.1 likely for packaged one), is the custom build that new? It may be that some transport deficiencies were fixed in that, or in NUT over the years.</div>
<div dir="auto"><br>
</div>
<div dir="auto">For that older setup, probably there are some timeout settings to tell the driver to reconnect somehow, but can't remember ATM. Also different systems varied with success of active polling vs interrupt delivery, so "pollonly" (and freq) options
can help.</div>
<br>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Wed, Feb 9, 2022, 03:56 Gary via Nut-upsuser <<a href="mailto:nut-upsuser@alioth-lists.debian.net">nut-upsuser@alioth-lists.debian.net</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="background-color:rgb(255,255,255); display:inline!important"></span>OS name and version: Ubuntu 20.04.3 LTS
<div>NUT Version: 2.7.4 (installed via apt-get)</div>
<div>USB communication driver: 0.33</div>
<div>Subdriver: APC HID 0.96</div>
<div>Device: APC Back-UPS 550</div>
<div><br>
</div>
<div>The usbhid-ups driver seems to stop responding/serving data to upsd after running it for a few hours. It works initially when starting the NUT service but would stop working after a while. It would start working again for a bit if I restart it (sudo upsdrvctl
start)</div>
<div><br>
</div>
<div>In my syslog, I would get these error messages once it stops working.</div>
<div><br>
</div>
<div>Feb 8 15:20:43 internal upsmon[25307]: UPS [ups1@localhost]: connect failed: Connection failure: Connection timed out</div>
<div>Feb 8 15:20:43 internal upsmon[25307]: UPS ups1@localhost is unavailable</div>
<div><br>
</div>
<div>Reading the log, the upshid-ups log stops updating after a while. For example, in this log, it would keep updating until 8282 seconds but nothing appears in the log afterwards. The command I use to capture the log is:</div>
<div>/usr/lib/nut/usbhid-ups -DDDDD -a ups1 > /var/log/usbhid_log 2>&1 &</div>
<div><br>
</div>
<div>Log file:</div>
<div><a href="https://drive.google.com/file/d/11LwtnUoF7TweNDxMrIG8ZAxNTlzKwpy7/view?usp=sharing" target="_blank" rel="noreferrer">https://drive.google.com/file/d/11LwtnUoF7TweNDxMrIG8ZAxNTlzKwpy7/view?usp=sharing</a></div>
<div><br>
</div>
<div>The troubleshooting steps I have done include:</div>
<div>- Works without issue: Connecting to a different VM (but on same hardware, cable port, usb passthrough) running FreeBSD 12.3 and NUT 2.7.4.1</div>
<div>--- So it doesn't seem to be an issue with hardware, cable, or VM passthrough issue</div>
<div><br>
</div>
<div>The setup:</div>
<div>- APC Back-UPS connected via USB to USB port on machine, passthrough via ESXi to guest VM</div>
<div><br>
</div>
Greatly appreciate any insights.
<div style="margin:0px; background-color:rgb(255,255,255)"><br>
</div>
</div>
</div>
_______________________________________________<br>
Nut-upsuser mailing list<br>
<a href="mailto:Nut-upsuser@alioth-lists.debian.net" target="_blank" rel="noreferrer">Nut-upsuser@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser" rel="noreferrer noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>