Low power consumption method based on Linux desktop environment

By collecting multi-dimensional data in real time in the Linux desktop environment to calculate the low power consumption level and dynamically adjust the hardware and process working modes, the problem of the existing operating system's unintelligent management of background processes in low power consumption mode is solved, and intelligent energy saving and performance optimization are achieved.

CN120803744AInactive Publication Date: 2025-10-17KYLIN CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511270147.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-10-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing operating systems are not smart enough in managing background processes in low-power mode, resulting in a poor user experience and device performance that cannot meet the needs of different usage scenarios.

Method used

By collecting factors such as automatic energy-saving mode, battery status, remaining power and CPU usage in real time in the Linux desktop environment, the low power consumption level is calculated, and the working mode of hardware and processes is dynamically adjusted according to preset strategies, giving priority to protecting users' active processes.

Benefits of technology

It achieves intelligent control of system power consumption, extends battery life, and optimizes device performance in different usage scenarios while ensuring user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803744A_ABST
    Figure CN120803744A_ABST
Patent Text Reader

Abstract

The invention relates to the field of system power consumption, and particularly provides a low power consumption method based on a Linux desktop environment, which comprises the following steps: S1, starting a system, and initializing corresponding software and hardware; s2, registering a security service interface of the Dbus; s3, a low-power-consumption level calculation module collects the on-off state, the battery state, the remaining capacity percentage and the CPU occupancy rate of the automatic energy-saving mode and calculates the current low-power-consumption level; s4, broadcasting the current low power consumption level; s5, monitoring the current low-power-consumption level, and executing a corresponding control behavior according to the current low-power-consumption level and a preset low-power-consumption strategy; and S6, collecting the actual execution strategy of each background application, and returning to the step S3 when it is detected that the preset low-power-consumption strategy conflicts with the actual execution strategy. By means of the scheme, the technical problems that an existing low-power-consumption mode only controls a hardware working mode, and management on background processes is not intelligent enough are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of system power consumption, and specifically provides a low-power consumption method based on a Linux desktop environment. BACKGROUND

[0002] With the wide application of UKUI, how to reduce system power consumption while ensuring user experience has become an important issue. The low-power consumption mode of the mainstream PC operating system on the market often only controls the hardware working mode, and the management of background processes is not intelligent enough to effectively regulate the work content, work frequency and rendering special effects of background applications, and often lacks optimization solutions for foreground processes.

[0003] 1. The background management strategy is not intelligent Currently, users often need to manually manage background processes in the power saving and energy saving strategies of mainstream operating systems. This manual management method is not only cumbersome and prone to errors, but users also have difficulty accurately determining which background processes can be safely closed and which processes are critical to the normal operation of the device. Even worse, some operating systems directly kill background processes to extend the battery life, which can reduce energy consumption to some extent, but it seriously affects the normal use of device functions. When users need to use certain background functions, they often need to restart the application because the related processes have been killed, which not only wastes users' time and effort, but also may cause data loss or application state abnormalities, greatly affecting user experience.

[0004] For example, when browsing a webpage, the user may want the background to continue downloading files, but if the system kills the download process for energy saving, the user needs to initiate the download task again, which undoubtedly increases the user's operation cost.

[0005] In addition, this energy-saving strategy may also cause the device to fail to fully utilize its performance advantages in different use scenarios. For example, when the user is performing high-intensity work or entertainment activities, the system may still limit the performance output of the device according to the preset energy-saving strategy, causing the device to run slowly or stutter, and failing to meet the user's needs.

[0006] 2. Lack of foreground process priority optimization module The priority of all processes in the current mainstream operating system is the same, and the CPU load is evenly distributed to each process, without improving the priority of the process being operated by the user, so the response speed of the CPU to the user's active process cannot be improved. SUMMARY

[0007] In order to overcome the above-mentioned defects, the present application is proposed to provide a solution to the technical problem that the existing low-power consumption mode only controls the hardware working mode and the management of background processes is not intelligent enough.

[0008] A low-power method based on Linux desktop environment, comprising the following steps: S1: system startup, initialization of corresponding software and hardware; S2: register the security service interface of Dbus, start the low-power level calculation module; S3: the low-power level calculation module collects the automatic energy-saving mode switch state, battery state, remaining battery percentage, CPU occupancy, and calculates the current low-power level; S4: broadcast the current low-power level; S5: listen to the current low-power level, and according to the current low-power level and the preset low-power strategy, execute the corresponding control behavior; S6: collect the actual execution strategy of each background application, and return to step S3 when detecting that the preset low-power strategy conflicts with the actual execution strategy.

