Ubuntu启用休眠hibernate
生活随笔
收集整理的這篇文章主要介紹了
Ubuntu启用休眠hibernate
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Ubuntu默認關閉了休眠模式,因為休眠模式很實用,我們可以通過設置打開休眠模式。
一、測試Ubuntu系統是否支持休眠模式
sudo pm-hibernate執行該命令后,系統會自動關閉斷電,重新打開系統后,如果能恢復到該命令執行前的狀態則表明該系統支持休眠模式。下面我們就通過設置啟用Ubuntu的休眠模式。
二、創建設置文件并寫入內容
在/etc/polkit-1/localauthority/50-local.d/目錄中創建一個名叫com.ubuntu.enable-hibernate.pkla文件。
并在該文件中寫入如下內容: [Enable Hibernate in logind] Identity=unix-user:* Action=org.freedesktop.login1.hibernate ResultActive=yes
如果是Ubuntu14.04之前的版本,可以在com.ubuntu.enable-hibernate.pkla文件中寫入下面的內容: [Enable hibernate in upower] Identity=unix-user:* Action=org.freedesktop.upower.hibernate ResultActive=yes
當然保險起見,可以將兩份內容都同時寫入com.ubuntu.enable-hibernate.pkla文件中: [Enable Hibernate in logind] Identity=unix-user:* Action=org.freedesktop.login1.hibernate ResultActive=yes[Enable hibernate in upower] Identity=unix-user:* Action=org.freedesktop.upower.hibernate ResultActive=yes
保存文件:
:wq!三、重啟indicator或者重啟系統
killall indicator-session-service若要重啟系統可使用命令: sudo reboot
此時,右上角的【休眠】已經啟用。
總結
以上是生活随笔為你收集整理的Ubuntu启用休眠hibernate的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Machine Learning wee
- 下一篇: 几本对于笔试和面试有用的书