Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure power management after RHEL7.2 minimization installation

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to minimize the installation of RHEL7.2 after the power management configuration, the editor feels very practical, so share with you to learn, I hope you can learn something after reading this article, say no more, follow the editor to have a look.

1 description

The company sent out a test notebook. To minimize the installation of RHEL7.2, it is found that after closing the laptop cover, the system will automatically sleep and the network card will close. After looking for a pass on the Internet, I finally found a solution.

2 operating environment RHEL7.2 x643 detailed step operation

Basic power management items are defined in / etc/systemd/logind.conf this configuration file. The following is the default configuration

[root@localhost ~] # cat / etc/systemd/logind.conf

# This file is part of systemd.

#

# systemd is free software; you can redistribute it and/or modify it

# under the terms of the GNU Lesser General Public License as published by

# the Free Software Foundation; either version 2.1 of the License, or

# (at your option) any later version.

#

# Entries in this file show the compile time defaults.

# You can change settings by editing this file.

# Defaults can be restored by simply deleting this file.

#

# See logind.conf (5) for details.

[Login]

# NAutoVTs=6

# ReserveVT=6

# KillUserProcesses=no

# KillOnlyUsers=

# KillExcludeUsers=root

# InhibitDelayMaxSec=5

# HandlePowerKey=poweroff

# HandleSuspendKey=suspend

# HandleHibernateKey=hibernate

# HandleLidSwitch=suspend

# HandleLidSwitchDocked=ignore

# PowerKeyIgnoreInhibited=no

# SuspendKeyIgnoreInhibited=no

# HibernateKeyIgnoreInhibited=no

# LidSwitchIgnoreInhibited=yes

# IdleAction=ignore

# IdleActionSec=30min

# RuntimeDirectorySize=10%

# RemoveIPC=yes

# This is default for OL7.2

RemoveIPC=no

You can see the description of this file through the man command

[root@localhost ~] # man logind.conf

#... The following is a partial explanation

HandlePowerKey=, HandleSuspendKey=, HandleHibernateKey=, HandleLidSwitch=, HandleLidSwitchDocked=

Controls whether logind shall handle the system power and sleep keys and the lid switch to trigger actions such as

System power-off or suspend. Can be one of "ignore", "poweroff", "reboot", "halt", "kexec", "suspend", "hibernate"

"hybrid-sleep", and "lock". If "ignore", logind will never handle these keys. If "lock", all running sessions will be

Screen-locked; otherwise, the specified action will be taken in the respective event. Only input devices with the

"power-switch" udev tag will be watched for key/lid switch events. HandlePowerKey= defaults to "poweroff".

HandleSuspendKey= and HandleLidSwitch= default to "suspend". HandleLidSwitchDocked= defaults to "ignore".

HandleHibernateKey= defaults to "hibernate". If the system is inserted in a docking station, or if more than one

Display is connected, the action specified by HandleLidSwitchDocked= occurs; otherwise the HandleLidSwitch= action

Occurs.

HandlePowerKey: the action after pressing the power button

HandleSleepKey: the action after pressing the suspend key

HandleHibernateKey: the action after pressing the sleep button

HandleLidSwitch: stand by after closing the laptop lid

Gnore (do nothing)

Poweroff (shutdown)

Reboot (restart)

Halt (power off, what's the difference from poweroff, you need to disconnect the power manually? )

Kexec (Kill execution process)

Suspend (pending on standby)

Hibernate (dormant)

If you don't want the system to stand by when the laptop is closed, edit the / etc/systemd/logind.conf file, remove the HandleLidSwitch comment, and change the value to ignore. The root user then executes the command systemctl restart systemd-logind to make the changes take effect.

The above is how to minimize the installation of RHEL7.2 after the power management configuration, the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report