Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing  (Read 34444 times)

0 Members and 1 Guest are viewing this topic.

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Hi. I've been looking for a tool to automatically change refreshrates on my LCD corresponding the game I start. More like CRU does, but then automated for use with MAME and other emulators. I was unable to find something like that. So I wrote it myself.

I short: you can run 'RatRefresh.exe -file refreshrates.txt -get bublbobl;mame' to switch to the exact refresh rate for that game. Or you can use 'RatRefresh.exe -refresh 59.150' to switch to that refreshrate.

A little backstory
A few years ago I've build me an arcade-cabinet with a LCD screen. We all know that gives issues with refreshrates and tearing. (And I don't want to debate that - I know CRT is better for the true arcade experience). We also know we can use CRU or actually EDID overrides to setup custom refreshrates to solve that. But that's quite cumbersome if you need to switch refreshrates between games. Also until not too long ago you would need specific hardware for that, as only ATI and NVidia seem to support EDID override. But since 2017-ish Intel supports it too. The next step was to automate this, so when I select a game, the resolution automatically switches. For that exact reason I wrote:

RatRefresh
RatRefresh is a simple tool that updates the custom EDID information of the first custom resolution to match a given refreshrate. It's mainly intended to switch your display refreshrate to exactly match the MAME game you will play. It's quite universal, with both manual command line and input from a file with games/refreshrates in it. You could put anything you want in the inputfile with a specific refreshrate, and it can be picked up. So if you want to automate this to run your mediaplayer at 59.94Hz, you can.

Requirements
  • .NET Framework 4.7.1 or higher (already installed on a default Windows 10 setup)
  • Hardware that supports EDID override
  • Windows Vista or higher, but only tested on Windows 10 (XP does not support EDID override)
  • Admin permissions (more on that below)

Usage
  • Unzip the RatRefresh zipfile to a folder on your system
  • Run RatRefresh.exe -setup to have it detect your monitors and show some info. It will then ask you to select the monitor you want to change rereshrate for (some people might have more than one screen attached). This will create the needed edid.txt file, which simply contains the registry path to your monitor.

Basic setup is done now. You can now run RatRefresh as follows:

RatRefresh.exe -refresh 59.150

This will set the refresh rate of the display setup in edid.txt to 59.150. After it does that it will restart the displaydriver, more on that below.

You can supply -min or -max parameters to supply your monitors minimum and maximum supported refreshrates. If you don't supply them, the values provided by EDID are used. However, these are usually very restrictive. Your screen might report rates from 49 to 61 for example while it might be able to do 45 to 65. To find the limits, it'll be trial and error. You could try 'RatRefresh.exe -min 20 -max 100 -refresh 61.000', if that works try 'RatRefresh -min 20 -max 100 -refresh 62.000'. If that fails you'll probably have a black screen., Press up to get your previous command back, press backspace 5 times, and type 1.500 to get the command 'RatRefresh -min 20 -max 100 -refresh 61.500'. Test values until you find your monitors limit. Use those values with -min and -max in your command lines. It's not expected you kill anything, as every monitor has some detection of specs and most will even show an 'out of range' message when you go to high or low.

-norestart will prevent the videodriver to be restarted, but the custom EDID value will still be set.
-showmonitors will show you the detected monitors information
-debug (must be put as first parameter) will show additional information and wait for keypressess before quitting

Automate for MAME
As for now I merely run MAME on my cab, I wanted to automate that. MAME's XML file contains the refreshrates for all machines it supports. However parsing the almost 200MB and growing XML file takes quite a while, even on beefy PC's (using .NET libraries that is). So I wrote a little, not so smart mame.xml parser of my own, which generates a file containing a line for each game with it's refresh rate.

MameXMLParser.exe
MameXMLParser.exe takes a MAME xml file as input and outputs a plain textfile with the following structure:

<rom name>;mame;<refreshrate>

one rom per line. So you'll end up with a file with as many lines as MAME supports individual machines.

Usage:
  • First create a MAME xml file by running 'MAME.exe -listxml > mame.xml'. If you run 64bit MAME it will be 'MAME64.exe -listxml > mame.xml'. If you use any other MAME distribution use it's executable name, I think all support the -listXML option.
  • Find out your displays native default refreshrate. Not all MAME machines have a refreshrate set in MAME.XML, for example mechanicals. When no match is found your screen will still need a certain refreshrate :) Usually this is 60.000 or 75.000 but you can use whatever you want if your monitor supports it.
  • Then run 'MameXMLParser.exe -input mame.xml -output refreshrates.txt -default 60.000'
    This will generate rereshratex.txt with all needed info for MAME.
  • Now you can use RatRefresh with this generated refreshrates.txt file:
    RatRefresh.exe -file refreshrates.txt -get bublbobl;mame
    This will search for the string 'bublbobl;mame' in 'refreshrates.txt' and set the corresponding refreshrate.


You could easily add roms for another emulator to this file with whatever name you want to call it, like
nes;nes;60.000
palgenesis;palgenesis;50.000


And  then from your frontend call a batch file and run RatRefresh.exe -file refreshrates.txt -get nes;nes
or RatRefresh.exe -file refreshrates.txt -get palgenesis;palgenesis and so on.

When used together with a frontend, restarting the displaydriver will most likely crash the frontend, as it simply looses it's drawing port. So what I do is start a batchfile, which kills the frontend, runs RatRefresh, starts MAME and after that restart the frontend again. Attractmode luckily saves the last played game as soon as you select, so when I restart it, it comes back exactly where I left. My batch file content:

run-mame.bat
Code: [Select]
@echo off
taskkill /im attract.exe

pushd "D:\Emulator\RatArcade_\RatRefresh"
RatRefresh -file refreshrates.txt -min 49 -max 62.4 -get %1;mame
IF NOT ERRORLEVEL 1 timeout 3
pushd d:\emulator\mame
mame %1

:: Everything below will run only when Mame has quit.

pushd "D:\Emulator\RatArcade_\AttractMode"
attract.exe




Issues
  • Frontends: huge issue for me personally: When an EDID resolution is added, it's only picked up when the displaybus is reset. This means restarting the displaydriver works, physically switching the display off and on works, and removing the cable and reconnecting it works. For now I can only do the first one, restarting the videodriver.
    The issue with this is though that usually your frontend will crash. This makes sense as it looses its screen completely when running. However when switching the monitor off and on again or pluging the cable, the new refreshrate is picked up too. So I am still looking for a way to simulate that instead of restarting the whole videodriver.
    Any suggestions to solving this are welcome!
  • Admin permissions required. As the EDID value is stored in HKLM registry, you will need admin rights to modify them. This could be prevented by granting users write permissions to the EDID_OVERRIDE key. However, after that restarting the display driver requires admin permissions as well.
  • I haven't done any testing at all on x86 machines, as I simply don't have x86 running anymore. Feel free to report!

Version history
v0.1
- initial release


v0.11 download (note it's usage is quite different from newer versions, please switch to newer version if you can)
- fixed: bug in calculating horizonatal blanking pixels - thanks to xxDaViDxx for reporting!
- Also switched back from using CRU's Restart64.exe to devcon64.exe, to be less dependant of CRU.

v0.12 download
- Build to .NET 4.7.2 target
- Added automatic refreshrate multipliers and deviders. If a game runs at 30Hz which your monitor can't display, it tries if *2, *3 or *4 is in range of your monitor. So in this case 60Hz would be chosen which still should leave you without tearing.
- Same the other way around, if a game runs at 120Hz, which your monitor doesn't support, it will be set to 60Hz.
- Removed devcon64.exe dependency.
- Added setup mode, no manual fiddling around with CRU anymore.
- Added showdisplays command
- Added API and WMI calls, and better interpretation of EDID values to get reported min and max frequencies for example.
- Removed the -edidfile parameter. Tool will use the edid.txt file in the same directory as the tool.
- Added elevated permissions check

v0.13 download
- Moved back to devcon again, as pnputil seems to have different version in different Windows releases. Not all support the restart-device switch.

v0.14 download
- Added -remove parameter to delete the EDID_OVERRIDE key

I this tool is useful for you, or you have questions or bugreports, feel free to respond. If you test it, please respond if it works for you. If something like this already exists and I am making a fuss out of nothing feel free to respond as well :) Happy gaming!  :cheers:
« Last Edit: September 17, 2022, 05:27:48 am by Rataplan626 »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: RatRefresh - play your games on their native refresh rate on LCD
« Reply #1 on: January 10, 2017, 10:16:15 am »
reserved

buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1597
  • Last login:Today at 07:41:04 am
  • Is running at 15kHz
Re: RatRefresh - Automated EDID updater for MAME and others
« Reply #2 on: January 11, 2017, 06:48:14 am »
Wow, that's amazing. It's going to take me a while to think of everything i can do with this, but I can think of a few emulator uses already. Thank you!

xxDaViDxx

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:February 21, 2021, 02:07:49 pm
  • I want to build my own arcade controls!
First of all, thanks for the utility. I have something similar but with a batch file and reg files. I also use devcon.exe instead of restart64.exe

  devcon.exe disable =display
  timeout /t 1 /nobreak >nul
  devcon.exe enable =display

You could give devcon a try, maybe it solves your problem with your frontend.

Also, I am experiencing some problems with my display and your tool. It seems that the hex introduced in the EDID is not the proper one, since it doesn't set the desired refresh rate. I have recorded a video showing the problem: https://www.screencast.com/t/BZdQGVAIRYG

Thanks again and regards,
David


Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
First of all, thanks for the utility. I have something similar but with a batch file and reg files. I also use devcon.exe instead of restart64.exe

  devcon.exe disable =display
  timeout /t 1 /nobreak >nul
  devcon.exe enable =display

You could give devcon a try, maybe it solves your problem with your frontend.

Also, I am experiencing some problems with my display and your tool. It seems that the hex introduced in the EDID is not the proper one, since it doesn't set the desired refresh rate. I have recorded a video showing the problem: https://www.screencast.com/t/BZdQGVAIRYG

Thanks again and regards,
David

Hi,
thanks for testing and reporting. And sorry for not replying erlier, it seems I don't get any notifications from this forum even if I have switched that on for specific threads. Will look into that.

About your issue, what I see is that the calculation / translation of the horizontal blanking pixels is wrong. The tool replies 4120 banking pixels, resulting is a (pseudo) resolution of 6040 x 1125. I think I know where that comes from, but if you can you can paste the edid value generated by CRU at 1920x1080 @ 60Hz with a pixelclock of 148.50, as you initially do in your screenshot, so I can verify that and make a fix.

About devcon, I have actually used that initially, but in the end that does the same. It disables the videodriver completely which I guess makes DirectX or GDI lose its marbels which makes sense. I just tried Restart64.exe hoping it might be 'smarter', but functionally that's exactly the same as devcon does. As it didn't make a difference I kept Restart64 in until I have a definitive fix. I've had a lot of reading about this. When I disconnect the DVI cable (or the monitors power cable, not just use its power button) the link re-initiates. The frontend then keeps running. That turns out to be a videodriver affair though, and not something in Windows functionality. That would mean that even if I was able to call the specific method from the videodriver, that could break with every videodriver update and also it would be specific to at least each videocard manufacturer, maybe even between models.

So for my own setup I am currently taking it a bit further. I ordered a DVI connector breakout box. When that is in I will just connect it completely through except pin 16 (out of my head) which I believe could make the system believe the cable is actually disconnected. If not I'll have to findout which wires do. I will then connect them through a USB controller relay, allowing me do 'disconnect and reconnect the DVI cable' progammatically. It's a bit of a hassle, but when I do that manually at least everything keeps running, and also it is a LOT faster to switch to the correct resolution as with disabling en enabling the driver again.
But I would love to be proven that there is a generic method to trigger this without hardware mods! Thank you so much for thinking with me.

Also I like your scripting style - it's how I would do it :) Use a command (net.exe in this example) to find out if you have admin permissions :) I like that creative scripting. :applaud:

matsadona

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 760
  • Last login:February 03, 2022, 12:14:31 pm
This is indeed interesting. I need to read more carefully when I'm back home.
Building, collecting and playing arcade machines :)

xxDaViDxx

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:February 21, 2021, 02:07:49 pm
  • I want to build my own arcade controls!
Hi Rataplan626, thanks for look at this.

I paste the requested value:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4073\4&1de3fe18&0&UID200195\Device Parameters\EDID_OVERRIDE]
"0"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,73,40,00,00,00,00,09,16,01,04,a5,33,1d,\
  78,3a,6e,a5,a3,54,4f,9f,26,11,50,54,25,4b,00,71,4f,81,80,d1,c0,01,01,01,01,\
  01,01,01,01,01,01,02,3a,80,18,71,38,2d,40,58,2c,45,00,e0,0e,11,00,00,1e,00,\
  00,00,fc,00,44,45,4c,4c,20,55,32,33,31,32,48,4d,0a,00,00,00,10,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,01,43
"CRU_Name"=hex:01,44,45,4c,4c,20,55,32,33,31,32,48,4d
"CRU_Serial_Number"=hex:00,35,39,44,4a,50,32,32,53,42,44,30,4c
"CRU_Range_Limits"=hex:00,00,38,00,4c,00,1e,00,53,00,aa
"1"=hex:02,03,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,fb

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Hi Rataplan626, thanks for look at this.

I paste the requested value:

<registry>

Try version 0.11 from https://goo.gl/TY1irh. The error was in the calculation of the horizontal blanking pixels. One specific byte of the EDID contains values for both the horizontal blanking pixels and the actual horizontal resolution. Bits 7Ė4   are the 4 most significant bits of the horizontal active pixels, bits 3Ė0 are the 4 most significant bits for the horizontal blanking pixels. I just copied the code for the active pixels to the blanking pixels calculation but that's not correct; as for the active resolution I have to mask bit 3-0 and then reverse the value. But for the blanking I have to mask 7-4 and NOT reverse. I reversed them which is wrong. In my case though, both systems I've tested on had 00 in that whole byte so it didn't trigger the bug there :)

Also I've switched back to devconx64 now, which I have included. That might be just a bit more 'clean' than relying on CRU. Please let me know if this works for you now.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:April 24, 2022, 02:38:27 pm
  • 0x2b|~0x2b?
Just some ideas on improving the automation process a bit to save your users playing around with the registry.

I found this post on how to retrieve the EDID data for a monitor.

Also you could use System.IO.Process to launch the MAME exe with the -listxml parameter and redirect its output to capture it. Then you can just have a textbox and button for the user to browse to the MAME exe's path.
« Last Edit: February 02, 2017, 07:02:12 am by headkaze »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Just some ideas on improving the automation process a bit to save your users playing around with the registry.

I found this post on how to retrieve the EDID data for a monitor.

Also you could use System.IO.Process to launch the MAME exe with the -listxml parameter and redirect its output to capture it. Then you can just have a textbox and button for the user to browse to the MAME exe's path.

I will look into that at some point. So far I've had 4 (count 'em  ;)) downloads, so the interest is a bit less than I had anticipated honestly. Still for the people that do use it, I'd like to give them the best possible experience. About the GUI thing, you are talking about the MameXMLParser.exe here? I could sure do a GUI there (although personally I like the commandline stuff more). Finding out where the EDID data is is indeed not too hard, until more than one screen is attached. What's the screen your emulator will run on / refreshrate needs to be changed for? That's hard to tell. Still, if people want that I'll get it in.
For me the main issue now is getting the new resolution / refreshrate picked up without restarting the videodriver as that breaks at least everything DirectX has open.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:April 24, 2022, 02:38:27 pm
  • 0x2b|~0x2b?
For me the main issue now is getting the new resolution / refreshrate picked up without restarting the videodriver as that breaks at least everything DirectX has open.

If you add a custom resolution with the new refresh rate via the Intel Graphics Control Panel can you change the resolution without restarting the driver?


xxDaViDxx

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:February 21, 2021, 02:07:49 pm
  • I want to build my own arcade controls!
Thanks Rataplan626, 0.11 works like a charm! You have saved me to buy a G-Sync monitor for my arcade cabinet.

Don't get disappointed about the little welcome the app has had. There are several people asking for a command line CRU, and as they start googling about that, they will reach this post in the same way I did.

With a feature to get the displays ( something like the -listmonitors of http://12noon.com/?page_id=80 ) just to be able to pass the name or id substring as a parameter instead of going through CRU and then regedit, it would be great.
Also, if the new refresh rate is the same than the defined one, don't make the driver refresh.

Thanks once more time.
« Last Edit: February 03, 2017, 09:42:40 am by xxDaViDxx »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Quote
Also, if the new refresh rate is the same than the defined one, don't make the driver refresh.

That's already how it should work. If the wanted refresh rate is the same as the actual, it just quits. If not, please report :) Also I will definitely look into making it easier to use, by implementing  some way to easily detect your monitor / display. Thanks for the suggestion.

Sidenote: If you are into a even better, more lag-free experience, update to mame 0.182. It now has a portaudio driver which brings down the audio latency even more. Enable it in your mame.ini with
sound                     portaudio
audio_latency             1

« Last Edit: February 06, 2017, 02:55:33 am by Rataplan626 »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Quote
If you add a custom resolution with the new refresh rate via the Intel Graphics Control Panel can you change the resolution without restarting the driver?

Hi headkaze, thanks for thinking along! Yes, both Intels own custom resolution creator and NVidia's make the new resolutions available without a reboot. On both the screen goes blank for a few seconds though, so somehow they trigger a 'resync' or restart or something like that as well I guess. They do not restart the whole display driver though. However, I have tried to find out, using process monitor, if they call a specific api or function or something, but I was unable to find that. Unfortunately I'm not enough of a reverse-engineer for this. If anyone has the ability to find that out, or point me to the tools to find that out, it would be of great help! I am a bit afraid though that this is vendor-specific and built into the driver, rather than it's a Windows function. That would mean I'd have to implement it for each individual videocard-brand / driver branch (which aren't too many anymore) but also that it can potentially break with each driver release. Also I think if it was 'that easy' CRU wouldn't need a reboot / driver restart either :)

This weekend I build a DVI extension cable, by cutting a DVI cable in two, and connecting the wires to the corresponing terminators on a DVI breakout connector. I can't get an image though, not even on the lowest possible resolution. That means either I've done something wrong, or the interference of the 4-5 centimeters without shielding is already too much. Bummer, as I wanted to fix this issue mechanically in my cab until I have a better solution.
« Last Edit: February 06, 2017, 07:58:40 am by Rataplan626 »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:April 24, 2022, 02:38:27 pm
  • 0x2b|~0x2b?
My guess is the Intel Graphics Control Panel adds the resolution to the registry and then it becomes available to the usual Win32 API's that enumerate available screen resolutions. ie. EnumDisplaySettings to get the available resolutions and ChangeDisplaySettings to set the resolution/refresh rate.

It's not vendor specific because I recently released an updated Resolution Changer utility and as soon as you add a custom resolution in Intel Graphics Control Panel it becomes available to the utility to set the new resolution.

So if you find out what keys it writes to (using Process Monitor should do it) then my guess is you could change the refresh rate without restarting the driver.
« Last Edit: February 07, 2017, 07:57:31 am by headkaze »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19388
  • Last login:Yesterday at 09:36:37 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
What he said.  Resolution stuff has been intrinsically linked with the registry, for whatever reason, since win 9x days.  Like the serial port it will never die.  ;)

Lots of utilities like powerstrip just edit the registry. 

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
I know it's all stored in registry. I've looked quite a bit into this stuff, and I believe its not THAT easy  :)
At first, I think there is a difference between custom resolutions saved by at least Intel vs a regular EDID override. EDID overrides go into HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4073\4&1de3fe18&0&UID200195\Device Parameters\EDID_OVERRIDE\0, of course substituted to your own hardware GUIDs. The (buggy) Custom Resolutions panel that's in the Intel driver panel, writes values to another place. That writes to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\{02DB5D2E-E25D-4F8D-98FC-B83D51AFABBA}\0000\C_MODES_DFP_fb. That's been in there for ages, but that's NOT a 'proper' EDID override. Now I don't care where the registry goes as long as I can introduce my custom refresh rates. The proper universal EDID override support though is what Intel is including in their drivers right now, after years and years of lobbying.

Now I don't care where I have to write for this to work, so I've tested with the Intel panel as well. When I save the registry of a custom resolution added by Intel, then remove that resolution through the Intel panel, and then import the registry again, that resolution does NOT come available until I manually restart the videodriver. Also when just adding the registry, the Intel control panel does not show that custom resolution, again until I restart the driver. Even when I change resolution to for example 800x600 or another default available resolution, after that switch the custom resolution still isn't available.

When I add a custom resolution through Intel's panel or Nvidia's panel, when I click OK the screen goes blank for a few seconds. That makes me think they both restart or resync some stuff from within the driver, rather than restarting the whole driver. But anyway AFTER that screen blanking the resolution IS available. But the crux is that we do not want to use the vendors control panel :)


My guess is the Intel Graphics Control Panel adds the resolution to the registry and then it becomes available to the usual Win32 API's that enumerate available screen resolutions. ie. EnumDisplaySettings to get the available resolutions and ChangeDisplaySettings to set the resolution/refresh rate.

It's not vendor specific because I recently released an updated Resolution Changer utility and as soon as you add a custom resolution in Intel Graphics Control Panel it becomes available to the utility to set the new resolution.

So if you find out what keys it writes to (using Process Monitor should do it) then my guess is you could change the refresh rate without restarting the driver.

True, when I use the Intel control panel to add a resolution I have no issues switching to that either. But I invite you to test your tool by only changing the registry and then see if your tool picks it up. If yes, then we are onto something cool :)

I've tried several tools to capture API calls to see what happens even beyond procmon but so far I've not been able to get that.


Like the serial port it will never die.  ;)

Hehe indeed. I've bought a few new Brocade fibrechannel switches last year for my company, and I still need my good 'ol laptop or a USB-Serial converter in order to set them up :)
« Last Edit: February 08, 2017, 05:56:00 am by Rataplan626 »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:April 24, 2022, 02:38:27 pm
  • 0x2b|~0x2b?
Check out this post. Apparently you can set any resolution using ChangeDisplaySettingsEx.

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Check out this post. Apparently you can set any resolution using ChangeDisplaySettingsEx.

I know, but again, only resolutions known to the system. I am currently looking into http://stackoverflow.com/questions/26169268/disconnect-and-reconnect-displays-programmatically which seems to be more what I need. With a fellow who actually is a programmer (I'm certainly not) I've looked into hooking API's yesterday, but we were unable to fetch something interesting except of hundreds of EnumDisplayDevices calls.

Still working on it :)

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:April 24, 2022, 02:38:27 pm
  • 0x2b|~0x2b?
I think you should look at this post again. You can set a custom resolution using ChangeDisplaySettingsEx. Try it with CDS_ENABLE_UNSAFE_MODES, CDS_UPDATEREGISTRY and perhaps CDS_GLOBAL.

