Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-15-2016, 06:30 AM   #1
whismerhill
Connoisseur
whismerhill began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Apr 2016
Device: Kindle 4(mine) & Kindle Touch(wife)
Lightbulb 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.
whismerhill is offline   Reply With Quote
Old 04-15-2016, 07:02 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is online now   Reply With Quote
Advert
Old 04-15-2016, 10:15 AM   #3
whismerhill
Connoisseur
whismerhill began at the beginning.
 
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.
whismerhill is offline   Reply With Quote
Old 04-15-2016, 10:33 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by whismerhill View Post
O_o you start an unattended batch job without plugging the power ??
are you serious ?
O_o you check to see if the power is connected every time you click the convert button in calibre, or the fetch news button or the download metadata button, really? Are you serious?

Quote:
also closing the lid generally overrides whichever software setting prevent sleep, depending on how it's set up for the particular device.
generally - really so when a user posses a laptop that does not obey this "general" principle of yours and he complains that calibre caused his laptop to die unexpectedly, you are going to deal with the bug reports?

Quote:
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)
Right and windows control panel has a button to turn off sleep, what has that got to do with anything?

Quote:
-some download applications also have options to prevent sleep given that they need to finish downloading at some point ...
Like when the laptop comes out of sleep...

Quote:
-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) ...
You are comparing the active watching of a movie with running background tasks? What?


Quote:
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)
And if you have a program that prevents it from going to sleep you lose all those benefits.

Putting a computer to sleep is a user's decision. It is not the job of applications to second guess his choice.
kovidgoyal is online now   Reply With Quote
Old 04-15-2016, 01:05 PM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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.
eschwartz is offline   Reply With Quote
Advert
Old 04-15-2016, 03:46 PM   #6
whismerhill
Connoisseur
whismerhill began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Apr 2016
Device: Kindle 4(mine) & Kindle Touch(wife)
Quote:
Originally Posted by kovidgoyal View Post
O_o you check to see if the power is connected every time you click the convert button in calibre, or the fetch news button or the download metadata button, really? Are you serious?
no, because when you convert 1 or 20 file it doesn't matter, when you convert 200 files and you're gonna leave your desk, it matters more so yeah I'd check the power when I do a humongous batch job which requires a lot of processing time. Anyway I was just saying, it's not like it matters.

Quote:
Originally Posted by kovidgoyal View Post
generally - really so when a user posses a laptop that does not obey this "general" principle of yours and he complains that calibre caused his laptop to die unexpectedly, you are going to deal with the bug reports?
That's what you call "unexpectedly" ? Strange word for an expected outcome.
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:
Originally Posted by kovidgoyal View Post
Right and windows control panel has a button to turn off sleep, what has that got to do with anything?
I was just giving examples that it exists in other software. Insomnia comes really handy sometimes look it up if you wish. (not gonna link, not sure of the rules for linking stuff out here)

Quote:
Originally Posted by kovidgoyal View Post
Like when the laptop comes out of sleep...
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:
Originally Posted by kovidgoyal View Post
You are comparing the active watching of a movie with running background tasks? What?
Yes, in both example cases the computer is left untouched for a little while assuming that you watch the movie without pauses or volume adjustments.In both examples, the computer is doing something that losely needs to be completed within a certain timeframe. In the case of the movie it's annoying to be interrupted from watching cause the computer goes to sleep, in the case of the background task it might be annoying to come back to your desk to find out your computer went to sleep within 15 minutes & the process is actually only @ 10% while you left the desk for 4 hours & it had the time to complete.



Quote:
Originally Posted by kovidgoyal View Post
And if you have a program that prevents it from going to sleep you lose all those benefits.
The beauty of having a program which handles sleep himself is precisely there.
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:
Originally Posted by kovidgoyal View Post
Putting a computer to sleep is a user's decision. It is not the job of applications to second guess his choice.
For sure, I never implied the app should prevent sleep always & without it being optional.

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.
whismerhill is offline   Reply With Quote
Old 04-15-2016, 04:03 PM   #7
whismerhill
Connoisseur
whismerhill began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Apr 2016
Device: Kindle 4(mine) & Kindle Touch(wife)
Quote:
Originally Posted by eschwartz View Post
When watching a movie, the way you use the computer is by looking at it as opposed to touching buttons.
Your comparison is horrendous.
this is actually the right comparison don't see what's so horrendous about it all.
In both cases the computer has no buttons touched when doing a background task & leaving your desk or when watching a movie

Quote:
Originally Posted by eschwartz View Post
And there is no excuse whatsoever for calibre, or most applications, to override user preferences for going to sleep.
you're right it should always be an option of course. and in most software keeping awake the computer is an option ..
don't see where I implied that it should be imposed on everyone ???
Quote:
Originally Posted by eschwartz View Post
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).
*Media re-encoding (particular x264 with insane profiles) could optionally prevent it although the high process usage should in theory be enough to prevent sleep, but again depends on user settings.
*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:
Originally Posted by eschwartz View Post
Thank you for confirming for us all that calibre is working as intended.
huuuuu ... come down off your high horse ?
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.
whismerhill is offline   Reply With Quote
Old 04-15-2016, 10:17 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is online now   Reply With Quote
Old 04-15-2016, 10:54 PM   #9
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
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
BetterRed is offline   Reply With Quote
Old 04-16-2016, 03:58 AM   #10
whismerhill
Connoisseur
whismerhill began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Apr 2016
Device: Kindle 4(mine) & Kindle Touch(wife)
Quote:
Originally Posted by kovidgoyal View Post
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.
Fair enough. I suppose my first post wasn't clear enough to convey the idea of an option

Quote:
Originally Posted by BetterRed View Post
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
Actually no, what you suggest is completely the reverse from what I was suggesting.
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.
whismerhill is offline   Reply With Quote
Old 04-16-2016, 01:38 PM   #11
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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
theducks is online now   Reply With Quote
Old 04-16-2016, 03:39 PM   #12
whismerhill
Connoisseur
whismerhill began at the beginning.
 
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
whismerhill is offline   Reply With Quote
Old 04-16-2016, 07:19 PM   #13
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
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
BetterRed is offline   Reply With Quote
Old 04-16-2016, 07:33 PM   #14
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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.
JSWolf is offline   Reply With Quote
Old 04-17-2016, 04:18 AM   #15
whismerhill
Connoisseur
whismerhill began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Apr 2016
Device: Kindle 4(mine) & Kindle Touch(wife)
Quote:
Originally Posted by JSWolf View Post
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.
Your point being ???

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,
whismerhill is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 12:30 PM.


MobileRead.com is a privately owned, operated and funded community.