How to disable suspend on Fedora 18

原文地址:https://jamielinux.com/articles/2013/01/disable-suspend-on-fedora-18/

 

How to disable suspend on Fedora 18

In Fedora 18, the default behaviour on laptops is to suspend when closing the lid.

To disable this behaviour, add the following line to /etc/systemd/logind.conf and reboot your system:

HandleLidSwitch=lock

The screen will lock after a delay, which is 10 minutes by default. You can lock your screen manually by pressing Ctrl-Alt-L.

Update #1: See man logind.conf for more options, such as triggering a shutdown when closing the lid.

Update #2: Instead of rebooting, you can just run systemctl restart systemd-logind.service as root user.

Update #3: A new option has been added to logind.conf that allows you to set lock instead of ignore.

Comments
Daniel Cabral | Jan 16, 2013

How about changing the behavoir to poweroff when the lid is closed. My suspend don't work for now anyways.

Jamie Nguyen | Jan 16, 2013

You can put HandleLidSwitch=poweroff in logind.conf to make your laptop shutdown when you close the lid. I've updated the article to mention the manual page which describes the various different options.

Bryce Hardy | Jan 22, 2013

Thank you for this; for some reason Gnome Tweak Tool no longer has this option, so I was looking for a fix. Thanks again.

Hermogene | Jan 23, 2013

Great! Thank you, resolved my problem under Fluxbox!

Dave | Jan 30, 2013

Thanks. btw there is no need to reboot after the edit of /etc/systemd/logind.conf just restart systemd-logind with
sudo systemctl restart systemd-logind.service

Jamie Nguyen | Jan 30, 2013

@Dave: Thanks. Article updated :)

Akash Kumar Sharma | Feb 12, 2013

Thanks ! instead of ignore I used "lock". So the system locks when lid closes.

Jamie Nguyen | Jan 30, 2013

@Akash: Oh cool! I'm pretty sure I didn't see that option in the man page when I wrote this article so it must be a recent addition to the Fedora package. Article updated. Thanks!

Samuel Sieb | Feb 15, 2013

@Bryce: The reason it's not in the Tweak Tool any more is because Gnome doesn't handle the lid switch any more.  That's why you have to modify the systemd config file.

Nikos Feidopiastis | Mar 07, 2013

Thanks. Every fedora upgrade after 14 is a new surprise. (not positive....)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值