04-15-2016, 06:30 AM | #1 |
Connoisseur
Posts: 66
Karma: 10
Join Date: Apr 2016
Device: Kindle 4(mine) & Kindle Touch(wife)
|
calibre batch processing abilities & computer sleep
hi, I noticed with the help of "POWERCFG -REQUESTS"
that calibre doesn't seem to stop the computer from going to sleep when processing batch tasks. Just wanted to report that. I mean, it could be somewhat useful since calibre already supports background batch processing while the user can continue working OR go away from computer. note: hope this is the right forum to post this. have a nice day. |
04-15-2016, 07:02 AM | #2 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
IMO having applications interfere with sleep is not a good idea. Imagine that the user starts a background job in some application, then something interrupts them and they have to leave, so they close the lid on the laptop, but the laptop does not go to sleep -- thereby draining the battery unexpectedly and making the entire laptop unavailable without a power supply.
|
Advert | |
|
04-15-2016, 10:15 AM | #3 |
Connoisseur
Posts: 66
Karma: 10
Join Date: Apr 2016
Device: Kindle 4(mine) & Kindle Touch(wife)
|
O_o you start an unattended batch job without plugging the power ??
are you serious ? also closing the lid generally overrides whichever software setting prevent sleep, depending on how it's set up for the particular device. There's already software that prevents sleep : -insomnia a little application that prevents sleep & does nothing else (intended for such situations as software which doesn't provide the functionnality) -some download applications also have options to prevent sleep given that they need to finish downloading at some point ... -most media players generally prevent sleep too (otherwise your computer might go to sleep in the middle of that movie, if you didn't touch any of the computer controls) ... What's more you don't need a laptop to benefit from sleep, a desktop can be put to sleep with benefits : e.g. all your programs stay where they were and you can start over whatever you were working on on wakeup nearly instantly (with normal sleep, not deep sleep) Last edited by whismerhill; 04-15-2016 at 10:18 AM. |
04-15-2016, 10:33 AM | #4 | ||||||
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Putting a computer to sleep is a user's decision. It is not the job of applications to second guess his choice. |
||||||
04-15-2016, 01:05 PM | #5 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
When watching a movie, the way you use the computer is by looking at it as opposed to touching buttons.
Your comparison is horrendous. And there is no excuse whatsoever for calibre, or most applications, to override user preferences for going to sleep. In fact, offhand I can ONLY think of the specific instance of media players as something which should keep the computer awake (though I could theoretically be overlooking something). ... Thank you for confirming for us all that calibre is working as intended. |
Advert | |
|
04-15-2016, 03:46 PM | #6 | ||||||
Connoisseur
Posts: 66
Karma: 10
Join Date: Apr 2016
Device: Kindle 4(mine) & Kindle Touch(wife)
|
Quote:
Quote:
That's like throwing a megui x264 conversion with an insane profile & then being surprised that you needed power to complete it? Also in theory it's an non-issue since it would of course be optional, so the user did turn it on, his problem. Quote:
that supposes that whatever was downloading wasn't needed when the user comes back to his computer. more efficient to have a download software which prevents sleep while downloading, which will prevent the computer from going to sleep, the download will complete, then the computer will go to sleep since the software will remove the "restriction". When the user comes back to his desk, the download is finished and he can continue whatever it was that he was doing. Quote:
Quote:
e.g. When it's running tasks which are deemed by the user as "time critical" or whatever, then it will prevent sleep for as long as the task is running, as soon as the task is completed it will stop preventing sleep. Therefore you lost none of the advantages. (time critical = turn on option "prevent sleep while working" ) Quote:
Anyways, in my humble opinion, you have a strange point of view, but that's your decision. I thought it was a good idea, but apparently it's not xD Have a nice day. PS: didn't even notice you were the main developer xD. let me thank you for making an awesome application, you probably heard it all before but still. And while saying that I'm not trying to rub it in to get the feature I suggested, because in all honesty I don't really need it, I just thought it would be a good idea as I said before. again have a nice day. |
||||||
04-15-2016, 04:03 PM | #7 | ||||
Connoisseur
Posts: 66
Karma: 10
Join Date: Apr 2016
Device: Kindle 4(mine) & Kindle Touch(wife)
|
Quote:
In both cases the computer has no buttons touched when doing a background task & leaving your desk or when watching a movie Quote:
don't see where I implied that it should be imposed on everyone ??? Quote:
*Archiving *Uploading *Downloading *Scanning for viruses *Hard disk checking *Burn out testing of processors/memory/graphic cards, for stability testing & overclocking *Application fully automatic updates/installations (such as windows updates, you don't need to be in front of the computer for them to complete, but sleep would prevent them from being done when you return to it) ... there's probably more stuff out there that can be done unattended if the computer is not sleeping. Freeing the whole computer ressources for when the user is back if he would want to make use of them. Quote:
I was just making a little suggestion, thought it would be a good idea, apparently it's not. Well nobody's hurt so have a nice day. |
||||
04-15-2016, 10:17 PM | #8 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you are saying that calibre should have an option to prevent the computer from sleeping while jobs are running, as opposed to doing it unconditionally, I have no objection to that, but I also dont think it is worth the time to implement it myself. Patches are welcome.
|
04-15-2016, 10:54 PM | #9 |
null operator (he/him)
Posts: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
An alternative might be to provide a feature that would tell calibre send a shut down/sleep message to the OS when its batch jobs are done, before it terminates itself. A 'do once' button in the Alt_Shift+J Jobs would do the trick. That way any non calibre tasks scheduled to run on logoff, sleep (?), or shutdown -- like backup -- get done.
I prefer solutions that put the onus on the user to do something "now", rather than relying on (or getting bitten by) some previously set and long forgotten option. BR |
04-16-2016, 03:58 AM | #10 | ||
Connoisseur
Posts: 66
Karma: 10
Join Date: Apr 2016
Device: Kindle 4(mine) & Kindle Touch(wife)
|
Quote:
Quote:
In your case, sleep needs to be disabled globally so that the computer would stay awake, then calibre sends a sleep message at the end of tasks. Doable but inefficient as other applications might interfere with the sleep message or even also require the computer to stay awake it's much much more efficient to setup your own computer for sleep, and have the application temporarily suppress the default sleep behavior see this blog for more details : https://dlaa.me/blog/post/9901642 or even this microsoft article which also has nice remarks about the function used to prevent sleep : https://msdn.microsoft.com/en-us/lib...8VS.85%29.aspx Last edited by whismerhill; 04-16-2016 at 04:08 AM. |
||
04-16-2016, 01:38 PM | #11 |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Isn't that what (OS) Scheduled Tasks can do?
Wakes the computer (if asleep/hibernating), run a task, kill it if it runs over N time. Optionally: Ignore if on battery |
04-16-2016, 03:39 PM | #12 |
Connoisseur
Posts: 66
Karma: 10
Join Date: Apr 2016
Device: Kindle 4(mine) & Kindle Touch(wife)
|
not really, beside one might as well deactivate sleep manually at this point, too much clicking xD
|
04-16-2016, 07:19 PM | #13 |
null operator (he/him)
Posts: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@whisermill - It's pretty obvious Kovid won't be doing it 'your way', and that you're not interested in any alternate approaches to solving the procedural problem.
So, download the source, and change it to implement your solution. If you use appropriate source management processes you can merge your changes such that you wont be locked out of future releases. <sark>And in case the power goes out, don't forget to check the batteries in your UPS, or that your MG set has enough fuel in its tank, and that they're not located where a tsunami mighty knock them down.</sark> BR |
04-16-2016, 07:33 PM | #14 |
Resident Curmudgeon
Posts: 73,976
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
In the UK, some outlets have an on/off switch and if you have it set to off and forget to check, you will be using your laptop on battery thinking it's properly plugged in.
If the cord plugged into the laptop is not properly plugged into the power brick, then it's not properly plugged in. |
04-17-2016, 04:18 AM | #15 | |
Connoisseur
Posts: 66
Karma: 10
Join Date: Apr 2016
Device: Kindle 4(mine) & Kindle Touch(wife)
|
Quote:
Look I don't mean to be mean but if a user starts a humongous automated batch job such as : - a video conversion(one of those x264 insane profile that can take upward of 20 hours to complete at 100% processor usage) - a calibre conversion of xxxxxxx books - or whatever other task that will busy your computer for hours & doesn't check that its computer is properly connected to power so it can complete its task. It's the user's fault no way around it, whether or not he has reasons to have not properly checked the power is irrelevant. Besides a user could always look up the emergency low battery settings for his particular laptop.... Besides a laptop, |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Batch processing with kindlegen | Blunaigel | Kindle Formats | 28 | 01-25-2019 10:01 AM |
Scripting ebook-convert for batch parallel processing? | joewiz | Conversion | 9 | 03-15-2013 05:34 AM |
Tag editor with batch processing | semenoof | General Discussions | 0 | 01-17-2013 03:12 AM |
Does Calibre server work when computer is in "Sleep"/can it prevent Sleep | Backdraft | Calibre | 1 | 01-14-2011 07:47 PM |
Batch processing of PDB files? | Asterra | iRex | 6 | 12-04-2007 01:10 PM |