Configuration
PowerRequestMonitor
You can configure any number of <RequestFilterRule> to describe which power requests should be considered as usage.
<SystemMonitor>
<PowerRequestMonitor watchOperation="sleep" watchMode="block|block-weak">
<RequestFilterRule ... />
<RequestFilterRule ... />
</PowerRequestMonitor>
</SystemMonitor>
watchOperation
- default:
sleep- OS:
🐧 Linux
Controls which inhibition operations are visible to the <PowerRequestMonitor>. Only locks whose operation matches one of the configured values are evaluated by filter rules and counted as usage. Multiple values can be combined with |.
sleepBlocks or delays suspend and hibernate.
shutdownBlocks or delays system shutdown and power-off.
rebootBlocks or delays a system reboot.
idleBlocks idle-triggered actions such as screen blanking, screensaver activation, and automatic suspend.
handle-power-keyPrevents logind from acting on the physical power button press.
handle-suspend-keyPrevents logind from acting on the suspend key.
handle-hibernate-keyPrevents logind from acting on the hibernate key.
handle-lid-switchPrevents logind from reacting to the laptop lid being closed.
watchMode
- default:
block|block-weak- OS:
🐧 Linux
Controls which inhibition modes are visible to the <PowerRequestMonitor>. Only locks whose mode matches one of the configured values are evaluated. Multiple values can be combined with |.
blockThe operation is completely prevented for as long as the lock is held. Privileged processes can override this, but unprivileged applications cannot.
block-weakA weaker variant of
blockthat can be overridden by the system or a privileged process without releasing the lock. Used when an application wants to signal preference but not enforce it unconditionally.delayDoes not prevent the operation, but delays it by a short window (configured in
logind.confviaInhibitDelayMaxSec). The application is expected to perform any necessary cleanup within this window and then release the lock. Used by media players that need to flush buffers before a suspend.
RequestFilterRule
<RequestFilterRule type="MustNot" name="Backup">CBBackupPlan</RequestFilterRule>
type
- default:
MustNot
This attribute determines if this is an inclusive or exclusive filter rule.
MustInclusive filters reduce the set of monitored resources to include only those that match at least one of the filters.
MustNotExclusive filters reduce the set of monitored resources by those that match with them.
name
You can provide any logical name here, to describe the power request or group of power requests. This name will be used to represent these requests in the log.
text
- 🔍 regex:
The text node of the <RequestFilterRule> will be parsed as a regular expression and matched against the name and reasons of the power request.