While working on deprecating the sysutils/pcns port, I began converting hosts over to using sysutils/apcupsd instead. Since I've relied on PowerChute in the past, I configured apcupsd to use the pcnet driver as I have in the past before switching over to pcns. I discovered that newer releases of the NMC firmware seems to periodically stop sending status broadcasts, which results in spurious COMMLOST events when using this driver. I've reported this behavior upstream to the apcupsd-users mailing list, however there does not seem to be much movement. I don't expect to receive much of a response given that the last release of apcupsd was made over eight years ago. I'm hoping that by including this patch in the sysutils/apcupsd port, sysutils/pcns users will have a clear path forward after the port is removed at the end of the month. Thanks in advance!
Created attachment 256494 [details] Proposed patch
apcupsd-users thread can be found here: https://sourceforge.net/p/apcupsd/mailman/message/59114143/
Ping!
Hi, do you use the pre-built packages from the FreeBSD CDN, or do you build your ports/packages yourself? I'm asking because I'm considering adding this as an optional patch, and I'm not sure if it will help you. Note that we are not the APCUPSD upstream. BTW, nice report and investigation.
(In reply to Danilo G. Baio from comment #4) Thanks! On these systems I usually use packages from the CDN and resort to using ports only when I need to customize behavior. I was hoping to resolve this upstream, but the project hasn't been touched in years. The good news is this is a very small adjustment to behavior that resolves a longstanding issue in the pcnet driver (there are unresolved reports for this problem). That said, I was hoping by moving this into ports I could avoid maintaining _EXTRA_PATCHES.
(In reply to Steven Stallion from comment #5) So, let's do this: Send the patch to the project's mailing list to formalize it. And also include it here as an extra patch, with an option enabled by default. This won't harm users; on the contrary. This way, we are not modifying the project on our own.
(In reply to Danilo G. Baio from comment #6) Will do!
Created attachment 256721 [details] Proposed patch (updated)
(In reply to Danilo G. Baio from comment #6) I've updated the apcupsd-users mailing list thread and I have also attached an updated patch. Thanks again for taking a look!
(In reply to Steven Stallion from comment #9) Great, I'll run some build tests and then proceed to push the changes.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=7f625a5cf6959cb84bb2f112583ea9cc6bb7c7fb commit 7f625a5cf6959cb84bb2f112583ea9cc6bb7c7fb Author: Steven Stallion <sstallion@gmail.com> AuthorDate: 2025-01-15 19:35:15 +0000 Commit: Danilo G. Baio <dbaio@FreeBSD.org> CommitDate: 2025-01-15 19:41:11 +0000 sysutils/apcupsd: Add patch to increase the PCNET commlost timeout PR: 283900 Reviewed by: dbaio sysutils/apcupsd/Makefile | 12 +++++++----- sysutils/apcupsd/files/extra-patch-pcnet-commlost (new) | 17 +++++++++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-)
Committed, thanks!
(In reply to Danilo G. Baio from comment #12) Thank you!