Ubuntu18.04 禁用自动挂起,禁止自动休眠

    戴尔的7920工作站新安装了ubuntu18.04LTS,结果登录远程桌面差不多半个小时之后就断开连接了,查看发现机器自动挂起了。修改了power设置中中blank screen 为never,保存之后过了半个小时又再一次自动挂起了。

    这次重新唤醒,把隐私设置里面的自动锁屏也改成了关闭,保存退出之后,半小时左右又自动挂起了。。。

    查了资料,按照http://manpages.ubuntu.com/manpages/bionic/zh_CN/man5/logind.conf.5.html中的说明,修改了/etc/systemd/logind.conf和/user/lib/systemd下面的conf文件,把suspend改成了ignore,保存退出重启logind的服务,结果还是没能解决问题。

    后来实在没办法,还改了BIOS设置中,POWER设置中一个block sleep的选项,依旧阻止不了系统自动挂起。

    由于使用过程中,还会间歇性的出现文件管理器和terminal打不开的情况,最后,试着把系统设置->区域和语言改成了English (United States),又按照stackoverflow上一个回答搞了一下,居然神奇的好了。。。

stackoverflow的回答:https://askubuntu.com/questions/1062369/how-to-disable-auto-sleep-in-ubuntu-18-04

I finally found a solution looking through some other threads. Here's what I did:

  1. Install gnome-tweak-tool: sudo apt install gnome-tweak-tool

  2. Run gnome-tweaks.

  3. Change the option under "Power" for "Suspend when laptop lid is closed" to "off".

Now the monitor only turns off the screen when the lid is closed, and no longer goes to sleep.

This doesn't really resolve the issue of sleep-looping in case I ever wanted the laptop to actually go to sleep, but it's a good enough solution for me at least.

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值