View Single Post
Old 31st December 2015, 10:46   #732  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
I don't know how to do it, except by manually disabling the power saving mode when you encode.

I know that there are programs available on the net to temporarily disable the feature (while a certain program is running or when a window is opened), but I can't find them any more.

If you wish, I can perhaps write a little program that will simulate mouse moves or key presses so that the system will "think" that someone is still using the computer, but that method has several drawbacks. It will also disable the screen blanker, and the mouse or keyboard activity may interfere with other programs. Therefore, I don't think it's a good solution.

If someone can find a way to disable and enable power saving mode from the command line, I should be able to add these commands in the __ENCODE*.cmd scripts to disable it when the encoding starts and re-enable it when it finishes. But I don't know that commands and even if it's possible. Someone?

[EDIT] "powercfg" is the command to do it. It has a lot of options, including the possibility to change the current power scheme (for example to switch from "Power saver" to "High Performance" or the opposite). It can also change any setting within the current power scheme (including the "sleep after" and "hibernate after" settings). It can also examine the current configuration and list the available power schemes. Therefore, it seems that everything is possible.

But I don't know what I should do. I must take into account that the PC may crash during an encoding (for example due to a power failure), or the encoding may be interrupted by the user. In that cases, the original settings will not be restored, and the PC will never go to sleep mode automatically any more, unless the user restores manually the original settings. So, what should I do? IMO, it is simpler to change completely the power scheme and use the High performance scheme during the encoding, and restore whatever was the original scheme when the project has been created when the encoding finishes. That way, if the scheme is not restored, the user will only have to select the original scheme manually to restore it.

But some users may prefer to leave the current scheme, and change only the minimum number of things: the delays for the automatic sleep and hibernate operations. IMO, that's not the best solution, because the "Power saver" scheme may not save much power anymore after a crash. Also, should I change the settings for the PC connected to the DC power only, or also for the PC running on battery? I suppose that an encoding is always made when the PC is connected, but who knows?

It is also possible to force the user to create a special "Encoding" scheme for the encoding, and switch to that scheme automatically only if it exists. The advantage is that the user can freely configure it, but he will have to turn off the sleep and hibernate features anyway.

There are many possibilities. Do you have a preference? Personally, I think that I can add a menu with the list of available power schemes in the GUI, to let the user select the power scheme to use during the encoding, and the one to restore after the encoding. I can also add a menu that will allow the user to restore immediately any power scheme. That may be useful to facilitate the restore after a crash. Is it OK for everybody?
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 31st December 2015 at 11:48.
r0lZ is offline