protonscr

GTA IV - issues with ZolikaPatch

dxvkclosed d3d9can't reproduce
doitsujin/dxvk#3622 · opened 2023-08-15 by HunterCZ122 · updated 2024-01-27 · 22 comments · github
HHunterCZ122 2023-08-15 github

Software information

Grand Theft Auto IV, Steam version, downgraded using Zolika1351's downgrade archive

After downgrading and launching the game:
On Nvidia, it gives me black screen and nothing happens (or just doesn't display anything on xorg)
On Intel, it works, but sometimes freezes in loading screen (trace with freeze is provided)
WineD3D works properly.
I tried faking vendor to AMD, using deferSurfaceCreation, no luck.
I maybe think the issue comes from ZolikaPatch since it uses some nasty hacks which maybe can trigger DXVK.
I tried asking in Zolika1351's Discord, currently without any answer.

System information

  • GPU: GTX 1660 Ti, UHD 630
  • Driver: 535.98, 23.1.5
  • Wine version: Proton Experimental
  • DXVK version: 2.2

Apitrace file(s)

Log files

steam-12210.log

KK0bin maintainer 2023-08-16 github

The WineD3D apitrace replays with DXVK without any hitch, the ANV apitrace is over before displaying any frame and the Nvidia apitrace is literally empty.

HHunterCZ122 2023-08-16 github

Then I think it's a issue inside ZolikaPatch doing something incorrect. It doesn't work even with older versions of DXVK and D9VK. On Xorg it does crash inside libnvidia-glcore.so. Also noticed on ANV it doesn't just freeze GTA IV, but all XWayland windows. Lavapipe also has the same issue with freezing, but doesn't freeze other windows. Looking at Zolika's Discord, I'm not only one experiencing this issue, but they use Windows instead. Unfortunately ZolikaPatch is not open source, so guess I'm out of luck with this until developer itself responds.

Mmirh 2023-09-23 github

For starters, you could provide decent apitraces?
As said, only the already-known-working wined3d one contains usable information.

HHunterCZ122 2023-09-23 github

For starters, you could provide decent apitraces? As said, only the already-known-working wined3d one contains usable information.

I will try to investigate it tomorrow. Unfortunately the modder who made ZolikaPatch left (https://zolika1351.pages.dev/posts/saying-goodbye), so I don't see any point since FusionFix can supersed it (and works fine with DXVK).
Also sorry for making the title misleading because I thought the issue is with older versions of GTA 4, but the downgraded copy works fine without ZolikaPatch.

HHunterCZ122 2023-09-24 github

Surprisingly, gamescope fixes the freeze in loading screen I had on Mesa drivers (anv, lavapipe, and radv on Steam Deck). Nvidia still crashes. More apitraces will maybe not help, because I think the problem lays elsewhere (WSI, Wine, X11...).
As I said, the game works without ZolikaPatch, so it really depends on DXVK devs if they want to fix broken mod. Still, it's strange WineD3D just works.

If someone wants to reproduce:

  1. Get ZolikaPatch from here and extract it to game's folder (where GTAIV.exe executable is located): https://zolika1351.pages.dev/mods/ivpatch
  2. Launch the game, it will automatically downgrade your game to 1.0.8.0
Mmirh 2023-09-24 github

An issue is still an issue, what causes it specifically doesn't really matter.
If any though, freezes might be triggered but not caused by dxvk - and the same is true for black screens. They aren't exactly the usual kind of glitches that you are 100% sure on where to put blame.

And if you can't take better apitraces, it is likely to be the case.

HHunterCZ122 2023-09-24 github

An issue is still an issue, what causes it specifically doesn't really matter. If any though, freezes might be triggered but not caused by dxvk - and the same is true for black screens. They aren't exactly the usual kind of glitches that you are 100% sure on where to put blame.

And if you can't take better apitraces, it is likely to be the case.

Then tell me how I should make better apitraces? The Nvidia one is obviously blank because the game instantly crashes (stays at black screen), and the Intel one ends when the freeze happened. I only provided one trace with WineD3D because it works on both GPUs correctly.
Feel free to give me any tips.

Mmirh 2023-09-24 github

Yeah, then, if you don't think you may have done some mistake yourself.. I think that's pretty damning.
Like, that it's not even the graphics calls to cause the problems (or if not any, they hurt so hard and so suddenly the entire process that they don't get registered?)

You should probably check your dmesg and Xorg.0.log (or however it may be called in wayland?) for clues.

HHunterCZ122 2023-09-24 github

You should probably check your dmesg and Xorg.0.log (or however it may be called in wayland?) for clues.

Tested xorg again (which makes it even worse), checked journalctl, looked at Proton log, nothing interesting... I even tried proton-tkg without fshack, which managed even to turn off my screen on anv, made me switch to tty and restart display manager.

Yeah, then, if you don't think you may have done some mistake yourself.. I think that's pretty damning.

If you think so, then I will do the traces again tomorrow.

Mmirh 2023-09-25 github

I don't think it should even be possible to bring down your display session without leaving a single hint..

HHunterCZ122 2023-09-25 github

I don't think it should even be possible to bring down your display session without leaving a single hint..

It's because my laptop display has a broken EDID (or maybe it just doesn't support lower resolutions natively) and doesn't report other resolutions other than 1920x1080. Proton's fshack or Wayland does not have this problem.
I agree it's a little bit out of context, but still it's an issue.