BTW Before I found this Win32 API function I had a look at the source for Intel HD Graphics Control Panel (it's written in .NET 4.0) in .NET Reflector. It basically calls a method in igfxDHLib.dll called set_AddCustomMode. So I basically extracted the code necessary to add a custom mode, added a reference to igfxDHLib.dll and created a little command line tool for adding a resolution. It works :)

But... I really think ChangeDisplaySettingsEx will do what you want. So if you give it a try and you can't get any joy I will post my "IntelAddCustomMode" tool. Additionally if it works then you wont need to find another solution for nVidia and ATI cards.

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
You clearly took it a bit further already than I did :) I hadn't though about decompiling the intel software. Nor have I even done such thing before. But you only know what you can achieve after you've tried :)
I have a little spare time today, I will try to work with ChangeDisplaySettingsEx. Thanks so far headkase! I might call on your expertise again.

However now I think of it, I wonder if that's what I had in mind. It might achieve the same goal, but I think using this method doesn't use EDID at all. I'll see if I can get it to work :)
« Last Edit: February 09, 2017, 08:12:49 am by Rataplan626 »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
I've had a look, and while I don't have a working test yet, I still have my thoughts. ChangeDisplaySettingsEx can indeed be used to set a specific resolution and sort of a specific refresh rate. However, in the DEVMODE structure which holds the display settings, the refreshrate is defined in Hertz, and as a word or dword (integer or long in my VB.net case) making it impossible to set something like 59.150 Hertz.
However, when you create a custom resolution with a decimal refresh rate in the Intel panel, it becomes available as the nearest rounded number in terms of Hertz. When I create a custom resolution of 59.150Hz, I can switch to that with whatever resolution switching method by switching to 59Hz. (Check it - when you do so, even in the Windows resolution switcher a new refresh rate of 59Hz is available which is in fact the 59.150 Hz one just created). So despite the fact I'll  have to fiddle out what format they use in those registry values (they sure have a different format than the EDID I am using so far) I am quite afraid that that is not enough. As I've tested before, just having the registry there is not enough at least for all resolution switchers I've tested so far to be able to switch to that resolution, until the videodriver is restarted.

Headkaze, with your extracted Intel dll utility, when you add a resolution, does it 'reset' the screen for a moment - ie. does it go blank for a little?

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:April 24, 2022, 02:38:27 pm
  • 0x2b|~0x2b?
Headkaze, with your extracted Intel dll utility, when you add a resolution, does it 'reset' the screen for a moment - ie. does it go blank for a little?

Yes it does. Right now though I have only implemented "Basic Mode" which will only accept an integer for refresh rate (dwRR) just like the Intel Control Panel.

Code: [Select]
    [StructLayout(LayoutKind.Sequential, Pack=4)]
    public struct _CUI_BASIC_MODE
    {
        public uint dwColor;
        public int bScanType;
        public uint dwRR;
        public uint dwHActive;
        public uint dwVActive;
        public uint dwTimingAlgo;
        public uint dwUnderscan;
        public uint dwHEffective;
        public uint dwVEffective;
        public int bIsValid;
    }

Advanced mode on the other hand does accept a "double" value for dwVScanRate. If you want me to implement the Advanced Mode then I need to know how it automatically calculates the following values; "Pixel Clock" (dwPixelClock), "Horizontal Scan Rate" (dwHScanRate), "Horizontal Total" (dwHTotal) and "Vertical Total" (dwVTotal).

Code: [Select]
    [StructLayout(LayoutKind.Sequential, Pack=8)]
    public struct _CUI_ADV_MODE
    {
        public uint dwColor;
        public int bScanType;
        public uint dwHActive;
        public uint dwHFrontPorch;
        public uint dwHBackPorch;
        public uint dwHSyncWidth;
        public int bHSyncPolarity;
        public double dwHScanRate;
        public uint dwVActive;
        public uint dwVFrontPorch;
        public uint dwVBackPorch;
        public uint dwVSyncWidth;
        public int bVSyncPolarity;
        public double dwVScanRate;
        public uint dwHTotal;
        public uint dwVTotal;
        public double dwPixelClock;
        public int bIsValid;
    }
« Last Edit: February 09, 2017, 02:33:43 pm by headkaze »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
I was just looking into the advanced mode. In the Intel panel I cannot supply a decimal in the scan-rate field. So with that I still can't do 59.150 for example, but that doesn't mean the function inside the Intel dll doesn't support it since it accepts a double.

Horizontal total = front porch + back porch + sync width + active
Same for vertical, just add the values up for the total vertical
pixelclock is horizontal total * vertical total * refresh rate / 1000000 (as it's handled in MHz)
horizontal scanrate = vertical total * refresh rate

I'm now checking what format is used to store the custom resolutions from the Intel panel, and wheter that can be used on other brand cards as well.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:April 24, 2022, 02:38:27 pm
  • 0x2b|~0x2b?
Okay I added an "Advanced Mode" to my utility which uses those calculations. I parse "vscanrate" as a double and pass it to set_AddCustomMode without modification. Sorry but I have not tested "Advanced Mode" yet. Also you need to have Intel HD Graphics Control Panel installed for this to work as I do not include igfxDHLib.dll or any other library this app may depend on.

Code: [Select]
IntelAddCustomMode v1.1 - by headkaze

USAGE: IntelAddCustomMode.exe mode=basic|adv|list|remove [options]

General Options:

verbose=true                            Verbose Output

Basic Options:

width=n                                 Width
height=n                                Height
refreshrate=n                           Refresh Rate
interlaced=true|false                   Interlaced Mode
underscan=n                             Underscan Percentage
timing=gtf|cvt|cvtrb|cea861             Timing standard

Example: IntelAddCustomMode mode=basic width=800 height=600 refreshrate=60

Advanced Options:

interlaced=true|false                   Interlaced Mode
hactive=n                               Active (Horizontal)
hfrontporch=n                           Front Porch (Horizontal)
hbackporch=n                            Back Porch (Horizontal)
hsyncwidth=n                            Sync Width (Horizontal)
hsyncpolarity=+|-                       Sync Polarity (Horizontal)
vactive=n                               Active (Vertical)
vfrontporch=n                           Front Porch (Vertical)
vbackporch=n                            Back Porch (Vertical)
vsyncwidth=n                            Sync Width (Vertical)
vsyncpolarity=+|-                       Sync Polarity (Vertical)
vscanrate=n                             Scan Rate (Vertical) in Hz

Remove Options:

index=n                                 Index of the Mode to Remove (from mode=list)

Download IntelAddCustomMode.zip
« Last Edit: March 01, 2017, 06:35:09 am by headkaze »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Thank you very much for the effort and insight! I'll take a look at it as soon as I have spare time again. If this works for Intel, this could easily be used as an alternative for my own tool. And you wrote it in a fraction of the time :D but in the for me most important thing is people can have a tearingless experience on their lcd-cab.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19388
  • Last login:Yesterday at 09:36:37 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
I can confirm that it works.  The changedisplaysettingsex api is what I used a few years ago to help rotate the taito type x games.  It is a bit fiddly though... what works for one video card may not work for another.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:April 24, 2022, 02:38:27 pm
  • 0x2b|~0x2b?
If this works for Intel, this could easily be used as an alternative for my own tool.

You will still need to read the MAME xml and then add the appropriate resolution/refresh rate by calling my tool. We still don't know if it will set a valid floating point refresh rate so it might turn out to be useless.

Finally we still need ways for adding resolutions for nVidia and AMD. Well according to this article AMD may be as simple as setting a registry key. That leaves nVidia.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19388
  • Last login:Yesterday at 09:36:37 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
I've been using AMD/ATI cards for years and for every one I've had at least, I can confirm that registry hacks are generally all you need to add resolutions.  Of course my newest card is now a couple of years old, so YMMV. 

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Howard, did that include floating point refreshrates? Looking at the article it looks like its all just x-y resolutions rather than floaing point refreshrates as well.
I've had no time at all this week to work on my own idea. Still have some ideas if that doesn't work out.

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Okay I added an "Advanced Mode" to my utility which uses those calculations. I parse "vscanrate" as a double and pass it to set_AddCustomMode without modification. Sorry but I have not tested "Advanced Mode" yet. Also you need to have Intel HD Graphics Control Panel installed for this to work as I do not include igfxDHLib.dll or any other library this app may depend on.

Code: [Select]
IntelAddCustomMode v1.0 - by headkaze

USAGE: IntelAddCustomMode.exe mode=<basic|adv|list|remove> [options]

Basic Options:

[width=n]                               Width
[height=n]                              Height
[refreshrate=n]                         Refresh Rate
[interlaced=true|false]                 Interlaced Mode
[underscan=n]                           Underscan Percentage
[timing=gtf|cvt|cvtrb|cea861]           Timing standard

Example: IntelAddCustomMode mode=basic width=800 height=600 refreshrate=60

Advanced Options:

[interlaced=true|false]                 Interlaced Mode
[hactive=n]                             Active (Horizontal)
[hfrontporch=n]                         Front Porch (Horizontal)
[hbackporch=n]                          Back Porch (Horizontal)
[hsyncwidth=n]                          Sync Width (Horizontal)
[hsyncpolarity=+|-]                     Sync Polarity (Horizontal)
[vactive=n]                             Active (Vertical)
[vfrontporch=n]                         Front Porch (Vertical)
[vbackporch=n]                          Back Porch (Vertical)
[vsyncwidth=n]                          Sync Width (Vertical)
[vsyncpolarity=+|-]                     Sync Polarity (Vertical)
[vscanrate=n]                           Scan Rate (Vertical) in Hz

Remove Options:

[index=n]                               Index of the Mode to Remove (from mode=list)

Download IntelAddCustomMode.zip

I've finally had time to test it. In basic mode it works - it adds a resolution 'intel-wise'. In advanced mode it doesn't work for me though:

C:\Users\Rataplan_\Desktop\IntelAddCustomMode\IntelAddCustomMode>IntelAddCustomMode.exe mode=adv hactive=1920 hfrontporch=48 hbackporch=80 hsynchwidth=32 hsyncpolarity=+ vactive=1200 vfrontporch=3 vbackporch=26 vsyncwidth=6 vscanrate=59.150
Setting DELL U2412M (256) to 2048 x 1235 59150 Hz. Success


It doesn't end up in the custom resolutions though, as it does in basic mode. Also when I supply an integer-like refreshrate like 59 it doesn't seem to add it.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19388
  • Last login:Yesterday at 09:36:37 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Howard, did that include floating point refreshrates? Looking at the article it looks like its all just x-y resolutions rather than floaing point refreshrates as well.
I've had no time at all this week to work on my own idea. Still have some ideas if that doesn't work out.

I'm not 100% sure.  I only used it for nonstandard (vertical) resolutions and didn't really mess with the refresh rate.  I know that powerstrip handled custom resolutions with most of my cards very well so perhaps you could look and see if it has source code available?

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:April 24, 2022, 02:38:27 pm
  • 0x2b|~0x2b?
C:\Users\Rataplan_\Desktop\IntelAddCustomMode\IntelAddCustomMode>IntelAddCustomMode.exe mode=adv hactive=1920 hfrontporch=48 hbackporch=80 hsynchwidth=32 hsyncpolarity=+ vactive=1200 vfrontporch=3 vbackporch=26 vsyncwidth=6 vscanrate=59.150

First of all it should be "hsyncwidth" but I still noticed a discrepancy with the calculations I'm using based on your algorithm.

I'm using:
Code: [Select]
hTotal = hFrontPorch + hBackPorch + hSyncWidth + hActive;
vTotal = vFrontPorch + vBackPorch + vSyncWidth + vActive;
hScanRate = vTotal * vScanRate;
pixelClock = hTotal * vTotal * vScanRate / 1000000.0;

The values I'm getting are:
Code: [Select]
hTotal: 2080 vTotal: 1235 hScanRate: 73050.25 pixelClock: 151.94452
But entering these values into the Intel HD Graphics Control Panel I get: hTotal: 2080 vTotal: 1258  hScanRate: 74.222 pixelClock: 154.38176

So obviously there is some miscalculation here.
« Last Edit: March 01, 2017, 04:40:24 am by headkaze »

djrobx

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:April 08, 2017, 02:26:48 am
  • I want to build my own arcade controls!
Interesting tool!

Since you've brought up the Intel driver, I wanted to point out something that I have observed setting up a new cab over the last week or so.   I've been using a collection of my favorite emulators for years with VSYNC without any issues.   But on this machine, it seemed like I was having trouble with every emulator I tried.   Whenever I used vsync I'd get distorted audio.   If I enabled autoframeskipping the result was super choppy performance.   Testing my CPU showed utilization was sub-10% and it's a relatively new machine so that shouldn't be a problem.   After scratching my head I stumbled across this:

http://forum.arcadecontrols.com/index.php?topic=135230.0

FreqTool - A tool that checks the actual refresh rate.  I ran it on my system and discovered that "60hz" was more like 59.4hz.  Then the light bulb went off in my head.

Most emulators support auto-frameskipping in conjunction with Vsync.   However, if your actual refresh rate is *SLOWER* than the sound card rate, you will get into a very rough loop frequent frame skips as the next frame is likely going to have to be skipped since the machine is always "behind" where it should be by the next video frame.  And if you disallow frameskips, your audio buffer will be starved for sure.    So I set a custom resolution of 61hz, and everything started working better.    That tested at "60.7" which is still too fast, but the result is FAR more pleasant - sound no longer stutters, and there are some very infrequent, barely perceptible video skips.

My built in Realtek tested at very close to the expected 48khz rate.   It's the Intel video that's way off.    I will try using your tool to see if I can dial in a rate that's closer to actual 60hz.

Moral-TL;DR: Err on the side of a faster refresh rate.   If it's picking up refresh rates from a XML file it might even be a good idea to be able to specify an offset.

As for your registry settings, have you checked to see if you need to broadcast a message to get Windows to pick up your settings?  I recall doing something similar with joystick calibration values, and needing to send WM_SETTINGCHANGE to get the system to pick it up.

https://msdn.microsoft.com/en-us/library/windows/desktop/ms725497(v=vs.85).aspx

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1940
  • Last login:Yesterday at 02:36:38 pm
    • jakobud.com
Any thoughts on putting this on Github?
Jakobud 
Arcade Cabinet Plans and Dimensions http://jakobud.com

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Hi, I've been very busy lately, we are about to remodel the house and add a few meters as well. So we are busy with constructors and the like. Also it's carnaval here  :cheers:

In the next few days I'll try to work on the tool again. Currently I've implemented a way allowing you to select a monitor and it'll read the edid and modify it, whichs means you don't need the edid file and registry. I'm not too fond of it though, so I'll redo that I suppose :)

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:April 24, 2022, 02:38:27 pm
  • 0x2b|~0x2b?
Rataplan626: I got advanced mode working in IntelAddCustomMode. I don't think it's adding the decimal part of the refresh rate but give it a try anyway and let me know your results.

You can cut/paste this command line:
Code: [Select]
IntelAddCustomMode.exe mode=adv verbose=true hactive=1920 hfrontporch=48 hbackporch=80 hsyncwidth=32 vactive=1200 vfrontporch=3 vbackporch=26 vsyncwidth=6 vscanrate=59.150
« Last Edit: March 01, 2017, 06:38:10 am by headkaze »

tspeirs

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 129
  • Last login:July 23, 2020, 07:44:52 am
  • I want to build my own arcade controls!
Thanks for this. I've been taking a look and can confirm it works perfectly as intended.

I was able to get games to launch at the correct refresh with GameEx and MAME for every game I tried.

Unfortunately GameEx will not reinitialize the direct3d device after return from a game. It produces an out of memory exception. It does not like the device being enabled/disabled and I was unable to work around this.

Still, very nice work and again I can confirm it does work for me.

A couple of thoughts on other options rather than resetting the video.
1. Try putting the monitor into powersave mode.
2. Try resetting the actual specific device rather than the whole video system.
« Last Edit: March 13, 2017, 12:41:48 pm by tspeirs »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
@tspeirs; thanks for the reply, glad to hear it works. I am currently working on the tool again, I've had a couple of really rough weeks and haven't had any free time at all. I'm still working to get it to read the new edid values without restarting the driver, and I am implementing a better way to select the wanted display from commandline, rather than supplying that EDID file (which will always be optional, as one might just have some different edid, who knows).

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
Hi Rataplan626,

I've been extensively searching through the web for something similar to what you seem to have achieved  ;)

... and to be honest, the main reason for me to join this forum was to be able to speak with you  :)

Since I cannot (maybe because I'm new) leave you a pm, I'll ask you something right here:

- first of all, is it safe to run a 'custom' non standard refresh rate on a general LCD monitor ?
... as far as I know, on digital hw, worse case scenario is the monitor not picking up the correct synch ... but I could be wrong  :-\

- second, what is the granularity/stability achievable when dealing with refresh rates ?
... I mean, if my hw says it can go from 30Hz to 60Hz what are the chances I can go 59.59hz stable, for example ?

- third: how much all the above is hw dependant ?
In other words, is it possible a specific monitor/brand won't allow me to play around at all ?

Cheers  :)

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Metalhammer, I think it's fairly safe to 'underclock' your LCD. Most LCD's I know are 60 or 75Hz native, and pretty much all arcades are just over 60 but mostly range from 55-60Hz in my experience. As long as the LCD syncs to it it's safe as far as I can tell. Setting it to a higher rate than it was designed for would theoretically strain the display a bit more, but all my monitors just give a 'input out of range' message as soon as I yank it up too much.
The 'stability' question I'm not sure about what you mean. If you set a refreshrate to 59.59, your videocard will send 59.59 frames a second, not more, not less. These devices all have very accurate frequency generators and I have so far not seen any issues. When I set my display to an 'odd' resolution, it just stays there and works.
Hardware dependent is not as much of the issue as software is. You will need a driver that supports EDID override. Now NVidia and AMD already do, Intel does and is currently implementing that on multiple driver branches. So the chances are yours already supports it, if mot the beta driver might work out. On my system I still run the beta driver although I believe by now the final version with EDID support is out.

Another part is the monitor itself. My screen work from about 49 - 64Hz from the top of my head, others might do more or less. But practically all games I play work with something between 55-61Hz.

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
Hi Rataplan,

I agree my question about stability was not so clear  ;)
I mainly meant if you can keep you screen at a custom resolution for some time without keeping handy an extinguisher  :P

On the cabinet I'll have a Fujitsu Scenicview B19-5 with a n NV Gtx 1050 while at the moment I can play with a Gtx 460 and an old Samsung (cannot remember the model!)  ;)

I did today few test on my rig (the proper one I use daily) and I set some custom resolution even though Nvidia panel don't allow you to use fractions for the refresh rate.
The outcome was absolutely disappointing since I tried to come as close as possible to the game refresh rate but tearing started to appear and was pretty terrible  :-[

For example Double Dragon (running @57.44Hz) when viewed at 57Hz looked way worse than at 60Hz  ???
... I really hope the decimals will be able to do the trick otherwise my enthusiasm will go straight through the drain  :angry:

Take care and speak to you soon  :)

I'll keep you posted !

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Now that's exactly where EDID overrides come in. Usually the custom resolution settings from the graphics card vendors themselves only allow for integers for refreshrate, but an EDID override steers on a specific pixelclock which enables you to get a very specific refreshrate. So you could use CRU to set the exact refreshrate (with decimals). Or just use RatRefresh of course ;)

Also, to get the best results, use syncrefresh 1 and disable vsync in your mame.ini. That makes the game sync to the refreshrate rather than the other way around, which keeps everything smooth as butter even if the set refreshrate is off by 0.01 Hz or something. With regular vsync you would then skip a frame every so many frames.

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
Ok, so if I got it right,  I need to use synch to monitor refresh rate and triple buffer together, right ? ... if so, it's my actual config already  ;)

One thing I didn't (probably) get: RatRefresh forces a specific resolution into the register/CRU and then turns it into the current one ?
In other words, do I need to use CRU in order to be able to set a specific refresh rate or can I simply run RatRefresh and it will take care of everything ?

If the latter, what about passing the tool a not supported resolution ? Will windows black screen and will I need to boot in safe mode  :( ?

Cheers  :)

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
If refreshrate matches and sync refresh is on I'd not enable triple buffering as it just generates a little overhead then.

You can supply a -min and -max switch with minimum and maximum refrrshrates for your setup. If the requested rate is beyond the tool just quits (or sets 60Hz, I'm not sure at the moment). I tested it by using ratrefresh from command line, setting rates until my monitor stopped syncing to the signal. Of course it's black screen than. But you press up or f3 to get the previous command back on the prompt, delete the last so many characters with backspace and just type in another refresh rate. You could always boot in vga-mode but thats too cumbersome in my opinion.

For now you need CRU one time to get the proper registry key for your monitor. After that you'll only need RatRefresh. I think the opening post is very complete. Read that again and just try - really you'll enjoy your games much more!

I currently have a testversion ready where you can query the system, it'll reply with the detected monitors, and then you can just pass the display name to the tool and it'll work the rest out. But there's a few bug I'll first have to work out.

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
Thanks RatRefresh, I'll follow your hint and read the initial post once more  ;)

One question which popped up recently in my mind: if I'm not mistaking, RatRefresh overwrites the 'main' refresh rate in the registry so it can set that one up, according to the game you want to play.
Doing so I imagine you're going to write again and again over the same disk sector  :-\ ... if so, do you think this could be an issue, especially with SSD  :-[ ?

Thanks !

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Registry doesn't work that way, it's more of a database and (at least up to win 7) it's mostly append that it does. That's why the registry sometimes grows extremely big while the actual content isn't that big.
Your SSD is safe. SSD does TRIM which does exactly prevent what you say. It makes sure if you write a million times to sector / block 1 those writes are spread out over the disk. An SSD holds like a making table containing all logical blocks and the actual physical blocks where a logical block correctly resides. In theory every block on your SSD will get the same amount of writes. Google for SSD TRIM. Also look at this:
http://techreport.com/review/27909/the-ssd-endurance-experiment-theyre-all-dead Of course nothing will live forever, but a typical SSD will outlive your pc anyway.


Why so scared of everything?
« Last Edit: April 01, 2017, 04:10:17 am by Rataplan626 »

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
[...]
Why so scared of everything?
You should know the old way of saying "better safe than sorry"  :P

Thanks Rataplan for the insight into SSD writes and all the assistance ;)

I believe no one (or very few) got the real potential of what you're trying to do here or maybe simply people is too 'coarse' to appreciate that  ;)

Keep up with the good job ! ... I plan to do more extensive testing and report back.

A question: do you think there could be differences between VGA and DVI connections ?
I'm asking this since I'm currently using VGA and I'd like to avoid finding different results when I'll switch to DVI  :-\

Cheers   :)

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
I've never tested on VGA, the only machine I have with still VGA on it is a very old Asus netbook, crappiest thing ever. But please report!

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
Unfortunately the monitor I was going to use passed away this morning  :angry:

As such I had to 'kidnap' another one from my mom's house and ... surprise: that one despite being a quite "recent" LG LCD, doesn't have a DVI port  :banghead:

