Call of Duty 2 freezes running in Intrepid

Asked by Rocko

Call of Duty 2 runs under wine fine 99% of the time in Hardy, but in Intrepid it almost invariably fails to start up.

The symptom is that the video freezes during startup and wine stops responding. It usually freezes on one of the first two 'advertising' screens a random number of frames in. If I click the mouse very quickly to get through the first two advertising screens and the intro to the main screen (ie where it says resume game, etc), I can occasionally get to the main screen. On a couple of occasions the video has frozen on the intro frame but the music for the main screen has played. There isn't any specific debug information printed to the terminal when it freezes.

In Hardy this does happen, but only very occasionally.

I have tried all combinations of the following:

* wine 1.0, wine 1.1.5 and 1.1.6 (on kernel 2.6.27-7-generic i386)
* nvidia 173.14.12 and 177.80 drivers
* ALSA and OSS audio drivers.

In Hardy it is running with both wine 1.1.5/1.1.6, kernel 2.4.26-21-generic i386 and nvidia 173.14.12. (I'm using i386 because it freezes in Hardy amd64 as well.) In both Hardy and Intrepid, the wine configuration is unmodified (ie no registry changes).

My hardware is:

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)
01:00.0 VGA compatible controller: nVidia Corporation GeForce 8600M GT (rev a1)

Note that Call of Duty 4 runs fine in all of the above combinations (except wine 1.0, which needs the directd3d patch applied before it will run), including in the amd64 kernel. It's only Call of Duty 2 that has this problem.

What difference could there be in Intrepid that stops it working?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu wine Edit question
Assignee:
No assignee Edit question
Solved by:
Rocko
Solved:
Last query:
Last reply:
Revision history for this message
Rocko (rockorequin) said :
#1

Two updates:

1. In Hardy amd64, it is much the same as in Intrepid i386 - it does play, but very rarely. In both, if I put the patch in that avoids playing the intro, I can get to the 'Resume game' screen every time, but it almost invariably freezes as soon as I press 'Resume game' and 'OK'.

2. wine doesn't hang completely - if I run with WINEDEBUG=+wave, when the screen freezes, there are a bunch of messages with the following repeating regularly:

trace:wave:wodPlayer_NotifyCompletions still playing 0x15e62f70 (1108992/1108928)
trace:wave:wodPlayer waiting 1ms (5,1)

(This is in Intrepid now.) So it looks like this might be an audio problem. Note that no sound is actually playing while it is saying this. I've told wine to use the OSS driver because the ALSA driver produces crackling/stuttering sound.

Note also: just in case it was something to do with pulseaudio, I have altered Intrepid's /etc/pulse/daemon.conf settings to match those in Hardy, but it makes no difference:

default-fragments = 4
default-fragment-size-msec = 25

Revision history for this message
Rocko (rockorequin) said :
#2

If it helps, when the game freezes, the trace for d3d9 always shows:

trace:d3d9:IDirect3DVertexBuffer9Impl_Lock (0x156668) Relay
trace:d3d9:IDirect3DVertexBuffer9Impl_Unlock (0x156668) Relay

I put a debug into the code and verified that IDirect3DVertexBuffer9Impl_Unlock is successfully completing (ie it leaves the critical section).

Revision history for this message
Rocko (rockorequin) said :
#3

The process gets left in the wait_pipe state.

I tried running it on Intrepid on an old laptop with an ATI card and the open-source radeon video drivers, and it plays the introductory adverts and scenes fine (although the main screen is blank, probably because the driver doesn't support enough of the 3D effects yet).

So this could be due to a change in the way the kernel is interacting with the nvidia driver. The driver itself should be the same in Hardy and Intrepid since it has the same version (ie 173.14.12).

Revision history for this message
Rocko (rockorequin) said :
#4

The following solution works for me. It was recently added to the wine app DB at http://appdb.winehq.org/objectManager.php?sClass=version&iId=3794 - see Pete's comment on 'RE: Freeze on vendor logo animations':

"I found the following on a CrossOver forum, and it works:

"Does it hang when playing the intro movies? There's a bug in CoD2(I believe, it might be CrossOver's fault as well) which causes a deadlock due to a race condition when playing movies on dual(or more) core CPUs. You can work around this issue by disabling all but one CPU cores. On Linux this can be done with "echo 0 > /sys/devices/system/cpu/cpu1/online". This way the Linux scheduler will stop using this CPU for any processes. It can be reenabled with echo 1 > ... "

Revision history for this message
Arton Pereira Dorneles (artondorneles) said :
#5

Thanks Rocko for this solution! Work great!

wine-1.1.11
01:00.0 VGA compatible controller: ATI Technologies Inc Mobility Radeon HD 3450