mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2003-09-08, 23:53   #12
dsouza123
 
dsouza123's Avatar
 
Sep 2002

66210 Posts
Default

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 ?

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 ?
dsouza123 is offline   Reply With Quote
Old 2003-09-09, 01:49   #13
jocelynl
 
Sep 2002

2×131 Posts
Default

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
jocelynl is offline   Reply With Quote
Old 2003-09-10, 02:11   #14
crash893
 
crash893's Avatar
 
Sep 2002

23×37 Posts
Default

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
crash893 is offline   Reply With Quote
Old 2003-09-10, 16:28   #15
Complex33
 
Complex33's Avatar
 
Aug 2002
Texas

5·31 Posts
Default

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.

Complex33 is offline   Reply With Quote
Old 2003-09-10, 16:30   #16
Complex33
 
Complex33's Avatar
 
Aug 2002
Texas

5×31 Posts
Default

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 :(
Complex33 is offline   Reply With Quote
Old 2003-09-14, 22:35   #17
crash893
 
crash893's Avatar
 
Sep 2002

23×37 Posts
Default

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)
crash893 is offline   Reply With Quote
Old 2003-09-15, 11:09   #18
QuintLeo
 
QuintLeo's Avatar
 
Oct 2002
Lost in the hills of Iowa

26×7 Posts
Default

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.
QuintLeo is offline   Reply With Quote
Old 2003-09-21, 23:46   #19
crash893
 
crash893's Avatar
 
Sep 2002

29610 Posts
Default

bump
crash893 is offline   Reply With Quote
Old 2003-09-22, 00:48   #20
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

19·397 Posts
Default

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.
Prime95 is offline   Reply With Quote
Old 2003-09-22, 23:04   #21
crash893
 
crash893's Avatar
 
Sep 2002

1001010002 Posts
Default

what language?
crash893 is offline   Reply With Quote
Old 2003-09-22, 23:19   #22
PrimeCruncher
 
PrimeCruncher's Avatar
 
Sep 2003
Borg HQ, Delta Quadrant

2×33×13 Posts
Default

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?
PrimeCruncher is offline   Reply With Quote
Reply

Thread Tools


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


Fri Aug 6 05:36:01 UTC 2021 up 14 days, 5 mins, 1 user, load averages: 4.07, 3.29, 2.87

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.