I'll try to go ahead anyway and see what happens ... I'll keep you posted  ;)

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
Ok, so let's start with my report but I can anticipate I still have no good news  :(

First of all, there were no entries in my windows registry about "EDID", "EDID_OVERRIDE" or something even slightly similar.
There was one key named 'properties' (under display section of course  ;)) which didn't allow me to read its values no matter what change I tried to made to its security settings  :angry:

Eventually, after spending some time on the web, I managed to find a tool NVIDIA suggested in order to get display EDID value (Monitor Asset Manager).
After running that and playing around with 'export', 'save', etc ... I managed to have EDID entries created into the registry and accessible to me  ;)

Anyway this again was quite different than what you depicted into the initial post since the key name was 'properties' and inside there were no '0' or '1' subkeys but just 'EDID' one.
I used that one (after making other adjustments!) and RatRefresh seemed to lilke it !

When I ran the tool, I saw the monitor changing resolution (a low one like 640x480), then changing immediately back to the one I was using.
Output of the command line was the following:

C:\Users\Metalhammer\Desktop\RatRefresh>RatRefresh.exe -edidfile edid.txt -refresh 57.44
Key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\GSM56B8\5&2c2b7b9d&0&12345678&01&00\Device Parameters
Value EDID
WantedRefreshRate 57,44
HexCurrentPixelClock 2ea5
CurrentPixelClock 11941
HexHorizontalResolution 0690
HorizontalResolution 1680
HexverticalResolution 041a
VerticalResolution 1050
HexHorizontalBlankingPixels 00a0
HorizontalBlankingPixels 160
HexVerticalBlankingLines 001e
VerticalBlankingLines 30
TotalHorizontalResolution 1840
TotalVerticalResolution 1080
CalculatedPixelClock 11414
HexCalculatedPixelClock 2c96
ReversedEdidHexCalculatedPixelClock 962c
TotalChecksum 9033
Checksum 183
HexChecksum b7

Unfortunately I didn't find any tool to check if the monitor refresh rate had really changed !

I tried to run MAME games with that refresh rate but results were absolutely disappointing: together with the micro stuttering I got also tearing !
I tried to disable/enable triple buffering but difference was not huge (disabling it made the situation worse though).

Since in the registry I found two EDID entries, as if I had two monitors (like your 0 and 1 entries I presume), I tried also to use the 'other' display key (just in case) and while if I run the RatRefresh twice on the 1st I got the message 'refresh already set', if I run the 2nd I see the same resolution swap but never get the message.

I also noticed in CRU that 2nd display has the only resolution/refresh rate set to whatever I set it to while primary always stays to 60Hz.

I'm sure now that unless I have a way to check whether monitor is 'really' using the refresh rate I ask it to use, there will be no progress  :banghead:

Are you 100% sure MAME games, using this tool, don't show anymore the slightest amount of tearing and micro stuttering  :-[?

Cheers  :)

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
No, Device Parameters is not the key you need. You need the EDID override key. So yes it still tries to write to the read-only key you supplied, and restarts the videodriver which is why the screen 'flashes'. But also it's obvious tearing isn't gone as you do NOT actually change refresh rates with that key. I don't know how to make the manual easier to understand as it's already step by step. But here's my guess: you did NOT set a custom resolution with CRU first. In the current version of RatRefresh you will still need to do that.

So start CRU, and create a custom resolution with the native resolution of your monitor, and for example 59Hz or something like that. As soon as you apply that, in the registry under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY" the monitor you created that resolution for should have an EDID override key. Underneath that there is probably a 0 and 1 value, usually you should use 0. That key, including 0 (or 1 if that's the active screen) and it should work.

Also, if the resolution is finally set, again I'd advice NOT to use triple buffer and/or waitvsync, but only syncrefresh. I have just tried it on a machine with a NVidia GPU and it works perfectly fine. I'd really advice you to thourougly read the opening post and work through it step by step.

The next version will allow to just select a displaydevice and the tool will read the EDID and create the appropriate override key. But for now, you'll need to go through all the hassle (but only once). If it still doesn't work, please report with a screenshot of your display registry key with all keys you have access to expanded, and the output of RatRefresh. I'm sure we can get it to work :) We could also do a Teamviewer session, as I really want to help you to get good results. :cheers:

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
[...]
The next version will allow to just select a displaydevice and the tool will read the EDID and create the appropriate override key. But for now, you'll need to go through all the hassle (but only once). If it still doesn't work, please report with a screenshot of your display registry key with all keys you have access to expanded, and the output of RatRefresh. I'm sure we can get it to work :) We could also do a Teamviewer session, as I really want to help you to get good results. :cheers:
Man, you're gr8  :)

I cannot thank you enough for the assistance in this  ;) really appreciated   :cheers:
... if eventually we'll make it, I'll ask you a photo of yours in order to build a statue and put it next to the cabinet  :lol

I'm now going to try again, following your new advice, and report  8)

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
Guys this was thought to be a long post and ideed it was  :-\
... unfortunatelly, after writing for half an hour, I got logged out and I lost everything  :banghead: !!!!

Let's try to start from scratch, but I'm not sure I'll remember everything.

First of all: we made it  8) !!! ... thanks to RataPlan kind assistance I got what I was doing wrong  ;)

In few words, the resolution I put inside CRU, was my monitor native one (1600x1024@60Hz) and Windows/CRU was not picking it up as a real
custom one and, as such, it was not adding the EDID_OVERRIDE key inside the registry.

Adding a more 'exotic' refresh rate (59.59Hz) made the trick  ;) !

After configuring everything as Rataplan suggested, I prepared myself to enter the truth test: running a game with a non 60Hz refresh !

I used Ghost 'n Goblins as my benchmark since this was one of the main reasons for embarking into this 'refresh rate' adventure !
Unfortunatelly results were good but not what I was expecting (slightly better that running @60Hz though)  ???.

What I mean with poor results ?
I mean that the scrolling is not 'smooth' but a bit 'jerky' ... not excessively but still something noticeable  :-\.

Now how can I know there isn't something wrong in my procedure and this is the reason for the disappointing results ?
Just because many, many games are now really close to perfection as never before, no matter how hard I played with the MAME settings  :o!

... here I must thank really much RataPlan for the hard work and I won't quit stressing how this guy didn't (so far) receive the attention and
gratitude he deserves  :applaud:!

How well now Neo-Geo games run, how smooth are Mortal Kombat side scrolling portraits (the ones of the characters when you insert coin)  :applaud:!

So what about GnG  ????

To be honest I got few ideas about it which I'd like to share with you; according to my opinion there could be three reasons:

- my LCD doesn't like/pick up the 59.59Hz refresh rate
- MAME GnG driver is not optimized (other games behave similarly while others are simply perfect)
- the original arcade was exclty the same but I never noticed it (I was 8 at the time!)

To rule out the first one, I ask you the favor to do a test:

could you please run Gng (bootleg @59.59Hz) and compare it to Black Tiger (bootleg @60.00Hz) ?
Have a close look at the background: in GnG, tombstones or the far mountains for example, don't move smoothly while in Black Tiger everything is silk smooth !

Since I'm still stuck in finding a way to check my 'real' monitor refresh rate, I did some research and find a little tool, presented inside this same forum.

The tool is FreqTest and you can find it here:
http://forum.arcadecontrols.com/index.php/topic,135230.0.html

Is it reliable ? Can I succesfully check if my panel took the refresh rate I put inside RatRefresh ?

Now for the to do part  ;):

I noticed, as RataPlan himself said in the beginning, that my MAME frontend (FEEL), whenever I switch refresh rate, crashes (it goes black screen eventually crashing in a couple of minutes)  :'(.

Now, if there's no way to prevent this behavior, I'm scr**d  :timebomb: !!!

Indeed, it won't be feasible, inside a cabinet to manually start/stop applications.

Please tell me there's a solution since I cannot believe we went so far just to surrender now to evil windows events  :cry: !!!

One last thought:

I tried the same procedure on a laptop with Intel graphics; I managed to get the EDID_OVERRIDE key and to run RatRefresh but, according to the tool above (and also to various web based testers) I'm still at 60Hz ! ... obviously I tried mame, just in case, and results were trash (same as without RatRefresh), confirming I'm still at 60Hz  :badmood:.

I'm afraid there's not so much to do with my portable rig since probably the vendor locked something to prevent users tampering around with video settings !

I'll leave you alone guys for the moment, hoping that when I'll come back, someone will have really good news for the front end issue  :notworthy:!

Don't forget I still have some room, on the left of the cabinet, for a second statue (the one on the right is already booked for RataPlan's) :lol

Cheers  ;) !

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
I don't know that tool but ran it after running ratrefresh for Ghosts 'n Goblins (which is in fact in my favorite list in my frontend). Results:


It seems to show the value a bit less as it is (or should be) but at least it's not far off the 59.59. Now Ghosts 'n Goblins is not a good game to test this with, as it has 'native' jerky scrolling. It skips a step every 4 or 5 vertical lines or so when playing the game. When the map is shown at the beginning of a level or when you lost a life the scrolling should actually be smooth.
The game I tested most of the tool with is The New Zealand Story, tnzs. It runs at 59.150 Hz from the top of my head and has full screen smooth scrolling which makes it easy to see if it works or not. If the refreshrate is off you will most probably see vertical jags when you are walking left or right, which will completely vanish with the correct settings and vsync or syncrefresh (as said I prefer syncrefresh but still vsync or triple buffer should be ok as well). Indeed games like Metal Slug should be fine to test as well, although Metal Slug and especially Metal Slug 2 are known for some slowdowns when a lot of sprites are on screen. But that's another thing :) Also if I'm correct Metal Slug srolls with 2 pixels wide at a time, so maybe it's not THAT smooth. But again that's a game-thing, what RatRefresh should do is takeaway the tearing, which is a refresh-rate thing independent of the game you are emulating.

I'm still working to get it to work without having to restart the videodriver but despite all suggestions of the people above, that's unfortunately not how it works and I'm afraid there are vendor or even driver specific calls needed to get that working. I'm currently trying to get things working through the ChangeDisplaySettingsEx API but so far it's the same as everything else - it works as soon as the display driver is restarted, but before that it won't pickup the just-created new resolution.

Laptop: My own Lenovo ultrabook has an Intel 4000 or something like that integrated and a 60Hz panel. However, I can change refreshrates of that panel up to about 120Hz actually which is quite insane :) In fact Lenovo has a tool that brings down the refreshrate to 48Hz in order to save some battery. When that option is enabled if I remember correctly it will be 48Hz no matter what I do - Lenovo probably has an even more direct way to change that refresh rate. But with that option disabled I can freely change the refreshrate and it works perfectly fine otherwise.

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
Now Ghosts 'n Goblins is not a good game to test this with, as it has 'native' jerky scrolling. It skips a step every 4 or 5 vertical lines or so when playing the game. When the map is shown at the beginning of a level or when you lost a life the scrolling should actually be smooth.
I knew it, I knew it  :angry:
... so basically also the original arcade behaves like this  :-\ !?

I'm still working to get it to work without having to restart the videodriver but despite all suggestions of the people above, that's unfortunately not how it works and I'm afraid there are vendor or even driver specific calls needed to get that working. I'm currently trying to get things working through the ChangeDisplaySettingsEx API but so far it's the same as everything else - it works as soon as the display driver is restarted, but before that it won't pickup the just-created new resolution.
So at the moment, there's no way to avoid any frontend to crash  :cry: ?
(btw also MAME crashes as soon as you change the refresh rate  :'()

... any hope in having Microsoft developers look into this  :-[ ?

Man, I cannot believe we are stuck at this point after all your efforts ... now that finally I saw the light I need to go back into the darkness  :banghead:


Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
Rataplan, what about the following idea ? Do you think is doable  ;) ?

- we know we need to use a FE to run our emulators
- we have the ability to pass parameters to RatRefresh whenever we need to run a specific game (mainly rom name)
- we know FE crashes as soon as RatRefresh restarts the video driver in order to have the change take effect  :'(

And if we(you :P) change RatRefresh to:

- accept some more parameters to:
                                                                1) know what emulator we want to run the game from (ie. path of MAME exe)
                                                                2) know the emulator command line and parameters (basically the rom name)
                                                                3) know the front end (FE exe path)

We could:

- pass RatReftesh the game name which will trigger the refresh rate change
- as soon as RatRefresh is finished with the task it could (somehow) kill the FE and launch MAME with the selected rom (*)
- upon MAME exiting, RatRefresh could start again the FE

... as far as I know, the FE shouldn't keep any state from MAME (but the last selected game) which could prevent it from working correctly once restarted by RatRefresh  :-\

Maybe a RatRefresh .ini could also be useful to avoid passing too many parameters (mainly lenghty paths) and easily change stuff.

What do you think  :-\ ?

(*) we could also think about a way to ask the FE to exit as soon as it's finished passing RatRefresh the parameters it needs ! It will be RatRefresh which will take care of monitoring MAME process and spawn the FE back as soon as it exits  ;)
« Last Edit: April 03, 2017, 09:54:51 am by Metalhammer »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Oh that's easy to do, and could even be done from a simple batch-file which you could start from your FE in stead of MAME64.exe. However, people might get other issues like a 'front-end startup animation' everything you quit a game and such. For now I still want to invest time in getting it to work the way it should rather than creating workarounds. Because I wanted to keep the tool versatile I did not create a standard ini file, but made it to for example specify an edid file, so you can simply pass another edid file if you have a second screen. But that's all gonna change anyway.

If you want your FE to quit and restart, make a simple batch file of it. Your FE starts MAME with parameters (ie ROM name) which you can fetch in a batch file with %1, %2, %3 and so on, each representing one parameter passed from the FE. From the top of my head you could try something like:

taskkill.exe /fi:frontend.exe (modify that to your FE executable)
ratrefresh /edidfile edid.txt /file refreshrates.txt /get %1;mame
mame64 %1
frontend.exe

Actually I have something like that in my own cab now, and it works but it's not ideal by any (of my) means.

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
Obviously I agree with your way of seeing things and that RatRefresh should be working as it is ;)

While you find a suitable and definitive solution, just to avoid not taking advantage of your great job, I'll go for the workaround we just discussed  :)

Thanks mate  :)

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
Rataplan, I'd like to ask you something quick:

I'm trying to parse a Mame.xml file with the nice tool you worte (MameXMLParser) anyway, despite it saying 'file written' I get absolutely nothing in my directory  ???

I tried running it with admin privileges, running it in a different folder but all to no good  :-\

Any idea on this  :-\ ?

Fixed: it was my Antivirus preventing it from writing to the disk :angry: ... funny thing is that last time I tried, it worked fine :banghead:
« Last Edit: April 06, 2017, 04:59:09 am by Metalhammer »

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
Since I'm confident I piled up now some nice experience with RatRefresh, I'd like to share with you my two cents  ;)

In few words, for whoever could come across this thread and just skip to the last post, I can summarize it as follows:

This tool rocks, period  ;)

It allows to adapt the monitor refresh rate to game's own giving you the definitive experience of arcade emulation (I'm using MAME mainly) on a modern PC and LCD screen. Indeed also when you enable all the tearing fixes inside MAME (synch to monitor refresh and triple buffering) you'll still have stuttering coming from the refresh rate differences  :-[

Pro:
- games run smooth and tear/stutter free as never before  :applaud:

Cons:
- the driver reset crashes the FE in use  :'(

Obviously Rataplan is already working hard to find a suitable solution and I'm really eager to see what he will come up with  ;)

Good job Rataplan !


nipsmg

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1728
  • Last login:Yesterday at 06:15:40 am
  • ROONEY!! ERRGH!!
    • Arcadia
Hey Rataplan,

I'm wondering if it might be worthwhile to have a conversation with some of the FE authors out there (Launchbox, Attract-Mode) and see if they can support handling a graphics device handle loss, and go grab a new device   handle on resume.

Instead of attempting to attack this from your end in, it might make sense to petition for support for this tool from the FE authors themselves.

I REALLY want to use this tool, but the majority of the people who will be using the cab are not tech savvy in any way and will be unable to deal with an FE crash.

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Rataplan626: I got advanced mode working in IntelAddCustomMode. I don't think it's adding the decimal part of the refresh rate but give it a try anyway and let me know your results.

You can cut/paste this command line:
Code: [Select]
IntelAddCustomMode.exe mode=adv verbose=true hactive=1920 hfrontporch=48 hbackporch=80 hsyncwidth=32 vactive=1200 vfrontporch=3 vbackporch=26 vsyncwidth=6 vscanrate=59.150

Hi Headkaze, I totally missed that post, sorry for that. I hope you are still reading this. I've redownloaded your tool but it does not accept decimals:

C:\Users\Rataplan_\Desktop\IntelAddCustomMode>IntelAddCustomMode.exe mode=adv verbose=true hactive=1920 hfrontporch=48 hbackporch=80 hsyncwidth=32 vactive=1200 vfrontporch=3 vbackporch=26 vsyncwidth=6 vscanrate=59.150
dwColor             : 32
bScanType           : 0
dwHActive           : 1920
dwHFrontPorch       : 48
dwHBackPorch        : 80
dwHSyncWidth        : 32
bHSyncPolarity      : 0
dwHScanRate         : 74410,7
dwVActive           : 1200
dwVFrontPorch       : 3
dwVBackPorch        : 26
dwVSyncWidth        : 6
bVSyncPolarity      : 0
dwVScanRate         : 59150
dwHTotal            : 2080
dwVTotal            : 1258
dwPixelClock        : 154774,256
bIsValid            : 0
Setting DELL U2412M (256) to 1920 x 1200 59150 Hz. Success

It says it sets to 59150Hz which could be a cosmetic bug, but the screen does NOT go blank and the actual refreshrate does not change. I test that with setting my display to 60Hz, then run your tool and then play The New Zealand Story (tnzs), I always test with that as it has a full moving screen pixel by pixel at 59.150. At 60Hz it gives tearing. After running the tool with the given commandline it still running at 60Hz.

But it doesn't seem to work with integer refreshrates either on my system. When I set it to 55Hz for example, it accepts it, the screen goes blank for a second as it would do from Intel panel itself, but yet it still runs at the same refreshrate as before. Also it does not show as a custom resolution in the intel panel which I expected it would do (but I could be wrong).



Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Hey Rataplan,

I'm wondering if it might be worthwhile to have a conversation with some of the FE authors out there (Launchbox, Attract-Mode) and see if they can support handling a graphics device handle loss, and go grab a new device   handle on resume.

Instead of attempting to attack this from your end in, it might make sense to petition for support for this tool from the FE authors themselves.

I REALLY want to use this tool, but the majority of the people who will be using the cab are not tech savvy in any way and will be unable to deal with an FE crash.

Well I think it's not feasible to just 'fix' that in the FE. If you are using a device which driver is stopped, well I can imaging your software goes berzerk. I still want to try to fix that though, so a fix is not needed on FE side. By the way, I use AttractMode myself, and I kill it in a batch file which fires when I select a game. It then starts RatRefresh, starts the emu, and after the emulator quits, it starts AttractMode again. Attractmode happens to remember the last played game even if it was brutally killed. So for now, for me, that's a little workaround which still automates everything completely. But being a technician, I don't like workarounds, I want fixes :)

nipsmg

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1728
  • Last login:Yesterday at 06:15:40 am
  • ROONEY!! ERRGH!!
    • Arcadia
I started talking with the AttractMode guys over on their github.  They suggested looking at the "ResFix" plugin to compensate.  Any experience with that?

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
[...]
By the way, I use AttractMode myself, and I kill it in a batch file which fires when I select a game. It then starts RatRefresh, starts the emu, and after the emulator quits, it starts AttractMode again. Attractmode happens to remember the last played game even if it was brutally killed. So for now, for me, that's a little workaround which still automates everything completely. But being a technician, I don't like workarounds, I want fixes :)
This indeed is the same procedure I ended up with (thanks to Rataplan for support) for a different FE (Feel)  ;)
... the only difference is that, instead of 'killing' the process, I ask it to close  :P

While Rataplan works at a possible fix, this is the only workaround I found which allows me to use this tool in an automatic and almost transparent way.

Personally I strongly believe the benefits far outpass the hassle of going through the procedure of fine tuning the batch/script file  :)

nipsmg

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1728
  • Last login:Yesterday at 06:15:40 am
  • ROONEY!! ERRGH!!
    • Arcadia
I might have to set this up in a couple weeks when I get back from vacation.  Would either of you mind sharing your batch files?

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
No problem Nipsmg, send me a pm when you'll be back and I'll send you my script  ;)

Not sure it could be an issue with the real thing (mame cabinet) but I'll report what I experienced on my test rig (a simple PC with mame, FE and Ratrefresh stuff to play/experiment around):

- over here I use the FE in windowed mode
- 90% of times I leave other windows open (ex. notepad or simply folders), after mame quits and script reopens the FE, I get a Windows Explorer process crash  :-\
- around 40% of the times, again when mame quits and FE respawns, I loose focus on it: I can see the FE window in the application bar blinking but the open window doesn't respond to commands until I click on it  :-\

As I said, I'm not sure the above could be an issue when FE is in fullscreen mode and no other windows are open (as should happen on a dedicated mame cabinet) anyway, it won't be bad to learn something if you have any good idea/hint on the subject ;)

Cheers  :)

nipsmg

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1728
  • Last login:Yesterday at 06:15:40 am
  • ROONEY!! ERRGH!!
    • Arcadia
would using something like crt_emudriver and vmmaker be a potential vector for attacking this problem?  Or are they completely unrelated?

http://geedorah.com/eiusdemmodi/forum/viewtopic.php?id=295


Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
would using something like crt_emudriver and vmmaker be a potential vector for attacking this problem?  Or are they completely unrelated?

http://geedorah.com/eiusdemmodi/forum/viewtopic.php?id=295
Do you mean using a CRT instead of an LCD  ;) ?

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
would using something like crt_emudriver and vmmaker be a potential vector for attacking this problem?  Or are they completely unrelated?

http://geedorah.com/eiusdemmodi/forum/viewtopic.php?id=295

I've never worked with CRTEmu, but I do know it only works on ATI cards. They are somehow related, in the sense that they edit EDID information and use that so set specific resolutions / refresh rates. I don't have any ATI cards myself so I can't test.

But, as stated before so far the issue is that we need to restart the videodriver in order for it to pickup the just-edited EDID values. It's with CRU, and any other tool I've seen so far. I've asked people to confirm they can change to just set custom resolution and refreshrate without restarting the videodriver, but no-one has proven me that yet. The only way I know how to do that is to use the manufacturers control panel. NVidia can pickup custom resolutions without restarting the videodriver, and Intel can as well. But that would mean I'd have to talk to driver-specific DLLs and functions, which might change in any or every driver release, which makes it extremely error-prone especially with Windows 10 were there's little control in updates for average Joe.
My test-systems  as well as my cab runs on Intel GPU. The custom resolutions set with the Intel control panel goes to a completely different registry part, and does not use the default EDID override keys and values. Also when I manually put that registry in, it doesn't pick it up either (until a driver restart). So that means the Intel panel triggers a function which makes it pick up the custom resolutions, which was already clear to me as the screen goes black for a second when you apply them from the panel. The difference is though that using the Intel panel, even when it blanks the screen it does NOT reset the displaydriver, which means that graphic applications like the frontend don't loose their display ports and keep working.

