1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id="systemd-battery-check.service" xmlns:xi="http://www.w3.org/2001/XInclude">
9 <title>systemd-battery-check</title>
10 <productname>systemd</productname>
14 <refentrytitle>systemd-battery-check.service</refentrytitle>
15 <manvolnum>8</manvolnum>
19 <refname>systemd-battery-check.service</refname>
20 <refname>systemd-battery-check</refname>
21 <refpurpose>Check battery level whether there's enough charge, and power off if not</refpurpose>
25 <para><filename>systemd-battery-check.service</filename></para>
27 <command>/usr/lib/systemd/systemd-battery-check</command>
28 <arg choice="opt" rep="repeat">OPTIONS</arg>
33 <title>Description</title>
35 <para>This service checks the presence of an external power supply and the battery level during the early
36 boot stage to determine whether there is sufficient power to carry on with the booting process.</para>
38 <para><command>systemd-battery-check</command> returns success if the device is connected to an AC power
39 source or if the battery charge is greater than 5%. It returns failure otherwise.</para>
43 <title>Options</title>
45 <para>The following options are understood by <command>systemd-battery-check</command>:</para>
48 <xi:include href="standard-options.xml" xpointer="help" />
49 <xi:include href="standard-options.xml" xpointer="version" />
54 <title>Exit status</title>
57 On success (running on AC power or battery capacity greater than 5%), 0 is returned, a non-zero failure
63 <title>Kernel Command Line</title>
65 <para>The following variables are understood:</para>
67 <variablelist class='kernel-commandline-options'>
69 <term><varname>systemd.battery-check=<replaceable>BOOL</replaceable></varname></term>
72 <para>Takes a boolean. If specified with false, <command>systemd-battery-check</command> command
73 will return immediately with exit status 0 without checking battery capacity and AC power
74 existence, and the service <filename>systemd-battery-check.service</filename> will succeed. This
75 may be useful when the command wrongly detects and reports battery capacity percentage or AC power
76 existence, or when you want to boot the system forcibly.</para>
78 <xi:include href="version-info.xml" xpointer="v254"/>
85 <title>See Also</title>
87 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>