Main > Software Forum
[Discontinued][17-09-22] RatRefresh - refresh rate switcher, stops LCD tearing
Howard_Casto:
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:
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 :)
--- Quote from: headkaze on February 06, 2017, 04:13:45 pm ---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.
--- End quote ---
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.
--- Quote from: Howard_Casto on February 08, 2017, 12:48:56 am ---Like the serial port it will never die. ;)
--- End quote ---
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 :)
headkaze:
Check out this post. Apparently you can set any resolution using ChangeDisplaySettingsEx.
Rataplan626:
--- Quote from: headkaze on February 08, 2017, 12:24:14 pm ---Check out this post. Apparently you can set any resolution using ChangeDisplaySettingsEx.
--- End quote ---
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:
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.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version