mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)
-   -   is there a way (https://www.mersenneforum.org/showthread.php?t=1070)

dsouza123 2003-09-08 23:53

I have been looking for code/utilities to do this ( prime95 faster when the monitor is on powersaving/standby/powerdown ).

The most direct is if prime95 could detect the monitor going into powersaving mode. I haven't found code that can accomplish that.

This would involve modifying prime95 and then only using a new version that has this functionality, so better with an external solution. :)

The external program could try to detect monitor powersaving and change the priorities of prime95 or other programs.

The next way is to detect if the screensaver is active and for how long.
There is code for that but I haven't got it to work. The how long part may be tricky unless continually checking or the start time can be determined somehow ( using an API call / or value stored in a registry entry).

Changing Prime95's and other programs priorities (process AND thread(s))from an external program is doable using existing utilities ( I do it all the time ).

Another possibility is when the monitor goes into standby/power off to stop the screensaver. ;)

There is no connection between the screen saver and the monitor going into standby. When the computer is idle for a certain amount of time an idle state is started if a screen saver has been specified it will be started after its wait time has elaped, if the energy saving specifies a wait time for the monitor to powerdown then when the wait has elapsed the monitor powers down. If the screen saver stops while the monitor is in powerdown the monitor continues in powerdown until keyboard or mouse etc activity ends the idle state.

Has anyone coded anything like this, a small utility that can detect either monitor powersaving or the screensaver running with how long it has been running then either changing process and thread priorities in other programs and or stopping a screen saver ? :question:

I am trying with MASM and Delphi, code from VB or C or C++ is usable, it can be converted.

There is still the issue of at least 2 maybe three code paths 9x ( 95, 95r2, 98, 98SE, ME), NT 4 and under, 2000 and XP. I am not really as concerned with 95 or NT 4/4-.

There are alot of PCs with 98SE, 2000, and XP so those are the major versions it has to work with.

I have easy access to 95 ( version ? ), 98SE. I may be able to get access to ME, XP home and maybe 2000.

I don't know if the PRO versus home/standard versions have any differences.

Who is interested, can help, has any ideas ?

jocelynl 2003-09-09 01:49

Perhaps you should convince your friend that screen savers are useless now a days. They were usefull with the old monochrome screen. And with the new plasma screen, you could have the same picture on for decade and it wouldn't make any difference.


Joss

crash893 2003-09-10 02:11

yea but you see he wont do it if he cant keep his computer the way it is
and i do mean exactly the way it is


with the matrix screen saver running the iterations times are up in the 9.933 area i mean there just awfull

and im sure im not the only person with this perdiciment

Complex33 2003-09-10 16:28

I have some instances of Prime95 running on machines where it only runs when the computer is not in use by a user. Under windows I simply setup a scheduled task that runs the executable when the computer is idle and stops when the computer is used again. This has the effect of making Prime95 completely transparent to the user with the side effect of losing all those cycles when the computer has a user on it. But, alas this is they way it must be. Perhaps it could be a solution for you.

:banana:

Complex33 2003-09-10 16:30

Oh and I forgot you would just set the priority to 5 or so which should be above the screen saver. Set the idle time for the scheduled task to coincide with the monitor power save mode :(

crash893 2003-09-14 22:35

i would like to know what Mr. Woltman thinks of this idea

also is there a comand line way to alter primes pority while its running?

if that was the case i could just make something else to run with it ( or try with my limited programing experinces)

QuintLeo 2003-09-15 11:09

There likely are still more computers around running NT4 than 2k. In any event, if a code path works under NT 4 or before, it *should* still work under 2k.

There are still quite a few machines running 95, though I suspect there are more running 98 or 98SE than 95 by now.

crash893 2003-09-21 23:46

bump

Prime95 2003-09-22 00:48

It looks like this system call would be part of a solution:

GetDevicePowerState

The GetDevicePowerState function retrieves the current power state of the specified device.

BOOL GetDevicePowerState(
HANDLE hDevice,
BOOL* pfOn
);


I don't know how to get the monitor's hDevice.

crash893 2003-09-22 23:04

what language?

PrimeCruncher 2003-09-22 23:19

I agree with Prime95 on the GetDevicePowerState API call, that would appear to be part of the solution. Doing some digging on MSDN, I think you can get a handle to the monitor using CreateFile (I know it sounds weird) by setting the file name as "\\.\LCD" but that only works on XP and I have no XP machines here.

In response to crash893, it should be supported in any language. I know it is in MASM because I just tried coding a test prog that would tell me whether the monitor was on or in a power-saving mode or off.

This all means one of two things:
1) It's impossible
2) The answer is so obvious its right in front of our face

Any votes?


All times are UTC. The time now is 05:35.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.