Bug 243021 - Hard disk doesn't spin down on poweroff
Hard disk doesn't spin down on poweroff
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
7
All Linux
low Severity high
: ---
: ---
Assigned To: Kernel Maintainer List
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-06 18:09 EDT by Stefano Cavallari
Modified: 2007-11-30 17:12 EST (History)
5 users (show)

See Also:
Fixed In Version: 2.6.22.1-27.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-21 20:32:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stefano Cavallari 2007-06-06 18:09:04 EDT
Description of problem:
When I power off my laptop I hear a loud click from the hd, in the same way as
if I powered it off using the switch. 
That is what is called emergency parking of heads, and could damage hardware in
the long run.

Version-Release number of selected component (if applicable):
kernel 2.6.21-1.3194.fc7
using pata_sis, though I *think* the bug affects any ata drive.

How reproducible:
Always

Steps to Reproduce:
1. Start the power off sequence
2. Listen to the hd
3. Become worried
 

Additional info:
In fc6 this didn't happen. It's probably because F7 kernel is using new pata
drivers instead of the plain old ide driver.
I marked the Severity as High as HDs (especially laptop's) are rated for a
limited number of emergency parkings.
Comment 1 James 2007-06-08 12:26:39 EDT
Eck! Not good, got this here too. kernel-2.6.21-1.3194.fc7 just told the
notebook to power down and simply yanked the plug on the hard disc. I've an
Intel 82801DBM (ICH4-M) controller using the ata_piix driver connected to a
FUJITSU MHT2060AT. I'm switching back to a kernel using the old IDE code in the
meantime.
Comment 2 James 2007-06-09 09:48:22 EDT
This may not strictly be a kernel issue: see http://linux-ata.org/shutdown.html
; possibly a problem in sysvinit or initscripts?
Comment 3 Stefano Cavallari 2007-06-09 11:45:23 EDT
I think you are right. I'm changing the component for this bug to SysVInit
(which contains /sbin/shutdown)
Comment 4 James 2007-06-09 13:23:29 EDT
Understood. Although reading through the kernel Bugzilla
http://bugzilla.kernel.org/show_bug.cgi?id=7838 it seems that the 2.6.22 release
upstream will have stuff to fix this as well. I'm going to try the suggested
patch and see what happens.
Comment 5 Andre Robatino 2007-06-09 22:44:15 EDT
  Roughly how many emergency parkings are desktop and/or laptop HDs rated for? 
(I have a desktop.)  Just to get a sense of how fast this needs to be fixed.
Comment 6 Alexey Titov 2007-06-10 01:50:05 EDT
Please be fast :-)
Comment 7 James 2007-06-11 07:47:00 EDT
Dang, tried patch, didn't work (apparently doesn't cover PATA). Should've read
the notes more carefully! 
Comment 8 James 2007-06-12 10:45:55 EDT
Can anybody raise the priority of this bug from "low"?
Comment 9 Stefano Cavallari 2007-06-12 17:51:26 EDT
I'm setting the component back to "kernel", as it's where the problem is
_happening_.
Doesn't matter if it can be worked around in userspace, kernel or both. 
I looked at the kernel bugzilla and the bug (7838) is marked as
resolved_code_fix, though I can't find the patch itself. (only the scsi one, but
not the libata-specific one).
I've looked in git (scsi-misc-2.6) too, but I can't find anything related to
this to test.

PS: this is *NOT* a forum, so add a comment only if you know something new. 
If you just need help or something use http://www.fedoraforum.org/
Comments like "be fast" just spams the developers which are fixing bugs,
including this one!
Comment 10 Stefano Cavallari 2007-06-14 09:30:04 EDT
I found some patches for 2.6.21 to solve this issue:
http://marc.info/?l=linux-ide&m=118047865916766&w=2
Comment 11 Stefano Cavallari 2007-06-14 15:49:24 EDT
kernel-2.6.21-1.3228.fc7 still have the bug.
Comment 12 James 2007-06-14 16:47:51 EDT
Nice find, Stefano. Those patches worked for me (patched against vanilla
2.6.21.4 and 2.6.21.5).
Comment 13 Stephen E Clark 2007-06-19 17:02:25 EDT
Can't someone from redhat implement these changes in Fedora?

http://linux-ata.org/shutdown.html
Comment 14 Manuel Moran 2007-06-29 06:10:14 EDT
This also happens when hibernating. 

