# OS2 World Community Forum

## OS/2, eCS & ArcaOS - Technical => Setup & Installation => Topic started by: Dariusz Piatkowski on November 11, 2019, 05:12:56 am

Title: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 11, 2019, 05:12:56 am
I've got the AN SNAP 505 build here and since I hooked up my dual screen setup (Dell U2412M monitors) I figured it would be best for me to actually use the PowerSave feature.

Previously I was running a Samsung245T display and that was a ON/OFF type of a deal, so I took to just running the display ON full-time.

Alright, so what's the secret to getting this to work? LOL

I looked at the XWP  'Desktop=>ScreenSaver=P2 - DPMS Settings' configuration options and both the DPMS Standby and Suspend are greyed out. Only DPMS OFF state is click-able, which is what I have selected. The problem is that after 60mins of no both monitors stay powered ON.

So off I went checking out the SNAP 'Advanced Button => VESA DPMS Power Tests' option to see what SNAP actually recognizes about the monitors' capability. Let me mention that the DELL displays are correctly recognized to start off with, I did not have to wrestle with the setups along the lines of what I had to do with the Samsung 245T.

Anyways, so SNAP actually shows the following:
1) STAND BY
2) SUSPEND
3) OFF

...which I tested, and all of them correctly work from within that 'Advanced' button screen.

So why is it that XWP apparently does not "see it"?

Ideally I would like to use the SUSPEND option.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 11, 2019, 05:56:56 am
Did you actually enable the screensaver on page 1 and set a module on page 3?
The screensaver should enable all options if the driver and card supports it and if falling back to using the VGA registers, only the off state is supported.
The screensaver is built against an old SNAP SDK so I guess something might have changed or SNAP itself is broken. I'd suggest opening a ticket at Arca Noae. I do know that SNAP does turn my monitor off, only thing I've found that does under OS/2 but as my video card isn't supported I get no wide screen resolutions and therefore use Panorama.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 11, 2019, 05:57:41 am
...ummm...never mind, I think I got this one.

Turns out my Doodle Screen Saver was set to non-DPMS mode, presumably b/c my Samsung245T didn't work otherwise?

One of my old (c 2015) posts came up in my search on this topic and the problem I ran into there was that I wasn't sure how to turn OFF DPMS functionality (was having issues with the power supply board capacitors on my 245T).

Anyways, so yeah, off I went to re-set DoodleSS to use the DPMS modes, now they show up in the XWP ScreenSaver tab and hopefully they will successfully toss the monitors into the STANDBY mode. I will report out once that test happens.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 11, 2019, 05:59:56 am
Hey Dave!
Did you actually enable the screensaver on page 1 and set a module on page 3?
The screensaver should enable all options if the driver and card supports it and if falling back to using the VGA registers, only the off state is supported.
The screensaver is built against an old SNAP SDK so I guess something might have changed or SNAP itself is broken. I'd suggest opening a ticket at Arca Noae. I do know that SNAP does turn my monitor off, only thing I've found that does under OS/2 but as my video card isn't supported I get no wide screen resolutions and therefore use Panorama.

Thanks for the response, our postings crossed each other...I think I got this one figured out.

BUT....you did answer another question of mine, which was: having had the DSS installed why is it that I no longer actually see any of the SS modules showing up in the P3 I think? Sounds like it's the issue you mentioned above...I'll toss a ticket out there for that one.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 11, 2019, 06:16:49 am

BUT....you did answer another question of mine, which was: having had the DSS installed why is it that I no longer actually see any of the SS modules showing up in the P3 I think? Sounds like it's the issue you mentioned above...I'll toss a ticket out there for that one.

You mean there are no modules listed on page 3? Or they can't be enabled?
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 11, 2019, 06:43:47 pm

BUT....you did answer another question of mine, which was: having had the DSS installed why is it that I no longer actually see any of the SS modules showing up in the P3 I think? Sounds like it's the issue you mentioned above...I'll toss a ticket out there for that one.

You mean there are no modules listed on page 3? Or they can't be enabled?

Actually, attempting to get to P3 never gets me there...pressing the '+' just hangs on P2 in an effort to get to P3, pressing it again brings me to 'Archive' tab next.

