You are not logged in.

#1 2008-03-04 12:51:55

funkyou
Member
From: Berlin, DE
Registered: 2006-03-19
Posts: 848
Website

[solved] My external hdd goes to sleep after some time

Well, my external hdd goes to sleep when i dont touch it for about 20 minutes or so... It wakes up upon access, but i dont want it to be like this...

How can i change this behavior and prevent it from goind to sleep?

The device (samsung/sata/external usb case) is detected as /dev/sda:

usb 5-2: new high speed USB device using ehci_hcd and address 2
usb 5-2: configuration #1 chosen from 1 choice
Initializing USB Mass Storage driver...
scsi2 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
scsi 2:0:0:0: Direct-Access     Generic  External         1.04 PQ: 0 ANSI: 4
usb-storage: device scan complete
Driver 'sd' needs updating - please use bus_type methods
sd 2:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 21 00 00 00
sd 2:0:0:0: [sda] Assuming drive cache: write through
sd 2:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 21 00 00 00
sd 2:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 2:0:0:0: [sda] Attached SCSI disk
sdparm --long /dev/sda
    /dev/sda: Generic   External          1.04
    Direct access device specific parameters: WP=0  DPOFUA=0

Last edited by funkyou (2008-03-08 12:57:53)


want a modular and tweaked KDE for arch? try kdemod

Offline

#2 2008-03-05 02:04:44

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: [solved] My external hdd goes to sleep after some time

try to disable usb suspend support in kernel (CONFIG_USB_SUSPEND)

also you can try disable usbcore autosuspend which depending on kernel version is either -1 or 0

Last edited by broch (2008-03-05 02:10:30)

Offline

#3 2008-03-05 02:13:40

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: [solved] My external hdd goes to sleep after some time

I had this problem in the past with a USB hd -- I had to open up the enclosure and change the jumper settings physically on the drive, if I remember correctly.

Offline

#4 2008-03-05 10:59:24

funkyou
Member
From: Berlin, DE
Registered: 2006-03-19
Posts: 848
Website

Re: [solved] My external hdd goes to sleep after some time

Ok, i recompiled my kernel without CONFIG_USB_SUSPEND, but no chance... Also tried the usbcore autosuspend stuff, but this seems to work only when CONFIG_USB_SUSPEND is compiled into the kernel, so its no usable option (because i have already disabled that)...

My HDD is a Samsung HD501LJ, and the manual doesnt say anything about jumpers, although there are some of them... The Samsung website also doesnt loose a word about powersaving settings, only that its a fault of my BIOS manufacturer if it happens... Also the case has no jumpers of anything...

And at last, my BIOS (ASROCK 775Dual-VSTA) doesnt even have an option for IDE/SATA powersaving...

I guess i must write some sort of "daemon" in bash that polls the hdd every 10 minutes by simply doing an ls or something... wink

Sometimes i just hate modern hardware...


want a modular and tweaked KDE for arch? try kdemod

Offline

#5 2008-03-05 15:14:16

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: [solved] My external hdd goes to sleep after some time

Have you tried playing with hdparm -B and -S settings?  Values of 255 and 0, respectively, should, in theory, disable all powersaving options and spindowns on all drives.

Offline

#6 2008-03-05 15:58:12

funkyou
Member
From: Berlin, DE
Registered: 2006-03-19
Posts: 848
Website

Re: [solved] My external hdd goes to sleep after some time

Yes, but it does not work because the drive is a sata one and hdparm doesnt work on it, but only on drives that are recognized as /dev/hd* (=the old ide drivers)

And sdparm doesnt have an option for this and even regognizes only 2 useless flags on my drive...


want a modular and tweaked KDE for arch? try kdemod

Offline

#7 2008-03-05 17:55:31

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: [solved] My external hdd goes to sleep after some time

this is pretty simple to fix (and better than hdparm)
disable APM in kernel. This works well on laptops (search thread about linux killing laptop disks), whether APM will also affect desktop system where default power saving hardware options are different i don't know.

Offline

#8 2008-03-05 19:58:12

jean-paul
Member
From: Germany
Registered: 2007-03-26
Posts: 61

Re: [solved] My external hdd goes to sleep after some time

@funkyou,

I found this in the web, perhaps it can help you.

 I was in the same situation, after a bit of digging on the interweb I needed to install the sdpam utility for my Debian Etch distro and then:

sdparm --clear STANDBY -6 /dev/sd[Your device]

and now it appears to not sleep. Hope this helps anyone in the same situation.

Jean-Paul


I'm root. if you see me smile, you'd better have a backup!! smile

Offline

#9 2008-03-07 07:55:08

funkyou
Member
From: Berlin, DE
Registered: 2006-03-19
Posts: 848
Website

Re: [solved] My external hdd goes to sleep after some time

broch wrote:

this is pretty simple to fix (and better than hdparm)
disable APM in kernel. This works well on laptops (search thread about linux killing laptop disks), whether APM will also affect desktop system where default power saving hardware options are different i don't know.

I am using the zen kernel and APM is completely disabled in it, i dont even have any possibilities to configure it - APM is completely gone in this kernel...

jean-paul wrote:

@funkyou,

I found this in the web, perhaps it can help you.

 I was in the same situation, after a bit of digging on the interweb I needed to install the sdpam utility for my Debian Etch distro and then:

sdparm --clear STANDBY -6 /dev/sd[Your device]

and now it appears to not sleep. Hope this helps anyone in the same situation.

Jean-Paul

I found it too smile and tried it, but it does not work:

$ sudo sdparm --clear STANDBY -6 /dev/sda
    /dev/sda: Generic   External          1.04
change_mode_page: page offset failed: given response length too small, offset=4 given_len=4 bd_len=0

Well, i am still searching for a solution... If someone has an idea, dont hesitate to post here smile

EDIT: The drive case also has an eSATA plug, i will try it this way and see if it also happens with eSATA to isolate the problem a little bit...

Last edited by funkyou (2008-03-07 07:58:20)


want a modular and tweaked KDE for arch? try kdemod

Offline

#10 2008-03-07 14:15:46

zeratul289
Member
From: Liverpool, UK
Registered: 2008-03-07
Posts: 24

Re: [solved] My external hdd goes to sleep after some time

funkyou wrote:

it does not work because the drive is a sata one and hdparm doesnt work on it, but only on drives that are recognized as /dev/hd*

Are you sure? I can put all of my (definately) SATA drives on standby with no problems using hdparm:

hdparm -y /dev/sdb

/dev/sdb:
 issuing standby command

Which correctly spins down. Could you post the output of "hdparm -I /dev/sd[x]"?

Offline

#11 2008-03-08 12:57:26

funkyou
Member
From: Berlin, DE
Registered: 2006-03-19
Posts: 848
Website

Re: [solved] My external hdd goes to sleep after some time

zeratul289 wrote:
funkyou wrote:

it does not work because the drive is a sata one and hdparm doesnt work on it, but only on drives that are recognized as /dev/hd*

Are you sure? I can put all of my (definately) SATA drives on standby with no problems using hdparm:

hdparm -y /dev/sdb

/dev/sdb:
 issuing standby command

Which correctly spins down. Could you post the output of "hdparm -I /dev/sd[x]"?

Works for me big_smile
I dont know why it didnt work before, i always got an error message... Well, thank you very much for convincing me to try it once more smile


want a modular and tweaked KDE for arch? try kdemod

Offline

Board footer

Powered by FluxBB