systemd-battery-check.service(8) — Linux manual page


SYSTEMD-BA...K.SERVICE(8) systemd-battery-checkSYSTEMD-BA...K.SERVICE(8)

NAME         top

       systemd-battery-check.service, systemd-battery-check - Check
       battery level whether there's enough charge, and power off if not

SYNOPSIS         top


       /usr/lib/systemd/systemd-battery-check [OPTIONS...]

DESCRIPTION         top

       This service checks the presence of an external power supply and
       the battery level during the early boot stage to determine
       whether there is sufficient power to carry on with the booting

       systemd-battery-check returns success if the device is connected
       to an AC power source or if the battery charge is greater than
       5%. It returns failure otherwise.

OPTIONS         top

       The following options are understood by systemd-battery-check:

       -h, --help
           Print a short help text and exit.

           Print a short version string and exit.

EXIT STATUS         top

       On success (running on AC power or battery capacity greater than
       5%), 0 is returned, a non-zero failure code otherwise.


       The following variables are understood:

           Takes a boolean. If specified with false,
           systemd-battery-check command will return immediately with
           exit status 0 without checking battery capacity and AC power
           existence, and the service systemd-battery-check.service will
           succeed. This may be useful when the command wrongly detects
           and reports battery capacity percentage or AC power
           existence, or when you want to boot the system forcibly.

           Added in version 254.

SEE ALSO         top


COLOPHON         top

       This page is part of the systemd (systemd system and service
       manager) project.  Information about the project can be found at
       ⟨⟩.  If you have
       a bug report for this manual page, see
       This page was obtained from the project's upstream Git repository
       ⟨⟩ on 2023-12-22.  (At that
       time, the date of the most recent commit that was found in the
       repository was 2023-12-22.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to

systemd 255                                    SYSTEMD-BA...K.SERVICE(8)

Pages that refer to this page: systemd.directives(7)systemd.index(7)