Author Topic: Monitor DPMS controls : SNAP config?  (Read 1389 times)

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 11
  • -Receive: 149
  • Posts: 2168
    • View Profile
Re: Monitor DPMS controls : SNAP config?
« Reply #30 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.lib
10-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.lib
10-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 TERMINSTANCE
name SSDPMS
file SSDPMS
OPTION MAP=SSDPMS
OPTION DESCRIPTION '@#DRY:1.0#@DPMS support for ScreenSaver core'
OPTION ELIMINATE
OPTION MANYAUTODATA
OPTION OSNAME='OS/2 and eComStation'
OPTION SHOWDEAD
LIBPATH %os2tk%\lib
LIBPATH %scitech_lib%\lib\release\os232\ow10
LIB 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.

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 21
  • Posts: 451
    • View Profile
Re: Monitor DPMS controls : SNAP config?
« Reply #31 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).

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 11
  • -Receive: 149
  • Posts: 2168
    • View Profile
Re: Monitor DPMS controls : SNAP config?
« Reply #32 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.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 13
  • -Receive: 10
  • Posts: 602
    • View Profile
Re: Monitor DPMS controls : SNAP config?
« Reply #33 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?