Here are the contents of sscore.cfg:

Code: [Select]
[G:\util\DSSaver]type sscore.cfg; ----------------------------------------------------------; This is an automatically generated configuration file for; the Screen Saver core.; Do not modify it by hand!Enabled = 1Activation_Time = 600000Module_FileName = G:\util\DSSaver\Modules\Blank.dllPassword_Protected = 0Use_Current_Security_Password = 0Password =Delayed_Password_Protection = 0Password_Delay_Time = 60000Use_DPMS_Standby_State = 0DPMS_Standby_Time = 3600000Use_DPMS_Suspend_State = 0DPMS_Suspend_Time = 7200000Use_DPMS_Off_State = 0DPMS_Off_Time = 7200000Wake_By_Keyboard_Only = 0First_Key_Event_Goes_To_Password_Window = 0Disable_VIO_Popups = 1; ----------------------------------------------------------; End of configuration file; ----------------------------------------------------------
The 'g:\util\dssaver\...' is not present anywhere in my CONFIG.SYS, assuming that something is missing from the environment and preventing the modules from being found.

Strangely enough, the BLANK module is in fact active b/c on P1 of the 'Screen Saver' tab I do have the 'Screen saving enabled' checked and it is active after 10 mins of inactivity. The screen does certainly go blank after 10 mins.

So it's almost like XWP does not see the installed screen saver modules in the DSSaver directory itself. Let me see if flipping Disable_VIO_Popups to '0' will allow me to see some errors/warnings?
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 11, 2019, 06:47:46 pm
...ummm...never mind, I think I got this one....SNIP...Anyways, so yeah, off I went to re-set DoodleSS to use the DPMS modes, now they show up in the XWP ScreenSaver tab and hopefully they will successfully toss the monitors into the STANDBY mode. I will report out once that test happens.

Well, so a rather strange result:

1) PRIMARY display stayed turned ON
2) SECONDARY display went to DPMS SUSPEND mode

ugh? lol

I will log a ticket for that issue as I suspect this is entirely within the SNAP driver somewhere. Perhaps a silly missconfiguration when running a dual-head setup? Clearly the system knows to put something into SUSPEND mode, but that ends up being just one of the monitors.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 11, 2019, 07:08:50 pm
The 2 main reasons for not being able to get to page 3 are a bad sscore.cfg, easy enough to test by moving it out of the way even though it looks fine. Or a corrupted/bad module. Reinstalling might fix that, or else uninstalling and reinstalling. The latest is in the testers directory or if needed I can send you a copy.

Did both monitors used to turn off? I don't know if the screen saver was written to turn off both monitors or if that is a SNAP responsibility.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 11, 2019, 09:16:51 pm
Dave!

The 2 main reasons for not being able to get to page 3 are a bad sscore.cfg, easy enough to test by moving it out of the way even though it looks fine. Or a corrupted/bad module. Reinstalling might fix that, or else uninstalling and reinstalling. The latest is in the testers directory or if needed I can send you a copy.

Oh boy, was I behind on these releases or what!!!

I was running v1.8 here, meanwhile 2.2 is out there publicly available, and now there is yours 2.4 drop (which I just grabbed, so no worries, but thank you for the reminder - I originally noted it on the mailing list and just forgot about it).

Sooo...great news! The upgrade to 2.1 and then 2.2 fixed my issue. All modules show up, they are configurable and work correctly, as best as I can tell anyways. So now the only thing left is to get the DPMS stuff working for both monitors.

...Did both monitors used to turn off? I don't know if the screen saver was written to turn off both monitors or if that is a SNAP responsibility.

Nope, I never had two of the Samsungs hooked up long enough b/c that monitor has a weird EDID coding. It is meant to facilitate the LANDSCAPE to PORTRAIT mode switch, but unfortunately that has always caused the secondary monitor on my OS/2 box to insist on running in 960x1200 mode, which as you can imagine is absolutely dreadful looking when in LANDSCAPE mode. I spent countless hours with the SNAP configuration utility trying to play with different H & V-sync signals to trip the monitor into the proper & native 1920x1200, but no-go there.