[0009] Further, the step S1 comprises the steps of: S11: system cold start and hardware initialization; S12: multi-factor authentication and user environment loading; S13: start of layered power management service stack.

[0010] Further, the step S11 comprises the steps of: S111: execute firmware layer initialization, complete CPU / RAM self-check, peripheral device enumeration, and load embedded controller firmware; S112: start systemd-udevd daemon process in parallel to handle hot plug events.

[0011] Further, the step S12 comprises the steps of: S121: start the display server, run the greeter login manager, activate the fingerprint identification module and TPM encryption chip communication; S122: call pam_tally2 module to prevent brute force cracking, and unlock LUKS encrypted home directory after verification; S123: configure software and system according to user historical data hardware.

[0012] Further, the step S13 comprises the steps of: S131: start power management configuration touch hardware working mode; S132: continuously monitor the battery charging and discharging state, and expose data through / org / freedesktop / UPower Dbus interface.

[0013] Further, the step S2 comprises the steps of: S21: Declare GetPowerMode method, SetPowerMode method and PowerModeChanged signal through XML description org.ukui.powerManager interface; S22: Register / PowerManager object path using QDBus framework, bind to system bus, start low power level calculation module.

[0014] Further, the step S3 comprises: When the automatic energy saving mode switch state is on, the battery state is battery powered, the remaining battery percentage is below 20%, and the CPU occupancy is below 30%, the low power level is the extremely low power mode; When the automatic energy saving mode switch state is on, the battery state is battery powered, the remaining battery percentage is below 20%, and the CPU occupancy is above 30%, the low power level is the medium low power mode; When the automatic energy saving mode switch state is on, the battery state is battery powered, the remaining battery percentage is above 20%, and the CPU occupancy is below 30%, the low power level is the medium low power mode; When the automatic energy saving mode switch state is on, the battery state is battery powered, the remaining battery percentage is above 20%, and the CPU occupancy is above 30%, the low power level is the normal mode; When the automatic energy saving mode switch state is on, the battery state is battery powered, the remaining battery percentage is above 80%, and the CPU occupancy is arbitrary, the low power level is the normal mode; When the automatic energy saving mode switch state is on, the battery state is battery powered, the remaining battery percentage is arbitrary, and the CPU occupancy is arbitrary, the low power level is the normal mode; When the automatic energy saving mode switch state is off, the battery state is arbitrary, the remaining battery percentage is arbitrary, and the CPU occupancy is arbitrary, the low power level is the normal mode.

[0015] Further, the step S4 comprises the steps of: S41: Define composite data type according to Dbus Type System, and attach timestamp and data check code; S42: Notify attribute change through org.freedesktop.DBus.Properties.PropertiesChanged signal, and send broadcast PowerModeChanged signal to / PowerManager path to allow wildcard matching subscriber.

[0016] Further, the step S5 comprises the steps of: S51: Listen to the PowerModeChanged signal of PowerManager to obtain the current low-power level; S52: According to the current low-power level, the corresponding control behavior is executed.

[0017] Further, the preset low-power strategy includes: When in the extremely low-power mode, the color temperature retrieval frequency is stopped, the disk monitoring frequency is stopped, the software store background update frequency is stopped, the synthesizer state is closed, the window special effect is closed, the search index service IO priority dynamic grading is closed, the notebook display backlight maximum value is limited to 80%, the notebook built-in sound is cancelled gain and the maximum value is limited to 80%, the desktop environment component animation is closed, the desktop environment component special effect is closed, the task bar reduces the tray flicker refresh frequency, the hardware mode is low-power mode, the fan speed is low, the display refresh rate is 60hz, the background picture is adjusted to dark color, and the theme is adjusted to dark color; When in the medium low-power mode, the color temperature retrieval frequency is reduced, the disk monitoring frequency is reduced, the software store background update frequency is reduced, the synthesizer state is started, the window special effect is closed, the search index service IO priority dynamic grading is closed, the notebook display backlight maximum value is limited to 80%, the notebook built-in sound is cancelled gain and the maximum value is limited to 80%, the desktop environment component animation is closed, the desktop environment component special effect is closed, the task bar reduces the tray flicker refresh frequency, the hardware mode is balanced mode, the fan speed is medium, the display refresh rate is not limited, the background picture is not adjusted, and the theme is not adjusted; When in the normal mode, the color temperature retrieval frequency is not limited, the disk monitoring frequency is not limited, the software store background update frequency is not limited, the synthesizer state is started, the window special effect is started, the search index service IO priority dynamic grading is started, the notebook display backlight maximum value is not limited, the notebook built-in sound is not limited, the desktop environment component animation is started, the desktop environment component special effect is started, the task bar reduces the tray flicker refresh frequency, the hardware mode is performance mode, the fan speed is high, the display refresh rate is not limited, the background picture is not adjusted, and the theme is not adjusted.