Still looking for a generic solution for this. But I've got some very busy weeks in my company, so I've had very little time to work on it. On the other hand, tools like CRU and other tools can as far as I am aware NOT pickup new resolutions with a reboot or reset of the display driver either. Which sort of means I I wonder if it's possible at all.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:April 24, 2022, 02:38:27 pm
  • 0x2b|~0x2b?
Also it does not show as a custom resolution in the intel panel which I expected it would do (but I could be wrong).

I'll have a look when I get a chance. Thanks for the feedback.

BTW Have you tried calling "devcon restart =display" instead of using disable/enable?

And what about reload.zip?

Quote
It just sets GPU scaling to whatever the current setting is for each monitor, which seems to be enough to reload the overrides.
« Last Edit: May 13, 2017, 04:58:27 am by headkaze »

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
Hi Headkaze,

could you please share some details about the mysterious 'reload.zip' file you attached  ::) ?

... I'm pretty curious  ::)

Thanks !

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Also it does not show as a custom resolution in the intel panel which I expected it would do (but I could be wrong).

I'll have a look when I get a chance. Thanks for the feedback.

BTW Have you tried calling "devcon restart =display" instead of using disable/enable?

And what about reload.zip?

Quote
It just sets GPU scaling to whatever the current setting is for each monitor, which seems to be enough to reload the overrides.

Headkaze, a million thanks for your help and interest. Devcon restart does the same as disable and restart. In fact I do use restart in my tool, but that still disabled and enabled the driver. The reload.exe seems interesting. Unfortunately it fails with 'Failed to load atiadlxx.dll' which makes me  believe it's only for ATI/AMD cards. Still, I'll see if I can find anything in that direction for NVidia / Intel as well.

Sorry for the late reply again, somethings wrong with the notifications for some reason.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:April 24, 2022, 02:38:27 pm
  • 0x2b|~0x2b?
Here is the source to the IntelAddCustomMode utility (IntelAddCustomMode1.1_Source.zip).

It was working for me (both Basic and Advanced) so I'm not sure why it isn't for you. Either way I don't think this tool will allow us to use non-integer refresh rates.

pulp25

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:July 18, 2018, 10:44:40 am
  • I want to build my own arcade controls!
Fantastic Software.

I use it with a Nvidia 1030 and a Viewsonic 2365wp (Fv : 50 Ė 75 Hz) IPS 1080P

I configure .bat for emuloader frontend to test it with mame and all is ok with all filter on (GLSL).

R-Type 55khz -> smooth
Mortal Kombat 55khz -> smooth
Neo-Geo KOF 2000 59.x khz -> wall scrooling smooth

Negative point : The EDID process (windows sound for new device manager [can't cut sample], restarting driver) but it work
                        The Response Time of the LCD Viewsonic 2365wp

Thanks
« Last Edit: October 10, 2017, 06:20:49 am by pulp25 »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Hi, we are currently about to move back in our completely rebuilt house. Which means I am about to unpack my cab again, and my actual PC, and be able to work on this tool again. Although I've had only 46 downloads (count 'em!) I have some idea's to improve usability. Having said that, for me it works fine with the quircks it has. Are people actually using it?

Metalhammer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:September 11, 2018, 08:05:47 am
  • I want to build my own arcade controls!
Re: RatRefresh - Automated EDID updater for MAME and others - no more LCD tearing
« Reply #77 on: September 11, 2018, 08:00:54 am »
Hi, we are currently about to move back in our completely rebuilt house. Which means I am about to unpack my cab again, and my actual PC, and be able to work on this tool again. Although I've had only 46 downloads (count 'em!) I have some idea's to improve usability. Having said that, for me it works fine with the quircks it has. Are people actually using it?
Hi Rataplan, nice to hear from you again  ;)

Just letting you know every time I power on my cab I cannot help but thank you once more for your tool  :notworthy:
... showing it with pride to everyone who comes around and who grew up playing arcades  ;)

Obviously let me know if there will be further developements: improvements are always welcome  ;D

Take care  ;)

Cheers  :cheers:

ramos8414

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 65
  • Last login:January 09, 2019, 08:27:24 pm
  • I want to build my own arcade controls!
Can you please reupload the example pictures.

ramos8414

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 65
  • Last login:January 09, 2019, 08:27:24 pm
  • I want to build my own arcade controls!
Hi. I've been looking for a tool to automatically change refreshrates on my LCD corresponding the game I start. More like CRU does, but then automated for use with MAME. I was unable to find something like that. So I wrote it myself.

I short: you can run 'RatRefresh.exe -edidfile edid.txt -file refreshrates.txt -get bublbobl;mame' to switch to the exact refresh rate for that game.

A little backstory
Last year I've build me an arcade-cabinet with a LCD screen. We all know that gives issues with refreshrates and tearing. (And I don't want to debate that - I know CRT is 'better' for arcade gaming). We also know we can use CRU or actually EDID overrides to setup custom refreshrates to solve that. But that's quite cumbersome if you need to switch refreshrates between games. Also until a short while ago you would need specific hardware for that, as only ATI and NVidia seem to support EDID override. As my cab uses its Intel Core i3 6300 build in GPU I was out of luck anyway. Until a short while ago when Intel finally released a testdriver with EDID override support. Check https://communities.intel.com/thread/25904?start=150&tstart=0 for more info, and https://downloadcenter.intel.com/download/26504/Intel-Graphics-Test-Driver for that actual driver download. It will relatively soon come out of test and from then on the official Intel driver will probably support EDID override as well. This testdriver was only supposed to support 4th and 5th gen iGPU's with internal panels only. Still I took the plunge and what do you know? It worked! Using CRU I was now able to do custom resolutions and refreshrates on my Intel GPU! If you use that with MAME's -syncrefresh option, it will give you a completely tearing-free experience at the correct game-speed.

The next step was to automate this, so when I select a game, the resolution automatically switches. No tool as such found, so I wrote:

RatRefresh

RatRefresh is a simple tool that updates the EDID information of the first custom resolution to match a given refreshrate. It's mainly intended to switch your display refreshrate to exactly match the MAME game you will play. I've given it some thoughts but for now I've made it quite universal, with both manual command line and input from a file with games/refreshrates in it. You could put anything you want in the inputfile with a specific refreshrate, and it can be picked up. So if you want to automate this to run your mediaplayer at 59.94Hz, you can.

Note that this is currently more or less a testbuild.

Requirements

I use .NET Studio to program. For now though this means .NET 4.5.1 is required. Most of you will already have that on your systems anyway. However this whole tool could have been created in a rather simple VBScript as well, but for now this tool will be written and updated in .NET only.
Reason for only one custom resolution: Windows will automatically switch to the first custom resolution if only one is there, which means no manual resolution-switching is needed after that.

Usage
There are a few initial manual steps involved. As I want to keep it versatile I will keep it that way for now.

  • Unzip the RatRefresh zipfile to a folder on your system
  • Start CRU and create ONE custom resolution for your display. Use whatever resolution you want to play your games in, I use the native resolution of my screen which is 1920x1200@60Hz. If a custom resolution is already there, delete it and recreate to make sure the registry keys are setup correctly. If multiple custom resolutions are there delete all but one. Example:



  • Now start regedit.exe and find the the path to the EDID_OVERRIDE key + value. It is located in "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY" and then some subkey for your  GPU / display. You could search for 'EDID_OVERRIDE' or look for the value 'CRU_Name'. In that key you will probably two REG_BINARY values, 0 and 1. These correspond to the monitor number (I think) and on all my systems this is 0.
    Now right-click the EDID_OVERRIDE key in the left-pane and click 'Copy Key Name'. Then open notepad and paste that key. Now add \ and the monitor number behind that, for example \0.
    It should look like this, but probably with differend ID's in:



    save that file to the RatRefresh folder as edid.txt, or another name if you want, like monitor_1.txt

Basic setup is done now. You can now run RatRefresh as follows (I use edid.txt here):

RatRefresh -edidfile edid.txt -refresh 59.150

This will set the refresh rate of the display setup in edid.txt to 59.150. After it does that it will run devcon64.exe to restart the displaydriver, more on that below.


Automate for MAME
As for now I merely run MAME on my cab, I wanted to automate that. MAME's XML file contains the refreshrates for all machines it supports. However parsing the almost 200MB and growing XML file takes quite a while, even on beefy PC's (using .NET libraries that is). When using the regular XML tooling available in .NET memory usage grows beyond 2GB when processing mame.xml. My cab has 8GB of RAM, but I know there are a lot of machines with maybe only 1GB. So I wrote a little, not so smart mame.xml parser of my own, which is way faster and uses a fraction of the memory. But it might be buggy. Still this would take way too long to do with each game you select, so I went another route.

MameXMLParser.exe
MameXMLParser.exe takes a MAME xml file as input and outputs a plain textfile with the following structure:

<rom name>;mame;<refreshrate>

one rom per line. So you'll end up with a file with as many lines as MAME supports individual machines. To fetch a game out of that file takes a fraction of a second even on the slowest and worst piece of cr@p pc I have still lying around, which is a Intel Atom N330 based netbook.

Usage:
  • First create a MAME xml file by running 'MAME.exe -listxml > mame.xml'. If you run 64bit MAME it will be 'MAME64.exe -listxml > mame.xml'. If you use any other MAME distribution use it's executable name, I think all support the -listXML option.
  • Find out your displays native default refreshrate. Not all MAME machines have a refreshrate set in MAME.XML, for example mechanicals. When no match is found your screen will still need a certain refreshrate :) Usually this is 60.000 or 75.000 but you can use whatever you want if your monitor supports it.
  • Then run 'MameXMLParser.exe -input mame.xml -output refreshrates.txt -default 60.000'
    This will generate rereshratex.txt with all needed info for MAME.
  • Now you can use RatRefresh with this generated refreshrates.txt file:
    RatRefresh.exe -edidfile edid.txt -file refreshrates.txt -get bublbobl;mame
    This will search for the string 'bublbobl;mame' in 'refreshrates.txt' and set the corresponding refreshrate.

You could easily add roms for another emulator to this file with whatever name you want to call it, like
nes;nes;60.000
palgenesis;palgenesis;50.000


When used together with a frontend (more on that below) it can usually supply you the emulator / system name you are starting a game for to use in a commandline.


Issues
  • I have put some error-checking in, but certainly not excessive. Using wrong combinations of commandlines or inputfiles will probably result in a nice errormessage. Read the help again and try again.
  • Frontends: huge issue for me personally: When an EDID resolution is added, it's only picked up when the displaybus is reset. This means restarting the displaydriver works, physically switching the display off and on works, and removing the (DVI at least) cable and reconnecting it works. For now I can only do the first one, restarting the videodriver.
    The issue with this is though that the frontend I use on my cab, AttractMode, crashes. This makes sense as it looses its screen completely when running. However when switching the monitor off and on again or pluging the cable, the new refreshrate is picked up too. So I am still looking for a way to simulate that instead of restarting the whole videodriver.
    For now that means I am personally only using it from commandline. I haven't tested other frontends though.
    Any suggestions to solving this are welcome!
  • Admin permissions required. As the EDID value is stored in HKLM registry, you will need admin rights to modify them. This could be prevented by granting users write permissions to the EDID_OVERRIDE key. However, after that restarting the display driver requires admin permissions as well. Those permissions can also be granted to users, but as I am still looking for a better way to have the EDID values reloaded. For now I use devcon to restart the display driver.
  • I haven't done any testing at all on x86 machines, as I simply don't have x86 running anymore. Feel free to report!

Version history
v0.1 download
initial release


v0.11 download
fixed: bug in calculating horizonatal blanking pixels - thanks to xxDaViDxx for reporting!
Also switched back from using CRU's Restart64.exe to devcon64.exe, to be less dependant of CRU.



I this tool is useful for you, or you have questions or bugreports, feel free to respond. If you test it, please respond if it works for you. If something like this already exists and I am making a fuss out of nothing feel free to respond as well :) Happy gaming!  :cheers:

Fixed the image url's.

tonyt76

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 69
  • Last login:January 31, 2023, 07:28:39 pm
  • I want to build my own arcade controls!
Hi everyone. Has anyone created a batch file to do the following:

Run the batch
Type in the rom name
Ratrefesh sets the custom res
MAME launches the same "rom" that you typed in?

Thanks!
« Last Edit: April 10, 2019, 09:27:36 am by tonyt76 »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Tony, I will help you out, and we will post the final .bat here for reference for other people. Rest will be through PM to not clutter the forum. Also fixed the initial posts' images. Sorry for not responding earlier, never got the notifications. Changed my email address now, this one gets them. Probably a spam issue.

Note there's still no improvements in RatRefresh. However, I'm going to do a new version with better usability and hopefully detection of the display device. However, the main issue will still be there, which is restarting of the display driver. So far I've been unable to find a solution, or any third-party tool that can apply new EDID overrides without restarting the video driver.
Again, please prove me wrong :-)
« Last Edit: April 10, 2019, 10:03:30 am by Rataplan626 »

mortalkombatfan

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:July 22, 2019, 04:38:59 pm
  • I want to build my own arcade controls!
My Attract Mode emulator cfg

   !Code!
# Generated by Attract-Mode v2.5.1
#
executable           run.bat
args                 "[romfilename]"
workdir              emulators\MAME
rompath              roms\
romext               .zip;.7z
system               Arcade
info_source          listxml
import_extras        nplayers.ini;catver.ini
artwork    marquee         
artwork    snap
   !Code!

This is my batch file (run.bat) in the mame folder with nircmd.exe and ratrefresh configured as per instructions. I use nircmd.exe as attract mode loses focus when relaunched and does not terminate well.   

   !Code!
nircmd.exe killprocess attract.exe

ratrefresh.exe /edidfile edid.txt /file refreshrates.txt /get %~n1;mame

devconx64.exe disable =display
devconx64.exe enable =display

mame64.exe %1

ratrefresh.exe -edidfile edid.txt -refresh 60

devconx64.exe disable =display
devconx64.exe enable =display

nircmd.exe exec2 max "D:\Attract Mode" "D:\Attract Mode\attract.exe"
   !Code!

I use groovymame which would only launch after i added an additional display driver restart, as switchres did not agree.

In groovymame mame.ini
   !Code!
monitor      lcd
lcd_range   50.00-75.00
   !Code!

Putting this altogether you select a game refresh rate is chosen, attract mode terminated, mame launched when you exit mame the display is switched back to 60hz. Attract mode relaunched, Select another game.

I use groovymame with d3d9ex for low latency.

Bojak

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:August 11, 2020, 11:31:31 pm
  • I want to build my own arcade controls!
