Showing posts with label workaround. Show all posts
Showing posts with label workaround. Show all posts

Thursday, September 29, 2011

External usb hdd WD Elements - avoid spindown -- #2

A little update regarding the USB HDD spin-down-problem (discussed here: External usb hdd WD Elements - avoid spindown).
I found a better workaround somewhere (sorry to the original author - i forgot where...).

By default, the APM_level is set to 96(d) (60h) after every reconnect.
When setting this value to 128(d) (80h), the drive spins down after .. approx. 30-45 minutes (i haven't tested this exactly, but it definitely doesn't spin after.. lets say 1h).

The APM_level can be set with hdparm:
# hdparm -B /dev/disk/by-label/WD_500G_NTFS
/dev/disk/by-label/WD_500G_NTFS:
APM_level = 96

# hdparm -B 128 /dev/disk/by-label/WD_500G_NTFS
/dev/disk/by-label/WD_500G_NTFS:
setting Advanced Power Management level to 0x80 (128)
APM_level = 128
Note: The hard disk doesn't remember this setting. Like written before - after every reconnect it has its default setting of 96d.


Update1 / additional information:
The hdparm method works for me on the following Kernel:
$ uname -s -r -v -o
Linux 3.0.0-1-686-pae #1 SMP Sat Aug 27 16:41:03 UTC 2011 GNU/Linux
but on
uname -s -r -v -o
Linux 3.1.0-1-686-pae #1 SMP Mon Nov 14 08:24:20 UTC 2011 GNU/Linux
i get the following error when running hdparm:
# hdparm -B /dev/disk/by-label/WD_500G_NTFS
/dev/sdb:
HDIO_DRIVE_CMD(identify) failed: Invalid argument

edit1: (17.12.2011)
-added information regarding different kernel versions.

Sunday, July 31, 2011

Firefox 5 / Firefox 6 / Firefox 7 / Firefox 8 / Firefox 9 / Firefox 10 - javascript confirm/alert box freeze

I have exactly this problem:
support.mozilla.com - Firefox hangs sometimes on javascript "confirm"

A workaround is to change the appearance of javascript alerts:
support.mozilla.com - Change appearance of javascript alerts
short: go to 'about:config', search for 'prompts.tab_modal.enabled' and set it to 'false'. done.

This way the boxes come with a os-dependent style instead of the nice 'fade out' FFox5 style, but they do work again ;-)
Here is a site where you can test it: JavaScript Confirm


Just for reference, i'm using:
Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0 Iceweasel/5.0
on a debian unstable/sid.
Update:
Problem persists on
Firefox:Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0 Iceweasel/6.0
Update2:
Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20100101 Firefox/6.0.2 Iceweasel/6.0.2
Update3:
Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Iceweasel/7.0.1
Update4:
Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20100101 Firefox/8.0 Iceweasel/8.0
Update5:
Browser version info like above; debian package version: 8.0-3+b1
Update6:
Mozilla/5.0 (X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 Iceweasel/9.0.1
Debian Package: 9.0.1-1
Update7:
Wow. still not working. Might be a problem at my side.. whatever..
Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 Iceweasel/10.0.2

edit:
Added update for new Browser Version.
Changed Title (added "Firefox 6").
edit2:
Added update for ffox 6.0.2.
Added link for testing.
edit3: (07.10.2011)
-Updated info for FFox 7.0.1
-Changed Title (added "Firefox 7").
edit4: (25.11.2011)
-Updated info for FFox 8.0
-Changed Title (added "Firefox 8").
edit5: (17.12.2011)
-Updated info for FFox 8.0
-new sub-update (debian-specific)
edit6: (03.02.2012)
-Updated info for FFox 9.0.1
-Changed Title (added "Firefox 9").
edit7: (06.03.2012)
-Updated info for FFox 10.0.2
-Changed Title (added "Firefox 10").

Sunday, May 29, 2011

External usb hdd WD Elements - avoid spindown

Update: I got a new workaound here: External usb hdd WD Elements - avoid spindown -- #2

I've got an external 2.5", 500G USB HDD from WesternDigital
- this one: http://images.google.com/images?q=WDBABV5000ABK-00.
Without being accessed, it spins down after 5-10s (seconds, not minutes!) automatically.
This behavior seems to be hardcoded in the hardware/firmware by WD and cannot be changed (if anyone knows better, please leave a comment). It can be very annoying, for example when starting a file manager or open a 'save as...'-dialog etc. because the hard drive has to spin up every time adding a delay of some seconds until the dialog appears. The same happens when reading or writing at a low speed (let's say ~ <10KiBytes/s) - the drive spins up and down multiple times a minute.

A dirty workaround is to keep the drive busy by touching and syncing in a short interval.

A quick way to do this via commandline:
while [ 1 ]; do echo "touch at - `date`"; touch /media/WD_500G_NTFS/tempfile; sleep 5s; sync; done
A bit nicer with the following script:


edit: inserted link to new post.