一些概念的澄清(standby,suspend,hibernate)

本文讨论了计算机睡眠模式的命名混乱问题,并提出了推荐的命名规范,包括Standby、Suspend和Hibernate等模式,以改善用户体验。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Introduction

Arguing about sleep nomenclature is often very emotional between people with different views. Windows and Mac OSX have decided on names for the actions and it's about time Linux did the same. We are hurting the user experience with ad-hoc and confusing policies about naming.

Developing gnome-power-manager (and a chunk of the power management in HAL) gives me first-hand experience of the ways users, distros, packagers and developers can and do get this wrong.

NOTES from 'hotkey-setup':

When the machine should be put to sleep in some fashion:
KEY_SLEEP signals Suspend to RAM (Suspend, technically called "standby")
KEY_SUSPEND signals Suspend to Disk (Hibernate, technically called "suspend"...)

I hope this spec can convert some of the wacky/zany/confusing/crazy software out there to stick to common names.

Standby

Standby is the action where the CPU is held in a low power state but no data is saved to RAM or hard disk. It normally takes a a split second to standby and resume. You cannot remove the battery when on laptop power or work will be lost.

Recommended Nomenclature

  • Forward action: STANDBY

  • Reverse action: CONTINUE (or RESUME for user-documentation or translations)

Suspend

Suspend is the action where the computer freezes all activity, and copies working data to RAM. It then turns off the screen, and goes into a low-power mode. It normally takes a few seconds to suspend and a few seconds to resume. You cannot remove the battery when on laptop power or work will be lost.

Recommended Nomenclature

  • Forward action: SUSPEND

  • Reverse action: RESUME

Suspend is a good word as the computer is not powered down but in a temporary sleep. A user can understand that suspend'ing the work is not the same as hibernating. You can boot other OS's, or change batteries when hibernated.

Resume is a good word as the user un-suspends the computer, and resumes all work. It is also previously used by pm-tools, HAL and the kernel and Microsoft Windows.

Bad Nomenclature

  • Sleep

  • Standby

  • Suspend-to-RAM

Sleep is a BAD word as it does not convey time, and the name sleep has been used to mean standby and suspend and hibernate over the years.

Standby is a name that does not convey what is actually about to happen - "standby for what?" and is used by the kernel in ACPI for a power saving state that is rarely used. See above...

Suspend-to-RAM is a bad description as it forces the user to know about hardware when it should be abstract. s-t-r may be great for programmers, but is not intuitive for new users.

Hibernate

Hibernate is the action where the computer freezes all activity and swaps data to disk, turns off the screen and powers down. This takes over one minute for me to swap my ram to disk, and nearly 40 seconds to thaw.

Recommended Nomenclature

  • Forward action: HIBERNATE

  • Reverse action: THAW (or RESUME for user-documentation or translations)

Hibernate is used by pm-tools, HAL, the kernel and Microsoft Windows already, and convey nicely that hibernating is a long term thing, and takes longer than suspending.

The backwards action name isn't as important for end users IMO. The user will only ever click a "Suspend" button, not a "Resume" button. This, and the difficulty translating thaw into non-english languages, I think it is permissable to add to user-visible parts of the stack hibernate and resume as a valid phrase. The logic - a user doesn't care - but we must use thaw as the programmatic name as the actions from return from standby and return from hibernate may be very different.

Bad Nomenclature

  • Wake

  • Suspend-to-disk

Wake is bad as it is the opposite of sleep, not hibernate. Wake has been used in the past for wakeup from standby, wakeup from hibernate and wakeup from suspend.

Suspend-to-disk is a bad description as it also forces the user to know about hardware. Why should a new user be expected to know that writing to RAM is quicker than writing to disk?

Conclusion

I really do think getting these 6 words correct will make a big difference to the bigger picture. When people are using the correct words to describe problems, and users know that suspend does the same thing on GNOME and on KDE.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值