- 发帖可能变空内容,邪门暂不知所以然
- 『稷下学宫』新认证方式,24年网站打算和努力目标
主题:在笔记本电脑上使用Linux的朋友请关注 -- 请尽量
问题可以简单概括为:为了减少耗电,硬盘过于频繁地load/unload,比方说每分钟2-3次。而硬盘的load cycle count是一项寿命指标,最近出的笔记本硬盘这项指标通常为600000次,老一些的型号仅有300000次。
现在大家意见基本上统一为原因出在硬盘出厂的缺省设置上。
需要注意的是,这个问题不仅仅在Ubuntu上有,其他Linux Distro的用户也有报告,如Gentoo。
我用的是Debian,同样有这个问题。另外,我并没有enable laptop-mode,并且是在使用AC电源的状态下,观察到load_cycle_count以每分种3次的速度增加。
需要调整设置的硬盘有黑他气、撕衣给特等牌子。
下面是一个Ubuntu用户给出的解决办法。请务必仔细分析自己的具体情况再决定是否跟从。另外,如果操作不当,hdparm可能会产生不可恢复的副作用。
2) make sure the file contains the following 2 lines (fix it if you have PATA HDD):
#!/bin/sh
hdparm -B255 /dev/sda
3) copy this file to 3 locations:
/etc/acpi/suspend.d/
/etc/acpi/resume.d/
/etc/acpi/start.d/
我的硬盘型号是黑他气的。把hdparm的apm值设到超过200后,load_cycle_count到目前为止(至少过去30分钟了)都没再长了。硬盘的温度长了一度,从37(摄氏)到了38度。
It appears that on Debian, none of those scripts is executed when the computer wakes up. Hence the hdparm -B value is lost.
I fixed this problem with the laptop-mode-tools package. The configuration file /etc/laptop-mode/laptop-mode.conf has extensive comments to guide you through. The relevant options are ENABLE_LAPTOP_MODE***, CONTROL_HD_POWERMGMT, etc.
Will see how it goes in the next couple of days, i.e. after a few more sleep/hibernate/restart cycles.