Bug 1222255

Summary: apcupsd killpower requested in non-power fail condition
Product: [openSUSE] openSUSE Tumbleweed Reporter: JS <obs.coke518>
Component: OtherAssignee: Antonio Teixeira <antonio.teixeira>
Status: NEW --- QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description JS 2024-04-03 05:49:57 UTC
When manually hibernate the system, the following error is logged:

apcupsd: Cannot find /etc/apcupsd/powerfail file.
                Killpower requested in non-power fail condition or bug.
                Killpower request ignored at device.c:95
systemd-sleep: apcupsd FATAL ERROR in device.c at line 96
systemd-sleep: Cannot find /etc/apcupsd/powerfail file.
systemd-sleep:  Killpower requested in non-power fail condition or bug.
systemd-sleep:  Killpower request ignored at device.c:96
apcupsd: apcupsd FATAL ERROR in device.c at line 96
               Cannot find /etc/apcupsd/powerfail file.
                Killpower requested in non-power fail condition or bug.
                Killpower request ignored at device.c:96
apcupsd: apcupsd error shutdown completed

There should be no need to turn off the UPS when there is no power outage.

Maybe add an additional check (&& [ -f /etc/apcupsd/powerfail ]) before calling apccontrol killpower in /usr/lib/systemd/system-sleep/apcupsd.sh is enough.