天天看點

linux hibernate suspend 差別,實作Linux休眠(sleep/hibernate)和挂起(suspend)

實作Linux休眠(sleep/hibernate)和挂起(suspend)

釋出時間:2007-03-15 01:07:00來源:紅聯作者:XLooking

系統要求:

1.配置并編譯核心:kernel2.6

2.軟體:hibernate

測試環境:

1.系統Debian testing etch

2.桌面:fluxbox

3.Thinkpad r40

細節:

1.核心選項Power Management support:

Legacy Power Management API

Software Suspend

(/dev/hda5)Default resume partition(swap交換區,用fdisk -l确定)

ACPI Support(小孫建議用ACPI)

2.安裝hibernate

[email protected]:~$ apt-cache search hibernate

acpi-support - scripts for handling many ACPI events

gnome-power-manager - frontend for gnome-powermanager

hibernate - smartly puts your computer to sleep (suspend to RAM or disk)

kde-guidance-powermanager - HAL based power manager applet

安裝acpi-support和hibernate

3.配置hiberante

sudo dpkg-reconfigure hibernate

主要是休眠喚醒密碼。小孫發現:從suspend恢複不需要密碼,可能與配置檔案有關。

sudo hibernate-disk // sleep,系統記憶體映象将寫入swap區後關機

sudo hibernate-ram // suspend,就是挂起。

linux下這兩種模式可以随意使用,不需要額外的配置,較為友善。

windows xp隻能是sleep模式,或者suspend模式,二者切換需要更新設定。

總結:

編譯後的核心,搭配輕量級的桌面環境,使得linux下的休眠速度和喚醒速度都要比windows快,且友善安全。想想吧,再也不需要将工作中的eclipse關閉,下次可以接着建構程式的友善、的快樂。

konsole下運作hibernate效果較好,mlterm回退出,不知道問題是什麼。