DO unresponsive while HD waking up from sleep, forces user to click abort before proceeding

This is hard for me to reproduce, because I have to wait for my HD to go to sleep, but

  • My HD is in sleep mode
  • I switch to it in DO on the left side of a dual lister
  • DO shows it is working (with the abort button) in the list view
  • While it is doing that I click on a different drive button, because I am impatient and would rather use a different drive letter than to wait for this thing to wake up
  • DO does not react UNTIL I click the abort button.

This is extremely annoying because the user has to move the mouse over to the abort button. By that time, sometimes the operation is already done, and one clicks on some file instead. Then one has to go back down to the buttons to do any action.

I have had the urge to throw something at DOpus everytime this happens :slight_smile:

This is of course worth of investigate, but why you put HDD to sleep in the first place? I have few hard drives that working for years without sleep mode (unless I shut down my computer) and they're just fine. HDD consumes 10 watts maximum (most of them less that 10 W) and it's not worth to save that amount of power - it's up to 7,5 kWh per month, which gives you 0,89 euros per month (in worst scenario, maximum power consumption, maximum payment per kWh based on ... statistics) if your HDD works all the time, 24/7, 31 days. I'm just asking of course.

If it's not a notebook (accu) or an external drive activating sleep-mode by its own controller, its best to always leave HDD powered on like peterb said. I have some external drives and NAS going to sleep and on access DO of course waits for them to wake up (it's the same with network, NAS, CD-Rom, etc.), but that takes only 2-3 seconds (of course depends on the drive... some are really slow).

But I think it's not DO-related, it's a Windows-thing. I assume you will see same behaviour in Explorer.


Your HD going to "sleep" is not Directory Opus's fault. You can use programs like "NoSleepHD" or "KeepAliveHD" to keep your hard drives from going to sleep. Both programs write a tiny text file to each drive at time intervals of your choosing (I have mine set to 2 minutes). "NoSleepHD" only supports up to 5 drives, while "KeepAliveHD" lets you add as many drives as you want.

As long we don't know WHICH drive we're talking about no programm is needed (on normal internal HDD just turn off sleep mode in energy-options!). BTW the unresponsible time while wake-up was meant, not DO setting drives to sleep.

You can have a drive enter sleepmode when you wish with hdparm.exe, it might help you to investigate the issue:
You need to download hdparm for windows, then run it like so (hda being the first disk, hdb being the second etc.):
hdparm.exe -Y hda

Hard disk drives have their own spindown timer, if it is enabled, they will spindown without the operating system telling it to do so (some external USB drives tend to be set up like this). You can set/disable this timer with hdparm.exe as well. It's the -S switch. Do not mix up with the -s switch, which will get you in trouble. Might be necessary to use switch/option "-K 1" as well to store the settings reset proof in the drive.

I have 5 drives spinning down separately via the disk specific timers, DO would "lock" for 4-5 seconds while any of them is spinning up, but nothing unusual with that, despite the energy cost savings. o)

Hmmm. I can confirm that something may be wrong. I accessed remote computer (local network) and after computer shutdown, Opus was unresponsible until I kill application and restart program. Before I can open new lister but cannot enter any drive/directory.

Did you try with Explorer while DO was unresponsive?
The only way to tell it's not the whole network/windows system waiting for response from an endpoint that died.

I will (I do something on second computer, so I think this will happens again - so far only twice). But seriosly - if whole system waiting for response, then killing Opus and restarting could not solve that problem, isn't? But surprisingly I just restarted Opus and everything works. So my bet is on Opus, not system (until system waits for Opus to end some operations - but this will be even worse if Explorer will freeze as long as Opus is running).

If it stays frozen longer than a minute, please create a crash dump using Task Manager and we can use it to see which API is blocking or what is happening.

It was small problem and not happen again. I think I reported some more important bugs and questions so I leave this thread to rsn746352 and will wait for answering my questions. But of course if that happens again - I'll make more tests (not just kill / restart).

Ok, checked that Explorer works while DO was still unavailable. Even when I have no listers open (and previously I browsing remote lan computer). Unfortunatelly - that was not long enough to made any actions. After 20 seconds Opus starts working again.

If it starts working after 20 seconds then that is normal for that scenario. It takes Windows up to 30 seconds (by default) to decide a network location is unreachable, after which the OS tends to cache the result.

We try to avoid triggering calls that may block on threads that you cannot cancel, but it's hard to do everywhere, especially as the API has no way to cancel requests (threads have to be left to run in the background and know to stop when they finally return from the API), and the API usually takes a fraction of a second, making it unnoticeable when nested code which uses it is used somewhere.

Explorer has similar issues in places. Almost everything will, due to how the API works.

Avoiding aituations with unreachable network drives is the best thing to do, and we provide help for that with things like the option to not automatically reload network paths in folder tabs (unless a button is clicked) when restoring saved listers. (Similar exists for sleeping local HDDs.)

OTOH, if the lister does not become responsive again, after a much longer time, then we'd want a crash dump for that to investigate where things are hanging.

Thanks for all the responses, so judging by this thread I should prevent my external USB hard drives to go to sleep. What exactly is the best way to do this? I saw the post about using a tool that writes a small file at regular time intervals but that, honestly, sounds like a completely insane solution to me.

There must be a way in Windows 10 to turn of HD Sleep mode, right?

The Windows setting is buried a few levels deep in the Power related control panels:

Most internal drives will respect that, and some external ones will.

Some external drives ignore it and go to sleep on their own schedule regardless of what it is set to. Of those, some have tools from the manufacturer that let you change their internal timeouts or turn off the timers completely, but some don't.

Thanks for the great explanation. It seems to work.

Although with USB drives I still get this lag when they are first inserted and I try to access them "too quickly" when Windows is still thinking about them. Then I get a LONG pause of ~10 seconds sometimes, where I cannot click on anything in the lister.

The previously mentioned "lag" with non-existent network drives is still bothering me too. I understand it is an OS fault and not a DOpus problem though.

Try the latest beta (12.3.6) as we have made some changes to improve things with network drives.