Bug 213451 - Hard drive makes clicky noise on shutdown
Summary: Hard drive makes clicky noise on shutdown
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 6
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-01 15:41 UTC by axgrau
Modified: 2008-01-03 20:53 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-01-03 20:53:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description axgrau 2006-11-01 15:41:18 UTC
Description of problem:
the hard drive is not turned off gracefully when shutting down the system: a
clicky noise can be heard just before the computer turns off.

This is an Acer TravelMate 4200 laptop with a Hitachi Travelstar SATA drive.  

The same problem occurs with fc5 (original kernel and updates) but not with Suse
10.1. The same noise can be heard if the laptop is switched off the hard way
with the power button.

I had a similar problem with a Dell laptop and other distributions using early
2.6.x kernels (including vanilla). As far as I can remember, it was solved with
kernel 2.6.6.

Excerpt from dmesg:
SCSI subsystem initialized
libata version 2.00 loaded.
ata_piix 0000:00:1f.2: version 2.00
ata_piix 0000:00:1f.2: MAP [ P0 P2 IDE IDE ]
ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) -> IRQ 193
PCI: Setting latency timer of device 0000:00:1f.2 to 64
ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0x18B0 irq 14
scsi0 : ata_piix
ata1.00: ATA-6, max UDMA/100, 195371568 sectors: LBA48 
ata1.00: ata1: dev 0 multi count 16
ata1.00: applying bridge limits
ata1.00: configured for UDMA/100
  Vendor: ATA       Model: HTS541010G9AT00   Rev: MBZO
  Type:   Direct-Access                      ANSI SCSI revision: 05
SCSI device sda: 195371568 512-byte hdwr sectors (100030 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
SCSI device sda: 195371568 512-byte hdwr sectors (100030 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda3 < sda5 sda6 sda7 sda8 sda9 >
sd 0:0:0:0: Attached scsi disk sda
ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0x18B8 irq 15
scsi1 : ata_piix


Excerpt from lspci:
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA
Storage Controller IDE (rev 02) (prog-if 80 [Master])
	Subsystem: Acer Incorporated [ALI] Unknown device 0090
	Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping-
SERR- FastB2B-
	Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
<MAbort- >SERR- <PERR-
	Latency: 0
	Interrupt: pin B routed to IRQ 193
	Region 0: I/O ports at <unassigned>
	Region 1: I/O ports at <unassigned>
	Region 2: I/O ports at <unassigned>
	Region 3: I/O ports at <unassigned>
	Region 4: I/O ports at 18b0 [size=16]
	Capabilities: [70] Power Management version 2
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-

Comment 1 axgrau 2006-11-22 14:09:10 UTC
The problem seems to be related to the libata module. Suse applies a
libata-acpi-suspend patch which also contains the following part:

+/**
+ *	ata_device_shutdown - send Standby Immediate command to drive
+ *	@ap: target ata_port
+ *	@dev: target device on the ata_port
+ *
+ *	This command makes it safe to power-off a drive.
+ *	Otherwise the heads may be flying at the wrong place
+ *	when the power is removed.
+ */
+int ata_device_shutdown(struct ata_port *ap, struct ata_device *dev)
+{
+
+	if (!ata_dev_present(dev))
+		return 0;
+
+	ata_standby_drive(ap, dev);
+	ap->flags |= ATA_FLAG_SUSPENDED;
+
+	return 0;
+}
+

However, this was meant for a 2.6.16 kernel.


Comment 2 axgrau 2006-12-04 11:10:43 UTC
This problem seems to have been addressed also in Debian (bug #348172). They
propose to patch the halt command in sysvinit so that halt -h spins down not
only IDE disks but also SATA disks.

I tried rebuilding the sysvinit package in fc6 including the Debian patch, and
then adding HALTARGS="-d -h" at the end of /etc/init.d/halt, however it doesn't
make any difference. Maybe their method of finding SATA disks doesn't work in
Fedora, or maybe Fedora unmounts partitions in a different way and the switch -h
doesn't do anything.

Comment 3 Jon Stanley 2007-12-31 21:43:17 UTC
Hello,

I'm reviewing this bug as part of the kernel bug triage project, an attempt to
isolate current bugs in the Fedora kernel.

http://fedoraproject.org/wiki/KernelBugTriage

I am CC'ing myself to this bug, however this version of Fedora is no longer
maintained.

Please attempt to reproduce this bug with a current version of Fedora (presently
Fedora 8). If the bug no longer exists, please close the bug or I'll do so in a
few days if there is no further information lodged.

Thanks for using Fedora!

Comment 4 axgrau 2008-01-03 20:35:03 UTC
Hello,

I'm not using Fedora anymore in this computer, so I cannot say whether this bug
is still present in more recent versions. I would expect it to have been fixed
though. The Suse guys have been working on this issue
(http://linux-ata.org/shutdown.html), and recent kernels should spin down disks
properly. At least, it works with Suse 10.3.


Comment 5 Jon Stanley 2008-01-03 20:53:45 UTC
In that case, I'll close this as INSUFFICIENT_DATA.  If you happen to use Fedora
on that computer again and note the problem, feel free to re-open this bug report 


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