When games run in Wine switch to full screen, Wine chooses the first available refresh rate for the requested resolution by default. This can be problematic because the first refresh rate is often the lowest. For example, Wine may choose 60 Hz when 85 Hz is available for the same resolution because 60 Hz appears first in the list of display modes. On CRTs, 60 Hz is quite flickery so it hurts the eyes after a while.
Why does Wine do this? Because Windows does it, or at least it used to. More recent versions of Windows default to 75 Hz if it’s available and then try other modes if 75 Hz is not available. In any case, a default resolution is selected that the user may want to change. Microsoft added a feature to dxdiag that lets the user specify an override refresh rate which is used instead of the default. This feature is documented in KB315614 (main article), KB230002, and KB217348. However, Wine did not include this feature…until now.
I wrote a patch to implement the above dxdiag functionality, which allows Wine users to specify an override refresh rate. The patch has been implemented in the most recent version of Wine (0.9.58), which is available in the Wine Ubuntu repositories, Debian unstable, and the other usual download locations. Instructions on how to use it are available on the UsefulRegistryKeys wiki page. The key to look for is “ForceRefreshRate” in HKLMSoftwareMicrosoftDirectDraw.
The commit information for the patch, including a diff, is available on the wine-cvs list.
I see nothing about your patch on the wiki page. I see where the entry should go. Should we just create the entry manually using regedit?
HKLM/Software/Microsoft/DirectDraw/ForceRefreshRate
??
The wiki page does not explicitly mention my patch. Rather, it contains instructions on how to set the registry key that my patch uses to override the refresh rate.
As mentioned at the top of the wiki page, “If [the] key does not exist create it”. So yes, you do have to create the key manually using regedit (the key you mentioned is the correct one). Make sure you set it to be a DWORD value; it won’t work if you use a string (REG_SZ).
I would have liked to make the refresh rate override feature easier to use, but Wine does not yet implement dxdiag, where this value is set in Windows, so I couldn’t add it there. It may be possible to add an option to winecfg that changes this value, but it seems better to wait until Wine has dxdiag and then implement the option the right way.
Let me know if you have any issues using the feature; I would be happy to help.
Hi!
I have exactly the problem your patch fixes.
But I cannot set the registry switch, because:
The Key Software/Microsoft/DirectDraw/* doesn’t exist. Only Direct-X and Direct-Music are there and they are empty…
Maybe you can give a hint, what to do?
I use Wine 1.0 on an ubuntu System (7.10).
Robert.
You need to create the DirectDraw key. You can do this by browsing to HKLMSoftwareMicrosoft, right-clicking Microsoft, then clicking New->Key and typing in DirectDraw as the name. Once the key is created, right-click DirectDraw, click New->DWORD Value, and then type ForceRefreshRate as the name. Then double-click ForceRefreshRate, select the Decimal option, and enter the refresh rate you want to use. Click OK and close the Registry Editor. Any full-screen applications run in Wine will now use the refresh rate you set.
My issue is funny really, I am trying to set up a game for my missus ubuntu setup, and she has an LCD screen. Now, the issue is, game opens a refresh rate above 60. Perhaps this wouldn’t be a problem, only the LCD is an IBM ThinkVision, and it decides it’s going to place a large box over the screen which says “Signal out of range”. So whilst the LCD could possibly function in higher rates without issue, this black box message is a game ruiner.
So, the answer? Somehow restrict wine from accessing other refresh rates. Your method above didn’t work. It might be the game is coded to use a refresh rate and doesn’t look to this.
Wine really needs to be hard coded from the ground up to lock refresh rates.