Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Describe the bug
When an appropriate event is seen by apcupsd and a shut down is initiated, the system shuts down and halts but remains powered on - see screen shot.
Unfortunately, pressing any key on the keyboard will not initiate a reboot. It appears the keyboard on the system is disabled when the system is halted, including PS2. To recover from this situation a hard-reset must be performed.
To Reproduce
Steps to reproduce the behavior:
- Ensure a monitor or serial port is connected to view Console output
- Attach a PS2 keyboard to the computer - reboot if necessary
- Go to 'System'
- Click on 'Firmware'
- Click on 'Plugins'
- Select 'os-apcupsd' and install
- Attach an APC Smart-UPS using a USB cable
- Go to 'Services'
- Click on 'Apcupsd'
- Click on 'Settings'
- Configure settings as per screen shot - UPS Name is not important.
- For testing purposes, ensure 'Battery Timeout Shutdown' is changed from the default of '0' to a low number such as '60'. Revert it to '0' after testing is complete.
- Click on 'Status'
- Verify UPS information is complete - see screen shot.
- Remove mains power to the UPS
- Observe OPNsense commences shutting down about a minute later and simply halt.
- Restore mains power to the UPS
Depending on the UPS device configuration, it may go to sleep after 'DHSUTD' period - see Services: Apcupsd: Status.
If the UPS does not get commanded to go to sleep during shut down and power is restored, OPNsense will remain at the screen awaiting some form of action before it can reboot - a PS2 keyboard is useless at this point.
Expected behavior
When apcupsd initiates a shut down, it should do so using '-p now'.
Reviewing the Makefile for the FreeBSD port of apcupsd (https://cgit.freebsd.org/ports/tree/sysutils/apcupsd/Makefile), the section beginning on line 84 appears to make a post-patch change to apccontrol.in by replacing;
with
Reviewing the installed /usr/local/etc/apcupsd/apccontrol, it appears the replacement did not occur:
Line 96 reads as;
${SHUTDOWN} -h now "apcupsd initiated shutdown"
Manually replacing '-h now' with '-p now' at line 96 of /usr/local/etc/apcupsd/apccontrol, and with the same test scenario as above, the computer shuts down and powers off - the computer must support ACPI and it must enabled for this to work, as APM was removed from FreeBSD somewhere along the version 13 lineage.
Describe alternatives you considered
Don't use apcupsd.
Screenshots
Relevant log files
N/A
Additional context
N/A
Environment
Software version used and hardware type if relevant, e.g.:
OPNsense 26.1.5 (amd64).
Intel® Core(TM) i7-7700 CPU @ 3.60GHz (3600.00-MHz K8-class CPU)
Network Intel® I350
OPNsense installed packages for apcupsd.
apcupsd-3.14.14_6 Set of programs for controlling APC UPS
os-apcupsd-1.2_3 APCUPSD - APC UPS daemon
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Describe the bug
When an appropriate event is seen by apcupsd and a shut down is initiated, the system shuts down and halts but remains powered on - see screen shot.
Unfortunately, pressing any key on the keyboard will not initiate a reboot. It appears the keyboard on the system is disabled when the system is halted, including PS2. To recover from this situation a hard-reset must be performed.
To Reproduce
Steps to reproduce the behavior:
Depending on the UPS device configuration, it may go to sleep after 'DHSUTD' period - see Services: Apcupsd: Status.
If the UPS does not get commanded to go to sleep during shut down and power is restored, OPNsense will remain at the screen awaiting some form of action before it can reboot - a PS2 keyboard is useless at this point.
Expected behavior
When apcupsd initiates a shut down, it should do so using '-p now'.
Reviewing the Makefile for the FreeBSD port of apcupsd (https://cgit.freebsd.org/ports/tree/sysutils/apcupsd/Makefile), the section beginning on line 84 appears to make a post-patch change to apccontrol.in by replacing;
with
Reviewing the installed /usr/local/etc/apcupsd/apccontrol, it appears the replacement did not occur:
Manually replacing '-h now' with '-p now' at line 96 of /usr/local/etc/apcupsd/apccontrol, and with the same test scenario as above, the computer shuts down and powers off - the computer must support ACPI and it must enabled for this to work, as APM was removed from FreeBSD somewhere along the version 13 lineage.
Describe alternatives you considered
Don't use apcupsd.
Screenshots
Relevant log files
N/A
Additional context
N/A
Environment
Software version used and hardware type if relevant, e.g.:
OPNsense 26.1.5 (amd64).
Intel® Core(TM) i7-7700 CPU @ 3.60GHz (3600.00-MHz K8-class CPU)
Network Intel® I350
OPNsense installed packages for apcupsd.
apcupsd-3.14.14_6 Set of programs for controlling APC UPS
os-apcupsd-1.2_3 APCUPSD - APC UPS daemon