Jump to content

Delay forced shutdown


ajones81

Recommended Posts

I have the following options set in Control Panel -> Power Options:

6buz978.gif

4tk4e8z.gif

Where I stay unfortunately there are power outages that tax my UPS and so I have set it to shut down my PC as and when the battery runs low.

My problem is, when I restart my system later, invariably the Windows disk check starts up, indicating that most probably uTorrent was in the process of writing to disk when it was rudely interrupted and forcibly shut down by Windows.

Thus I want to know, is there some way uTorrent could perhaps delay the forced shutdown a bit (I know that sounds like an oxymoron!) till it has finished writing to disk? Or is there some other solution to my problem you might be able to suggest?

Link to comment
Share on other sites

If the application doesn't exit in time, Windows simply ends the task as if you did so from the Task Manager, which is (to say the least) not graceful at all. When Windows forces a shutdown, there's nothing µTorrent can do about it. The best you can do is have bt.graceful_shutdown set to false, but that's already the default setting anyway.

Link to comment
Share on other sites

As you can see from the 2nd screenshot above, there's also an option to run a program when the low battery alarm occurs. Now I don't know whether Windows will actually run a program when it is also set to shut down (to be tested during next power-out), but if it will, a command-line option like uTorrent /exit that flushes downloaded data to disk and quits immediately would be really handy...

Link to comment
Share on other sites

So, since bt.graceful_shutdown is set to false, that's why the disk check starts up on restart? I wonder if I set bt.graceful_shutdown to true, would Windows wait for uTorrent to take its time and quit properly and then shut down, or would it forcibly close the program after some preset amount of time? If with bt.graceful_shutdown set to true, uTorrent still manages to close fast enough to satisfy Windows, then that would certainly solve my problem.

Link to comment
Share on other sites

It would force it to shut down if it doesn't exit quickly enough. Given identical situations (number of connections, amount of data in the cache, etc), graceful shutdown would probably take longer to exit because it waits for things to complete gracefully, like checking for proper tracker response and stuff. I really doubt setting bt.graceful_shutdown would help, but I guess it's worth a try if you want.

Link to comment
Share on other sites

There's an easier solution...

Use hibernate! When battery level is critical, tell it to enter hibernation!

This is better in many ways, including that the utorrent problem won't happen and you won't lose any of your work at all. You'll only need to do a graceful shutdown once in a while when there's no power shortage. It might be your best solution, too...

Link to comment
Share on other sites

Thats pretty neat. I'll try it sometime, soon.

edit: Actually i won't because my computer is crap and would never boot again, the psu is about burnt out and I can't get another one (with a higher wattage) because its proprietary Biostar crap.

Link to comment
Share on other sites

Hibernate? Well, thanks to uTorrent and all the *cough* stuff I've downloaded with it, my three hard drives are almost bursting at the seams, so there's no way I can sacrifice 4GB for hibernation...

Gotta get me one of those 1TB babies! :P

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...