Unable to download your files, GDrive keep saying it's infected with virus, both 0.1 and 0.11 version.  :'(

Rhyader

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:February 15, 2022, 09:43:17 am
Hi, how can I download RatRefresh? It seems I need an autorization...

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Hi. I'm really sorry for not replying to anything, I never got any notification working on this forum. It seems those Google Drive links aren't good anymore for public access. I acknowledged the request I got today, which is why I actually got noticed.

While I still use 0.11 on my own cab with great success, it could still do with some better usability. The response to the tool has been quite a bit less than I anticipated though. For me it was the holy grail when used with a LCD based cab, I thought more people had tearing issues and such. But anyway, I'll try to update the links soon, and find some ways to make RatRefresh better to use.

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
I've changed the link to RatRefresh in the opening post, so it should be available without authotization again. 5 years after it's release, it seems more people are picking it up. So I'm tempted to improve it's usability, even if I have very, very little time on my hands the last few years.

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: RatRefresh - Automated EDID updater for MAME and others - no more LCD tearing
« Reply #87 on: September 13, 2022, 04:24:22 am »
Hi, I found that the Google Drive link again didn't work without a google account. I've fixed that now. Also I removed the link to version 0.1 completely, as that had some bugs anyway. I'm currently finally working on the tool a bit again, I'm trying to get the display-detection in properly, so you don't have to fiddle around in registry anymore. So far no luck in that but I made some progress.

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Hi, I've been working on the tool the last couple of days, and I think the usability has improved quite a lot. I've updated the opening post. All comments, issues, questions, requests or remarks are welcome.

Cisek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 104
  • Last login:March 12, 2023, 08:27:21 pm
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #89 on: September 20, 2022, 04:57:12 am »
Rataplan  :notworthy:

I was waiting years for this. Technicaly gsync/freesync solve the issue, however for classic 4:3 aspect ratio lcd, or 16:9 lacking gsync/freesync it is gamechanger!
Will it work on pc crt monitors as well?

Do you think it would be possible to implement it for the linux systems, like batocera?

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #90 on: September 23, 2022, 03:25:24 am »
Rataplan  :notworthy:

I was waiting years for this. Technicaly gsync/freesync solve the issue, however for classic 4:3 aspect ratio lcd, or 16:9 lacking gsync/freesync it is gamechanger!
Will it work on pc crt monitors as well?

Do you think it would be possible to implement it for the linux systems, like batocera?

Well, I use linux (ubuntu / debian based) at work, but never wrote any software for that myself. While .NET apps can nowadays made to run on Linux, this app basically writes a registry value to achieve the goal, which Linux doesn't have obviously. So no, don't expect a Linux version soon.
I guess it can work on CRT as well. For that though, maybe changing the resolution as well might be even more effective, or even requiered. The tool now changes the refreshrate for the resolution you are running at now. Maybe I should add actual resolution change too.

Justin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 531
  • Last login:March 21, 2023, 08:59:36 am
    • Centipede MAME cabinet
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #91 on: February 11, 2023, 03:24:46 pm »
Since I just moved from a CRT to an LCD (without G sycn/ Free sync) I am very interested in this.

I tried to set it up to plam Metal SLug 5 as a test, which reports a refresh rate of 59.1856....hz

I tried the following command, it seems to be setting the monitor up as I see no errors and it clearly is resetting things (black screen, then back on etc).

C:\mame\RatRefresh>ratrefresh -debug -min 55 -max 60 -refresh 59.185
or even
C:\mame\RatRefresh>ratrefresh -debug -min 55 -max 60 -refresh 59.186

However, testing Mslug5 I am seeing tearing just as usual (as if 60hz).

Am I doing something wrong?

This is the result I get:

Code: [Select]
C:\mame\RatRefresh>ratrefresh -debug -min 55 -max 60 -refresh 59.186
Key SYSTEM\CurrentControlSet\Enum\DISPLAY\GSM5674\4&2cbcb734&0&UID16843008\Devic
e Parameters\EDID_OVERRIDE
WantedRefreshRate 59.186
CalculatedPixelClock 15204
HexCalculatedPixelClock 3b64
ReversedEdidHexCalculatedPixelClock 643b
TotalChecksum 9067
Checksum 149
HexChecksum 95
"3 warps to Uranus" -- so I stopped playing!

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #92 on: February 14, 2023, 08:28:41 am »
Since I just moved from a CRT to an LCD (without G sycn/ Free sync) I am very interested in this.

I tried to set it up to plam Metal SLug 5 as a test, which reports a refresh rate of 59.1856....hz

I tried the following command, it seems to be setting the monitor up as I see no errors and it clearly is resetting things (black screen, then back on etc).

C:\mame\RatRefresh>ratrefresh -debug -min 55 -max 60 -refresh 59.185
or even
C:\mame\RatRefresh>ratrefresh -debug -min 55 -max 60 -refresh 59.186

However, testing Mslug5 I am seeing tearing just as usual (as if 60hz).

Am I doing something wrong?

This is the result I get:

Code: [Select]
C:\mame\RatRefresh>ratrefresh -debug -min 55 -max 60 -refresh 59.186
Key SYSTEM\CurrentControlSet\Enum\DISPLAY\GSM5674\4&2cbcb734&0&UID16843008\Devic
e Parameters\EDID_OVERRIDE
WantedRefreshRate 59.186
CalculatedPixelClock 15204
HexCalculatedPixelClock 3b64
ReversedEdidHexCalculatedPixelClock 643b
TotalChecksum 9067
Checksum 149
HexChecksum 95

What OS are you running, and what graphics card? Also, if you run REGEDIT and go to 'SYSTEM\CurrentControlSet\Enum\DISPLAY\GSM5674\4&2cbcb734&0&UID16843008\Device Parameters\EDID_OVERRIDE', does it actually have a 0-value with an EDID string? It should have, as I do an elevation-check, and also it should give an error when it was unable to write. Does the parent of that, so 'SYSTEM\CurrentControlSet\Enum\DISPLAY\GSM5674\4&2cbcb734&0&UID16843008\Device Parameters' have an EDID value?

I just tested on my work Intel NUC with Iris Plus 655 iGPU with 2 Dell U2421E monitors, and I seem to see the same issue. When I set anything below 59Hz it works fine when I view https://www.testufo.com/refreshrate. But anything between 59 and 60 results in 60.000Hz. I don't have that issue on my actual cab which also has an iGPU, but an older one with probably other drivers. If testufo doesn't lie (can't run MAME here) it might be a driver issue. Also, what are your mame.ini settings?

Justin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 531
  • Last login:March 21, 2023, 08:59:36 am
    • Centipede MAME cabinet
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #93 on: February 14, 2023, 08:39:01 am »
Thanks for the detailed response!
I was running windows 7 at the time.  I also tested it on my personal win 7 PC and there it gave me blues screens.

In any case I now updated the mame PC to windows 10 last night and hence I will test it there and see what happens.   Is there a good reliable way to verify what hz the system is ACTUALLY running at once the settings have been applied?  I looked at dxdiag and I'm not convinced that reports correctly or precisely (maybe it is rounding?).

Edit: just realized you posted an online tool to check refresh. Thanks!
« Last Edit: February 14, 2023, 09:29:20 am by Justin »
"3 warps to Uranus" -- so I stopped playing!

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #94 on: February 15, 2023, 06:46:55 am »
Well, Windows 7 SHOULD work, as it supports EDID override. But I never tested it. The Intel drivers however support it since somewhere 2017-2018. Now I can't imagine your Win7 drivers being that old, but still. On my actual CAB with Win10 it works fine:

https://drive.google.com/file/d/1ZlpRVLiw7T9FNJsZmspD9JBE_3m5KCYJ/view?usp=share_link

however on my work-NUC it doesn't, as said anything between 59 and 60Hz gets 'rounded' to 60Hz. It did absolutely work on that NUC as well before, so I assume there's a bug (or feature?) in the current Intel driver.
So again, just to try to debug: what GPU / driverversion do you use?
« Last Edit: February 15, 2023, 09:08:30 am by Rataplan626 »

Justin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 531
  • Last login:March 21, 2023, 08:59:36 am
    • Centipede MAME cabinet
[17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #95 on: February 15, 2023, 05:54:37 pm »
Ok I tried under windows 10.  iGPU is Radeon hd4600
Latest drivers

It doesn't error out but the testufo tool shows no change:

Edit:  the RegEdit keys are showing correctly what you described above, entirely.
« Last Edit: February 17, 2023, 03:23:16 pm by Justin »
"3 warps to Uranus" -- so I stopped playing!

Justin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 531
  • Last login:March 21, 2023, 08:59:36 am
    • Centipede MAME cabinet
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #96 on: February 18, 2023, 03:06:50 pm »
Could the issue have to do with the fact I'm using the VGA port on the monitor?  I will try the HDMI port on both ends (card and monitor) and see what happens.
"3 warps to Uranus" -- so I stopped playing!

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #97 on: February 21, 2023, 07:18:23 am »
Could the issue have to do with the fact I'm using the VGA port on the monitor?  I will try the HDMI port on both ends (card and monitor) and see what happens.

darn, I just CAN'T wet notifications working on this forum. Anyway, I don't believe VGA should be any problem at all. I don't have any proper AMD machinery at hand. But I do have some really old Zotac units with something like an AMD A4-4000 or something in there. I could try on that. Feel free though to test HDMI and report :-)

TitanGorilla

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:March 21, 2023, 12:56:46 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #98 on: February 26, 2023, 04:23:57 pm »
Hi Rataplan,

I seem to have the same issue with any version after 0.11. The refresh rate doesnít seem to change. I also noticed the EDID file generated is different from 0.11 but this might be the way you designed the later versions. Iím not sure what I could be doing wrong with versions after 0.11. I tried 0.12 and 0.14 and they both seem to give the same issue. It seems using the CRU tool allows the refresh rate to change properly with 0.11. Iím not sure why it might work on 0.11 but not 0.14

I also have a weird issue with my video card. I have a NVIDIA GTX970 and with your utility it resets the video card drivers, the video card reset seems to cause screen tearing. Itís noticeable tearing in browsers such as Chrome in particular. I tried turning off and on manually the display adapter drivers from the device manager even without using your utility and it still seems to cause screen tearing. Restarting my machine fixes the tearing completely. It also doesnít seem to be an issue with resetting the refresh rate in Windows after setting custom refresh rates with the CRU tool.

Do you know if there is a way to reset the refresh rate from the command line without having to reset the video card drivers, similar if the refresh rate were to be reset from Display settings manually from Windows? Also, do you know what might cause the video screen tearing after resetting the display drivers? 
« Last Edit: February 26, 2023, 04:32:52 pm by TitanGorilla »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #99 on: February 28, 2023, 06:21:38 am »
Hi Rataplan,

I seem to have the same issue with any version after 0.11. The refresh rate doesnít seem to change. I also noticed the EDID file generated is different from 0.11 but this might be the way you designed the later versions. Iím not sure what I could be doing wrong with versions after 0.11. I tried 0.12 and 0.14 and they both seem to give the same issue. It seems using the CRU tool allows the refresh rate to change properly with 0.11. Iím not sure why it might work on 0.11 but not 0.14

I also have a weird issue with my video card. I have a NVIDIA GTX970 and with your utility it resets the video card drivers, the video card reset seems to cause screen tearing. Itís noticeable tearing in browsers such as Chrome in particular. I tried turning off and on manually the display adapter drivers from the device manager even without using your utility and it still seems to cause screen tearing. Restarting my machine fixes the tearing completely. It also doesnít seem to be an issue with resetting the refresh rate in Windows after setting custom refresh rates with the CRU tool.

Do you know if there is a way to reset the refresh rate from the command line without having to reset the video card drivers, similar if the refresh rate were to be reset from Display settings manually from Windows? Also, do you know what might cause the video screen tearing after resetting the display drivers?

So you state with RatRefresh 0.11 it works, but with 0.14 it doesn't work well? That's curious. If that's the case, I can obviously debug that. Weird thing is though, that on my own cab 0.14 works fine, which is why I inititally think about driver issues. Setting a custom refresh rate without resetting the driver is my ultimate goal, see the first two pages of this thread. However I don't think that's feasible without very specific call to drivers, which would make it TOO brittle to my liking. The last time I used CRU, one needed a reboot before the custom refresh rates are available. If that changed, I'm interested. I think I remember some quirks toom, in the sense that when you add for example 59.150 Hz and 59.300 Hz, both are rounded off as 59, and it doesn't work well. I should try again to see if things changed.

I've also changed my email address on the forum in order to try to receive notifications. So if you could conform 0.11 works 'better' than 0.14 on your system, that would help.

Justin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 531
  • Last login:March 21, 2023, 08:59:36 am
    • Centipede MAME cabinet
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #100 on: February 28, 2023, 08:16:58 am »
I don't know if this has anything to do with the issue at all, but I will say that with my set up, when I run the initial steps that create my display driver file, it states that the minimum and maximum refresh rate identified are backwards!
It says something like:
Min rate: 87
Max rate: 54
"3 warps to Uranus" -- so I stopped playing!

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #101 on: February 28, 2023, 01:25:08 pm »
I don't know if this has anything to do with the issue at all, but I will say that with my set up, when I run the initial steps that create my display driver file, it states that the minimum and maximum refresh rate identified are backwards!
It says something like:
Min rate: 87
Max rate: 54
Do you guys get notification from this forum? I switched from hotmail to gmail but still no notifications, even though my settings seem to be correct.

Anyway, the min and max value come directory from the EDID value stored in registry. Maybe that's corrupted by now? :) In the registry, at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DELA0B8\4&3b360466&0&UID200195\Device Parameters, obviously for your own display, there is the EDID value. Rename or delete it, and reboot. After that, post me the value in there, and / or try running Ratrefresh -setup again. You could try ratrefresh -setup -api, but in terms of min and max nothing should change.

trevorp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Yesterday at 07:23:27 am
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #102 on: February 28, 2023, 09:21:39 pm »
Hi Rataplan,

I seem to have the same issue with any version after 0.11. The refresh rate doesnít seem to change. I also noticed the EDID file generated is different from 0.11 but this might be the way you designed the later versions. Iím not sure what I could be doing wrong with versions after 0.11. I tried 0.12 and 0.14 and they both seem to give the same issue. It seems using the CRU tool allows the refresh rate to change properly with 0.11. Iím not sure why it might work on 0.11 but not 0.14

I also have a weird issue with my video card. I have a NVIDIA GTX970 and with your utility it resets the video card drivers, the video card reset seems to cause screen tearing. Itís noticeable tearing in browsers such as Chrome in particular. I tried turning off and on manually the display adapter drivers from the device manager even without using your utility and it still seems to cause screen tearing. Restarting my machine fixes the tearing completely. It also doesnít seem to be an issue with resetting the refresh rate in Windows after setting custom refresh rates with the CRU tool.

Do you know if there is a way to reset the refresh rate from the command line without having to reset the video card drivers, similar if the refresh rate were to be reset from Display settings manually from Windows? Also, do you know what might cause the video screen tearing after resetting the display drivers?

So you state with RatRefresh 0.11 it works, but with 0.14 it doesn't work well? That's curious. If that's the case, I can obviously debug that. Weird thing is though, that on my own cab 0.14 works fine, which is why I inititally think about driver issues. Setting a custom refresh rate without resetting the driver is my ultimate goal, see the first two pages of this thread. However I don't think that's feasible without very specific call to drivers, which would make it TOO brittle to my liking. The last time I used CRU, one needed a reboot before the custom refresh rates are available. If that changed, I'm interested. I think I remember some quirks toom, in the sense that when you add for example 59.150 Hz and 59.300 Hz, both are rounded off as 59, and it doesn't work well. I should try again to see if things changed.

I've also changed my email address on the forum in order to try to receive notifications. So if you could conform 0.11 works 'better' than 0.14 on your system, that would help.

First off, let me say thank you for this fantastic tool.  I swapped out an old 27" CRT TV that was on its last legs for an LCD, and found this tool which does exactly what I wanted.

I started using it right when you pushed out 0.11, and then left my cab in a state of disrepair until a few months ago.

I saw that you had updated to 0.14 so I tried it with the same behavior as quoted above.

0.11 will give me any rate that my monitor is capable of.  I am not playing anything, just testing rate switching with the ufotest site, as I decide what I want to do with the cab.

Anything from 0.12 - 0.14 act like they're changing the refresh rate, but they all set my rate to 59.972hz.

0.11 will set it to 60.001, 54.707 or whatever I ask for.

I honestly presumed it was something I'd done to my setup so didn't report it here.

I safely exported my registry settings before attempting 0.14 so I can go back and forth between working and non-working configs to test anything you'd like.

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #103 on: March 01, 2023, 04:12:48 pm »
Hmm... Thats weird. Seems to be some bug that does not occur on my cab. Can you spare the time to run ratrefresh -debug -refresh 59.850 and after that to another refreshrate and paste output and the edidoverride registry value, and then the same for .14?
If .11 works it can't be something I can't fix, weird thing is I don't run into it myself.

trevorp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Yesterday at 07:23:27 am
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #104 on: March 01, 2023, 08:29:43 pm »
I don't seem to be able to attach images, so I'll just paste in text what the ufotest site shows at each stage.

Prior to running 0.11

ufotest shows 60.001 Hz

Running 0.11

Code: [Select]
D:\Utilities\RatRefresh>ratrefresh -debug -edidfile edid.txt -refresh 59.850
Key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE
Value 0
WantedRefreshRate 59.850
HexCurrentPixelClock 68ef
CurrentPixelClock 26863
HexHorizontalResolution 0a00
HorizontalResolution 2560
HexverticalResolution 0640
VerticalResolution 1600
HexHorizontalBlankingPixels 00a0
HorizontalBlankingPixels 160
HexVerticalBlankingLines 002e
VerticalBlankingLines 46
TotalHorizontalResolution 2720
TotalVerticalResolution 1646
CalculatedPixelClock 26796
HexCalculatedPixelClock 68ac
ReversedEdidHexCalculatedPixelClock ac68
TotalChecksum 7733
Checksum 203
HexChecksum cb

ufotest shows 59.851 Hz

Code: [Select]
D:\Utilities\RatRefresh>ratrefresh -debug -edidfile edid.txt -refresh 66.123
Key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE
Value 0
WantedRefreshRate 66.123
HexCurrentPixelClock 68ac
CurrentPixelClock 26796
HexHorizontalResolution 0a00
HorizontalResolution 2560
HexverticalResolution 0640
VerticalResolution 1600
HexHorizontalBlankingPixels 00a0
HorizontalBlankingPixels 160
HexVerticalBlankingLines 002e
VerticalBlankingLines 46
TotalHorizontalResolution 2720
TotalVerticalResolution 1646
CalculatedPixelClock 29604
HexCalculatedPixelClock 73a4
ReversedEdidHexCalculatedPixelClock a473
TotalChecksum 7736
Checksum 200
HexChecksum c8

ufotest shows 66.123 Hz

Registry after last command:

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000000
"ConfigFlags"=dword:00000000
"ContainerID"="{6d5104c6-2815-5319-8110-935b6287b83a}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0005"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,e2,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,22

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\WDF]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0004"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,25,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,a4,73,00,a0,a0,40,2e,60,30,20,36,00,80,90,21,00,00,1a,\
  00,00,00,fc,00,44,45,4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,10,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,01,c8

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE]
"0"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,28,\
  78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,25,4b,00,81,00,b3,00,d1,00,71,4f,a9,40,\
  81,80,d1,c0,01,01,a4,73,00,a0,a0,40,2e,60,30,20,36,00,80,90,21,00,00,1a,00,\
  00,00,fc,00,44,45,4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,10,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,01,c8
"CRU_Name"=hex:01,44,45,4c,4c,20,55,33,30,31,34
"CRU_Serial_Number"=hex:00,52,46,35,37,50,34,34,45,41,34,4e,4c
"CRU_Range_Limits"=hex:00,00,31,00,56,00,1d,00,71,01,18
"CRU_Extensions"=hex:01
"1"=hex:02,03,25,70,50,90,05,04,03,02,07,16,01,06,11,12,15,13,14,1f,20,23,09,\
  1f,07,67,03,0c,00,10,00,38,38,83,01,00,00,02,3a,80,18,71,38,2d,40,58,2c,45,\
  00,e0,0e,11,00,00,1e,01,1d,80,18,71,1c,16,20,58,2c,25,00,e0,87,10,00,00,9e,\
  01,1d,00,72,51,d0,1e,20,6e,28,55,00,40,--BINGO! Either that, or I was attempting to say "before" but it was too many letters to type--,10,00,00,1e,8f,0a,d0,8a,20,e0,2d,\
  10,10,3e,96,00,--BINGO! Either that, or I was attempting to say "before" but it was too many letters to type--,78,00,00,00,18,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,8f

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE\0]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE\0\Device Parameters]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE\0\Device Parameters\EDID_OVERRIDE]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\WDF]


Setup for 0.14

Code: [Select]
D:\Utilities\RatRefresh_0.14>RatRefresh.exe -setup
Detected video drivers:
Name:                         NVIDIA GeForce GTX 780
Device ID:                    PCI\VEN_10DE&DEV_1004&SUBSYS_84691043&REV_A1\4&80E7924&0&0008

Detected active monitors:
Monitor number:               1
Monitor description:          DELL U3014
Serial number:                1093946956
Monitor InstanceID:           DISPLAY\DEL4083\5&67fc0b1&0&UID4353
Monitor DevicePath:
HorizontalResolution:         2560
VerticalResolution:           1600
Minimum reported refreshrate: 68
Maximum reported refreshrate: 69


What monitor number to use?
1
edid.txt file written.

Running 0.14

Code: [Select]
D:\Utilities\RatRefresh_0.14>ratrefresh -debug -edidfile edid.txt -refresh 59.850
-min not supplied. Using EDID supplied value of 0
-max not supplied. Using EDID supplied value of 0
Requested refreshrate exceeding maximum. Setting refreshrate to maximum.
Key SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE
WantedRefreshRate 0
CalculatedPixelClock 0
HexCalculatedPixelClock 0000
ReversedEdidHexCalculatedPixelClock 0000
TotalChecksum 7457
Checksum 223
HexChecksum df

done

Note: this failed as it incorrectly identified my min/max rates as 0

Second run with min/max specified

Code: [Select]
D:\Utilities\RatRefresh_0.14>ratrefresh -debug -refresh 59.850 -min 50 -max 75
Key SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE
WantedRefreshRate 59.850
CalculatedPixelClock 26796
HexCalculatedPixelClock 68ac
ReversedEdidHexCalculatedPixelClock ac68
TotalChecksum 7733
Checksum 203
HexChecksum cb

done

ufotest shows 59.972 Hz

Code: [Select]
D:\Utilities\RatRefresh_0.14>ratrefresh -debug -refresh 66.123 -min 50 -max 75
Key SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE
WantedRefreshRate 66.123
CalculatedPixelClock 29604
HexCalculatedPixelClock 73a4
ReversedEdidHexCalculatedPixelClock a473
TotalChecksum 7736
Checksum 200
HexChecksum c8

done

ufotest shows 59.972 Hz

Registry after last command:

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000000
"ConfigFlags"=dword:00000000
"ContainerID"="{6d5104c6-2815-5319-8110-935b6287b83a}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0005"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,e2,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,22

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\WDF]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0004"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,25,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,a4,73,00,a0,a0,40,2e,60,30,20,36,00,80,90,21,00,00,1a,\
  00,00,00,fc,00,44,45,4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,10,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,01,c8

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE]
"0"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,28,\
  78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,25,4b,00,81,00,b3,00,d1,00,71,4f,a9,40,\
  81,80,d1,c0,01,01,a4,73,00,a0,a0,40,2e,60,30,20,36,00,80,90,21,00,00,1a,00,\
  00,00,fc,00,44,45,4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,10,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,01,c8

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\WDF]


Also note, if I go back to 0.11 and try and change refresh rates after running 0.14, they also fail to set the requested rate:

Code: [Select]
D:\Utilities\RatRefresh>ratrefresh -debug -edidfile edid.txt -refresh 66.123
Key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE
Value 0
WantedRefreshRate 66.123
HexCurrentPixelClock 68ac
CurrentPixelClock 26796
HexHorizontalResolution 0a00
HorizontalResolution 2560
HexverticalResolution 0640
VerticalResolution 1600
HexHorizontalBlankingPixels 00a0
HorizontalBlankingPixels 160
HexVerticalBlankingLines 002e
VerticalBlankingLines 46
TotalHorizontalResolution 2720
TotalVerticalResolution 1646
CalculatedPixelClock 29604
HexCalculatedPixelClock 73a4
ReversedEdidHexCalculatedPixelClock a473
TotalChecksum 7736
Checksum 200
HexChecksum c8

ufotest shows 59.972 Hz

I have to delete the registry entries and restore my backup

After deleting the registry entries and restoring and running the same command from above

ufotest shows 66.123 Hz

Please let me know what else I can do to assist.
« Last Edit: March 01, 2023, 08:31:58 pm by trevorp »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #105 on: March 02, 2023, 04:27:53 am »
Well obviously things are different, but that's not coming from my tool: in your first registry-paste (ie. for 0.11) you seem to have 2 custom resolutions, 0 and 1. Maybe in value 1 there is a copy-paste error, but it says:

"1"=hex:02,03,25,70,50,90,05,04,03,02,07,16,01,06,11,12,15,13,14,1f,20,23,09,\
  1f,07,67,03,0c,00,10,00,38,38,83,01,00,00,02,3a,80,18,71,38,2d,40,58,2c,45,\
  00,e0,0e,11,00,00,1e,01,1d,80,18,71,1c,16,20,58,2c,25,00,e0,87,10,00,00,9e,\
  01,1d,00,72,51,d0,1e,20,6e,28,55,00,40,--BINGO! Either that, or I was attempting to say "before" but it was too many letters to type--,10,00,00,1e,8f,0a,d0,8a,20,e0,2d,\
  10,10,3e,96,00,--BINGO! Either that, or I was attempting to say "before" but it was too many letters to type--,78,00,00,00,18,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,8f

And obviously that bingo part should not be in there :-) But the thing is, if you have multiple custom resolutions set, you'll get multiple refresh rates available in Windows, and one needs to manually select 'the closest' in order for it to work. Refreshrates in windows are rounded to 0 decimals, ie. 59.950 and 60.150 would both be 60Hz, from Windows GUI perspective, and I'm not sure anymore how Windows responds to that. When you have only one, Windows will always use that, which is why I strongly advise to only have ONE custom resolution set, which would be 0.

Then again, you state that in 0.11 it works, even while your registry there contains 2 custom resolutions, and one with possible bogus text too (although maybe because of that it might be filtered out).

The resulting EDID_OVERRIDE values for resolution 0 though in both your registry pastes of 0.11 and 0.14 are 100% identical. And in the end that's what Windows / display driver should pick up.

Your output it strange on another level though. With -debug, it should report also report the current Pixelclock, which it doesn't show. It seems I put another 0.14 up then I have myself. So before I update the opening post, try this release: <new link below, read along ;-)> and report. If it still doesn't work, I'd like to see them same output for this version again.
But before testing, make sure you run ratrefresh -remove, and verify the complete EDID_OVERRIDE is removed after that.

I'm currently looking into monitor DDC commands. With them you can programmatically do settings on your monitor like brightness, contrast, RGB values but also power-off if your monitor supports it (most do). ClickMonitorDDC is a great tool I use almost daily which does the same. I am currently testing to see if powering down or resetting link through DCC makes Windows / display driver pick up the custom resolutions. That would maybe mean we don't have to reset the display driver completely, in order not to crash frontends.

I'm also looking into why the min/max readout is not working but to be honest, reading my code and looking at the EDID specifications, I'm not sure how it ever worked at all  ;D

[edit]
I've just added some additional debug info with regards to the min/max readouts. Please supply output of ratrefresh -debug -refresh <something>. It should now report a list of 8 values, being min and max in the 4 possible places EDID has for them. You could also check in CRU whether that reads the same values:



I also noted that CRU still comes with restart64.exe, which also simply restarts the display driver, with the samy nasty side results for running application as using devcon to reset it.
New Ratrefresh test version: https://drive.google.com/file/d/1jTcLjuDrzKKZDF4SokUTZVoaGpj9u5Al/view?usp=share_link

[edit2]
unfortunately, turning off / resetting the monitor using DDC does not re-initialize the custom resolutions. For now an actual reset of the display driver remains mandatory.
« Last Edit: March 02, 2023, 05:22:58 am by Rataplan626 »

trevorp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Yesterday at 07:23:27 am
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #106 on: March 02, 2023, 08:06:12 am »
Thanks for your detailed reply!

This is going to require more time than I have this morning before work.  I'll have to pick it up afterwards.

quick notes this morning.

Running CRU I only see one custom entry, see attached pic.

When I attempt to run ratrefresh -remove, I get the below error:

Code: [Select]
D:\Utilities\RatRefresh_0.14>ratrefresh -remove
Trying to delete EDID_OVERRIDE key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\EDID_OVERRIDE
Error deleting registry key, probably doesn't exist anymore?


Here's my registry export after running the above:

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000000
"ConfigFlags"=dword:00000000
"ContainerID"="{6d5104c6-2815-5319-8110-935b6287b83a}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0005"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,e2,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,22

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\WDF]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0004"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,25,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,ef,68,00,a0,a0,40,2e,60,30,20,36,00,80,90,21,00,00,1a,\
  00,00,00,fc,00,44,45,4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,10,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,01,88

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE]
"0"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,28,\
  78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,25,4b,00,81,00,b3,00,d1,00,71,4f,a9,40,\
  81,80,d1,c0,01,01,ef,68,00,a0,a0,40,2e,60,30,20,36,00,80,90,21,00,00,1a,00,\
  00,00,fc,00,44,45,4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,10,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,01,88
"CRU_Name"=hex:01,44,45,4c,4c,20,55,33,30,31,34
"CRU_Serial_Number"=hex:00,52,46,35,37,50,34,34,45,41,34,4e,4c
"CRU_Range_Limits"=hex:00,00,31,00,56,00,1d,00,71,01,18
"CRU_Extensions"=hex:01
"1"=hex:02,03,25,70,50,90,05,04,03,02,07,16,01,06,11,12,15,13,14,1f,20,23,09,\
  1f,07,67,03,0c,00,10,00,38,38,83,01,00,00,02,3a,80,18,71,38,2d,40,58,2c,45,\
  00,e0,0e,11,00,00,1e,01,1d,80,18,71,1c,16,20,58,2c,25,00,e0,87,10,00,00,9e,\
  01,1d,00,72,51,d0,1e,20,6e,28,55,00,40,--BINGO! Either that, or I was attempting to say "before" but it was too many letters to type--,10,00,00,1e,8f,0a,d0,8a,20,e0,2d,\
  10,10,3e,96,00,--BINGO! Either that, or I was attempting to say "before" but it was too many letters to type--,78,00,00,00,18,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,8f

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE\0]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE\0\Device Parameters]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE\0\Device Parameters\EDID_OVERRIDE]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\WDF]