BBlisto91 2023-09-25 github

Thanks for the issue and steps.
I haven't followed this closely yet, but I will take a poke here later at some point.

Mmirh 2023-09-25 github

In Windows-land that wouldn't really be considered a problem, because the driver/dm can take care of GPU-scaling non-native resolutions (so they can also avoid lengthy mode switches).
Anyway, can't you just run the game in a window, duh?

HHunterCZ122 2023-09-25 github

Anyway, can't you just run the game in a window, duh?

That also doesn't work. I ran it with -windowed argument several times previously, and it didn't help.

HHunterCZ122 2023-09-25 github

So I asked few people in IV community. 2 people confirmed it works fine on Linux with AMD GPU. Uhh, hopefully it's not Nvidia driver issue again.

EDIT: Another guy confirmed it freezes in episode selection on radv.
I also confirm on nvk, but it doesn't happen that frequently.

So in summary:

  • All Mesa Vulkan drivers tend to freeze in episode selection or loading screen, which can be bypassed by running the game inside gamescope
  • proprietary Nvidia drivers just give up instantly and will not output anything (or show black empty window)
  • It's maybe regression in Mesa drivers (the 2 people did not say which distro and Mesa version they're using)
  • AMDVLK is not tested
?ghost 2023-10-16 github

I was playing 1.0.7.0 with ZolikaPatch for many hours (disabled ZP's fast memory option), never had any issue. Using Nvidia 1060 3GB on W10 with driver 527.56.

I would share a video and apitrace but I recently deleted my GTA IV install to update to the complete edition.

HHunterCZ122 2023-10-16 github

Nvidia 1060 3GB on W10 with driver 527.56.

That's the issue. It doesn't reproduce on Windows for some reason (I couldn't reproduce it on Windows too). The behavior is weird altogether on Linux. Maybe Vulkan WSI doesn't like something, or I really don't know. Last thing I could try is using Wine with Wayland driver.

HHunterCZ122 2023-10-19 github

It's doesn't seem to be DXVK issue, tried dgVoodoo2 and it also happens there.
Hilariously, disabling Steam Overlay fixes the freezing issue. Makes sense why gamescope works... Nvidia proprietary driver still just explodes (even with Wayland driver).
In conclusion, GTA IV is just broken itself....

BBlisto91 2023-10-19 github

Sounds like the Steam overlay freezes and crashes that happen for some in some games since the new Steam GUI then?

HHunterCZ122 2023-10-19 github

Sounds like the Steam overlay freezes and crashes that happen for some in some games since the new Steam GUI then?

Maybe it is. Sometimes (launching the game for fifth/sixth time) it works, but when I open Steam overlay entire game freezes.

BBlisto91 2023-10-19 github

Sounds like that yes. It can be a bit racy.

HHunterCZ122 2024-01-27 github

I can't reproduce the Steam overlay freeze issue anymore. The black screen issue (or nothing shows up on X11) only occurs when using proprietary Nvidia Vulkan driver on Linux. From my testing, NVK, RADV, AMDVLK, ANV, and Lavapipe launch without any problems.
So I'm closing this issue, as this doesn't seem to be a DXVK issue, but a driver bug in Nvidia's proprietary drivers.

Proton versions