分页: 1 / 1

休眠会“咔嚓”一声好心疼

发表于 : 2007-03-23 11:40
shawn.zhao
7.04休眠时会“咔嚓”一声,不知为何,正常关机不会。

发表于 : 2007-03-23 23:56
野草
心疼你还休眠. :P :P

发表于 : 2007-03-24 0:46
eexpress
休眠的时候,把硬盘线一下子拔掉。看它还响。

发表于 : 2007-03-24 12:24
railwaycat
在我的电脑上,关机就是这样,应该是硬盘突然断电,磁头臂复位的声音。
肯定是对硬盘不好。
自己试着改过/etc/init.d/halt 加长了 sleep的时间,不过似乎也不奏效

发表于 : 2007-03-24 12:25
glade
这是休眠的打呼噜现象

发表于 : 2007-03-24 14:56
npnufn
我的正常关机也有这个声音

发表于 : 2007-03-24 17:15
Beetle
哈~~这个问题早发现了,把sleep时间延长到30s基本么什么声音了……

发表于 : 2007-03-24 20:59
railwaycat
请问一下你是怎么改的?

发表于 : 2007-03-24 21:14
syhan
是的,我也使通过修改/etc/init.d/halt sleep时间来解决这个问题

发表于 : 2007-03-24 21:30
applnk
怎么改?里面没有sleep,是要自己添加吗?我是KDE。
#! /bin/sh
### BEGIN INIT INFO
# Provides: halt
# Required-Start: umountroot
# Required-Stop:
# Should-Start: lvm raid2
# Should-Stop:
# Default-Start: 0
# Default-Stop:
# Short-Description: Execute the halt command.
# Description:
### END INIT INFO
#
# Version: @(#)halt 2.85-22 19-Jun-2004 [email protected]
#

PATH=/sbin:/bin:/usr/sbin:/usr/bin
. /lib/lsb/init-functions

# Get the default from /etc/default/halt.
[ -f /etc/default/halt ] && . /etc/default/halt

do_stop () {
if [ "$INIT_HALT" = "" ]
then
case "$HALT" in
[Pp]*)
INIT_HALT=POWEROFF
;;
[Hh]*)
INIT_HALT=HALT
;;
*)
INIT_HALT=POWEROFF
;;
esac
fi

# See if we need to cut the power.
if [ "$INIT_HALT" = "POWEROFF" ] && [ -x /etc/init.d/ups-monitor ]
then
/etc/init.d/ups-monitor poweroff
fi

# Don't shut down drives if we're using RAID.
hddown="-h"
if grep -qs '^md.*active' /proc/mdstat
then
hddown=""
fi

# If INIT_HALT=HALT don't poweroff.
poweroff="-p"
if [ "$INIT_HALT" = "HALT" ]
then
poweroff=""
fi

log_action_msg "Will now halt"
halt -d -f -i $poweroff $hddown
}

case "$1" in
start)
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
do_stop
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac

: exit 0

发表于 : 2007-03-24 21:44
booker
我来试试,关机也是咔嚓一声,着实心疼。


也许在下边的两行之间加上sleep 30就可以了

代码: 全选

log_action_msg "Will now halt"
[b][color=red]sleep 30[/color][/b]
halt -d -f -i $poweroff $hddown

附上/etc/init.d/halt

代码: 全选

booker@ubuntu:~$ more /etc/init.d/halt
#! /bin/sh
### BEGIN INIT INFO
# Provides: halt
# Required-Start: umountroot
# Required-Stop:
# Should-Start: lvm raid2
# Should-Stop:
# Default-Start: 0
# Default-Stop:
# Short-Description: Execute the halt command.
# Description:
### END INIT INFO

PATH=/usr/sbin:/usr/bin:/sbin:/bin
[ -f /etc/default/halt ] && . /etc/default/halt

. /lib/lsb/init-functions

do_stop () {
if [ "$INIT_HALT" = "" ]
then
case "$HALT" in
[Pp]*)
INIT_HALT=POWEROFF
;;
[Hh]*)
INIT_HALT=HALT
;;
*)
INIT_HALT=POWEROFF
;;
esac
fi

# See if we need to cut the power.
if [ "$INIT_HALT" = "POWEROFF" ] && [ -x /etc/init.d/ups-monitor ]
then
/etc/init.d/ups-monitor poweroff
fi

# Don't shut down drives if we're using RAID.
hddown="-h"
if grep -qs '^md.*active' /proc/mdstat
then
hddown=""
fi

# If INIT_HALT=HALT don't poweroff.
poweroff="-p"
if [ "$INIT_HALT" = "HALT" ]
then
poweroff=""
fi

log_action_msg "Will now halt"
sleep 30
halt -d -f -i $poweroff $hddown
}

case "$1" in
start)
# No-op
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
do_stop
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac

:

发表于 : 2007-03-26 18:53
jupiter
从chinanet看到一张贴
http://linux.chinaunix.net/bbs/viewthre ... 194&extra=
引用:
而现在的硬盘,只有当读取数据的时候,磁头才会飞行在盘片表面。一旦读取动作结束,磁头立即自动归位停靠。同时,现在的硬盘都具备延时断电的功能。即当系统供电突然丢失时,硬盘本身的控制器能自动探测到这个变化,然后强迫磁头停止当前读写指令的执行,并使磁头正常归位.这个设计大大加强了硬盘在意外断电情况下的安全系数。

不过还是不喜欢关机硬盘发出的声音,我改成了10秒

发表于 : 2007-03-28 7:30
npnufn
我修改了 halt 没有效果,还是那样,也许根硬盘有关,我的是西部数据的80G IDE硬盘。

发表于 : 2007-07-23 9:03
wwkzf
我修改了sleep值之后,休眠还是会响,但是关机的那咔声已经没有了

发表于 : 2007-07-23 9:08
蓝蓝
glade 写了:这是休眠的打呼噜现象
................有谁早上起来和开机似的,嘟下