dxvk icon indicating copy to clipboard operation
dxvk copied to clipboard

[D3D9] Cannot select proper resolutions using dxvk with GTA IV

Open recklessnl opened this issue 4 years ago • 43 comments

Software information

GTA IV Complete Edition, up to date as of today, running on Windows 10 Professional.

System information

  • GPU: RTX 3090
  • Driver: 457.30.0
  • Wine version: N/A (Windows 10 DLLs only: d3d9.dll + dxgi.dll + dxvk.conf)
  • DXVK version: 1.7.2
  • Monitor: LG TV, 4K resolution @ 120hz, connected with HDMI 2.1 cable

Log files

  • d3d9.log: https://pastebin.com/7zuSnHMs

dxvk.conf:

dxgi.maxFrameLatency = 1
d3d9.maxFrameLatency = 1
d3d9.maxAvailableMemory = 16384

The problem

I cannot select the correct native resolution when using dxvk. The native resolution is 4k (3840x2160) and 120hz. The game allows me to select a max resolution of 1600x1200 at 100hz for some reason, not allowing me to go any higher in resolution nor refresh rate. See logs for more info. Resolution and refresh rate selection works fine when running it without dxvk (meaning I can select 4k@120hz). Any ideas on how to fix this?

recklessnl avatar Nov 23 '20 21:11 recklessnl

We get available display modes from win32 APIs; doesn't really sound like a DXVK bug. Does this work properly in other games?

Edit: We do actually set the correct display mode at some point (info: Setting display mode: 3840x2160@0), game then decides to revert to something else for some reason.

doitsujin avatar Nov 24 '20 16:11 doitsujin

Thanks for the reply @doitsujin — I haven't tested any other games on Windows 10 yet with dxvk.

When I open GTA IV without dxvk (running it normally), I can set the correct resolution just fine (3840x2160@120) so it must have something to do with dxvk + GTA IV.

Any ideas of things I could try to get it set to the right resolution and refresh rate? The game currently won't allow anything higher than 1600x1200@100hz when I run it with dxvk.

recklessnl avatar Nov 24 '20 19:11 recklessnl

@doitsujin Anything I can try to fix this?

recklessnl avatar Dec 03 '20 04:12 recklessnl

Beauty Reck ?! Try this: Steam Launch Options: -norestrictions -width 3840 -height 2160 %command% No Steam Launch Options: -norestrictions -width 3840 -height 2160

ViNi-Arco avatar Dec 07 '20 19:12 ViNi-Arco

Beauty Reck ?! Try this: Steam Launch Options: -norestrictions -width 3840 -height 2160 %command% No Steam Launch Options: -norestrictions -width 3840 -height 2160

This works, but it's still obviously broken. In game it caps out for me without using launch options at 1360x768 @ 144 Hz, where my native is 2560x1440 @ 165 Hz and my only DSR resolution is 5120x2880 @ 165 Hz. Resolutions above 1360x768 @ 144 Hz appear fine without DXVK. Screenshot (218)

I’m running Windows 10 as well with a RTX 3090.

MrEWhite avatar Dec 12 '20 21:12 MrEWhite

