Ubuntu不接显示屏网络不通,网络经常断

问题描述:Ubuntu系统突然断网、不接显示屏过一会网络就断了
解决方法:禁用系统休眠和挂起
配置步骤:
1、禁用休眠
1)创建 /etc/polkit-1/localauthority/90-mandatory.d/disable-hibernate.pkla 文件

sudo touch /etc/polkit-1/localauthority/90-mandatory.d/disable-hibernate.pkla

2)使用vi、vim、nano 等任一命令将如下内容添加到 /etc/polkit-1/localauthority/90-mandatory.d/disable-hibernate.pkla 文件

[Disable hibernate (upower)]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=no
ResultInactive=no
ResultAny=no
[Disable hibernate (logind)]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=no
[Disable hibernate for all sessions (logind)]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate-multiple-sessions
ResultActive=no

3)重启系统使其生效

reboot

2、禁用挂起
1)创建 /etc/polkit-1/localauthority/90-mandatory.d/disable-suspend.pkla 文件

sudo touch /etc/polkit-1/localauthority/90-mandatory.d/disable-suspend.pkla

2)使用vi、vim、nano 等任一命令将如下内容添加到 /etc/polkit-1/localauthority/90-mandatory.d/disable-suspend.pkla 文件

[Disable suspend (upower)]
Identity=unix-user:*
Action=org.freedesktop.upower.suspend
ResultActive=no
ResultInactive=no
ResultAny=no
[Disable suspend (logind)]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend
ResultActive=no
[Disable suspend for all sessions (logind)]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend-multiple-sessions
ResultActive=no

3)重启系统使其生效

reboot

参考来源 https://sites.google.com/site/easytipsforlinux/disable-hibernate-and-suspend

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值