Turn Off laptop heap sleep standby using CentOS 7.0 Power Management

Source: Internet
Author: User

Turn Off laptop heap sleep standby using CentOS 7.0 Power Management

Make full use of computing resources, and install the old HP6325 notebook in the House into CentOS 7.0 for remote control. One problem occurs when CentOS 7.0 power management closes the notebook by default and goes to sleep for standby mode. FTP and SSH cannot be accessed unless manual or Remote Wake-up through the network is performed. This means that the notebook can never close the lid...

Is there a way to cancel the sleep and wait for the notebook to run through power management like a window?

The Linux operating system is of course capable of this.

Power management that can be defined through/etc/systemd

Actions include:
HandlePowerKey: The action after pressing the power key
HandleSleepKey: The action after pressing the hold key
HandleHibernateKey: The action after the sleep key is pressed.
HandleLidSwitch: standby mode after the laptop is closed

The value of these actions can be
Ignore (do nothing)
Poweroff (shutdown)
Reboot (restart)
Halt (what is the difference between shutdown and poweroff? Do you need to manually disconnect the power supply ?)
Suspend (standby pending)
Hibernate)
By default, when I close the notebook screen, the system will wait.
What should I do if I don't want the system to wait when I close my notebook?

Open/etc/systemd/logind. conf In the vi editor.


Remove the annotator # In Front Of HandleLidSwitch and change its value from suspend to ignore.
[Login]
# NAutoVTs = 6
# ReserveVT = 6
# KillUserProcesses = no
# KillOnlyUsers =
# KillExcludeUsers = root
# InhibitDelayMaxSec = 5
# HandlePowerKey = poweroff
# HandleSuspendKey = suspend
# HandleHibernateKey = hibernate
HandleLidSwitch = ignore
# HandleLidSwitchDocked = ignore
# PowerKeyIgnoreInhibited = no
# SuspendKeyIgnoreInhibited = no
# HibernateKeyIgnoreInhibited = no
# LidSwitchIgnoreInhibited = yes
# IdleAction = ignore
# IdleActionSec = 30 min
# RuntimeDirectorySize = 10%
# RemoveIPC = no
~

Then systemctl restart systemd-logind to make the change take effect. Close the notebook lid and you will not be waiting for it.

If you want to enter the STANDBY state, run systemctl suspend.

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.