I still cannot replicate this :(

I wonder if for some reason on your setup, WineD3D exposes less modes and DXVK more modes and the game has a fixed size list that we're reaching here.

I'll try adding a hack to remove some modes that the game probably shouldn't be using.

In the meantime, you can try using something like: d3d9.forceAspectRatio = 16:9

misyltoad avatar Dec 13 '20 15:12 misyltoad

d3d9.forceAspectRatio = 16:9

i have the sasme issue, that command looks like it fixes it as a temp fix. Also if u dont mind i ask, How do i use MSAA on GTA IV what is the command i should input , also is there way to make reshade work with it . Thank you.

Kristijan1001 avatar Jan 03 '21 13:01 Kristijan1001

I reported this bug ages ago, back in the D9VK Github. It's a monitor issue. For some odd reason, some displays will flood the API with erroneous duplicates of the same resolution x refresh rate listing straight down the line save for native resolution. I speculate it has something to do with the way monitor EDIDs contain the timing information for G-Sync and ULMB/strobing modes so the driver can read these modes and understand what options are available. When I disconnect my G-Sync monitor and switch to a 60hz regular display, I can select any resolution I want because every resolution only gets 1 listing per refresh rate.

Here's my original issue report about this: https://github.com/Joshua-Ashton/d9vk/issues/341

You'll note that when I closed the thread I mentioned how I replicated the issue in an OpenGL emulator. The program in question was SNES9x set to OpenGL mode. It's strange that certain programs generate the list of resolutions incorrectly and others don't. But from what I can gather, this might not be fixable at all from the DXVK perspective. It's more DXVK is exposing a flaw somewhere else in the OS and driver code.

DaRkL3AD3R avatar Jan 06 '21 04:01 DaRkL3AD3R

Can you test with this? It would be interesting to see if this affects the problem for you.

dxvk-format-exposure.tar.gz

misyltoad avatar Feb 06 '21 09:02 misyltoad

Sadly no dice.

DaRkL3AD3R avatar Feb 06 '21 18:02 DaRkL3AD3R

Same issue with a 3440x1440 120Hz monitor, is it still unfixed ?

Kainey avatar May 16 '21 20:05 Kainey

Same issue on a 3090. Trying for 5120x1440

Displays a ton of different resolutions without DXVK but with it I can't go beyond 1152x864 (120hz)

FIocker avatar Aug 12 '21 17:08 FIocker

LG 4K same issue. Unsure if this can be fixed. Cant go past 1400x900 or something close to that i can’t remember it’s something by x900

easily can set resolution in 1920x1080 with d3d9 but not dxvk

interestingly it worked great in GTA IV just not the EFLC content

vanhalendlrband avatar Jan 15 '22 02:01 vanhalendlrband

Pretty sure this is just because we expose more modes than Windows and the game has a fixed size. Not super sure what to do here. I guess we could just not expose some modes or not expose ones that aren't the target refresh or something for this game.

misyltoad avatar Jan 15 '22 05:01 misyltoad

@Joshua-Ashton But without dxvk you can run the game at native 4k...

recklessnl avatar Jan 29 '22 02:01 recklessnl

Yes thats the same for me as well, without DXVK it runs up to 4k native as well just not great of course. Would be nice if it was DXVK then it would run amazing at 4k

Get Outlook for iOShttps://aka.ms/o0ukef


From: recklessnl @.> Sent: Friday, January 28, 2022 6:38:05 PM To: doitsujin/dxvk @.> Cc: vanhalendlrband @.>; Comment @.> Subject: Re: [doitsujin/dxvk] [D3D9] Cannot select proper resolutions using dxvk with GTA IV (#1831)

@Joshua-Ashtonhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJoshua-Ashton&data=04%7C01%7C%7C6880d7fcfcee4ac76e4c08d9e2d06192%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637790206906217956%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KonAxSrg7gRzcFKCZixawvLq3t1TMzXMGU6BNKI9rCc%3D&reserved=0 But without dxvk you can run the game at native 4k...

— Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdoitsujin%2Fdxvk%2Fissues%2F1831%23issuecomment-1024813652&data=04%7C01%7C%7C6880d7fcfcee4ac76e4c08d9e2d06192%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637790206906217956%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=7BzNsnOHwOdrNtEKVui%2Fn80aS52fmo%2BTdD5pRT6QQ%2BI%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHAO2A3AP5ZDGUWOE2VQ3G3UYNHI3ANCNFSM4UABXBXA&data=04%7C01%7C%7C6880d7fcfcee4ac76e4c08d9e2d06192%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637790206906217956%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=at389wPQ6YOnBACoOKju8%2Bg4wy6dVDcKgj7s6jdhPIQ%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7C6880d7fcfcee4ac76e4c08d9e2d06192%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637790206906217956%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=WwYEtBELOTBgZFrJyn8lL7oUp%2BPQodYyKIOmRWekZb8%3D&reserved=0 or Androidhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7C6880d7fcfcee4ac76e4c08d9e2d06192%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637790206906217956%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2FdTMSJNkaxuTTrj1vkKiXgHNtRFBnwH6qMnQxBhtUc8%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

vanhalendlrband avatar Jan 29 '22 03:01 vanhalendlrband

I have the same issue using a 1440p 144hz gsync monitor and RTX2070S

ancalimonungol avatar Feb 01 '22 16:02 ancalimonungol

In my case, I was stuck at 25 Hz for some reason (as well as limited res options), connected to an LG OLED 4K (HDR enabled). By passing the launch arguments: -width X -height Y -refreshrate Z as well as -availablevidmem T, I was able to get 4K 60 going smoothly.

Much to my surprise, and not diving too much into details, I'm running 2 x 970 in SLI - It looks like SLI support was also gone with DXVK, whereas without it it scales beautifully and gives decent performance.

HDR seems to have been broken too, but I can't confirm just yet, will do some more tests soon.

KiralyCraft avatar Feb 06 '22 20:02 KiralyCraft

In my case, I was stuck at 25 Hz for some reason (as well as limited res options), connected to an LG OLED 4K (HDR enabled). By passing the launch arguments: -width X -height Y -refreshrate Z as well as -availablevidmem T, I was able to get 4K 60 going smoothly.

Thanks! This fixed it for me, I wasn't aware there was a refresh rate option and was stuck at 1080p 50hz. I encourage everyone else to try this too.

Something interesting that I found too is that if I alt-tab when the game is initially loading (i.e. Rockstar logo intro) the game would switch back to 800x600, alt-tabbing after that is fine though so if it happens to anyone just be patient.

Uncasted avatar Mar 08 '22 17:03 Uncasted

I feel like this issue could have been resolved in the meantime by an updated dxvk or nvidia driver release as i suffered from it a year ago and luckily cant get it to occur anymore. 2560x1440 @ 144hz Monitor with active Gsync, using a display port cable
what i did just to be safe for anyone:

copied the 32bit versions of d3d9.dll and dxgi.dll into the main folder

dxvk.conf content: dxgi.maxFrameLatency = 1 d3d9.maxFrameLatency = 1

commandline.txt content: -rglLanguage=en-US -availablevidmem=8000

slightly off topic after that i followed http://ant-sh.blogspot.com/2021/01/antialiasing-with-dxvk-and-gta-iv.html to get smoother edges thats it

Karpadre avatar Oct 01 '22 19:10 Karpadre

The driver has no impact on this and I don't think the DXVK code that impacts this has been touched either.

K0bin avatar Oct 01 '22 19:10 K0bin

Just an update. I recently dropped a 4090 into my PC and this issue no longer occurs. It's either an update to DXVK that resolved this or the newer graphics card did. Everything software side is the same regarding driver and monitor configuration. Only potential changes are the new GPU or a DXVK update. I'm going to try a much older build of DXVK and see if I can re-replicate the issue or not. If not, then I think it's safe to say this is GPU specific.

DaRkL3AD3R avatar Oct 27 '22 07:10 DaRkL3AD3R

It's probably not anything on the dxvk side that has changed behavior in regards to this

Blisto91 avatar Oct 27 '22 07:10 Blisto91

It was the graphics card. I rolled back to DXVK 1.9.2 from Sept 2021, and the issue was still fixed. What's strange is, I tested a newer graphics card than my old one in the past, 1080 Ti vs 2080, and the same problem was present on the 2080 for me but not for my friend. He didn't have the multiple refresh rate reports like I did. But now upgrading my 1080 Ti to a 4090 resolved the issue. It's just bizarre.

I think it's safe to say either way this is not a DXVK issue and this topic can be closed. I had the same 3x listing issue in an emulator too which implies it's not a strictly DXVK thing but rather how the program polls the device on certain APIs.

To anyone still suffering this problem, a bandaid solution is to use Custom Resolution Utility to strip the EDID of all refresh rates besides your maximum and that should clean up the list enough to allow you to select your desired resolution. Otherwise, maybe eventually when you upgrade your GPU you'll find the problem solves itself.

DaRkL3AD3R avatar Oct 27 '22 07:10 DaRkL3AD3R

No it's fine to keep the issue open imo. dxvk can be weird in this regard sometimes, even on linux depending on your setup (monitors and such). Tho there it is alot of the time masked by various wine versions and what not. Not sure.

Blisto91 avatar Oct 27 '22 08:10 Blisto91

For me, what worked is disconnecting second monitor while playing GTA IV with DXVK. Then, all resolutions appear properly as they should. Main monitor is 1440p@144Hz (without Gsync/Freesync enabled) and second is 1080p@60Hz.

EPtoMEnt avatar Apr 28 '23 21:04 EPtoMEnt

I just wanted to add my experience and I'm still having issues. I used the downgrader after making sure game was stable from downgrade I installed DXVK. Game ran great for like 10 hours and It was very nice overall. I was having issues with how grey everything looked but that's a GTA 4 issue not a DXVK one so I decided to try a ENB. After installing the ENB and getting in-game I didn't like how the colors looked so I used my backup copy of GTA 4 and reinstalled DXVK. Now I cannot select higher than 1440x1080. I have read through this entire thread and searched many more threads. I have tried different monitors and a third backup copy of GTA now for some reason I'm getting that issue only when DXVK is installed every other time I can select 4k.

Gloaf69 avatar Jun 14 '23 22:06 Gloaf69

To anyone still suffering this problem, a bandaid solution is to use Custom Resolution Utility to strip the EDID of all refresh rates besides your maximum and that should clean up the list enough to allow you to select your desired resolution. Otherwise, maybe eventually when you upgrade your GPU you'll find the problem solves itself.

May I ask how you use the Custom Resolution Utility to do this I have downloaded it and tried to do it but I made my monitor stop working.

Gloaf69 avatar Jun 15 '23 00:06 Gloaf69

Same issue with a 4090 and I switched from 1080ti too. Forcing game arguments to launch in specified resolution. Default game detects resolutions without a problem. GTAIV_d3d9.log Screenshot 2023-06-23 224742

ArdaCsknn avatar Jun 23 '23 19:06 ArdaCsknn

Probably a Windows-only issue. The game also tries to use NvAPI which cannot work on Windows.

K0bin avatar Jun 23 '23 19:06 K0bin