As my primary monitor started to make that capacitor buzzing noise I figured I might as well take a stab at getting something else to work, which of course meant having to find a monitor with both DVI & VGA inputs, so that PRIMARY could run off of my ATI X850's DVI connector, while the SECONDARY would need to accept a VGA feed (SNAP driver limitations...grrh...c'mon, we've gotta be able to fix that eh?).

But anyways, the DELL was on sale, for a nifty $150 USD brand new, and the 2nd one being OpenBox with a$100 price tag I couldn't refuse.

In all honesty though I miss the awesome picture quality of the Samsung 245T. That was a PVA panel, and even though the IPS in the Dell is supposed to be better, it is a 6-bit panel and while the colour reproduction on the DVI connector is nice, there is something off on the VGA one. Certain colours are washed out.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 11, 2019, 10:27:32 pm
Good to hear that the screensaver is straightened out. As for the DPMS,probably should open an issue though I doubt much will happen quickly.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 11, 2019, 11:50:52 pm
...Sooo...great news! The upgrade to 2.1 and then 2.2 fixed my issue. All modules show up, they are configurable and work correctly, as best as I can tell anyways. So now the only thing left is to get the DPMS stuff working for both monitors...

OK, probably the last update on this given that the next part is most likely a SNAP device driver issue and as Dave put it, it'll take a long time, if ever actually to get resolved.

So with DSSaver at 2.2 version I activated the Matrix screen saver so that I could somewhat tell whether the PRIMARY monitor was being addressed/instructed to go into a DPMS mode in any way.

Alright, good dosage of snow tonight, got out there to clear the driveway, which took a while...LOL, long enough for the DPMS power-save to kick in.

Here are the results:

1) PRIMARY - Matrix screeensaver halted, meaning, the letters no longer scroll and the last active image is frozen on screen, so it would appear that DSSaver at least recognized that something 'DPMS' was supposed to happen. The monitor itself however did not go out of ACTIVE mode, no STAND BY, no SUSPEND.

2) SECONDARY - working good, screen put into SUSPEND mode
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 12, 2019, 12:02:19 am
Yes, even with non-working DPMS, the screen saver will stop when it is time to put the monitor to sleep.
I can build you a debug SSDPMS.dll which might print something interesting. Is your C:\ writeable?
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 12, 2019, 12:24:48 am
Dave!

Yes, even with non-working DPMS, the screen saver will stop when it is time to put the monitor to sleep.
I can build you a debug SSDPMS.dll which might print something interesting. Is your C:\ writeable?

Oh yeah, you bet...send it my way, or tell me where to pick it up. I'm about to install your latest 2.4 20190914 release...
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 12, 2019, 01:54:16 am
Here, I think your sdpms.dll will be in \os2\apps\dll, might need unlocking before backing up and replacing with this one.
Let the screensaver put your monitor to sleep/turn off and see what is written in c:\sdpms.log.
Don't forget to put your original back once finished testing.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 12, 2019, 03:56:48 am
...Let the screensaver put your monitor to sleep/turn off and see what is written in c:\sdpms.log.
Don't forget to put your original back once finished testing.

Hmm...I tried, but no drive C:\ here...and no log file anywhere else on my machine...is that hard-coded? Any chance we could use %TMP%, or %TEMP%, or anything else like that one?
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 12, 2019, 05:04:53 am
Yes, it's hard coded, which is why I asked you if C:\ was writeable. I don't really feel like updating it to use %TMP% right now but changing the hard coded path is simple so where do you want it to point?
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 12, 2019, 01:57:10 pm
Hey Dave!

Yes, it's hard coded, which is why I asked you if C:\ was writeable. I don't really feel like updating it to use %TMP% right now but changing the hard coded path is simple so where do you want it to point?

Damn...sorry man, I completely missed that. I know I read it, but for some reason it just translated to "is your bootable partition writeable"...yeah, I know...makes no sense, but because my bootable is G:\ I just got used to always converting any mention of C:\ into G:\. Sorry again.

Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 12, 2019, 04:26:41 pm
Here. Non-logging DLL removed
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 12, 2019, 05:34:44 pm
Here.

