Disable disk spinup during system resume
Hi,
I have a secondary sata disk (sda) in my system that I would like not to spinup on resume.
The primary disk is an SSD.
I tried this to no avail:
echo 0 > /sys/block/sda/device/scsi_disk/*/manage_start_stop
I can "manually" run this after each resume, but it introduces ware and delays I would like to avoid.
sdparm -r -C STOP /dev/sda
Note all partitions on the disk are "noauto" in fstab, and I would have thought the kernel wouldn't need to BLKRRPART on resume?
Any ideas appreciated.
cheers,
Pádraig.
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
Quoted 9 lines · Pádraig Brady
Hi,
I have a secondary sata disk (sda) in my system that I would like not to spinup on resume.
The primary disk is an SSD.I tried this to no avail:
echo 0 >
/sys/block/sda/device/scsi_disk/*/manage_start_stop
That should have worked. It prevents sd_resume() from doing anything to the drive.
Are you sure that the kernel is responsible for spinning up the drive? Maybe you have a program running in the background that does this automatically.
Quoted 10 lines
I can "manually" run this after each resume, but it introduces ware and delays I would like to avoid.
sdparm -r -C STOP
/dev/sdaNote all partitions on the disk are "noauto" in fstab, and I would have thought the kernel wouldn't need to BLKRRPART on resume?
Any ideas appreciated.
Try adding a dump_stack() line to drivers/scsi/sd.c:sd_start_stop_device() and see what shows up in the kernel log.
Alan Stern
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
Quoted 8 lines · Alan Stern
Quoted 4 lines · Pádraig Brady
Hi,
I have a secondary sata disk (sda) in my system that I would like not to spinup on resume.
Quoted 8 lines
Quoted 3 lines
I tried this to no avail:
echo 0 >
/sys/block/sda/device/scsi_disk/*/manage_start_stopTry adding a
dump_stack()line to drivers/scsi/sd.c:sd_start_stop_device() and see what shows up in the kernel log.
Tried that, and nothing is calling it for sda
(There were calls for sdb of course).
So it seems like something lower level :(
I'll keep digging.
cheers,
Pádraig.
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
Quoted 14 lines · Pádraig Brady
Quoted 11 lines · Alan Stern
Quoted 9 lines · Pádraig Brady
Hi,
I have a secondary sata disk (sda) in my system that I would like not to spinup on resume.
I tried this to no avail:
echo 0 >
/sys/block/sda/device/scsi_disk/*/manage_start_stop
Quoted 7 lines
Quoted 3 lines
Try adding a
dump_stack()line to drivers/scsi/sd.c:sd_start_stop_device() and see what shows up in the kernel log.Tried that, and nothing is calling it for sda
(There were calls for sdb of course).
So it seems like something lower level :(
Not at all -- nothing at a lower level generates SCSI commands. This means it is something at a higher level, like a program using SG_IO to pass the START STOP command to the drive directly.
Quoted 1 line
I'll keep digging.
What happens if you kill all the running processes (or as many as possible) before starting the suspend?
Also, how do you initiate the suspend? Do you use a program, or do you simply "echo mem >/sys/power/state"?
Alan Stern
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
Quoted 12 lines · Alan Stern
Quoted 9 lines · Pádraig Brady
Quoted 6 lines · Alan Stern
Quoted 4 lines · Pádraig Brady
Hi,
I have a secondary sata disk (sda) in my system that I would like not to spinup on resume.
Quoted 5 lines
What happens if you kill all the running processes (or as many as possible) before starting the suspend?
Also, how do you initiate the suspend? Do you use a program, or do you simply "echo mem >/sys/power/state"?
I just rebooted with init=/bin/sh and did
sdparm -r -C STOP /dev/sda
echo 0 > /sys/block/sda/device/scsi_disk/*/manage_start_stop echo mem > /sys/power/state
When I hit the power button to resume
sda started spinning again :(
There kernel logs about sata ports starting up.
Maybe I need to put the drive into a different
sleep state or something to stop it starting.
cheers,
Pádraig.
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
Quoted 19 lines · Pádraig Brady
Quoted 12 lines · Alan Stern
Quoted 9 lines · Pádraig Brady
Quoted 6 lines · Alan Stern
Quoted 4 lines · Pádraig Brady
Hi,
I have a secondary sata disk (sda) in my system that I would like not to spinup on resume.
Quoted 5 lines
What happens if you kill all the running processes (or as many as possible) before starting the suspend?
Also, how do you initiate the suspend? Do you use a program, or do you simply "echo mem >/sys/power/state"?
Quoted 8 lines
I just rebooted with init=/bin/sh and did
sdparm -r -C STOP
/dev/sda
echo 0 >/sys/block/sda/device/scsi_disk/*/manage_start_stopecho mem >/sys/power/stateWhen I hit the power button to resume
sda started spinning again :(
I have no idea why. Unless maybe the BIOS started the drive.
Here's another test you can try. Before starting the suspend, make sure no filesystems are mounted on sda and do:
echo scsi remove-single-device 0 0 0 0 >/proc/scsi/scsi
(replace the "0 0 0 0" with the appropriate Host, Channel, ID, and LUN values for your sda drive). This will erase all knowledge of that drive from the kernel. If it still spins up during resume, you can be sure the kernel isn't responsible.
Quoted 3 lines
There kernel logs about sata ports starting up.
Maybe I need to put the drive into a different
sleep state or something to stop it starting.
I really don't know what's going on. Maybe somebody on the linux-scsi mailing list can explain this.
Alan Stern
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
Quoted 19 lines · Pádraig Brady
Quoted 12 lines · Alan Stern
Quoted 9 lines · Pádraig Brady
Quoted 6 lines · Alan Stern
Quoted 4 lines · Pádraig Brady
Hi,
I have a secondary sata disk (sda) in my system that I would like not to spinup on resume.
Quoted 5 lines
What happens if you kill all the running processes (or as many as possible) before starting the suspend?
Also, how do you initiate the suspend? Do you use a program, or do you simply "echo mem >/sys/power/state"?
Quoted 8 lines
I just rebooted with init=/bin/sh and did
sdparm -r -C STOP
/dev/sda
echo 0 >/sys/block/sda/device/scsi_disk/*/manage_start_stopecho mem >/sys/power/stateWhen I hit the power button to resume
sda started spinning again :(
I have no idea why. Unless maybe the BIOS started the drive.
Here's another test you can try. Before starting the suspend, make sure no filesystems are mounted on sda and do:
echo scsi remove-single-device 0 0 0 0 >/proc/scsi/scsi
(replace the "0 0 0 0" with the appropriate Host, Channel, ID, and LUN values for your sda drive). This will erase all knowledge of that drive from the kernel. If it still spins up during resume, you can be sure the kernel isn't responsible.
Quoted 3 lines
There kernel logs about sata ports starting up.
Maybe I need to put the drive into a different
sleep state or something to stop it starting.
I really don't know what's going on. Maybe somebody on the linux-scsi mailing list can explain this.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 35 lines · Alan Stern
Quoted 19 lines · Pádraig Brady
Quoted 12 lines · Alan Stern
Quoted 9 lines · Pádraig Brady
Quoted 6 lines · Alan Stern
Quoted 4 lines · Pádraig Brady
Hi,
I have a secondary sata disk (sda) in my system that I would like not to spinup on resume.
Quoted 5 lines
What happens if you kill all the running processes (or as many as possible) before starting the suspend?
Also, how do you initiate the suspend? Do you use a program, or do you simply "echo mem >/sys/power/state"?
Quoted 8 lines
I just rebooted with init=/bin/sh and did
sdparm -r -C STOP
/dev/sda
echo 0 >/sys/block/sda/device/scsi_disk/*/manage_start_stopecho mem >/sys/power/stateWhen I hit the power button to resume
sda started spinning again :(I have no idea why. Unless maybe the BIOS started the drive.
Here's another test you can try. Before starting the suspend, make sure no filesystems are mounted on sda and do:
Quoted 6 lines
echo scsi remove-single-device 0 0 0 0 >/proc/scsi/scsi
(replace the "0 0 0 0" with the appropriate Host, Channel, ID, and LUN values for your sda drive). This will erase all knowledge of that drive from the kernel. If it still spins up during resume, you can be sure the kernel isn't responsible.
drive still spins up on resume.
cheers,
Pádraig.
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
Quoted 35 lines · Alan Stern
Quoted 19 lines · Pádraig Brady
Quoted 12 lines · Alan Stern
Quoted 9 lines · Pádraig Brady
Quoted 6 lines · Alan Stern
Quoted 4 lines · Pádraig Brady
Hi,
I have a secondary sata disk (sda) in my system that I would like not to spinup on resume.
Quoted 5 lines
What happens if you kill all the running processes (or as many as possible) before starting the suspend?
Also, how do you initiate the suspend? Do you use a program, or do you simply "echo mem >/sys/power/state"?
Quoted 8 lines
I just rebooted with init=/bin/sh and did
sdparm -r -C STOP
/dev/sda
echo 0 >/sys/block/sda/device/scsi_disk/*/manage_start_stopecho mem >/sys/power/stateWhen I hit the power button to resume
sda started spinning again :(I have no idea why. Unless maybe the BIOS started the drive.
Here's another test you can try. Before starting the suspend, make sure no filesystems are mounted on sda and do:
Quoted 6 lines
echo scsi remove-single-device 0 0 0 0 >/proc/scsi/scsi
(replace the "0 0 0 0" with the appropriate Host, Channel, ID, and LUN values for your sda drive). This will erase all knowledge of that drive from the kernel. If it still spins up during resume, you can be sure the kernel isn't responsible.
drive still spins up on resume.
cheers,
Pádraig.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 36 lines · Pádraig Brady
Quoted 35 lines · Alan Stern
Quoted 19 lines · Pádraig Brady
Quoted 12 lines · Alan Stern
Quoted 9 lines · Pádraig Brady
Quoted 6 lines · Alan Stern
Quoted 4 lines · Pádraig Brady
Hi,
I have a secondary sata disk (sda) in my system that I would like not to spinup on resume.
Quoted 5 lines
What happens if you kill all the running processes (or as many as possible) before starting the suspend?
Also, how do you initiate the suspend? Do you use a program, or do you simply "echo mem>/sys/power/state"?
Quoted 8 lines
I just rebooted with init=/bin/sh and did
sdparm -r -C STOP
/dev/sda
echo 0>/sys/block/sda/device/scsi_disk/*/manage_start_stopecho mem>/sys/power/stateWhen I hit the power button to resume
sda started spinning again :(I have no idea why. Unless maybe the BIOS started the drive.
Here's another test you can try. Before starting the suspend, make sure no filesystems are mounted on sda and do:
Quoted 8 lines
Quoted 6 lines
echo scsi remove-single-device 0 0 0 0>/proc/scsi/scsi
(replace the "0 0 0 0" with the appropriate Host, Channel, ID, and LUN values for your sda drive). This will erase all knowledge of that drive from the kernel. If it still spins up during resume, you can be sure the kernel isn't responsible.
drive still spins up on resume.
Did the disk (/dev/sda) spin down after
sdparm -r -C STOP /dev/sda
? I'm guessing that neither the root file system nor swap are located on /dev/sda ?
Doug Gilbert
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
Quoted 36 lines · Pádraig Brady
Quoted 35 lines · Alan Stern
Quoted 19 lines · Pádraig Brady
Quoted 12 lines · Alan Stern
Quoted 9 lines · Pádraig Brady
Quoted 6 lines · Alan Stern
Quoted 4 lines · Pádraig Brady
Hi,
I have a secondary sata disk (sda) in my system that I would like not to spinup on resume.
Quoted 5 lines
What happens if you kill all the running processes (or as many as possible) before starting the suspend?
Also, how do you initiate the suspend? Do you use a program, or do you simply "echo mem>/sys/power/state"?
Quoted 8 lines
I just rebooted with init=/bin/sh and did
sdparm -r -C STOP
/dev/sda
echo 0>/sys/block/sda/device/scsi_disk/*/manage_start_stopecho mem>/sys/power/stateWhen I hit the power button to resume
sda started spinning again :(I have no idea why. Unless maybe the BIOS started the drive.
Here's another test you can try. Before starting the suspend, make sure no filesystems are mounted on sda and do:
Quoted 8 lines
Quoted 6 lines
echo scsi remove-single-device 0 0 0 0>/proc/scsi/scsi
(replace the "0 0 0 0" with the appropriate Host, Channel, ID, and LUN values for your sda drive). This will erase all knowledge of that drive from the kernel. If it still spins up during resume, you can be sure the kernel isn't responsible.
drive still spins up on resume.
Did the disk (/dev/sda) spin down after
sdparm -r -C STOP /dev/sda
? I'm guessing that neither the root file system nor swap are located on /dev/sda ?
Doug Gilbert
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 45 lines · Douglas Gilbert
Quoted 44 lines · Pádraig Brady
Quoted 42 lines · Alan Stern
Quoted 20 lines · Pádraig Brady
Quoted 12 lines · Alan Stern
Quoted 9 lines · Pádraig Brady
Quoted 6 lines · Alan Stern
Quoted 4 lines · Pádraig Brady
Hi,
I have a secondary sata disk (sda) in my system that I would like not to spinup on resume.
Quoted 6 lines
What happens if you kill all the running processes (or as many as possible) before starting the suspend?
Also, how do you initiate the suspend? Do you use a program, or do you
simply "echo mem>/sys/power/state"?Quoted 8 lines
I just rebooted with init=/bin/sh and did
sdparm -r -C STOP
/dev/sda
echo 0>/sys/block/sda/device/scsi_disk/*/manage_start_stopecho mem>/sys/power/stateWhen I hit the power button to resume
sda started spinning again :(I have no idea why. Unless maybe the BIOS started the drive.
Here's another test you can try. Before starting the suspend, make sure no filesystems are mounted on sda and do:
echo scsi remove-single-device 0 0 0 0>/proc/scsi/scsi
(replace the "0 0 0 0" with the appropriate Host, Channel, ID, and LUN values for your sda drive). This will erase all knowledge of that drive from the kernel. If it still spins up during resume, you can be sure the kernel isn't responsible.
Quoted 4 lines
Quoted 1 line
drive still spins up on resume.
Did the disk (
/dev/sda) spin down after
sdparm -r -C STOP/dev/sda
y
Quoted 2 lines
? I'm guessing that neither the root file system nor swap are located on
/dev/sda?
correct
I now notice the hdparm -s option which might be applicable:
"Enable/disable the power-on in standby feature,
if supported by the drive. VERY DANGEROUS"
Now I'm wary of enabling that because I do need the drive enabled on first boot as the bios in this dell laptop can only boot from a disk in this sata slot. (I unmount and spin down after boot).
Seems like I might be left doing a spinup and spindown at each resume.
cheers,
Pâdraig.
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
Quoted 45 lines · Douglas Gilbert
Quoted 44 lines · Pádraig Brady
Quoted 42 lines · Alan Stern
Quoted 20 lines · Pádraig Brady
Quoted 12 lines · Alan Stern
Quoted 9 lines · Pádraig Brady
Quoted 6 lines · Alan Stern
Quoted 4 lines · Pádraig Brady
Hi,
I have a secondary sata disk (sda) in my system that I would like not to spinup on resume.
Quoted 6 lines
What happens if you kill all the running processes (or as many as possible) before starting the suspend?
Also, how do you initiate the suspend? Do you use a program, or do you
simply "echo mem>/sys/power/state"?Quoted 8 lines
I just rebooted with init=/bin/sh and did
sdparm -r -C STOP
/dev/sda
echo 0>/sys/block/sda/device/scsi_disk/*/manage_start_stopecho mem>/sys/power/stateWhen I hit the power button to resume
sda started spinning again :(I have no idea why. Unless maybe the BIOS started the drive.
Here's another test you can try. Before starting the suspend, make sure no filesystems are mounted on sda and do:
echo scsi remove-single-device 0 0 0 0>/proc/scsi/scsi
(replace the "0 0 0 0" with the appropriate Host, Channel, ID, and LUN values for your sda drive). This will erase all knowledge of that drive from the kernel. If it still spins up during resume, you can be sure the kernel isn't responsible.
Quoted 4 lines
Quoted 1 line
drive still spins up on resume.
Did the disk (
/dev/sda) spin down after
sdparm -r -C STOP/dev/sda
y
Quoted 2 lines
? I'm guessing that neither the root file system nor swap are located on
/dev/sda?
correct
I now notice the hdparm -s option which might be applicable:
"Enable/disable the power-on in standby feature,
if supported by the drive. VERY DANGEROUS"
Now I'm wary of enabling that because I do need the drive enabled on first boot as the bios in this dell laptop can only boot from a disk in this sata slot. (I unmount and spin down after boot).
Seems like I might be left doing a spinup and spindown at each resume.
cheers,
Pâdraig.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html