The entries are clearly still there.  If I click on DEL4083 and delete it, it deletes most, but not all of the data:

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000000
"ConfigFlags"=dword:00000000
"ContainerID"="{6d5104c6-2815-5319-8110-935b6287b83a}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0005"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0004"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"


I'll continue to poke at this after hours.

Also, you had asked if we get notifications, I turned them on yesterday for this thread, and got the notification to my gmail account.

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #107 on: March 02, 2023, 08:22:07 am »
Yeah, after disabling and re-enabling notifications it seems to work now. Anyway:

Code: [Select]
D:\Utilities\RatRefresh_0.14>ratrefresh -remove
Trying to delete EDID_OVERRIDE key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\[b]5&67fc0b1&0&UID4353[/b]\EDID_OVERRIDE
Error deleting registry key, probably doesn't exist anymore?

Here's my registry export after running the above:

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\[b]1&8713bca&0&UID0[/b]]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000000
"ConfigFlags"=dword:00000000
"ContainerID"="{6d5104c6-2815-5319-8110-935b6287b83a}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0005"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"


see the difference? Your edid file is not reflecting the correct key. So either run ratrefresh -setup again and check if edid.txt actually reflects the right key, or for now manually correct the key in edid.txt. If detecting is wrong, does it detect multiple screens? And if so, is the 'correct' key to be seen in the detections?

Think we're getting close now  :)

trevorp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Yesterday at 07:23:27 am
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #108 on: March 02, 2023, 07:43:09 pm »
OK, here we go.

Making sure it is really removed

Code: [Select]
D:\Utilities\RatRefresh_0.14_test>RatRefresh.exe -remove
Trying to delete EDID_OVERRIDE key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\EDID_OVERRIDE

D:\Utilities\RatRefresh_0.14_test>RatRefresh.exe -remove
Trying to delete EDID_OVERRIDE key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\EDID_OVERRIDE
Error deleting registry key, probably doesn't exist anymore?

Here's my registry export after the deletes

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000000
"ConfigFlags"=dword:00000000
"ContainerID"="{6d5104c6-2815-5319-8110-935b6287b83a}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0005"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0004"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"



Setup

Code: [Select]
D:\Utilities\RatRefresh_0.14_test>RatRefresh.exe -setup
Detected video drivers:
Name:                         NVIDIA GeForce GTX 780
Device ID:                    PCI\VEN_10DE&DEV_1004&SUBSYS_84691043&REV_A1\4&80E7924&0&0008

Detected active monitors:
Monitor number:               1
Monitor description:          DELL U3014
Serial number:                RF57P44EA4NL
Monitor InstanceID:           DISPLAY\DEL4083\5&67fc0b1&0&UID4353
Monitor DevicePath:
HorizontalResolution:         2560
VerticalResolution:           1600
Minimum reported refreshrate: 49
Maximum reported refreshrate: 86


What monitor number to use?
1
edid.txt file written.

Code: [Select]
D:\Utilities\RatRefresh_0.14_test>type edid.txt
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353

Here's my registry after setup

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000000
"ConfigFlags"=dword:00000000
"ContainerID"="{6d5104c6-2815-5319-8110-935b6287b83a}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0005"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,e2,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,22

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\WDF]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0004"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,70,5e,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,9e

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\WDF]


Checking CRU



I see there are two entries for DEL4083 - DELL U3014.



Here's the second one.



This second entry matches the rate that 0.14 (both original and test) set my rate to.

When I hit edit on the display, I see the same information for both DEL displays




Running the new 0.14_test version

Code: [Select]
D:\Utilities\RatRefresh_0.14_test>RatRefresh.exe -debug -refresh 59.850
-min not supplied. Using EDID supplied value of 49
-max not supplied. Using EDID supplied value of 86
Press key to continue.


Going through all Descriptor blocks
*** StoredEDIDValue(54): 239
*** StoredEDIDValue(55): 104

*** StoredEDIDValue(77): 82
*** StoredEDIDValue(78): 70

*** StoredEDIDValue(95): 68
*** StoredEDIDValue(96): 69

*** StoredEDIDValue(113): 49
*** StoredEDIDValue(114): 86

Key SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE
WantedRefreshRate 59.850
HexCurrentPixelClock: 68ef
CurrentPixelClock: 26863
HexHorizontalResolution: 0a00
HorizontalResolution: 2560
HexVerticalResolution: 0640
VerticalResolution: 1600
HexVerticalBlankingLines: 002e
VerticalBlankingLines: 46
TotalHorizontalResolution: 2720
TotalVerticalResolution: 1646
CalculatedPixelClock 26796
HexCalculatedPixelClock 68ac
ReversedEdidHexCalculatedPixelClock ac68
TotalChecksum 9640
Checksum 88
HexChecksum 58

done
Press key to continue.

ufotest shows 59.972 Hz



Here are both of the CRU





Here's my registry after 59.850

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000000
"ConfigFlags"=dword:00000000
"ContainerID"="{6d5104c6-2815-5319-8110-935b6287b83a}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0005"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,e2,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,22

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\WDF]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0004"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,ac,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,58

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE]
"0"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,28,\
  78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,40,\
  81,80,d1,c0,01,01,ac,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,00,\
  00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,4c,\
  4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,20,\
  20,20,20,01,58

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\WDF]


Another run with 66.123 refresh rate requested

Code: [Select]
D:\Utilities\RatRefresh_0.14_test>RatRefresh.exe -debug -refresh 66.123
-min not supplied. Using EDID supplied value of 49
-max not supplied. Using EDID supplied value of 86
Press key to continue.


Going through all Descriptor blocks
*** StoredEDIDValue(54): 172
*** StoredEDIDValue(55): 104

*** StoredEDIDValue(77): 82
*** StoredEDIDValue(78): 70

*** StoredEDIDValue(95): 68
*** StoredEDIDValue(96): 69

*** StoredEDIDValue(113): 49
*** StoredEDIDValue(114): 86

Key SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE
WantedRefreshRate 66.123
HexCurrentPixelClock: 68ac
CurrentPixelClock: 26796
HexHorizontalResolution: 0a00
HorizontalResolution: 2560
HexVerticalResolution: 0640
VerticalResolution: 1600
HexVerticalBlankingLines: 002e
VerticalBlankingLines: 46
TotalHorizontalResolution: 2720
TotalVerticalResolution: 1646
CalculatedPixelClock 29604
HexCalculatedPixelClock 73a4
ReversedEdidHexCalculatedPixelClock a473
TotalChecksum 9643
Checksum 85
HexChecksum 55

done
Press key to continue.

ufotest shows 59.972 Hz



Here are both of the CRU





Here's my registry after 66.123

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000000
"ConfigFlags"=dword:00000000
"ContainerID"="{6d5104c6-2815-5319-8110-935b6287b83a}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0005"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,e2,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,22

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\WDF]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0004"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,a4,73,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,55

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE]
"0"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,28,\
  78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,40,\
  81,80,d1,c0,01,01,a4,73,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,00,\
  00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,4c,\
  4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,20,\
  20,20,20,01,55

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\WDF]


This got so long, I hope I got all the tests in.

[edit] I forgot to mention, if I delete the second DEL4083 entry, close CRU and re-open it, it's gone.  Next time I run ratrefresh, it recreates it.
« Last Edit: March 02, 2023, 07:46:38 pm by trevorp »

Rataplan727

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 16
  • Last login:March 10, 2023, 04:40:19 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #109 on: March 03, 2023, 03:28:08 am »
At first: my Rataplan626 account is locked out, asked an admin. I had to register another account to post again.
Multiple screens being 'detected' I've seen before, it might be the issue here.
Your edid.txt file will now contain:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353

Please modify that to

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0

which is the other ID that was already in your registry, and then try running RatRefresh again. If it works it means I'm not detecting the actual monitor ID correctly.
The strange thing here now is that in your 'registry after delete', so the second code block, there is [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0] and [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353], where 5&67fc0b1&0&UID4353 is the one I detected. However, the 1&8713bca&0&UID0 does NOT have any EDID value in there. For your info, Windows or your display driver puts the EDID value it pulls from the monitor in [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters] value EDID. So it's weird it's not there IF that's the correct monitor key, and even stranger it's there AFTER you run RatRefresh -setup, as that writes nothing to registry but only generates the edid.txt file.

If all else fails, you can go the following route: first, maybe I'd delete your display driver and monitors from device manager, and reboot. After that, run CRU and put at least one custom resolution in (values don't really matter). Then you can lookup in registry where it created the EDID_OVERRIDE key. That's the key that should end up in edid.txt. After that make sure to remove the EDID_OVERRIDE key that's created by CRU so it doesn't interfere. Then try RatRefresh again.

The generated EDID_OVERRIDE registry seems to be correct when I decode it. So my guess now indeed is that my detection isn't working correctly for you. Sorry for the hassle and thanks for all your input  :cheers:

[edit]
ah, looking back I build in more functionality than I remembered :) What does 'RatRefresh -showmonitors' and 'RatRefresh -showmonitors -api' do?
« Last Edit: March 03, 2023, 07:08:48 am by Rataplan727 »

trevorp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Yesterday at 07:23:27 am
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #110 on: March 03, 2023, 09:28:53 am »
That sucks about your other account, I'm sure it'll get sorted out.

No joy so far.  Here are the results of my morning testing.

Code: [Select]
D:\Utilities\RatRefresh_0.14_test>type edid.txt
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0

Code: [Select]
D:\Utilities\RatRefresh_0.14_test>RatRefresh.exe -debug -refresh 66.123
-min not supplied. Using EDID supplied value of 49
-max not supplied. Using EDID supplied value of 86
Press key to continue.


Going through all Descriptor blocks
*** StoredEDIDValue(54): 112
*** StoredEDIDValue(55): 94

*** StoredEDIDValue(77): 82
*** StoredEDIDValue(78): 70

*** StoredEDIDValue(95): 68
*** StoredEDIDValue(96): 69

*** StoredEDIDValue(113): 49
*** StoredEDIDValue(114): 86

Key SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE
WantedRefreshRate 66.123
HexCurrentPixelClock: 5e70
CurrentPixelClock: 24176
HexHorizontalResolution: 0a00
HorizontalResolution: 2560
HexVerticalResolution: 0640
VerticalResolution: 1600
HexVerticalBlankingLines: 002e
VerticalBlankingLines: 46
TotalHorizontalResolution: 2720
TotalVerticalResolution: 1646
CalculatedPixelClock 29604
HexCalculatedPixelClock 73a4
ReversedEdidHexCalculatedPixelClock a473
TotalChecksum 9643
Checksum 85
HexChecksum 55

done
Press key to continue.

ufotest shows 59.972 Hz

Here's my registry export after this

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000000
"ConfigFlags"=dword:00000000
"ContainerID"="{6d5104c6-2815-5319-8110-935b6287b83a}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0005"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,a4,73,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,55

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE]
"0"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,28,\
  78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,40,\
  81,80,d1,c0,01,01,a4,73,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,00,\
  00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,4c,\
  4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,20,\
  20,20,20,01,55

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\WDF]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0004"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,f0,61,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,1b

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE]
"0"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,28,\
  78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,40,\
  81,80,d1,c0,01,01,f0,61,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,00,\
  00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,4c,\
  4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,20,\
  20,20,20,01,1b

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\WDF]



As this didn't work, I went the next route.  I deleted both the display adapter and monitor from Device Manager and rebooted.

Here's the registry export after this

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0001"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,e2,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,22

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353\Device Parameters\WDF]



Note that there's no EDID_OVERRID in the export, but when I ran CRU to create the custom entry I see my 59.971 rate is still following me.



I edited the custom entry anyway, closed out and re-opened CRU



Running ratrefresh -setup

Code: [Select]
D:\Utilities\RatRefresh_0.14_test>type edid.txt
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353

D:\Utilities\RatRefresh_0.14_test>RatRefresh.exe -setup
Detected video drivers:
Name:                         NVIDIA GeForce GTX 780
Device ID:                    PCI\VEN_10DE&DEV_1004&SUBSYS_84691043&REV_A1\4&80E7924&0&0008

Detected active monitors:
Monitor number:               1
Monitor description:          DELL U3014
Serial number:                RF57P44EA4NL
Monitor InstanceID:           DISPLAY\DEL4083\5&67fc0b1&2&UID4353
Monitor DevicePath:
HorizontalResolution:         2560
VerticalResolution:           1600
Minimum reported refreshrate: 49
Maximum reported refreshrate: 86


What monitor number to use?
1
edid.txt file written.

Code: [Select]
D:\Utilities\RatRefresh_0.14_test>RatRefresh.exe -debug -refresh 59.850 -min 50 -max 75

Going through all Descriptor blocks
*** StoredEDIDValue(54): 239
*** StoredEDIDValue(55): 104

*** StoredEDIDValue(77): 68
*** StoredEDIDValue(78): 69

*** StoredEDIDValue(95): 0
*** StoredEDIDValue(96): 0

*** StoredEDIDValue(113): 0
*** StoredEDIDValue(114): 0

Key SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353\Device Parameters\EDID_OVERRIDE
WantedRefreshRate 59.850
HexCurrentPixelClock: 68ef
CurrentPixelClock: 26863
HexHorizontalResolution: 0a00
HorizontalResolution: 2560
HexVerticalResolution: 0640
VerticalResolution: 1600
HexVerticalBlankingLines: 002e
VerticalBlankingLines: 46
TotalHorizontalResolution: 2720
TotalVerticalResolution: 1646
CalculatedPixelClock 26796
HexCalculatedPixelClock 68ac
ReversedEdidHexCalculatedPixelClock ac68
TotalChecksum 7733
Checksum 203
HexChecksum cb

done
Press key to continue.


ufotest shows 59.972 Hz

Here's the registry export after this
Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000000
"ConfigFlags"=dword:00000000
"ContainerID"="{6d5104c6-2815-5319-8110-935b6287b83a}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0004"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,e2,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,22

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\WDF]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0001"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,25,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,ac,68,00,a0,a0,40,2e,60,30,20,36,00,80,90,21,00,00,1a,\
  00,00,00,fc,00,44,45,4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,10,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,01,cb

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353\Device Parameters\EDID_OVERRIDE]
"0"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,28,\
  78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,25,4b,00,81,00,b3,00,d1,00,71,4f,a9,40,\
  81,80,d1,c0,01,01,ac,68,00,a0,a0,40,2e,60,30,20,36,00,80,90,21,00,00,1a,00,\
  00,00,fc,00,44,45,4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,10,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,01,cb

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353\Device Parameters\WDF]


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0 has made a return.

At this point I'm going to nuke it from orbit and run DDU at lunch and rip out all display drivers and start fresh.

I could continue to run 0.11 with no issues, so this isn't hurting anything.  I'm just glad I can help diagnose this so hopefully we can avoid a similar issue for someone else.

Sorry, I wrote this all up this morning and apparently never hit post.  Just checking in on my coffee run.

Rataplan727

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 16
  • Last login:March 10, 2023, 04:40:19 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #111 on: March 03, 2023, 10:36:16 am »
Quote
I could continue to run 0.11 with no issues, so this isn't hurting anything.  I'm just glad I can help diagnose this so hopefully we can avoid a similar issue for someone else.
And I really appreciate that! Remote support is always a hassle. Unless we use something like Anydesk so I can remote your system, it's going to be 'try this, report that' unfortunately..

EDID_OVERRIDE does not exist by default. It's only needed when you want to use custom resolutions. RatRefresh and CRU just create it when it's not there yet. And since 0.12 you don't actually have to use CRU anymore to set things up. In fact you shouldn't use CRU anymore to set things up, as that creates additional values in the EDID_OVERRIDE key. I'm baffled why it wouldn't work in 0.14. What is in your edid.txt from 0.11? IIRC 0.11 had the path until EDID_OVERRIDE in there, which 0.12+ does not have, it has just the instanceID. But that instance ID should be the same. After all, all RatRefresh and CRU do is put a value 0 with an EDID value with specific timings in there (or 1,2,3 for additional resolutions). It's just a registry value, and thats all these tools do. So then, if 0.11 works, I wonder what's in that edid.txt file.

However, AGAIN you now have 2 EDID_OVERRIDE keys, for ID 1&8713bca&0&UID0 and for 5&67fc0b1&0&UID4353, both with different original EDID values and both different EDID_OVERRIDE values for custom resolution 0. After deleting your display + monitors, only 5&67fc0b1&0&UID4353 seems to be left, so that does seem to be the one to work with. And also that's the ID you have in your edid.txt from 0.11 (from your post from yesterday). But then, after you run RatRefresh 1&8713bca&0&UID0 is back, which probably happens after resetting the device, as the only value RatRefresh writes is '0' with an EDID value in there.


I just can't get over the fact that 0.11 would work and 0.14 doens't. The previously posted registry stuff doesn't add up. So... I want to ask you one more time to do the following:

0.11
- Remove drivers / monitors from Windows and reboot
- Open CRU and add one custom resolution
- Rename devconx64 to something else, so your display won't get reset
- Verify the edid.txt still reflects the ID you now see in your registry, ie the one where CRU put it's info
- Run ratrefresh -debug -file edid.txt -refresh 59.300 (note that debug might require you to hit enter a few times, it might pause in between)
- Screen should NOT reset as devconx is not accesible.
- Post ratrefresh output
- Post edid.txt from version 0.11
- Export registry and post

then for 0.14
- Just to be sure (it's probaby redundant): remove drivers / monitor again and reboot
- Run ratrefresh -setup and choose your monitor
- Run ratrefresh -debug -norestart -refresh 59.300 (note that debug might require you to hit enter a few times, it might pause in between)
- Screen should NOT reset as 0.14 has -norestart
- Post ratrefresh output
- Export registry and post


I will carefully study those outputs. As this way we prevent the display from resetting, whatever is in the registry then with regards to custom resolutions, is what RatRefresh actually wrote. Resetting display might change things, although I haven't seen that happening yet. If the registry values that 0.11 writes are different than 0.14, I have work to do. If they are the same, well then I would not know yet how to proceed.

Thank you so much for your help debugging this :) Which I had a system that didn't work, would help me debug.

trevorp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Yesterday at 07:23:27 am
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #112 on: March 03, 2023, 09:13:22 pm »
0.11

Removing drivers/monitor from Device Manager and rebooting

Registry export

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&4&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0001"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&4&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,e2,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,22

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&4&UID4353\Device Parameters\WDF]


Setting a custom resolution with CRU



Registry after CRU

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&1&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0001"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&1&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,e2,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,22,02,03,25,f1,50,90,05,04,03,02,07,16,01,06,11,12,15,13,14,\
  1f,20,23,09,1f,07,67,03,0c,00,10,00,38,38,83,01,00,00,02,3a,80,18,71,38,2d,\
  40,58,2c,45,00,81,91,21,00,00,1e,01,1d,80,18,71,1c,16,20,58,2c,25,00,81,91,\
  21,00,00,9e,01,1d,00,72,51,d0,1e,20,6e,28,55,00,81,91,21,00,00,1e,8f,0a,d0,\
  8a,20,e0,2d,10,10,3e,96,00,81,91,21,00,00,18,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,e8

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&1&UID4353\Device Parameters\EDID_OVERRIDE]
"0"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,28,\
  78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,25,4b,00,81,00,b3,00,d1,00,71,4f,a9,40,\
  81,80,d1,c0,01,01,71,5e,00,a0,a0,40,2e,60,30,20,36,00,80,90,21,00,00,1a,00,\
  00,00,fc,00,44,45,4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,10,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,01,10
"CRU_Name"=hex:01,44,45,4c,4c,20,55,33,30,31,34
"CRU_Serial_Number"=hex:00,52,46,35,37,50,34,34,45,41,34,4e,4c
"CRU_Range_Limits"=hex:00,00,31,00,56,00,1d,00,71,01,18
"CRU_Extensions"=hex:01
"1"=hex:02,03,25,70,50,90,05,04,03,02,07,16,01,06,11,12,15,13,14,1f,20,23,09,\
  1f,07,67,03,0c,00,10,00,38,38,83,01,00,00,02,3a,80,18,71,38,2d,40,58,2c,45,\
  00,e0,0e,11,00,00,1e,01,1d,80,18,71,1c,16,20,58,2c,25,00,e0,87,10,00,00,9e,\
  01,1d,00,72,51,d0,1e,20,6e,28,55,00,40,--BINGO! Either that, or I was attempting to say "before" but it was too many letters to type--,10,00,00,1e,8f,0a,d0,8a,20,e0,2d,\
  10,10,3e,96,00,--BINGO! Either that, or I was attempting to say "before" but it was too many letters to type--,78,00,00,00,18,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,8f

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&1&UID4353\Device Parameters\WDF]


Verifying edid.txt still reflects the ID

Code: [Select]
D:\Utilities\RatRefresh>type edid.txt
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE\0

Code: [Select]
D:\Utilities\RatRefresh>ratrefresh -debug -edidfile edid.txt -refresh 59.300
Registry value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&0&UID4353\Device Parameters\EDID_OVERRIDE\0 could not be read. Wrong key / value?

At this point I started poking around the registy key with powershell and kept walking back until I realized the device ID was wrong.

I corrected it to what I see in the registry

Code: [Select]
D:\Utilities\RatRefresh>type edid.txt
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&1&UID4353\Device Parameters\EDID_OVERRIDE\0

The only difference is 5&67fc0b1&0&UID4353 doesn't work, 5&67fc0b1&1&UID4353 does.  When I kept restoring my registry backup, it was restoring the &0 display

Ratrefresh output

Code: [Select]
D:\Utilities\RatRefresh>ratrefresh -debug -edidfile edid.txt -refresh 59.300
Key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&1&UID4353\Device Parameters\EDID_OVERRIDE
Value 0
WantedRefreshRate 59.300
HexCurrentPixelClock 5e71
CurrentPixelClock 24177
HexHorizontalResolution 0a00
HorizontalResolution 2560
HexverticalResolution 0640
VerticalResolution 1600
HexHorizontalBlankingPixels 00a0
HorizontalBlankingPixels 160
HexVerticalBlankingLines 002e
VerticalBlankingLines 46
TotalHorizontalResolution 2720
TotalVerticalResolution 1646
CalculatedPixelClock 26549
HexCalculatedPixelClock 67b5
ReversedEdidHexCalculatedPixelClock b567
TotalChecksum 7741
Checksum 195
HexChecksum c3

Registry after this command

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&1&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0001"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&1&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,e2,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,22,02,03,25,f1,50,90,05,04,03,02,07,16,01,06,11,12,15,13,14,\
  1f,20,23,09,1f,07,67,03,0c,00,10,00,38,38,83,01,00,00,02,3a,80,18,71,38,2d,\
  40,58,2c,45,00,81,91,21,00,00,1e,01,1d,80,18,71,1c,16,20,58,2c,25,00,81,91,\
  21,00,00,9e,01,1d,00,72,51,d0,1e,20,6e,28,55,00,81,91,21,00,00,1e,8f,0a,d0,\
  8a,20,e0,2d,10,10,3e,96,00,81,91,21,00,00,18,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,e8

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&1&UID4353\Device Parameters\EDID_OVERRIDE]
"0"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,28,\
  78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,25,4b,00,81,00,b3,00,d1,00,71,4f,a9,40,\
  81,80,d1,c0,01,01,b5,67,00,a0,a0,40,2e,60,30,20,36,00,80,90,21,00,00,1a,00,\
  00,00,fc,00,44,45,4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,10,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,01,c3