Hmm...replaced the module, re-booted, re-tested, did not find the LOG file anywhere, not in the root, nor anywhere else.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 12, 2019, 06:26:25 pm
Confirmed . Seems the makefile defines DEBUG_BUILD instead of DEBUG_LOGGING :)
Another try, this one is tested here. BTW, restarting the desktop after replacing should be good enough.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 13, 2019, 02:05:23 am
Confirmed . Seems the makefile defines DEBUG_BUILD instead of DEBUG_LOGGING :)
Another try, this one is tested here. BTW, restarting the desktop after replacing should be good enough.

OK, here is a section of the LOG (right from the start onwards), I had it set to a pretty short interval, so following the initial test the monitors went through a couple more cycles before I replaced with the latest non-debug DLL.

Code: [Select]
[LibMain] : INITIALIZE DLL (start)[LibMain] : INITIALIZE DLL (done)[SSDPMS_Initialize] : SNAP is installed, trying to initialize it.[SSDPMS_Initialize] : SNAP DPMS support initialized successfully.[SSDPMS_Initialize] : Service initialized.[SSDPMS_GetCapabilities] : Calling GA_queryFunctions and DPMSdetect[SSDPMS_GetCapabilities] : Returning supported modes[SSDPMS_GetCapabilities] : Calling GA_queryFunctions and DPMSdetect[SSDPMS_GetCapabilities] : Returning supported modes[SSDPMS_GetCapabilities] : Calling GA_queryFunctions and DPMSdetect[SSDPMS_GetCapabilities] : Returning supported modes[SSDPMS_GetCapabilities] : Calling GA_queryFunctions and DPMSdetect[SSDPMS_GetCapabilities] : Returning supported modes[SSDPMS_SetState] : Shortcut exit.[SSDPMS_GetCapabilities] : Calling GA_queryFunctions and DPMSdetect[SSDPMS_GetCapabilities] : Returning supported modes[SSDPMS_GetCapabilities] : Calling GA_queryFunctions and DPMSdetect[SSDPMS_GetCapabilities] : Returning supported modes[SSDPMS_GetCapabilities] : Calling GA_queryFunctions and DPMSdetect[SSDPMS_GetCapabilities] : Returning supported modes[SSDPMS_SetState] : Query DPMS functions from SNAP[SSDPMS_SetState] : Calling DPMSsetState()[SSDPMS_SetState] : Saving current state, and returning[SSDPMS_GetCapabilities] : Calling GA_queryFunctions and DPMSdetect[SSDPMS_GetCapabilities] : Returning supported modes[SSDPMS_GetCapabilities] : Calling GA_queryFunctions and DPMSdetect[SSDPMS_GetCapabilities] : Returning supported modes[SSDPMS_SetState] : Query DPMS functions from SNAP[SSDPMS_SetState] : Calling DPMSsetState()[SSDPMS_SetState] : Saving current state, and returning...
There are no RCs or DPMS specific modes, so I'm not sure if this Dave gives you anything to narrow things down?

Now, there is something weird I did notice (given that the test timings were really short, like: 1 min of screen saver, than 1 min later do STAND BY and 1 min later do SUSPEND).

So here it is: when STAND BY kicks in the PRIMARY monitor goes blank and does not shut-OFF (which is correct since that is how the STAND BY mode operates), however the screen saver display (module output) is put on the SECONDARY monitor and it of course stops updating.

Following this, when the SUSPEND kicks in at the next stage the opposite actually happens, so the screen saver output is put back on the PRIMARY monitor but the SECONDARY actually goes into a SUSPEND mode.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 13, 2019, 03:05:59 am
Yes, it doesn't really say much besides no obvious errors. Without looking, I'd guess more printf's could be added to get the capabilities etc. Be interesting to know if it works for anyone with a dual head setup. And of course it could be a SNAP shortcoming or the screensaver. I doubt that Doodle gave much thought to dual monitor setups when writing the code. Unluckily the code is quite hard to follow.
One other test you could do is to try using direct VGA access. There's a couple of icons in the screensavers folder, one for enabling direct VGA access and one for using snap. Need to restart the desktop after switching. The direct VGA access probably won't work but it is easy enough to test.
Eventually it might be best to move to the bug tracker where we might get input from more knowledgeable people.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Andi B. on November 13, 2019, 02:32:11 pm
My main system is a dual-monitor setup with ATI X300, SNAP of course. I've a lot of other systems running and tested with Panorama. But I've never seen a system which switches monitor(s) off with the eCS/ArcaOS included Screen Saver.

