Re: Disk spin down issue on shut down/suspend to disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rafael J. Wysocki wrote:
>>> Sidux is a Debian Unstable based distro with it's own set of patches
>>> including the shut down patch provided here:
>>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=426224
>> You'll probably have to ask Sidux what changes they made that could cause
>> the double spin down, even if halt(8) is never passed the -h flag.
> 
> Well, I've been observing the same behavior on nx6325 for some time and I
> use openSUSE 10.2.  I think this is kernel-related.

Hmmm... If the problem only shows up on nx6325, it might be that ACPI is
pulling unnecessary stunt.  Please apply the attached patch and report
when the disk spins down and up.

Thanks.

-- 
tejun
diff --git a/kernel/sys.c b/kernel/sys.c
index 449b81b..9578e3f 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -875,10 +875,20 @@ EXPORT_SYMBOL_GPL(kernel_halt);
  */
 void kernel_power_off(void)
 {
+	printk(KERN_EMERG "XXX: pre-shutdown prepare\n");
 	kernel_shutdown_prepare(SYSTEM_POWER_OFF);
-	if (pm_power_off_prepare)
+	printk(KERN_EMERG "XXX: post-shutdown prepare, sleeping 5\n");
+	ssleep(5);
+	if (pm_power_off_prepare) {
+		printk(KERN_EMERG "XXX: pre-power_off_prepare\n");
 		pm_power_off_prepare();
+		printk(KERN_EMERG "XXX: post-power_off_prepare, sleeping 5\n");
+		ssleep(5);
+	}
+	printk(KERN_EMERG "XXX: pre-sysdev_shutdown\n");
 	sysdev_shutdown();
+	printk(KERN_EMERG "XXX: post-sysdev_shutdown, sleeping 5\n");
+	ssleep(5);
 	printk(KERN_EMERG "Power down.\n");
 	machine_power_off();
 }

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux