Solve the problem that the black screen cannot be awakened after the laptop CentOS7 is merged

Source: Internet
Author: User

Solve the problem that the black screen cannot be awakened after the laptop CentOS7 is merged

Enable and modify/etc/system/logind. conf

HandleLidSwitch = lock

Save and run the systemctl restart systemd-logind command to take effect immediately.

Refer:

Power Management (Simplified Chinese)

Systemd can handle some power supply-related ACPI events./etc/systemd/logind.confConfiguration of the following options:

  • HandlePowerKey: Action after pressing the power key
  • HandleSleepKey: Action after pressing the hold key
  • HandleHibernateKey: The action after the sleep key is pressed.
  • HandleLidSwitch: Standby mode after the laptop is closed

The action can beignore,poweroff,reboot,halt,suspend,hibernate,hybrid-sleep,lockOrkexec.

The default settings are as follows:

HandlePowerKey=poweroffHandleSuspendKey=suspendHandleHibernateKey=hibernateHandleLidSwitch=suspend

Without graphical interfaces or simple desktop managers such as i3 and awesome, systemd can replace acpid to process ACPI events.

Note: Run systemctl restart systemd-logindTo make the above changes take effect immediately. Note: systemd cannot handle AC power and battery ACPI events, so you must use Laptop Mode Tools or acpid Tools.

In the current version of systemdHandleThe options will be applied to the entire system unless they are blocked by other programs, such as the power manager in a desktop environment ). If other programs do not stop theseHandle, You may first be suspended by systemd, and then when the system is awakened, the Power Manager will again suspend the system.

Warning currently, only GNOME and KDE support the "inhibited" command. If you want to use Xfce, acpid, or other programs to manage ACPI events HandleOption ignore. Note: In addition to the default back-end (used to process standby/sleep) supported by the kernel, systemd can also use other backend (such as Uswsusp or TuxOnIce ).

Ordersystemctl hibernateTo work, follow the settings of sleep and mkinitcpio wake-up extension. (No installation requiredpm-utils)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.