On my main system with (ATI X300, SNAP) I've extended the old blackout utility to switch of the monitors after a period of inactivity. SNAP couldn't do that with the X300. I extended my blackout version for some other systems too. F.i. for Paul who used an ATI X550 at that time IIRC. SNAP couldn't handle the special registers this cards needed for power off. Probably to new for the SNAP code. And the cards BIOS do not react on the standard VGA commands.

As this is all a minor nuisance I don't expect someone will spend time on it. Neither extending Panorama nor SNAP to handle the cards shortcomings. I can only suggest to use the monitors power button instead. If you've a X300 or X550 you can try my blackout version too (hobbes).

Btw.
Quote
that monitor has a weird EDID coding. It is meant to facilitate the LANDSCAPE to PORTRAIT mode switch, but unfortunately that has always caused the secondary monitor on my OS/2 box to insist on running in in 960x1200 mode, which as you can imagine is absolutely dreadful looking when in LANDSCAPE mode.
IMHO this has nothing to do with landscape/portrait mode. Your monitor is simply faulty. It reports WRONG data. Obviously there is no workaround for your monitor with wrong EDID in any of our display drivers. It seems SNAP relies on the data supplied from the monitor. If the data is wrong SNAP can't guess what the correct data should be and so can't drive it. No clue if SNAP can be forced to a fixed resolution when there is no EDID data (cutting the pins from the D-sub connector) or if it refuses to work completely. Remember at the time SNAP was invented automatic display capability detection was a necessary feature to prevent damaging some of the old tube monitors. So SNAP may rely on correct data or may refuse to work for safety reasons.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 15, 2019, 12:17:33 am
Hi Andi.
My main system is a dual-monitor setup with ATI X300, SNAP of course. I've a lot of other systems running and tested with Panorama. But I've never seen a system which switches monitor(s) off with the eCS/ArcaOS included Screen Saver.

OK, so what I'm seeing maybe not be all that un-common after all.

...On my main system with (ATI X300, SNAP) I've extended the old blackout utility to switch of the monitors after a period of inactivity. SNAP couldn't do that with the X300...If you've a X300 or X550 you can try my blackout version too (hobbes).

Hmm...what's the name, b/c current search for blackout across the entire archive results in NO HITS. I'm guessing 'black103_ab.zip' is the file though? d/l'ing it right now...

Well, for what it's worth, as I wrote earlier, testing this out with SNAP's gactrl.exe and option #7 here (DPMS tests) actually provides a working STAND BY and SUSPEND functionality. it's just that Doodle SSaver does not appear to utilize it correctly???

...Btw.
IMHO this has nothing to do with landscape/portrait mode. Your monitor is simply faulty. It reports WRONG data. Obviously there is no workaround for your monitor with wrong EDID in any of our display drivers.

Ahhh, and here, with all due respect I have to differ. So here is the thing, I've actually re-written the EDID coding on the 245T display, progressively simplifying it right down to literally just the bare definition of basic VESA modes and the panel's native 1920x1200 resolution. The DVI and VGA ports have their own EDID records, so I adjusted the VGA side of course. Still the monitor would insist on coming up with this dreaded screen flip display. I thought I would completely take the EDID out of the equation. This meant I actually picked up an EXTRON EDID 101D & 101V module, which are pre-programmed with vanilla (VESA basically) modes, as well as allowing you to record a good EDID off of a monitor that works so that I could fake the video card & video drivers out.

Results => NOPE, nuthin'....still broken.

Better yet, given that my new DELL is recognized correctly, both on DVI & VGA I actually used the EXTRON module to copy the DELL EDID and drive the SNAP driver with that data...nah, no-go, the Samsung 245T would still come up with the wrong resolution.

