admin 管理员组文章数量: 1184232
有些情况需要我们的笔记本在关闭盖子后,依然需要维持正常工作,而不是挂起或休眠。
在Ubuntu默认的设置中,无法设置关闭盖子的操作,因此需要手动修改配置文件
参考文件:https://linux/article-15015-1.html
更改登录配置
打开 /etc/systemd/logind.conf 文件,如果没有则创建此文件
文件中通常有如下内容
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#HandleRebootKey=reboot
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodesMax=400k
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
在文件末尾追加如下三行
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
参数说明
suspend:合盖时挂起
lock:合盖时锁定
ignore:什么都不做
poweroff:关机
hibernate:合盖时休眠
版权声明:本文标题:Ubuntu设置笔记本电脑合盖时不挂起 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/b/1754905500a3048932.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论