dxvk icon indicating copy to clipboard operation
dxvk copied to clipboard

Call of Duty: Ghosts - Cutscene desync after the level loading is completed

Open gabriele2000 opened this issue 2 years ago • 4 comments

Call of Duty: Ghosts has a weird problem, now I even know why so here I am, I'm reporting this issue here since DXVK is the wrapper and there are a lot of hacks for problematic games.

When loading a level the game drops the framerate at 30FPS, when it finishes they reach the maximum possible. Now, I don't know if it's an XWayland-caused issue or it's simply the game's fault, but:

  • The V-Sync doesn't work (if I put 60Hz and enable the V-Sync in-game, the game fails to sync to the selected Hz, they sync with the screen Hz instead)
  • If I limit the FPS to 60 through DXVK (I do this in every game, stability reasons), after loading the level, the cutscene goes out-of-sync with the audio, so the audio is basically stopping and playing, the video is slower and it's overall a very bad experience.
  • When the game can reach the full framerate of your screen, everything's fine

Note: I think that an APITRACE of the problem will be impossible since the CPU load that apitracing puts is simply going to "fix" the problem, like the issue present in CoD: Modern Warfare 1 Remastered with the terrain glitches.

Software information

Call of Duty: Ghosts, DX11 x64

System information

  • GPU: Nvidia GTX1050TI 4GB
  • Driver: 525.105.17
  • Wine version: 7.20 (tested also with 8.9, issue still present)
  • DXVK version: taken from github actions

Apitrace file(s)

Will create it if asked, but I doubt I'll be able to reproduce the issue.

Log files

game.log

gabriele2000 avatar May 30 '23 20:05 gabriele2000

The V-Sync doesn't work (if I put 60Hz and enable the V-Sync in-game, the game fails to sync to the selected Hz, they sync with the screen Hz instead)

This is normal because Wayland apps cannot change the refresh rate, so the game thinks your monitor is running at 60 Hz when in reality it's running at 144 or 165 or whatever it is for you. The only way to work around that would be to engage the frame limiter if we detect that it's running above the desired refresh rate, but that's actually quite tricky especially if the app is running in windowed mode.

I don't think DXVK can do anything about audio issues though, we don't interact with audio in any way whatsoever.

doitsujin avatar May 30 '23 22:05 doitsujin

I don't think DXVK can do anything about audio issues though, we don't interact with audio in any way whatsoever.

I know, the audio issue is the desync, which is caused by the game having the FPS limited to 60 (since the game is synced to 120Hz, even with the vsync off, which is WEIRD).

This is normal because Wayland apps cannot change the refresh rate, so the game thinks your monitor is running at 60 Hz when in reality it's running at 144 or 165 or whatever it is for you.

The problem is that my monitor is a 120Hz monitor, I limit the game at 60FPS but the game knows that my refresh rate is still 120Hz and the videos are desynched when the loading is complete.

A: The game is DUMB for synching videos to your monitor refresh rate B: There should be a way to "fake" the refresh rate for games without having to lower it globally (it would be a no-brainer thing to do, but since it's the only game that has this issue, and since the issue is common (quick google search and you'll find hundreds of similar reports), I'd prefer if there was another way to solve the problem).

By the way, every game that has an FPS limiter can limit the output, it shouldn't be too different as limiting the Hz. Since WINE doesn't have Wayland support at a ready state (YET, still WIP), it shouldn't be the problem since the game is still running on X inside Wayland, but still X.

gabriele2000 avatar May 30 '23 22:05 gabriele2000

@gabriele2000 Does this act more like expected now with current dxvk? Refresh rates selected for vsync should limit correctly now

Blisto91 avatar Jun 07 '25 18:06 Blisto91

@gabriele2000 Does this act more like expected now with current dxvk? Refresh rates selected for vsync should limit correctly now

This wasn't a DXVK bug, I forgot to mention it. Both this game and Call of Duty: Advanced Warfare has this problem. The only thing that fixes it is running it with winesync, so no esync and no fsync.

I'll test everything with "stock values", meaning I'll re-enable fsync to see if the problem still occurs (I use DXVK_FRAMERATE=60 in every game since I have a 120Hz screen and my GTX1050TI can't run a lot of games that that refresh rate, plus it's better to lock them)

gabriele2000 avatar Jun 07 '25 18:06 gabriele2000

@gabriele2000 did you have time to retest this?

Blisto91 avatar Jun 28 '25 17:06 Blisto91

@gabriele2000 did you have time to retest this?

I'm about to test it. Can I have vsync off and limiter in DXVK on?

gabriele2000 avatar Jun 30 '25 20:06 gabriele2000

If you want dxvk to auto limit to the refresh rate the game picks then vsync has to be on. If that what you means

Blisto91 avatar Jul 01 '25 05:07 Blisto91

If you want dxvk to auto limit to the refresh rate the game picks then vsync has to be on. If that what you means

The issue is related to synchronization. If I limit the FPS to 60, the cutscenes will load at 30, as expected then will go to 60FPS after loading. DXVK isn't the issue, ESYNC and FSYNC is, since if you use them you'll have audio desync, if you use the "slow" synch method everything will be perfect.

I'd say this isn't something for DXVK to fix.

gabriele2000 avatar Jul 01 '25 11:07 gabriele2000

Doesn't it behave the same on Windows? In regards to audio I mean. Don't recall from my tests there.

Blisto91 avatar Jul 01 '25 11:07 Blisto91

Doesn't it behave the same on Windows? In regards to audio I mean. Don't recall from my tests there.

I just know that enabling ESYNC and FSYNC while limiting the framerate is a problem both in Call of Duty Ghosts and Call of Duty Advanced Warfare. They have desync issues while the game has finished loading the leven because the framerate will go up and if it doesn't reach the refresh rate, the audio will desync because the video "can't keep up" (it slows down to a crawl)

gabriele2000 avatar Jul 01 '25 14:07 gabriele2000