"CRU_Name"=hex:01,44,45,4c,4c,20,55,33,30,31,34
"CRU_Serial_Number"=hex:00,52,46,35,37,50,34,34,45,41,34,4e,4c
"CRU_Range_Limits"=hex:00,00,31,00,56,00,1d,00,71,01,18
"CRU_Extensions"=hex:01
"1"=hex:02,03,25,70,50,90,05,04,03,02,07,16,01,06,11,12,15,13,14,1f,20,23,09,\
  1f,07,67,03,0c,00,10,00,38,38,83,01,00,00,02,3a,80,18,71,38,2d,40,58,2c,45,\
  00,e0,0e,11,00,00,1e,01,1d,80,18,71,1c,16,20,58,2c,25,00,e0,87,10,00,00,9e,\
  01,1d,00,72,51,d0,1e,20,6e,28,55,00,40,--BINGO! Either that, or I was attempting to say "before" but it was too many letters to type--,10,00,00,1e,8f,0a,d0,8a,20,e0,2d,\
  10,10,3e,96,00,--BINGO! Either that, or I was attempting to say "before" but it was too many letters to type--,78,00,00,00,18,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,8f

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&1&UID4353\Device Parameters\WDF]


0.14

Removed drivers/mointors

Registry at this stage

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0001"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,e2,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,22

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353\Device Parameters\WDF]


Setting up ratrefresh

Code: [Select]
D:\Utilities\RatRefresh_0.14_test>ratrefresh -setup
Detected video drivers:
Name:                         NVIDIA GeForce GTX 780
Device ID:                    PCI\VEN_10DE&DEV_1004&SUBSYS_84691043&REV_A1\4&80E7924&0&0008

Detected active monitors:
Monitor number:               1
Monitor description:          DELL U3014
Serial number:                RF57P44EA4NL
Monitor InstanceID:           DISPLAY\DEL4083\5&67fc0b1&2&UID4353
Monitor DevicePath:
HorizontalResolution:         2560
VerticalResolution:           1600
Minimum reported refreshrate: 49
Maximum reported refreshrate: 86


What monitor number to use?
1
edid.txt file written.


Verifying edid.txt

Code: [Select]
D:\Utilities\RatRefresh_0.14_test>type edid.txt
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353

Code: [Select]
D:\Utilities\RatRefresh_0.14_test>ratrefresh -debug -norestart -refresh 59.300
Registry key SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353\Device Parameters\EDID_OVERRIDE could not be opened. Trying to create subkey.
Registry value SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353\ could Not be read. Using the original EDID value.
-min not supplied. Using EDID supplied value of 49
-max not supplied. Using EDID supplied value of 86
Press key to continue.


Going through all Descriptor blocks
*** StoredEDIDValue(54): 226
*** StoredEDIDValue(55): 104

*** StoredEDIDValue(77): 82
*** StoredEDIDValue(78): 70

*** StoredEDIDValue(95): 68
*** StoredEDIDValue(96): 69

*** StoredEDIDValue(113): 49
*** StoredEDIDValue(114): 86

Key SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353\Device Parameters\EDID_OVERRIDE
WantedRefreshRate 59.300
HexCurrentPixelClock: 68e2
CurrentPixelClock: 26850
HexHorizontalResolution: 0a00
HorizontalResolution: 2560
HexVerticalResolution: 0640
VerticalResolution: 1600
HexVerticalBlankingLines: 002e
VerticalBlankingLines: 46
TotalHorizontalResolution: 2720
TotalVerticalResolution: 1646
CalculatedPixelClock 26549
HexCalculatedPixelClock 67b5
ReversedEdidHexCalculatedPixelClock b567
TotalChecksum 9648
Checksum 80
HexChecksum 50
-norestart supplied, Not restarting video driver.

done
Press key to continue.

Registry
Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0001"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,e2,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,22

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353\Device Parameters\EDID_OVERRIDE]
"0"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,28,\
  78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,40,\
  81,80,d1,c0,01,01,b5,67,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,00,\
  00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,4c,\
  4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,20,\
  20,20,20,01,50

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&2&UID4353\Device Parameters\WDF]


It's worth noting that after I did all this, I went back, renamed devcon64.exe back, and tried 0.11.  Initially it wouldn't work with the device ID from the prior run, I had to edit it back and change the 1 to a 0 again.  It set the refresh rate to the same 59.972.

I deleted the display and monitor from Device Manager again, re-ran CRU, again, the device ID changed to 5&67fc0b1&3&UID4353 but at least ufotest shows the requested rate again.

Here's the registry after I got 0.11 working again without doing a restore from my registry backup

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000000
"ConfigFlags"=dword:00000000
"ContainerID"="{6d5104c6-2815-5319-8110-935b6287b83a}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0004"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,a5,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,e2,68,00,a0,a0,40,2e,60,30,20,36,00,81,91,21,00,00,1a,\
  00,00,00,ff,00,52,46,35,37,50,34,34,45,41,34,4e,4c,0a,00,00,00,fc,00,44,45,\
  4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,fd,00,31,56,1d,71,1c,00,0a,20,20,\
  20,20,20,20,01,22

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\WDF]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&3&UID4353]
"DeviceDesc"="@monitor.inf,%pnpmonitor.devicedesc%;Generic PnP Monitor"
"Capabilities"=dword:000000e4
"Address"=dword:00000111
"ConfigFlags"=dword:00000000
"ContainerID"="{5e53dd27-50e9-533e-b70c-88d73a545c57}"
"HardwareID"=hex(7):4d,00,4f,00,4e,00,49,00,54,00,4f,00,52,00,5c,00,44,00,45,\
  00,4c,00,34,00,30,00,38,00,33,00,00,00,00,00
"CompatibleIDs"=hex(7):2a,00,50,00,4e,00,50,00,30,00,39,00,46,00,46,00,00,00,\
  00,00
"ClassGUID"="{4d36e96e-e325-11ce-bfc1-08002be10318}"
"Service"="monitor"
"Driver"="{4d36e96e-e325-11ce-bfc1-08002be10318}\\0001"
"Mfg"="@monitor.inf,%generic%;(Standard monitor types)"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&3&UID4353\Device Parameters]
"EDID"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,\
  28,78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,25,4b,00,81,00,b3,00,d1,00,71,4f,a9,\
  40,81,80,d1,c0,01,01,b5,67,00,a0,a0,40,2e,60,30,20,36,00,80,90,21,00,00,1a,\
  00,00,00,fc,00,44,45,4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,10,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,01,c3

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&3&UID4353\Device Parameters\EDID_OVERRIDE]
"0"=hex:00,ff,ff,ff,ff,ff,ff,00,10,ac,83,40,4c,4e,34,41,10,18,01,03,80,40,28,\
  78,ea,1d,f5,ae,4f,35,b3,25,0d,50,54,25,4b,00,81,00,b3,00,d1,00,71,4f,a9,40,\
  81,80,d1,c0,01,01,b5,67,00,a0,a0,40,2e,60,30,20,36,00,80,90,21,00,00,1a,00,\
  00,00,fc,00,44,45,4c,4c,20,55,33,30,31,34,0a,20,20,00,00,00,10,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,01,c3
"CRU_Name"=hex:01,44,45,4c,4c,20,55,33,30,31,34
"CRU_Serial_Number"=hex:00,52,46,35,37,50,34,34,45,41,34,4e,4c
"CRU_Range_Limits"=hex:00,00,31,00,56,00,1d,00,71,01,18
"CRU_Extensions"=hex:01
"1"=hex:02,03,25,70,50,90,05,04,03,02,07,16,01,06,11,12,15,13,14,1f,20,23,09,\
  1f,07,67,03,0c,00,10,00,38,38,83,01,00,00,02,3a,80,18,71,38,2d,40,58,2c,45,\
  00,e0,0e,11,00,00,1e,01,1d,80,18,71,1c,16,20,58,2c,25,00,e0,87,10,00,00,9e,\
  01,1d,00,72,51,d0,1e,20,6e,28,55,00,40,--BINGO! Either that, or I was attempting to say "before" but it was too many letters to type--,10,00,00,1e,8f,0a,d0,8a,20,e0,2d,\
  10,10,3e,96,00,--BINGO! Either that, or I was attempting to say "before" but it was too many letters to type--,78,00,00,00,18,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,8f

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&3&UID4353\Device Parameters\WDF]


Rataplan727

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 16
  • Last login:March 10, 2023, 04:40:19 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #113 on: March 06, 2023, 09:21:54 am »
'Good' news: I have the same issue myself now. And that happened after using CRU 1.5.2. So that'll help debugging. I can't even get it back working with 0.11 after that. Will investigate and post an update.
« Last Edit: March 06, 2023, 09:30:37 am by Rataplan727 »

trevorp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Yesterday at 07:23:27 am
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #114 on: March 06, 2023, 12:05:23 pm »
Glad you can recreate the issue, sorry it's hosed up your install now.

I can definitely get 0.11 back to working after deleting the monitor and display adapters, and rebooting.  I have noticed if you're not quick enough with the reboot, windows starts detecting stuff automatically and I'm pretty sure that's how I had my display numbers walking from 0 to 1 to 2 to 3.

Rataplan727

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 16
  • Last login:March 10, 2023, 04:40:19 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #115 on: March 06, 2023, 04:50:11 pm »
I noticed during testing that every time you remove your video driver or monitors from device manager, I think the latter, it gets redetected with a number +1. Not sure why that is, but that's what I see.

Anyway, I think I found the issue, and it's related to using CRU.
[Boring explanation] When you use CRU, it obviously writes a custom EDID value. However, it writes the Feature Blocks, which is a part of the EDID string that contains the min / max refreshrates as supplied by the monitor itself, in a different way, maybe even incorrect according to EDID specs. What RatRefresh did was to use the existing custom EDID value as a base to calculate things. And as RatRefresh checks the minimum and maximum refreshrates your monitor supports, which read out completely wrong, it wouldn't work properly. So I changed RatRefresh to use the monitors own supplied EDID value to customize, unless you use the switch -usecustomedid in which case it works as before.
What's even weirder though is that I've seen several times that CRU changes the monitors own EDID value, and changes min/max there too:


And that's why I made the -remove option to delete both the EDID_OVERRIDE key, but also the monitors original EDID value. After that it resets the display, and the EDID value will be re-generated by what the monitor supplies
[/Boring explanation]

I've upped a new (debug) version here: https://drive.google.com/file/d/1JZ_-TFvZktMEZGlCvAAuLv28zT_h92nD/view?usp=sharing
run RatRefresh -remove
run RatRefresh -setup
and now just run for example RatRefresh -refresh 58.850

Let me know! Unfortunately none of the admins has responded to my question to unlock my Rataplan626 account, so I can't update the opening post  :(
« Last Edit: March 06, 2023, 04:52:30 pm by Rataplan727 »

TitanGorilla

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:March 21, 2023, 12:56:46 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #116 on: March 06, 2023, 10:06:57 pm »
Unfortunately, after following the steps the refresh rate doesn't seem to change. I followed your steps but set the refresh rate to 57.451. On the UFO Test, the refresh rate is still close to 60 Hz.

Also, after it refreshes, there is still noticeable tearing when scrolling on web pages. It's subtle, so I don't know if anyone noticed it or if they might have the same issue. Can you test to see if you get screen tearing in your browser after resetting your refresh rate? If not, it might be an issue with my video card driver. I get the same issue when disabling/enabling the video card manually from the device manager.

I'm not sure if the CRU tool caused some type of conflict with the video card driver or if it would have had the same issue without CRU installed. I reset CRU before re-installing RatRefresh and it still gives tearing. I may have to re-install my video card drivers to see if the issue persists. Restarting my machine fixes the tearing completely, it still persists until I restart, even if I reset the refresh rate in Windows. After restarting my machine setting the refresh rate from Windows without enabling or disabling the video card or using RatRefresh doesn't cause the screen tearing.

Rataplan727

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 16
  • Last login:March 10, 2023, 04:40:19 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #117 on: March 07, 2023, 03:04:32 am »
*sigh* I really hoped this would've fixed it. The thing you have in common with TrevorP is that both of you have NVidia GPU's. In a way I have the feeling that has a relation to the issue. But on the other hand, trevorp states and showed that RatRefresh 0.11 works fine for him. The actual registry key written by 0.11 is identical (or should be) to the one from later versions. The calculation of the resulting registry key has not changed since 0.11, after an issue found by user xxDaViDxx. All changes since are about detecting the registry key it has to write to, and adding more parameters, but nothing about the actual registry value.

So, if have some spare time and want to help out, if you know your way in Windows, can you:
- run RatRefresh -remove once again
- export me your HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY registry
- delete edid.txt and Run RatRefresh -setup once again just to be sure
- run ratrefresh -refresh 59.150 or something
- export me your HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY registry again

Did 0.11 work for you? Does it work when you set a custom resolution through CRU?

Thanks for helping out.

trevorp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Yesterday at 07:23:27 am
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #118 on: March 07, 2023, 08:35:11 am »
I had negative results as well.  Just didn't get a chance to do the full registry export run this morning.  Will do at lunch, just to document progress, and I'll also follow the above instructions as well.

I was going to ask if the nvidia GPU might be the issue as I recall you were testing with NUC.

I've got a few generations old NUC here I also want to test with, just to see if the results are different.

Rataplan727

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 16
  • Last login:March 10, 2023, 04:40:19 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #119 on: March 07, 2023, 08:48:44 am »
yeah but then again I just can't think of ANY reason why 0.11 WOULD work then...

[edit]
ah cr@p... I just found another bug, triggered on my work pc which does not occur on my home pc, laptop and cab. Working on that. No need for additional registry export for now. Stay tuned  :D
« Last Edit: March 07, 2023, 09:32:25 am by Rataplan727 »

TitanGorilla

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:March 21, 2023, 12:56:46 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #120 on: March 08, 2023, 11:33:26 pm »
I'm happy to help! I was able to get 0.11 working but it did take some time configuring CRU to get it working properly. I used CRU to remove every default setting except for one or two custom refresh rate values to ensure it was using the right EDID value. For some reason though, after using CRU with 0.11 it's showing a higher than expected range of min and max refresh rates when I attempted to get it working for 0.14 and 0.15.

I also think I fixed the screen tearing issue I was having. I used the Display Driver Uninstall utility and also changed some settings in Nvidia Control panel after re-installing the drivers. I think re-installing the drivers with DDU first most likely fixed my screen tearing issue.

I tried extensively to get 0.14 and the 0.15 debug version working but had no luck. It seems like the EDID override in 0.14/0.15 might not be writing to the correct registry value. I noticed when either using 0.14 or the 0.15 debug version, there are multiple refresh rates showing in the Windows Advanced display settings. The newer versions also seem to override the custom refresh values I set with CRU by giving a range of refresh rate values in Advanced display settings. I noticed even with 0.11, I couldn't get the refresh rate to change if there were the default refresh rate values showing. With CRU I had to remove all of the default values and only set 1 or 2 custom resolution/refresh rates, then restart my machine to set it to the refresh rate being overridden in the registry, and use the 0.11 version to get it working.

Rataplan727

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 16
  • Last login:March 10, 2023, 04:40:19 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #121 on: March 09, 2023, 03:33:06 am »
I'm happy to help! I was able to get 0.11 working but it did take some time configuring CRU to get it working properly. I used CRU to remove every default setting except for one or two custom refresh rate values to ensure it was using the right EDID value. For some reason though, after using CRU with 0.11 it's showing a higher than expected range of min and max refresh rates when I attempted to get it working for 0.14 and 0.15.

I also think I fixed the screen tearing issue I was having. I used the Display Driver Uninstall utility and also changed some settings in Nvidia Control panel after re-installing the drivers. I think re-installing the drivers with DDU first most likely fixed my screen tearing issue.

I tried extensively to get 0.14 and the 0.15 debug version working but had no luck. It seems like the EDID override in 0.14/0.15 might not be writing to the correct registry value. I noticed when either using 0.14 or the 0.15 debug version, there are multiple refresh rates showing in the Windows Advanced display settings. The newer versions also seem to override the custom refresh values I set with CRU by giving a range of refresh rate values in Advanced display settings. I noticed even with 0.11, I couldn't get the refresh rate to change if there were the default refresh rate values showing. With CRU I had to remove all of the default values and only set 1 or 2 custom resolution/refresh rates, then restart my machine to set it to the refresh rate being overridden in the registry, and use the 0.11 version to get it working.

Well, as stated before, 0.11 used the custom edid value, usually generated by CRU, and changed the pixelclocks & checksum in THAT custom value. 0.14 and 0.15 take the monitors own EDID (ie the EDID vavlue, and not the EDID_OVERRIDE\0 value) and change that. The reason for that thinking was when the custom key got corrupted or something, using the original one helps. I initially was under the impression that CRU just did the same; use the original EDID and change pixelclock / resolution accordingly. It seems though it changes some more things. However, when you change the refreshrate using CRU when you already have a custom rate from CRU, the exact two bytes that it changes are the same as RatRefresh does.
Now for something I never had to think of before; my CAB has a Dell Ultrasharp 2415+ which uses EDID 1.3 if I remember correctly. But the EDID values you guys with issues post all are EDID 1.4. There might be another issue.

For some reason things are very unconsistent for me. On my work NUC with 2x Dell U2421E, which are EDID 1.4 or higher, strange things happen. While I absolutely ONLY write to the EDID_OVERRIDE\0 value, as soon as the driver restarts, sometimes the monitors own EDID value also changes. When that happens things don't work. I think removing the monitors from device manager and have them redetected fixes that, but I've not had the time to work that out completely. The same happens when using CRU by the way for me, I've pasted an image before already where procmon clearly shows CRU writing to the monitors EDID value as well as to the override value.

What you could test to help me is set things up to work with RatRefresh 0.11. Then use 0.15 as following:
Code: [Select]
RatRefresh -min 50 -max 65 -usecustomedid -refresh 59.150 The crux there is the -usecustomedid switch which makes it behave like before; it takes the existing custom EDID key (if it exists from CRU for example) and modifies that. he -min and -max should be supplied just in case RatRefresh isn't able to decode it itself.

btw sorry again for all the hassle and thank you so much for all the help in this :-)

trevorp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Yesterday at 07:23:27 am
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #122 on: March 09, 2023, 01:22:17 pm »
In my case, the behavior is the same.  0.11 works, 0.15_debug does not

0.11
Code: [Select]
D:\Utilities\RatRefresh>type edid.txt
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&5&UID4353\Device Parameters\EDID_OVERRIDE\0

0.15_debug
Code: [Select]
D:\Utilities\RatRefresh_0.15_debug>type edid.txt
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&5&UID4353

Code: [Select]
D:\Utilities\RatRefresh_0.15_debug>RatRefresh -min 50 -max 65 -usecustomedid -refresh 58.150
RatRefresh 0.15 debug build

Key SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&5&UID4353\Device Parameters\EDID_OVERRIDE
WantedRefreshRate 58.150
CalculatedPixelClock 26034
TotalChecksum 7736
Checksum 200
HexChecksum c8

done

0.11 sets my rate to whatever I want, 0.15_debug keeps coming back to my 59.172 Hz rate

What's bizarre is I now have a third display in CRU, and one of them has the 59.171 Hz rate, though that's one I specifically don't call as my system seems to keep recreating it and defaulting to it.

I called 55.123, and my CRU was for







In the first and third CRU entries, it doesn't see the min/max rates, no serial number, etc.  In the second one, which is the one it keeps switching to regardless of what I call, the min/max and serial are present.






[edit]

After running some more tests and watching what's going on with process monitor, I can confirm what you already have.

The exact same registry writes are happening with the same values.

I do see a timing difference between the two devconx64 calls in 0.11 and 0.15

0.11
Code: [Select]
Time of Day Process Name PID Operation Path
56:06.5 RatRefresh.exe 9172 Process Create D:\Utilities\RatRefresh\devconx64.exe
56:09.0 RatRefresh.exe 9172 Process Create D:\Utilities\RatRefresh\devconx64.exe

0.15_debug
Code: [Select]
Time of Day Process Name PID Operation Path
59:38.7 RatRefresh.exe 2080 Process Create D:\Utilities\RatRefresh_0.15_debug\devconx64.exe
59:40.7 RatRefresh.exe 2080 Process Create D:\Utilities\RatRefresh_0.15_debug\devconx64.exe

I mean it's 2.5s vs 2s, but is it possible it's just a timing issue?

I've got about 7000 lines of process monitor dump to parse through for each run of ratrefresh, was just skimming.
« Last Edit: March 09, 2023, 06:22:25 pm by trevorp »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #123 on: March 10, 2023, 01:38:25 am »
Oh crap could that be  :o I lowered the delay to 1500ms... I'll test.
But yes that's the exact behaviour I see too. But not 100% reproducible yet. Btw got my account back  :)

TitanGorilla

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:March 21, 2023, 12:56:46 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #124 on: March 10, 2023, 02:59:20 am »
I didn't have much luck either. It seems like the default extension blocks are being reset after running the command in .15. In CRU I removed every refresh rate value except the one custom value, including the default extension blocks. After running .15 it seems to override the custom value and only shows the default refresh rates in Windows Advanced display properties. If I delete the extension blocks in CRU, it works in .11 again.





Registry value before running .15.



Registry value and final outcome after running the command in .15. I didn't notice a difference in the Display Properties in CRU. The default extension blocks are now showing in CRU and the default refresh rates are showing in Advanced display properties instead of just the one custom refresh rate I set. If I remove the default extension blocks, the custom refresh rate shows again after restarting, and I'm able to use .11 again to set a new custom refresh rate.


Also, congrats on getting your account back! :)

Edit:

I noticed the custom refresh rate value does change in CRU after running the command in .15. It's possible the default extension block values are overriding the custom refresh rate value set. The new value is showing in CRU but it's not selectable in the Advanced display properties.




« Last Edit: March 10, 2023, 03:32:56 am by TitanGorilla »

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #125 on: March 10, 2023, 04:29:03 am »
I've uploaded 0.15b4, it defaults back to 2 seconds delay before restarting the display driver, and it introduces a parameter -delay <ms> to change the delay. I would actually be surprised if the delay makes things not work. But it might, the delay was not in there for nothing. When I first just stopped and restarted without any delay, it didn't work either on my cab. Maybe 1500ms is just on the edge of working / not working on my system as it's so unpredictable. Then again, on my actual cab 0.15 works just fine, all versions are tested on my cab before shipping them out ;-)