[0018] The working principle and beneficial effects of the present application are as follows: In the implementation of the technical solutions of the present application, the low-power level is calculated by real-time collecting the automatic energy-saving mode, the battery state, the remaining power percentage, and the CPU occupancy rate in the desktop environment of the Linux system, and then broadcasted to the desktop environment component, and the desktop environment component executes the corresponding control behavior according to the preset low-power strategy. BRIEF DESCRIPTION OF DRAWINGS

[0019] The disclosure of the present application will become more readily understood from the following description of specific embodiments. As will be realized, the application is capable of other different obvious aspects and embodiments, all without departing from the application as broadly described herein. It is therefore contemplated that the application shall also cover any and all modifications of the application, and the scope of the claimed application shall not be limited by the specific embodiments presented herein. It is also understood that the specific embodiments presented herein are only by way of example and should not be used to limit the scope of the claimed application. Figure 1 is a schematic diagram of the main steps of a low-power method based on Linux desktop environment of the present application. DETAILED DESCRIPTION

[0020] Some embodiments of the present application will be described herein below with reference to the accompanying drawings. Those skilled in the art will understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.

[0021] Figure 1 is a schematic diagram of the main steps of a low-power method based on Linux desktop environment of the present application. As shown in Figure 1 , the low-power method based on Linux desktop environment of the present application mainly includes the following steps S1-S6.

[0022] Step S1: system startup, initialization of corresponding software and hardware.

[0023] In one embodiment, step S1 includes the following steps S11-S13.

[0024] S11: system cold start and hardware initialization.

[0025] In one embodiment, step S11 includes: S111: perform firmware layer initialization (BIOS / UEFI): complete CPU / RAM self-test, peripheral device enumeration, load embedded controller (EC) firmware; S112: start systemd initialization process: start systemd-udevd daemon process to handle hot plug events in parallel.

[0026] S12: multi-factor authentication and user environment loading.

[0027] In one embodiment, step S12 includes: S121: start X11 / Wayland display server, run ukui-greeter login manager, activate fingerprint recognition module and face recognition module.

[0028] S122: verify user password through PAM framework.

[0029] S123: configure user configuration: perform software configuration and system configuration according to user historical data hardware.

[0030] S13: Hierarchical power management service stack starts.

[0031] In one embodiment, step S13 comprises: S131: Activate kernel-level power policy: start power management configuration touch hardware working mode.

[0032] S132: Start user-level daemon upowerd: continuously monitor battery charging and discharging status, expose data through / org / freedesktop / UPower Dbus interface.

[0033] Step S2: Register the security service interface of Dbus, and start the low-power level calculation module.

[0034] In one embodiment, step S2 comprises: S21: Define service interface: describe org.ukui.powerManager interface through XML, declare GetPowerMode method, SetPowerMode method and PowerModeChanged signal.

[0035] S22: Implement service object: register / PowerManager object path using QDBus framework, bind to system bus, and start the low-power level calculation module.

[0036] Step S3: The low-power level calculation module collects automatic energy-saving mode switch state, battery status, remaining battery percentage, CPU occupancy rate, etc., and calculates the current low-power level. The level division is shown in Table 1.

[0037] Table 1 - Low-power level calculation method:

[0038] Step S4: Broadcast the current low-power level, which is used for preset low-power mode background application dynamic job content and job frequency.

[0039] In one embodiment, step S4 comprises: S41: Signal construction: define composite data type according to Dbus Type System, and attach timestamp and data check code.

[0040] S42: Multicast strategy: Notify attribute change through org.freedesktop.DBus.Properties.PropertiesChanged signal; Send broadcast PowerModeChanged signal to / PowerManager path, and allow wildcard matching subscribers.

[0041] Step S5: Listen to the current low-power level, and according to the current low-power level and the preset low-power strategy, execute the corresponding control behavior.

[0042] S51: Component registration mechanism: listen to the PowerModeChanged signal of PowerManager to obtain the current low-power level.

[0043] S52: According to the current low-power level, execute the corresponding control behavior.