Therefore, I attribute this completely to an internal monitor logic fault (in terms of how it actually responds to the video signal). This btw is across multiple 245T panels, I have some 4 of them here and am using them with my Winx based machines very successfully, albeit all connected through DVI.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 16, 2019, 03:51:40 pm
Dave,

...One other test you could do is to try using direct VGA access. There's a couple of icons in the screensavers folder, one for enabling direct VGA access and one for using snap. Need to restart the desktop after switching. The direct VGA access probably won't work but it is easy enough to test...

Yeah, I was thinking of going down this route next, should the SNAP direction not get a result I'm looking for.

So, with the direct VGA access the only option is to actually issue a DPMS OFF call, or at least that's what the DSSAVER tab implies.

I did test this out and BOTH monitors go dark. Now, is that 'dark' an OFF state? Nope, the power LED remains blue and does not go to amber, which is what that gactrl.exe tests show when I test directly. However, there is something different here because if I am in fact running an animated screensaver module upon the VGA access being activated BOTH screens freeze at that instant. This is different from what the SNAP approach does (see my earlier comment on how this works). So this could be getting me a STAND BY mode since the screens respond very quickly once I re-active them.

Anyways, for now I'm just going to stick with the VGA access. I am trying to get the AN folks to release an updated SNAP SDK build, the one I have here is from 10/2006 "Version 3.1 - Release 23", and SDDHELP.SYS build V3.0 - Build 460. Unfortunately any sample SDK code I build refuses to load due to driver load issue. I am playing with their DPMS calls to see if I can write a very simple DPMS mode tester which specifically deals with a multi-head installation.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 16, 2019, 06:11:57 pm
I talked to the AN folks about an updated SDK a while back. They seemed to think there was no need for an update and weren't interested in updating it.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 16, 2019, 06:28:13 pm
I talked to the AN folks about an updated SDK a while back. They seemed to think there was no need for an update and weren't interested in updating it.

LOL...well, the real world results sure indicate a different approach is necessary. I shared below information with Lewis earlier today, I'm hoping they will re-consider.

So in my specific case, I wanted to run the EDIDTEST sample code. Compile is OK, however running it produces the following response: "Unable to load SNAP device driver!".

In particular, it turns out this is being brought on by the following procedure call:

Code: [Select]
static GA_devCtx *LoadDriver(   N_int32 deviceIndex){   GA_devCtx *dc;#ifdef ISV_LICENSE   /* Register ISV license for SNAP DDC API */   DDC_registerLicense(OemLicense);#endif   if ((dc = DDC_loadDriver(deviceIndex)) == NULL)       PM_fatalError(DDC_errorMsg(DDC_status()));   init.dwSize = sizeof(init);   if (!DDC_queryFunctions(dc,GA_GET_INITFUNCS,&init))       PM_fatalError("Unable to get device driver functions!");   return dc;}
Either DDC_loadDriver fails, or DDC_queryFunctions. In either case it is the calling code in MAIN that actually handles the 0 (zero) return code from this procedure and puts out that error message.

I have SNAP build 505. The SNAP SDK I have here is build 460 and attempting to boot with it's SDDHELP.SYS causes a freeze at bootup time (right before the GUI stuff comes up). I expected to see that, but I thought I'd give it a go anyways.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 16, 2019, 08:07:43 pm
Interesting, I've been using the same SDK but didn't look into it much as I'm generally not using SNAP, so was just interested in getting the screensaver to build. It does bring up the possibility that the c:\scitech\lib\release\os232\ow10\pm.lib that I'm linking against is not quite right.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 16, 2019, 08:09:45 pm
Doodle also had this to say, didn't post sooner as I was hoping he'd show up or at least follow up.
Quote
Hi Dave,

I've just noticed that there is a conversation on www.os2world.com about DSSaver and a problem with multiple monitors.
I've seen that you've written that : "I doubt that Doodle gave much thought to dual monitor setups when writing the code."
This is completely true. :) I had a Matrox G400 at that time, and did not have multiple monitors to test the code with.

On the other hand, I got curious, and had a look at the old code (SSDPMS.c) to see if it should (in theory) or should not be able to deal with multiple monitors.

It seems that the code is completely dependent on SNAP and its DPMS support. It initializes the SNAP SDK API, and uses its DPMS functions to do the DPMS mode switching.

There are two clues in the code that may have information on multi-head / dual-monitor setups.
The first one is in the SSDPMS_SetState() function, when it calls into SNAP to set a given DPMS state:

#ifdef DEBUG_LOGGING
#endif

// If all goes well, this should set dpms state on all heads of the
// primary video device.
DPMSFuncs.DPMSsetState(stateToSet);

Please note the remark (highlighted in red). I don't remember all the details, but I believe that the SNAP API documentation said for the DPMSsetState() function that it sets the given DPMS state for all heads of the given graphics card.
On the other hand, looking at the SNAP SDK (into include/snap/ddc.h), the GA_DPMSFuncs structure has the definition of DPMSsetState() function, but it also has DPMSsetStateExt() defined, which might be used to specify the head number to set the DPMS state for. It might worth trying, if that helps or not.

Another clue is in the SNAP_Initialize() function, in which the SSDPMS.c code loads the SNAP driver. It says:

static int SNAP_Initialize()
{
// Load SNAP driver for primary display
// Note that we do not handle the case, when there are
// multiple video cards in the system.
// If that should also be handled, we should load a driver for
// all the cards, and call DPMSsetState() for all the drivers
// in SSDPMS_SetState().

{

As you can see, SSDPMS is NOT PREPARED for multiple graphics cards. However, it should be prepared for having ONE graphics card with multiple heads.

So, in my opinion, it's SNAP which fails to properly set the DPMS state for both of the monitors.
(I fail to remember, but didn't SNAP used to have a tool executable installed that could be used to set DPMS modes from command line? That could be used to test its capabilities...)

Sorry for not answering through os2world.com, but I could not register there (the registration currently seems to be broken in there). Still, I thought it might worth telling my opinion, so I wrote this email. Feel free to forward it / post it as you wish, wherever you want.

Thanks,
Doodle (Peter Kocsis)
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 17, 2019, 02:32:16 am
Dave,

Interesting, I've been using the same SDK but didn't look into it much as I'm generally not using SNAP, so was just interested in getting the screensaver to build. It does bring up the possibility that the c:\scitech\lib\release\os232\ow10\pm.lib that I'm linking against is not quite right.

Hmm...so how is it that your version of DSS successfully managed to load SNAP and yet mine does not?

OK, I have the VA365 versions present here, because I have been primarily working with the IBM compiler in all my previous attempts. Therefore, i find the following in the \snap\lib\release\os232\va36 location:

Code: [Select]
Directory of G:\code\source\snap\lib\release\os232\va36 8-25-18   5:43p     <DIR>         124  . 8-25-18   5:43p     <DIR>         124  .. 3-17-09  10:02p     12354           0  gconsole.lib 3-17-09  10:02p     12277           0  n_ga.lib 3-17-09  10:02p    104231           0  pm.lib10-26-06   4:19p        60         124  readme.txt        6 file(s)     128922 bytes used
...as such, my pm.lib is what should be getting linked when any locally compiled code is attempting to call SNAP APIs, correct?
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 17, 2019, 05:39:29 am
Dave,

Interesting, I've been using the same SDK but didn't look into it much as I'm generally not using SNAP, so was just interested in getting the screensaver to build. It does bring up the possibility that the c:\scitech\lib\release\os232\ow10\pm.lib that I'm linking against is not quite right.

Hmm...so how is it that your version of DSS successfully managed to load SNAP and yet mine does not?

Not quite sure what you mean?

Quote
OK, I have the VA365 versions present here, because I have been primarily working with the IBM compiler in all my previous attempts. Therefore, i find the following in the \snap\lib\release\os232\va36 location:

Code: [Select]
Directory of G:\code\source\snap\lib\release\os232\va36 8-25-18   5:43p     <DIR>         124  . 8-25-18   5:43p     <DIR>         124  .. 3-17-09  10:02p     12354           0  gconsole.lib 3-17-09  10:02p     12277           0  n_ga.lib 3-17-09  10:02p    104231           0  pm.lib10-26-06   4:19p        60         124  readme.txt        6 file(s)     128922 bytes used
...as such, my pm.lib is what should be getting linked when any locally compiled code is attempting to call SNAP APIs, correct?

It should be. I'm using OpenWatcom to compile so I have (after building the libs),
Code: [Select]
Directory of C:\scitech\lib\release\os232\ow10 6-16-19  2:57a         <DIR>    124 a---  . 6-16-19  2:48a         <DIR>    124 a---  .. 6-16-19  3:09a        14,848      0 a---  gconsole.lib 6-16-19  3:09a        14,848      0 a---  n_ga.lib 6-16-19  3:09a       122,880      0 a---  pm.lib10-26-06  1:19p            59    124 a---  readme.txt        6 file(s)     152,635 bytes used
and for lnk,

Code: [Select]
system os2v2_dll INITINSTANCE TERMINSTANCEname SSDPMSfile SSDPMSOPTION MAP=SSDPMSOPTION DESCRIPTION '@#DRY:1.0#@DPMS support for ScreenSaver core'OPTION ELIMINATEOPTION MANYAUTODATAOPTION OSNAME='OS/2 and eComStation'OPTION SHOWDEADLIBPATH %os2tk%\libLIBPATH %scitech_lib%\lib\release\os232\ow10LIB pm.lib
and the screensaver builds and mostly works. Installing AOS with SNAP, DPMS turns the monitor off when set correctly in the screensaver properties though sleep and suspend don't work, which I assumed was due to not having a supported chipset. Now your reports make me question things as your system should support sleep and suspend and doesn't seem to, then there is the dual monitor support also not quite working right.
It would be nice for DPMS to work with Panorama. In theory directly accessing the VGA registers to turn off vsync and hsync (set to 0hz) should turn off the monitor but I haven't had success doing that and wonder if a ring 3 app can even do it. I even installed X and using the VESA driver, tried using setmode to turn off the monitor without luck.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Andi B. on November 17, 2019, 10:38:24 am
Quote
...It would be nice for DPMS to work with Panorama. In theory directly accessing the VGA registers to turn off vsync and hsync (set to 0hz)...
Many years ago when I played with my ATI X300 I didn't find a utility which turned off the output so the monitors goes to standby. IIRC there where more than one which should have done the job via VGA registers but they did not work.

I concluded my cards BIOS does not implement these VGA register calls completely. I was not surprised cause VGA is not DVI. So I searched the datasheet for the X300 and wrote the utility to call the PCI registers of the chip to set the output drivers to power down. This let my monitors go to sleep.

Again, I don't think it's worth to invest much time playing with VGA register settings and new cards. Guess for newer chips it's necessary to program there registers via PCI the same as with my X300. My X300 does not offer these registers via PortIO. TTBOMK VGA is PortIO controlled only (beside video memory access).
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dave Yeo on November 17, 2019, 11:11:17 pm
Yet SNAP mostly works, even with unsupported video cards, at least to turn the monitor off and even directly accessing the cards through the VBE interface, perhaps using PCI commands, it should be possible to manipulate the hsync and vsync to use DPMS.
Title: Re: Monitor DPMS controls : SNAP config?
Post by: Dariusz Piatkowski on November 18, 2019, 05:07:41 am
Dave,

Interesting, I've been using the same SDK but didn't look into it much as I'm generally not using SNAP, so was just interested in getting the screensaver to build. It does bring up the possibility that the c:\scitech\lib\release\os232\ow10\pm.lib that I'm linking against is not quite right.

Hmm...so how is it that your version of DSS successfully managed to load SNAP and yet mine does not?

Not quite sure what you mean?

Well, you are building the test versions of DSS, and I am certainly able to run it here. The outcome I am seeing is that somehow the DSS codebase you have, having been compiled and linked against the SNAP generated libs is then able to successfully call SNAP functions on my current SNAP build 505 install.

In comparison, even though I can successfully compile the sample code (such as the EDIDTEST project, which is incredibly simple code), I am unable to successfully execute. Therefore, why the failure on my machine to load SNAP drivers when executing my sample EDIDTEST code, and yet no failure when running your test versions of DSS?