On my home Intel NUC, old 5th gen one, it even works fine with delay 0. But I noticed on that machine when restarting videodrivers, I don't get the Windows hardware disconnected / connected sound, which I DO get on all other machines I tried on. So there's definitely some differences in how systems or different drivers behave. Also, when I remove all values, or even remove my display drivers and monitors completely and let them re-install, my refresh rate seems to be 59.850, were one might expect 60. So either that ufotest site is off by a bit, or my Intel iGPU doesn't actually do 60Hz when it's supposed to.

Anyway, as you saw with procmon (it's so helpful to have people 'on board' that can help debug :cheers: to both of you) when you use -norestart and -usecustomedid, you can see the exact same values are written by 0.15 as 0.11. So please report on 0.15b4 :) I'd say, start with RatRefresh -remove, and then use RatRefresh -refresh <something> to start with. If that still doesn't work, use -remove again, and then setup CRU as you did with 0.11, and use RatRefresh -usecustomedid -refresh <something>, eventually with -delay 5000 or so to be sure.

« Last Edit: March 10, 2023, 06:18:07 am by Rataplan626 »

trevorp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Yesterday at 07:23:27 am
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #126 on: March 10, 2023, 10:03:04 am »
Grabbing coffee, so time for a quick update.

Getting 0.11 to work, then jumping to 0.15b4 still doesn't work with any delay.  Darn, I was hoping it was that easy.

Also of note, once I use 0.15b4, 0.11 ceases to work.  (when I say ceases to work, it comes back to the same 59.172 Hz as always) I have to delete the monitor and display adapter from control panel, reboot (not sure if necessary) and run CRU again.

I did try 0.11 -> 0.15b4 without customedid, then with customedid first, and that didn't work and borked 0.11.

I then did 0.11 -> 0.15b4 with customedid which didn't work, and also borked 0.11.

Will do more in-depth testing at lunch, just wanted to drop a note to let you know where I'm at.

Glad you got your account back as well.

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #127 on: March 10, 2023, 05:49:16 pm »
*sigh* it's getting out of hand :-)
Observations: I tried on three different systems to use CRU, and then use RatRefresh 0.11, set everything up fresh again, use CRU, run RatRefresh 0.15 -usecustomedid and the resulting custom edid was 100% identical in all ocasions, and on those machines worked fine as such.

More observations: when you delete monitors from Windows, and have the redetected, the monitors own EDID value that's written at for example 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\SDC424A\4&25831cb2&0&UID265988\Device Parameters', contains the EDID of the last used custom resolution, ie the EDID of the last refresh rate. If your last rate was 58.850, delete monitors and redetect them, the resulting EDID will be for 58.850Hz.
The same happens when you delete the monitors EDID and restart the video driver --> resulting EDID contains the last used refreshrate. Probably this happens as the monitors EDID is actually overwritten, hence it reports that EDID when you request it. So far for me to get back to the monitors actual EDID is removing monitors, removing the display adapter and then redetect things.
This results in strange behaviour. So parameter -remove now no longer removes the monitors own EDID anymore, only custom EDID.

Still I've not been able to even think of why 0.15 would not work to change a CRU generated value when -usecustomedid is used. To help myself I improved the -query parameter, which now shows more information on the monitors own edid and the custom edid. Link to 0.15b5 below.

So what you could verify is run RatRefresh -query, and see if the monitors own EDID makes any sense. Usually the refreshrate should be 60 or 75 or whatever you have. If the original value is not correct, remove monitors (remember to remove hidden monitors too) and display adapter, and then let windows scan for new hardware. All should be recreated correctly now. And on my systems here at home, they al work fine then without having to create a resolution with CRU.

0.15b5

trevorp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Yesterday at 07:23:27 am
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #128 on: March 11, 2023, 10:45:35 am »
Code: [Select]
D:\Utilities\RatRefresh_0.15b5>RatRefresh.exe -query
RatRefresh 0.15 debug build 5

Monitors original EDID values:
Decoded EDID values:

HexCurrentPixelClock:      5fad
CurrentPixelClock:         24493
HexHorizontalResolution:   0a00
HorizontalResolution:      2560
HexVerticalResolution:     0640
VerticalResolution:        1600
HexVerticalBlankingLines:  002e
VerticalBlankingLines:     46
TotalHorizontalResolution: 2720
TotalVerticalResolution:   1646
Refreshrate:               54.707
Minimum refreshrate:       82
Maximum refreshrate:       70

Checksum stored in EDID: e2
Calculated Checksum:     e2
Featureblock 4 minimum and maximum refreshrate
Minimum: 82
Maximum: 70
Featureblock 3 minimum and maximum refreshrate
Minimum: 68
Maximum: 69
Featureblock 2 minimum and maximum refreshrate
Minimum: 49
Maximum: 86
Featureblock 1 minimum and maximum refreshrate
Minimum: 64
Maximum: 46
Monitors custom EDID values:
Decoded EDID values:

HexCurrentPixelClock:      5fad
CurrentPixelClock:         24493
HexHorizontalResolution:   0a00
HorizontalResolution:      2560
HexVerticalResolution:     0640
VerticalResolution:        1600
HexVerticalBlankingLines:  002e
VerticalBlankingLines:     46
TotalHorizontalResolution: 2720
TotalVerticalResolution:   1646
Refreshrate:               54.707
Minimum refreshrate:       82
Maximum refreshrate:       70

Checksum stored in EDID: e2
Calculated Checksum:     e2
Featureblock 4 minimum and maximum refreshrate
Minimum: 82
Maximum: 70
Featureblock 3 minimum and maximum refreshrate
Minimum: 68
Maximum: 69
Featureblock 2 minimum and maximum refreshrate
Minimum: 49
Maximum: 86
Featureblock 1 minimum and maximum refreshrate
Minimum: 64
Maximum: 46

54.707 is normal, last time I ran 0.11 that's the rate I picked.

I removed all monitors, including hidden ones, and all display adapters.

Afterwards, I see two U3014 detected, one hidden, one not.



After doing ratrefresh -setup and calling for a rate of 58.123, my rate still goes back to the 59.972 I always see.

Code: [Select]
D:\Utilities\RatRefresh_0.15b5>ratrefresh -setup
RatRefresh 0.15 debug build 5

Detected video drivers:
Name:                         NVIDIA GeForce GTX 780
Device ID:                    PCI\VEN_10DE&DEV_1004&SUBSYS_84691043&REV_A1\4&80E7924&0&0008

Detected active monitors:
Monitor number:               1
Monitor description:          DELL U3014
Serial number:                RF57P44EA4NL
Monitor InstanceID:           DISPLAY\DEL4083\5&67fc0b1&9&UID4353
Monitor DevicePath:
Monitor active:               True
HorizontalResolution:         2560
VerticalResolution:           1600
Minimum reported refreshrate: 49
Maximum reported refreshrate: 86


What monitor number to use?
1
edid.txt file written.

Code: [Select]
D:\Utilities\RatRefresh_0.15b5>ratrefresh -debug -refresh 58.123 -delay 2500
RatRefresh 0.15 debug build 5

-min Not supplied. Using EDID supplied value Of 49
-max Not supplied. Using EDID supplied value Of 86
Press key to continue.

Key SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&9&UID4353\Device Parameters\EDID_OVERRIDE
WantedRefreshRate 58.123
HexCurrentPixelClock: 6227
CurrentPixelClock: 25127
HexHorizontalResolution: 0a00
HorizontalResolution: 2560
HexVerticalResolution: 0640
VerticalResolution: 1600
HexVerticalBlankingLines: 002e
VerticalBlankingLines: 46
TotalHorizontalResolution: 2720
TotalVerticalResolution: 1646
CalculatedPixelClock 26022
HexCalculatedPixelClock 65a6
ReversedEdidHexCalculatedPixelClock a665
TotalChecksum 9631
Checksum 97
HexChecksum 61

Restarting videodriver with a delay of 2500ms

done
Press key to continue.

CRU shows the two entries with the custom modes listed above.





It still seems like it's updating one custom edid and using a different.

When I look back in the registry, the two entries in CRU correspond to the one you detect:

Code: [Select]
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&9&UID4353

and

Code: [Select]
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0

I'm going to format my NUC and toss win10 on it later today.  I want to see if it's my monitor causing this.  It won't eliminate the nvidia GPU, but at least will eliminate the monitor.

I've got an AMD I can toss in there too but that requires a bunch of disassembly, will start with the easy stuff first.


Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #129 on: March 11, 2023, 11:21:14 am »
I wouldn't reinstall, don't think that'll help. What DOES help is that I now see ratrefresh writes to the non-active monitor. Maybe thats the issue here. I'll try to find out what or why or when the non-active monitor exists. I think I can test that myself over here.

Still I don't see why .15 doesnt work after fully resetting everything and using -usecustomedid after usig cru to create a custom resolution.

Btw as far asI know the 1&8713bca&0&UID0 ID is  the generic monitor on the default graphics adapter you'll get when you remove the real devices from device manager.

[Edit]
I wonder, does CRU write in different registry keys when creating a resolution for either of the two Dells it shows?
Could you maybe export registry after creating for active, and then export after creating resolution for inactive?
« Last Edit: March 11, 2023, 11:32:58 am by Rataplan626 »

trevorp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Yesterday at 07:23:27 am
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #130 on: March 11, 2023, 07:04:11 pm »
Will do the registry exports tomorrow.  Every time I promise to do it in a few hours, something comes up.  I'm going with "under promise, over deliver" at this point.

I wasn't planning on blowing away my cab, I just have an 11th gen NUC that is currently not being used.  Right now it's got Linux on it, but I don't mind blowing that away and dropping win10 on it temporarily, as I'm just curious.

[edit]

Still owe you more testing on the problem system, but I wanted to report that on the NUC 11 on a different Dell U3014 monitor, everything works as expected with 0.15b5.  I also don't see 1&8713bca&0&UID0 showing up under DELL4083.  I do still see two entries in CRU, and one of them is the 59.972 (59.971 in CRU) that's been stalking me.  This must just be the default rate of the monitor.

I used a different monitor as it was next to the NUC, but since they're the exact same model, I wanted to run a test.  Will move the NUC to test with the other monitor, but I expect no difference.

[edit2]
So as not to reply to myself, here are the results as promised

First off some images of the differences between the PC with the issues and nvidia GPU and the NUC.

Here's the original PC after running ratrefresh



Here's the NUC after running ratrefresh



Notice how the 1&8713bca&0&UID0 monitor is under the DELL4083 key on the problem PC, but it's under Default Monitor on the one that works.

I also see that on the NUC, it does create a new entry ending in UID0 but the first part of the key matches the Dell monitor, whereas on the problem PC it does not.

Rather than the registry exports, I used process monitor to monitor cru.exe and see what it did.

Here's CRU for the active monitor:

Code: [Select]
Operation Path Result Detail
RegCreateKey HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE REPARSE Desired Access: Set Value
RegCreateKey HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE SUCCESS Desired Access: Set Value, Disposition: REG_OPENED_EXISTING_KEY
RegSetInfoKey HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE SUCCESS KeySetInformationClass: KeySetHandleTagsInformation, Length: 0
RegSetValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE\0 SUCCESS Type: REG_BINARY, Length: 128, Data: 00 FF FF FF FF FF FF 00 10 AC 83 40 4C 4E 34 41
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE\(Default) NAME NOT FOUND
RegSetValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE\CRU_Name SUCCESS Type: REG_BINARY, Length: 11, Data: 01 44 45 4C 4C 20 55 33 30 31 34
RegSetValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE\CRU_Serial_Number SUCCESS Type: REG_BINARY, Length: 13, Data: 01 52 46 35 37 50 34 34 45 41 34 4E 4C
RegSetValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE\CRU_Range_Limits SUCCESS Type: REG_BINARY, Length: 11, Data: 01 00 31 00 56 00 1D 00 71 01 18
RegSetValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE\CRU_Extensions SUCCESS Type: REG_BINARY, Length: 1, Data: 01
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE\1 NAME NOT FOUND
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE\2 NAME NOT FOUND
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE\3 NAME NOT FOUND
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE\4 NAME NOT FOUND
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE\5 NAME NOT FOUND
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE\6 NAME NOT FOUND
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE\7 NAME NOT FOUND
RegCloseKey HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID_OVERRIDE SUCCESS
RegOpenKey HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters REPARSE Desired Access: Set Value
RegOpenKey HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters SUCCESS Desired Access: Set Value
RegSetInfoKey HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters SUCCESS KeySetInformationClass: KeySetHandleTagsInformation, Length: 0
RegSetValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID SUCCESS Type: REG_BINARY, Length: 256, Data: 00 FF FF FF FF FF FF 00 10 AC 83 40 4C 4E 34 41
RegCloseKey HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters SUCCESS

Here's CRU for the inactive monitor:

Code: [Select]
Operation Path Result Detail
RegCreateKey HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE REPARSE Desired Access: Set Value
RegCreateKey HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE SUCCESS Desired Access: Set Value, Disposition: REG_CREATED_NEW_KEY
RegSetInfoKey HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE SUCCESS KeySetInformationClass: KeySetHandleTagsInformation, Length: 0
RegSetValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE\0 SUCCESS Type: REG_BINARY, Length: 128, Data: 00 FF FF FF FF FF FF 00 10 AC 83 40 4C 4E 34 41
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE\(Default) NAME NOT FOUND
RegSetValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE\CRU_Name SUCCESS Type: REG_BINARY, Length: 11, Data: 01 44 45 4C 4C 20 55 33 30 31 34
RegSetValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE\CRU_Serial_Number SUCCESS Type: REG_BINARY, Length: 13, Data: 00 52 46 35 37 50 34 34 45 41 34 4E 4C
RegSetValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE\CRU_Range_Limits SUCCESS Type: REG_BINARY, Length: 11, Data: 00 00 31 00 56 00 1D 00 71 01 18
RegSetValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE\CRU_Extensions SUCCESS Type: REG_BINARY, Length: 1, Data: 01
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE\1 NAME NOT FOUND
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE\2 NAME NOT FOUND
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE\3 NAME NOT FOUND
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE\4 NAME NOT FOUND
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE\5 NAME NOT FOUND
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE\6 NAME NOT FOUND
RegDeleteValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE\7 NAME NOT FOUND
RegCloseKey HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\1&8713bca&0&UID0\Device Parameters\EDID_OVERRIDE SUCCESS
RegOpenKey HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters REPARSE Desired Access: Set Value
RegOpenKey HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters SUCCESS Desired Access: Set Value
RegSetInfoKey HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters SUCCESS KeySetInformationClass: KeySetHandleTagsInformation, Length: 0
RegSetValue HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters\EDID SUCCESS Type: REG_BINARY, Length: 256, Data: 00 FF FF FF FF FF FF 00 10 AC 83 40 4C 4E 34 41
RegCloseKey HKLM\System\CurrentControlSet\Enum\DISPLAY\DEL4083\5&67fc0b1&a&UID4353\Device Parameters SUCCESS

Interesting that on the inactive display it still writes to the active display as well.

Also of note, that 59.972 Hz rate that I keep ending up at is what's in the inactive monitor before I set a custom rate.

After I've set the custom rate and run ratrefresh, the custom rate I set for inactive stays, the rate for active updates to what ratrefresh calls for, but I still end up at 59.972 Hz rate, which now no longer shows in CRU at all.

I do have the registry exports, but they show the same, and this is pretty easy to digest.
« Last Edit: March 13, 2023, 01:21:43 pm by trevorp »

TitanGorilla

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:March 21, 2023, 12:56:46 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #131 on: March 14, 2023, 12:33:45 am »
It seems like .015b5 is giving me the same issue as before. The min and max refresh rate also might be a bit off from what was set with the -usecustomedid parameter.



Each time -refresh is run, the default extension block is reset.


After deleting the default extension block and restarting my machine, the refresh rate value I set is now being used and shows in Advanced display properties.


.11 doesnít reset the extension blocks after -refresh is used. After running -refresh with a new value, after the drivers reset, it immediately changes to the new value in Advanced display settings.


-refresh alone doesnít refresh the value in CRU, there are no resolutions and refresh rates present.


-usecustomedid with -refresh does set the new refresh rate value each time it's used.

Is there any possible way to have the -refresh command delete the default blocks, or can you create a separate parameter that allows you to delete these default blocks? Is it necessary to have default extension blocks? Maybe another parameter could be created to reset the default extension blocks if these are needed for some reason. .11 didnít reset this in CRU and it seemed to work if you deleted the default extension blocks manually. If it's possible to have a command to delete these extension blocks and prevent them from being reset after -refresh is run, it might allow the new refresh rate to show and be used. It seems when the default blocks are reset to the default, the new refresh rate isnít showing as available. If later versions deleted the extension blocks(or gave the option to delete these with a separate command) and prevented the Extension blocks from being reset when -refresh is used, it might allow the refresh rate to be used without having to restart the machine. The only other issue I noticed that might be preventing versions after .11 from working is the -refresh command doesnít set the refresh rate value in CRU, but the -usecustomedid command coupled with -refresh does seem to reset the value, itís just not usable because of the Extension blocks being reset to the default values.

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #132 on: March 14, 2023, 06:20:44 pm »
@trevorp Thanks again for the input.
Quote
but I wanted to report that on the NUC 11 on a different Dell U3014 monitor, everything works as expected with 0.15b5.
Hurray!  :cheers: at least SOME success :-)

I also see that on the NUC, it does create a new entry ending in UID0 but the first part of the key matches the Dell monitor, whereas on the problem PC it does not.
e the registry exports, but they show the same, and this is pretty easy to digest.

Now that's what I saw as well when monitoring CRU, but it also does a RegSetValue on the monitors 'own' EDID value (ie. not in the EDID_OVERRIDE key).

@TitanGorilla, thanks for that eleborate post as well :applaud:
Quote
Each time -refresh is run, the default extension block is reset.
That could be. Reason: when you start from scratch (ie. never ran CRU, or remove monitors / drivers and restart) you will probably not have a default extension block. But when you run CRU, it generates some stuff in the EDID_OVERRIDE key that's not there by default. At least on my systems, CRU 'generates' that default extension block, it's not there by default. This is on my laptop which never had any resolution set by either RatRefresh or CRU:


And using RatRefresh 0.15 without -usecustomedid, it will always use the EDID value in 'HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY\SDC424A\4&25831cb2&0&UID265988\Device Parameters' and then the EDID value, which I keep calling the monitors' own EDID, as that's were the 'default' EDID ends up. And again, when you DO use -usecustomedid, it uses the 0 value in EDID_OVERRIDE, and it should behave 100% identical to 0.11, which it does on my systems.

Quote
-usecustomedid with -refresh does set the new refresh rate value each time it's used.
You mean when you use -usecustomedid it actually works for you? If so, please report, as that would clear a lot of confusion for me. In your screenshot, I see the default extension block is actually there, so you probably had CRU to set a custom resolution to set 0.11 up, OR 0.15 with -usecustomedid? I would actually be happy if that worked, as, and sorry to repeat myself, 0.15 with -usecustomedid should functionally be the same as 0.11 with regards to the resulting regsitry, but that also means for now you need to setup thing by using CRU to setup one custom resolution, so a custom EDID value to reuse actually exists. If you use -usecustomedid but no custom EDID exists, it just uses the monitors original EDID value.

My goal is still to have RatRefresh work without the need for CRU, as I think that -setup parameter greatly improves usability for people that aren't as technical as you two. I have the sourcecode for CRU, but that's quite the thing in it's own :) But worst case I could use that to create the same 'Default extension block' as CRU does. Or at least understand WHAT it creates that for maybe.
I've not been feeling too well the last couple of days, the kids don't grant us a lot of sleep  :-\ but I want to work on it again in a couple of days.

« Last Edit: March 15, 2023, 06:21:58 am by Rataplan626 »

TitanGorilla

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:March 21, 2023, 12:56:46 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #133 on: March 21, 2023, 12:56:46 am »
Iím happy to help test to make RatRefresh the best it can be 😊 I know what you mean, I completely understand. There is definitely a lot going on with life that makes it hard to test and respond as often as Iíd like. Iím satisfied with the way .11 works but it would be great to get the later versions working too. Definitely, no need to rush the development of it if you have limited free time. I can only imagine having kids would be to balance work and other demands of life and debugging RatRefresh in your free time. That would be great if there was a way for you to add a command to reset the default extension blocks, it seems to be whatís keeping later versions from working on my machine. Itís interesting your laptop doesnít have any default extension blocks. I wonder if you were to use RatRefresh if it would set default extension blocks. It does seem like using -usecustomedid works to reset the refresh rate. Below are the steps I took to reset it and showing it refreshing the refresh rate after using -usecustomedid.


This is after first running -refresh with -usecustomedid. 57.777 is now showing in CRU.


The refresh rate is showing in CRU but still not selectable in Advanced display properties.


I deleted the default extension blocks before restarting my machine. If I don't delete the default extension blocks it seems to prevent it from showing the new refresh rate.



I restarted my machine, the new refresh rate from -usecustomedid is now selectable in Advanced display settings.

Rataplan626

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:March 22, 2023, 11:25:11 am
  • I want to build my own arcade controls!
Re: [17-09-22] RatRefresh 0.14 - refresh rate switcher, stops LCD tearing
« Reply #134 on: March 21, 2023, 08:40:46 am »
Well, there's a few things again. What I see from your CRU screenshots is that you have multiple Detailed Resolutions setup, which is not where the tool is actually intended for - when you have only one and you reset the driver, that one resolution becomes your 'default' and hence your screen should be in the desired refresh rate without manually having to select it. Having said that, it should still work, but it probably won't automatically switch to the resolution set by RatRefresh.

Now, when you delete the Extension Block, what I see on my system is that in the EDID_OVERRIDE key, a value 1 is written, with only value 02 03 at the start, and at the end just the checksum. So if that's what's needed, it's easy to add. You can try v15 debug build 6 with parameter -removeextensionblock.

To be sure of everything, and rule other things out, I'd want to ask you again to remove monitors and video drivers from device manager and have them redetected. Then use ratrefresh -setup (ID's might have changed) and then
Code: [Select]
ratrefresh -refresh 59.150 -removeextensionblockand then check with https://testufo.com/refreshrate
In other words, how I want a new user to be able to use it :) Of course you can run CRU to see if the extension block is actually not available anymore now. If that works you're free to check with your multiple custom resolutions setup, and to see whether it's reflected in your NVidia panel as well.
[edit]
If it doesn't you can always try the 'old' way, create a custom resolution with CRU and use -usecustomedid and -removeextensionblock to try. But obviously I want it to work without the need of CRU.
[/edit]


By the way, I expect you need a restart of the video driver with either CRU or RatRefresh 0.11, in order for the new resolutions to show up in the NVidia panel?

If it still doesn't work, I'd like to see the difference in your registry when you remove the Extension Block from CRU. As said, on my systems I get a value 1 with data "02 03 00 00 00 ...... 00 00 FB". That's what I hardcoded now in order to remove the ExtensionBlock (which feels a bit weird to be honest, adding something to remove something).

Anyway, try and report :-)
« Last Edit: March 22, 2023, 11:25:21 am by Rataplan626 »