[0044] In this embodiment, the background process of UKUI is preset with multiple sets of low-power strategies (i.e. different control behaviors are executed according to the low-power level), and for different low-power level scenarios, the main business, secondary business, and non-system necessary business are sequentially guaranteed to reduce power consumption while ensuring that the background main business used by the user is not affected. The low-power strategy is shown in Table 2.

[0045] Table 2 - UKUI background strategy:

[0046] Step S6: Feedback optimization.

[0047] The actual execution strategy of each background application is collected, and when it is detected that the preset low-power strategy does not match the actual execution strategy (i.e. the preset low-power strategy does not match the actual execution strategy of the background application), return to step S3 to recalculate the current low-power level and issue a new low-power strategy.

[0048] Based on the above steps S1-S6, in the desktop environment of the Linux system, the low-power level is calculated in real time by collecting the automatic energy-saving mode, battery status, remaining power percentage, CPU occupancy rate factors, and then broadcasted to the desktop environment component. The desktop environment component executes the corresponding control behavior according to the preset low-power strategy.

[0049] This method presets multiple sets of low-power strategies for the background process of UKUI, and for different levels of low-power scenarios, the main business function, secondary business function, and non-system necessary business function are sequentially guaranteed according to the priority, ensuring that the main business function used by the user is minimally affected by low power.

[0050] In order to manage the device energy consumption more effectively and prolong the battery life, the system builds an intelligent low-power mode level evaluation mechanism by comprehensively collecting key hardware and running state information. Specifically, the system collects the following core data in real time: system mode (such as high-performance mode, balanced mode, energy-saving mode, and the current running state), battery status (including the remaining battery percentage, battery health, and current charging and discharging power, and other key parameters), CPU occupancy (reflecting the real-time load of the processor, including the usage rate of each core and the overall load trend), and the like. Based on these multi-dimensional dynamic data, the current use scenario, performance requirements, and battery health of the device are comprehensively considered to accurately calculate the low-power mode level to solve the current problem.

[0051] It should be noted that although the steps in the above embodiments are described in a specific order, those skilled in the art can understand that, in order to achieve the effect of the present application, the different steps do not necessarily have to be executed in such an order, they can be executed simultaneously (in parallel) or in other orders, and these changes are within the protection scope of the present application.

[0052] So far, the technical solutions of the present application have been described in combination with the preferred embodiments shown in the drawings, but those skilled in the art can easily understand that the protection scope of the present application is obviously not limited to these specific embodiments. Those skilled in the art can make equivalent changes or replacements to the related technical features without deviating from the principles of the present application, and the technical solutions after these changes or replacements will all fall within the protection scope of the present application.

Claims

1. A low power consumption method based on Linux desktop environment, characterized in that: The following steps are involved: S1: System startup, initialization of corresponding software and hardware; S2: Register the Dbus security service interface and start the low-power computing module; S3: The low power level calculation module collects the automatic energy-saving mode switch status, battery status, remaining battery percentage, and CPU usage to calculate the current low power level; S4: broadcast the current low power consumption level; S5: Monitor the current low power consumption level and execute corresponding control actions according to the current low power consumption level and the preset low power consumption strategy; S6: Collect the actual execution policies of each background application, and return to step S3 when it is detected that the preset low power consumption policy conflicts with the actual execution policy.

2. The low power consumption method based on Linux desktop environment according to claim 1, characterized in that: The step S1 comprises the steps of: S11: System cold start and hardware initialization; S12: Multi-factor authentication and user environment loading; S13: The layered power management service stack is started.

3. The low power consumption method based on Linux desktop environment according to claim 2, characterized in that: The step S11 includes the following steps: S111: Execute firmware layer initialization, complete CPU / RAM self-test, peripheral device enumeration, and load embedded controller firmware; S112: Start the systemd-udevd daemon in parallel to handle hot plug events.

4. The low power consumption method based on Linux desktop environment according to claim 2, characterized in that: The step S12 includes the following steps: S121: Start the display server, run the ukui-greeter login manager, and activate the fingerprint recognition module and the face recognition module; S122: Call the pam module to prevent brute force cracking; S123: Perform software configuration and system configuration based on the user's historical data hardware.

5. The low power consumption method based on Linux desktop environment according to claim 2, characterized in that: The step S13 includes the following steps: S131: Start power management to configure the touch hardware working mode; S132: Continuously monitors the battery charge and discharge status and exposes the data through the / org / freedesktop / UPower Dbus interface.

6. The low power consumption method based on Linux desktop environment according to claim 1, characterized in that: The step S2 comprises the steps of: S21: Describe the org.ukui.powerManager interface through XML, declare the GetPowerMode method, SetPowerMode method and PowerModeChanged signal; S22: Use the QDBus framework to register the / PowerManager object path, bind to the system bus, and start the low-power level computing module.