On my Toshiba Satellite A200 I get a loud crack noise from disk heads, which
clearly means that hardware is suffering. 

This could produce hard disk failure, just out of software misbehaviour. We'd be
so glad to see a fix.
Comment 15 James 2007-06-29 06:56:07 EDT
I think this bug should be marked as a duplicate of Bug 242799.
Comment 16 Stephen E Clark 2007-06-29 07:50:12 EDT
They are related but not the same. It would really be nice if we could get
someone to step up an fix this problem since it been known about for a couple of
months.
Comment 17 Chuck Ebbert 2007-07-06 14:16:36 EDT
Kernel 2.6.21-1.3255 is in testing now with patches to fix this. Please test.
Comment 18 Chuck Ebbert 2007-07-06 14:36:21 EDT
(Update kernels are in the updates-testing repository.)

As root:

  yum --enablerepo=updates-testing update kernel
Comment 19 Andre Robatino 2007-07-06 14:55:49 EDT
  A message just appeared in fedora-package-announce notifying of a test update
for this kernel.  Normally, this mailing list is only for updates-released.  Is
this a mistake, or has it actually been released?

https://www.redhat.com/archives/fedora-package-announce/2007-July/msg00156.html
Comment 20 Chuck Ebbert 2007-07-06 14:58:54 EDT
(In reply to comment #19)
>   A message just appeared in fedora-package-announce notifying of a test update
> for this kernel.  Normally, this mailing list is only for updates-released.  Is
> this a mistake, or has it actually been released?
> 

That was a glitch in the announcement processing. The kernel is in testing.
Comment 21 Stephen E Clark 2007-07-06 15:28:31 EDT
[root@joker4 ~]# yum --enablerepo=updates-testing update kernel
Loading "installonlyn" plugin
Setting up Update Process
Could not find update match for kernel
No Packages marked for Update/Obsoletion

current kernel is:
[root@joker4 ~]# uname -r
2.6.21-1.3228.fc7
Comment 22 Chuck Ebbert 2007-07-06 15:44:35 EDT
Kernel may not have mirrored out yet.

I found the i386 "normal" kernel here, so it is released:
ftp://download.fedora.redhat.com/pub/fedora/linux/updates/testing/7/i386/kernel-2.6.21-1.3255.fc7.i686.rpm
Comment 23 Stephen E Clark 2007-07-08 13:56:30 EDT
In my testing it fixed my problem. I tried both a shutdown -r now and a shutdown
-h now - and my 
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -
      87 - stayed at 87.
I did a smartctl to find out what it was. Then did a shutdown -r now. Checked
and it was still 87 - I then did a shutdown -h now. Powered back on and checked
again and it was still 87. In the past it had always incremented , plus made a
loud click.

Now I haven't ran the kernel at all but it fixed this problem for me.
Comment 24 Manuel Moran 2007-07-10 11:11:33 EDT
This testing kernel fixed the problem for me. My Power-Off_Retract_Count remains
now the same as stated above (comment #23) and the click is not heard anymore.

I have to run the testing kernel (if I run the current one, I still get the clicks)

Thanks very much
Comment 25 Stephen E Clark 2007-07-17 14:57:14 EDT
Hey where did this kernel go 3255 - i have another system with the same problem
but this kernel is
gone!?ftp://download.fedora.redhat.com/pub/fedora/linux/updates/testing/7/i386/kernel-2.6.21-1.3255.fc7.i686.rpm
Comment 27 Serguei Miridonov 2007-07-19 22:38:55 EDT
2.6.22.1-20.fc7 fixes the problem on Compaq Presario 900
Comment 28 Andre Robatino 2007-07-20 21:57:42 EDT
  The kernel-2.6.22.1-27.fc7 in updates-released fixes it for me on a Dell
Dimension B110.
Comment 29 Manuel Moran 2007-07-21 06:24:00 EDT
The kernel-2.6.22.1-27.fc7 in updates-released fixes it on a Toshiba Satellite A200

It may be a good idea to add Fedora to the list of fixed distros here (none as
of yet):

http://linux-ata.org/shutdown.html

Comment 30 Stefano Cavallari 2007-07-21 20:32:51 EDT
2.6.22.1-27.fc7 fixes it for me too on my Asus A6km.
I think I can close this bug now. 

Note You need to log in before you can comment on or make changes to this bug.