1# Power Management<a name="EN-US_TOPIC_0000001121107655"></a> 2 3## Introduction<a name="section11660541593"></a> 4 5The power management subsystem provides the following functions: 6 71. System restarting: restarts or shuts down the system. 82. System power management: manages the system power status and running lock. 93. Display-related power consumption adjustment: adjusts the backlight brightness based on the ambient light and turns off the screen based on the proximity light. 104. Power saving: works in low power consumption mode without compromising main functions and performance. 115. Battery management: supports charging and discharging, battery and charging status monitoring (including status updating and reporting), and charging upon power-off. 126. Temperature control: restricts temperature rise through application, SoC, and peripheral control when the device temperature reaches the specified limit. 137. Power consumption statistics: collects statistics on the power consumption of software, hardware, and a single application. 148. Battery service for mini-, small-, and standard-system devices 159. Power management service for mini-, small-, and standard-system devices 16 17**Figure 1** Power management subsystem architecture<a name="fig7607759319"></a> 18 19 20![](figures/power-management-subsystem-architecture.png) 21 22## Directory Structure<a name="section19472752217"></a> 23 24``` 25/base/powermgr 26├── battery_lite # Battery service for mini-, small-, and standard-system devices 27├── battery_manager # Battery service 28├── battery_statistics # Power consumption statistics service 29├── display_manager # Display energy efficiency management service 30├── power_manager # System power management service 31├── powermgr_lite # Power management service for mini-, small-, and standard-system devices 32└── thermal_manager # Temperature control and thermal management service 33``` 34 35## Usage<a name="section19959125052315"></a> 36 37As shown in the system architecture, the power management subsystem consists of seven modules. Some modules provide external APIs or public event notifications. You can use them based on your use cases. The functions of key modules are described as follows: 38 39- Power Manager: provides APIs to request and release the running lock, enable the power saving mode, adjust the brightness, and restart or power off the device. It also provides public events for you to observe changes of the power saving mode and power-off status. 40- Battery Manager: provides APIs to query battery information. It also provides public events for you to observer changes of the battery status and charging/discharging status. 41- Thermal Manager: provides APIs to query the temperature rise status of a device. It also allows you to register callbacks and public events to listen for the temperature rise status of a device. 42- Battery Statistics: provides power consumption statistics on hardware and software. It allows you to query the power consumption of hardware or applications. 43 44## Repositories Involved<a name="section63151229062"></a> 45 46**Power Management Subsystem** 47 48[powermgr_power_manager](https://gitee.com/openharmony/powermgr_power_manager) 49 50[powermgr_display_manager](https://gitee.com/openharmony/powermgr_display_manager) 51 52[powermgr_battery_manager](https://gitee.com/openharmony/powermgr_battery_manager) 53 54[powermgr_thermal_manager](https://gitee.com/openharmony/powermgr_thermal_manager) 55 56[powermgr_battery_statistics](https://gitee.com/openharmony/powermgr_battery_statistics) 57 58[powermgr_battery_lite](https://gitee.com/openharmony/powermgr_battery_lite) 59 60[powermgr_powermgr_lite](https://gitee.com/openharmony/powermgr_powermgr_lite) 61