7. The low power consumption method based on Linux desktop environment according to claim 1, characterized in that: The step S3 comprises: When the automatic energy saving mode switch is on, the battery status is battery powered, the remaining battery percentage is below 20%, and the CPU usage is below 30%, the low power consumption level is ultra-low power consumption mode; When the automatic energy saving mode switch is on, the battery status is battery powered, the remaining power percentage is below 20%, and the CPU usage is above 30%, the low power consumption level is medium low power consumption mode; When the automatic energy saving mode switch is on, the battery status is battery powered, the remaining power percentage is above 20%, and the CPU usage is below 30%, the low power consumption level is medium low power consumption mode; When the automatic energy-saving mode switch is on, the battery status is battery-powered, the remaining battery percentage is above 20%, and the CPU usage is above 30%, the low power consumption level is normal mode; When the automatic energy saving mode switch is on, the battery status is battery powered, the remaining power percentage is above 80%, and the CPU usage is any, the low power consumption level is normal mode; When the automatic energy saving mode switch is on, the battery status is battery powered, the remaining power percentage is any, and the CPU usage is any, the low power consumption level is normal mode; When the automatic energy saving mode switch is off, the battery status is any, the remaining power percentage is any, and the CPU usage is any, the low power consumption level is normal mode.

8. The low power consumption method based on Linux desktop environment according to claim 1, characterized in that: The step S4 comprises the steps of: S41: Define the composite data type according to the Dbus Type System, and add a timestamp and data check code; S42: Notify property changes via the org.freedesktop.DBus.Properties.PropertiesChanged signal, and simultaneously broadcast the PowerModeChanged signal to the / PowerManager path, allowing wildcard matching of subscribers.

9. The low power consumption method based on Linux desktop environment according to claim 1, characterized in that: The step S5 comprises the steps of: S51: Monitor the PowerModeChanged signal of PowerManager to obtain the current low power consumption level; S52: Execute corresponding control actions according to the current low power consumption level.

10. The low power consumption method based on Linux desktop environment according to claim 1, characterized in that: The preset low power consumption strategy includes: When in ultra-low power mode, the color temperature retrieval frequency stops, the disk monitoring frequency stops, the software store background update frequency stops, the synthesizer state is closed, the window special effects are closed, the search index service IO priority dynamic grading is closed, the notebook display backlight maximum value is limited to 80%, the notebook built-in speaker gain is canceled and the maximum value is limited to 80%, the desktop environment component animation is closed, the desktop environment component special effects are closed, the taskbar reduces the tray flashing refresh frequency, the hardware mode is low power mode, the fan speed is low, the display refresh rate is 60hz, the background image is adjusted to dark, and the theme is adjusted to dark; When in medium-low power mode, the color temperature search frequency is reduced, the disk monitoring frequency is reduced, the software store background update frequency is reduced, the synthesizer state is turned on, the window special effects are turned off, the search index service IO priority dynamic grading is turned off, the notebook display backlight maximum value is limited to 80%, the notebook built-in speaker gain is canceled and the maximum value is limited to 80%, the desktop environment component animation is turned off, the desktop environment component special effects are turned off, the taskbar tray flickering is reduced and the refresh frequency is reduced, the hardware mode is balanced mode, the fan speed is medium speed, the display refresh rate is not limited, the background image is not adjusted, and the theme is not adjusted; When in normal mode, there is no limit on the color temperature retrieval frequency, no limit on the disk monitoring frequency, no limit on the software store background update frequency, the synthesizer status is turned on, the window special effects are turned on, the search index service IO priority dynamic grading is turned on, the maximum value of the notebook display backlight is not limited, the notebook built-in speaker is not limited, the desktop environment component animation is turned on, the desktop environment component special effects are turned on, the taskbar reduces the tray flashing refresh frequency in normal mode, the hardware mode is performance mode, the fan speed is high speed, the display refresh rate is not limited, the background image is not adjusted, and the theme is not adjusted.

Citation Information

Patent Citations

  • Method and device for generating electric quantity operation strategy of mobile terminal

    CN109600825A

  • Method and system for controlling electronic equipment to switch modes

    CN110300445A

  • Charging control method and related product

    CN110611347A

  • Power consumption control method and device, storage medium and terminal

    CN111158455A

  • Method and apparatus for controlling and optimizing low power consumption, and mobile terminal and storage medium

    WO2021244566A1