public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [linux-pm] [RFC] Disable disk spinup during system resume
       [not found] <4E293D20.3080403@draigBrady.com>
@ 2011-07-22 14:05 ` Alan Stern
  2011-07-22 15:50   ` Pádraig Brady
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Stern @ 2011-07-22 14:05 UTC (permalink / raw)
  To: Pádraig Brady; +Cc: Linux-pm mailing list, SCSI development list

On Fri, 22 Jul 2011, Pádraig Brady wrote:

> On 21/07/11 17:49, Alan Stern wrote:
> > On Thu, 21 Jul 2011, Pádraig Brady wrote:
> > 
> >> On 21/07/11 15:49, Alan Stern wrote:
> >>> On Thu, 21 Jul 2011, Pádraig Brady wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> I have a secondary sata disk (sda)  in my system that
> >>>> I would like not to spinup on resume.
> >>
> >>
> 
> > 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 :(

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.

> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-pm] [RFC] Disable disk spinup during system resume
  2011-07-22 14:05 ` [linux-pm] [RFC] Disable disk spinup during system resume Alan Stern
@ 2011-07-22 15:50   ` Pádraig Brady
  2011-07-22 17:38     ` Douglas Gilbert
  0 siblings, 1 reply; 4+ messages in thread
From: Pádraig Brady @ 2011-07-22 15:50 UTC (permalink / raw)
  To: Alan Stern; +Cc: Linux-pm mailing list, SCSI development list

On 22/07/11 15:05, Alan Stern wrote:
> On Fri, 22 Jul 2011, Pádraig Brady wrote:
> 
>> On 21/07/11 17:49, Alan Stern wrote:
>>> On Thu, 21 Jul 2011, Pádraig Brady wrote:
>>>
>>>> On 21/07/11 15:49, Alan Stern wrote:
>>>>> On Thu, 21 Jul 2011, Pádraig Brady wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I have a secondary sata disk (sda)  in my system that
>>>>>> I would like not to spinup on resume.
>>>>
>>>>
>>
>>> 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 :(
> 
> 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.

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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-pm] [RFC] Disable disk spinup during system resume
  2011-07-22 15:50   ` Pádraig Brady
@ 2011-07-22 17:38     ` Douglas Gilbert
  2011-07-22 18:03       ` Pádraig Brady
  0 siblings, 1 reply; 4+ messages in thread
From: Douglas Gilbert @ 2011-07-22 17:38 UTC (permalink / raw)
  To: Pádraig Brady
  Cc: Alan Stern, Linux-pm mailing list, SCSI development list

On 11-07-22 11:50 AM, Pádraig Brady wrote:
> On 22/07/11 15:05, Alan Stern wrote:
>> On Fri, 22 Jul 2011, Pádraig Brady wrote:
>>
>>> On 21/07/11 17:49, Alan Stern wrote:
>>>> On Thu, 21 Jul 2011, Pádraig Brady wrote:
>>>>
>>>>> On 21/07/11 15:49, Alan Stern wrote:
>>>>>> On Thu, 21 Jul 2011, Pádraig Brady wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I have a secondary sata disk (sda)  in my system that
>>>>>>> I would like not to spinup on resume.
>>>>>
>>>>>
>>>
>>>> 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 :(
>>
>> 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.
>
> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-pm] [RFC] Disable disk spinup during system resume
  2011-07-22 17:38     ` Douglas Gilbert
@ 2011-07-22 18:03       ` Pádraig Brady
  0 siblings, 0 replies; 4+ messages in thread
From: Pádraig Brady @ 2011-07-22 18:03 UTC (permalink / raw)
  To: dgilbert; +Cc: Alan Stern, Linux-pm mailing list, SCSI development list

On 22/07/11 18:38, Douglas Gilbert wrote:
> On 11-07-22 11:50 AM, Pádraig Brady wrote:
>> On 22/07/11 15:05, Alan Stern wrote:
>>> On Fri, 22 Jul 2011, Pádraig Brady wrote:
>>>
>>>> On 21/07/11 17:49, Alan Stern wrote:
>>>>> On Thu, 21 Jul 2011, Pádraig Brady wrote:
>>>>>
>>>>>> On 21/07/11 15:49, Alan Stern wrote:
>>>>>>> On Thu, 21 Jul 2011, Pádraig Brady wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I have a secondary sata disk (sda)  in my system that
>>>>>>>> I would like not to spinup on resume.
>>>>>>
>>>>>>
>>>>
>>>>> 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 :(
>>>
>>> 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.
>>
>> drive still spins up on resume.
> 
> Did the disk (/dev/sda) spin down after
>    sdparm -r -C STOP /dev/sda

y

> ? 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-22 18:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4E293D20.3080403@draigBrady.com>
2011-07-22 14:05 ` [linux-pm] [RFC] Disable disk spinup during system resume Alan Stern
2011-07-22 15:50   ` Pádraig Brady
2011-07-22 17:38     ` Douglas Gilbert
2011-07-22 18:03       ` Pádraig Brady

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox