小编DrN*_*one的帖子

Linux:如何在睡眠一段时间后休眠

我在 linux 中缺少的 Windows 功能之一如下:在 Windows 中,您关闭笔记本电脑盖,系统暂停到 RAM,一段时间(可配置)后,计算机自动唤醒并继续暂停到磁盘。我知道在 linux 中存在 suspend2both 模式,但它可以在电池耗尽之前暂停到磁盘,这是我试图避免的。

编辑:使用答案数据搜索后找到更详细的答案

https://askubuntu.com/questions/12383/how-to-go-automatically-from-suspend-into-hibernate

EDIT2:这些是我在 MSI Wind U100 上使用 Ubuntu 11.04 遵循的步骤。

第一:我安装了 tuxonice,因为我的上网本无法进入休眠状态。作为副作用,休眠和唤醒过程非常快且非常稳定。唯一的缺点是休眠/恢复上的显示是文本模式。安装 tuxonice 最简单的方法是添加相应的 ppa:https ://launchpad.net/~tuxonice/+archive/ppa

一旦你进入休眠状态,这个脚本就会发挥所有作用

#!/bin/bash
# Script name: /etc/pm/sleep.d/00rtchibernate
# Purpose: Auto hibernates after a period of sleep
# Edit the "autohibernate" variable below to set the number of seconds to sleep.
curtime=$(date +%s)
autohibernate=7200
echo "$curtime $1" >>/tmp/autohibernate.log
if [ "$1" = "suspend" ]
then
    # Suspending.  Record current time, and set a …
Run Code Online (Sandbox Code Playgroud)

linux suspend

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

linux ×1

suspend ×1