Page 1 of 1

Ext. hard drive awakes when starting VLC since v1.0.0

Posted: 20 Jul 2009 23:19
by Sunwalker
Hi,

since version 1.0.0 of VLC, my external hard drive always awakes, when starting VLC. Is there a way to change that?

Re: Ext. hard drive awakes when starting VLC since v1.0.0

Posted: 21 Jul 2009 00:31
by nikola23
Do you have your external harddrive set as one of the directories in your media library?

Re: Ext. hard drive awakes when starting VLC since v1.0.0

Posted: 21 Jul 2009 00:39
by Sunwalker
No, but I deactivated the library entirely now. Perhaps that solves the problem. Thanks.

Re: Ext. hard drive awakes when starting VLC since v1.0.0

Posted: 21 Jul 2009 19:00
by Sunwalker
Even with deactivated media library my ext. hard drive spins up on VLC start every once in a while.

So, any other suggestions?

Re: Ext. hard drive awakes when starting VLC since v1.0.0

Posted: 22 Jul 2009 03:56
by ajmas
I have seen this happen in other Mac applications when access to the filesystem catalogue is made, such as through the open/save dialogue. I don't know what algorithm MacOS X uses for deciding when to wake a drive. I'll see if I can find an answer.

Re: Ext. hard drive awakes when starting VLC since v1.0.0

Posted: 22 Jul 2009 03:59
by nikola23
What kind of harddrive is it? brand model etc.

Re: Ext. hard drive awakes when starting VLC since v1.0.0

Posted: 22 Jul 2009 09:07
by Sunwalker
It's a Western Digital My Book Essential 1TB connected via USB.

http://www.wdc.com/de/products/products.asp?driveid=353

Re: Ext. hard drive awakes when starting VLC since v1.0.0

Posted: 22 Jul 2009 14:51
by ajmas
Here is the answer I got (I asked on the darwin-dev mailing-list), when I asked what conditions cause a drive to spin up:
Basically, any I/O to the drive that is not in the cache will cause it to spin up. Unfortunately, much code (including in Apple's frameworks) likes to call statfs() on each and every filesystem any time an Open/Save dialog comes up, an application launches, etc. I can't remember for sure, but in my experience this often seems to spin drives up.

sudo fs_usage -w -f filesys
will show which filesystem calls are occurring and the elapsed time in the third to last column might allow your user to figure out which system call had to wait for the disk to spin up. It may then be possible to use dtrace to figure out the stack trace leading to the I/O and thus roughly where to assign blame / how to reproduce the problem.
I would have to see with the VLC developers if they are doing anything in particular.

Re: Ext. hard drive awakes when starting VLC since v1.0.0

Posted: 30 Jul 2009 21:37
by Ambrose
Time Machine uses hard links -- which are otherwise rare in OS X -- for certain files it keeps in its backups. If you use Time Machine, and if the drive that keeps spinning up is the same one you are using as your external drive for it, that might be the problem. The persistent hard link I mentioned will in this case cause Time Machine will remember that once upon a time the storage disk contained another version of VLC. The system will spin up the drive to examine the copy of VLC it believes is still there, to determine whether it should be used as the default version of VLC instead of the one in your applications folder.

If I'm right about this, the only solution I know of is to remove the complete Time Machine restore file from the external drive and replace it from scratch. I suspect, although I do not know, that other backup apps may do this as well.

Re: Ext. hard drive awakes when starting VLC since v1.0.0

Posted: 30 Jul 2009 23:40
by Sunwalker
I do not use time machine and deactivated spotlight for the external partitions... So this shouldn't be the problem, I think.