Tuesday, February 24, 2015

Work-around for "Deus Ex: Invisible War" on Windows 7 64bit

I recently finished the original Deus Ex again and I thought it was time I went through the whole series. I installed the first sequel The Invisible War, which I haven't played before, but much to my disappointment and frustration, the game wouldn't load.

I own the Steam version of the game, but after some serious Googling, it seems that no matter what version you own (CD, patched, GOG or Steam), the problem is the same: the game crashes behind the first in-game loading screen. Everything up until the intro cutscene works fine, but the levels won't load.

Old games tend to be finicky, even after the basic optimizations they receive for re-releases on platforms such as Steam and GOG. I recently discovered that Gothic II won't run on my Windows 7 box, even though in my previous installation it ran just fine.

I currently run Windows 7 Ultimate, 64bit, on an AMD FX 6300, 6GB RAM and a R7 260 GPU-- all factory clock settings. This was the first time I was running Invisible War, even though I had owned the game for a couple of years now, so I hadn't had the chance to test it on my previous hardware (Athlon X2 250, HD 6570).

What's curious with Invisible War, contrary to most other old games I've tried, is that the problem seems to be almost universally the same: black screen during loading, game crashes behind the screen, game is unplayable. I ran into one other unrelated issue, but this is the problem over 90% of users seem to have.



There are theories as to why this may be happening (all of the attributed to the insane of idea on Ion Storm's part to modify the Unreal 2 engine and use two different executables for the same game), but no matter the cause, there are a few fixes available.

FIX #1: In the game's "System" folder (e.g. ..\Steam\Steamapps\common\Deus Ex Invisible War\System), right click on the three executables (Ion Launcher, DX2, DX2Main), go to Properties and check "Disable Visual Themes" and "Disable Desktop Composition".

This is the simplest fix, but it doesn't seem to work for many people. Try it first, as it's the easiest, but chances are it won't get you anywhere. Also, always shut down your browsers and especially if you're running Chrome and its variants before running this or any similarly old games.

FIX #2: The game can't load, because it can't work multi-core CPUs. This idea comes largely from a similar issue with another EIDOS game, "Thief: Deadly Shadows", which uses the same engine. I haven't played "Deadly Shadows" on Windows 7 yet, but it sounds plausible.

To fix this, you can do a few things:

a) Set compatibility to Windows XP or lower.

b) Once you launch the game, hit Ctrl+Alt+Del and start the Task Manager. There, go to the Processes tab, right click on DX2Main.exe, select "Affinity" and deselect all cores except one (any one, it doesn't matter). You will need to do this every time you relaunch the game and likely when you load a new level in-game as well.

c) The above method is the simplest, but also irritating, because of its repetition. Instead, there is a one-time fix you can apply:
- Download "imagecfg". You can find the file HERE (it's not a virus or a hack, it won't damage your computer).
- Extract the file in C:\Windows\System32. The file is executable, but you must extract it as it is, do not run it.
- Hit "Run" (Windows key + R) and paste the command:
"imagecfg -a 0x1 C:\Games\Steam\SteamApps\common\Deus Ex Invisible War\System" and hit Return (or Run). Remember to modify the path of the game's folder to fit your own installation.

The above will permanently set the executable files in the game folder to run with a single core. If it doesn't work, you can repeat the process for each of the three .exe files seperately (by adding e.g. "\DX2Main.exe" at the end of the command).

This is the most popular fix and also the one that seems to work for most people. The majority of users seem to be able to play the game once Affinity has been set to a single CPU. Try it out and if all goes well, enjoy your game!

Unfortunately, it didn't work for me. Not only that, but now instead of a silent freeze behind a loading screen, Windows outright gave me an error and the game died right then and there, kicking me back to the Desktop.


FIX #3: This one isn't for everyone. There is a thread going around the net that the issue with the game isn't visual technology or CPUs, but rather a Realtek audio driver issue. It's a huge issue, as there is no easy and cost-effective way to get around that. Not only that, but Windows 7 has removed the option to turn off hardware acceleration for audio and, worse yet, killing the audio service entirely still doesn't fix the game, as the little bugger will return an error that it couldn't utilize the Direct Sound service and will refuse to proceed.

Outside of rolling back drivers until something sticks, the only other solution is using a different sound device. Some users have apparently reported that using headphones with built-in drivers solves the problem and the game runs fine.

I did try replacing my own sound device; I was lucky enough to find a forgotten Auzentech X-Plosion lying around my spare-parts boxes (great card, by the way) and installed it. Lovely sound, better than the on-board device. The game still wouldn't run, though.

FIX #4: I tried all of the above fixes and sadly, nothing worked. At all times, the problem remained the exact same: the game would freeze behind a loading screen and wait for me to force-kill it via the Task Manager.

The interesting thing is that the two executables, Ion Launcher and DX2Main.exe, are running simultaneously. At first I used to kill both and just try the process all over again, but at some point, when I only killed DX2Main.exe, Ion Launcher.exe relaunched the game after 3-5 minutes.

Not only did it relaunch the DX2Main.exe on its own, it picked up from where it left off, i.e. it loaded the in-game level just as it was supposed to.

This seems to always be the case as well; this particular issue almost always manifests like that. DX2Main.exe will freeze upon loading, but force-killing it will allow the Ion Launcher.exe file to relaunch the game and continue normally.

Of course this isn't a solution; it takes the Ion Launcher up to FIVE MINUTES to relaunch DX2Main.exe and, unlike its predecessor, Invisible War has A LOT of loading screens (thank you XBOX). At this state, there is absolutely no reason to play a game that takes a five-minute-break every time you run into a loading screen.

There is a work-around that, which I'm currently using. It's not ideal, but if you really want to play the game, it's relatively simple and does its job.

a) You will need Process Lasso. Process Lasso is a nifty optimization utility that allows a nice level of control over system resources and active processes and comes with some optimization features to boost PC performance.

For the purposes of this fix, we don't need the full version, so just download the free tool.

b) Install Process Lasso and run it. It costs almost no resources and stays quietly in the taskbar when you don't need it. If you feel like it, play around with some of its basic features.

NOTE: Process Lasso also allows easier switch in process Affinity, so if you have it installed and opt to try out FIX #2, use it instead of the regular old Windows Task Manager.

c) Launch the game and head to your first loading screen (whether loading a new game, an old save or a new level). As soon as the game freezes, Alt+Tab to Process Lasso. Find DX2Main.exe and Terminate it.

d) This is why we needed Process Lasso: Find Ion Launcher.exe, right click on it and hit "Restart". What the Ion Launcher normally does after five minutes, it will do instantly after hitting restart, which means it will instantly relaunch DX2Main.exe and the game will continue with very little delay.

It's not ideal, but so far it's the only way I've managed to get it to work. Essentially it's not a fix; it's a work-around the game's bug, we just speed up the process with Process Lasso.

Keep in mind a few tweaks, particularly with this latest method. This isn't a rule, but in my case, once the game froze behind the loading screen, Alt+Tab'ing to Process Lasso wasn't an option. Ctrl+Alt+Del worked, but only the Windows Task Manager would be viewable over the game. Every other program remained below the black screen of the dead executable.

In this case you can either:
- Kill DX2Main.exe via the Task Manager and then Restart Ion Launcher.exe from Process Lasso, or
- You can run the game in Window Mode.

To run Deus Ex: Invisible War in Window Mode, go to the System folder in the game directory and open Default.ini with the Notepad. There, change the following parameters to
StartupFullscreen=False (default is True)
and
UseFullScreen=False (default is True).

The old Alt+Enter also works to switch from Fullscreen to Windowed Mode and vice versa-- most of the time, anyway.

Also -especially if you're going to be playing in Windowed Mode- you may want to set resolution beforehand, either to avoid losing your entire Desktop after a game crash or simply because the in-game options lock at 1620x1200 and your monitor goes up to Full HD.

 For that, you can go My Documents\Deus Ex Invisible War\ and edit the user.ini file with the Notepad. The values you want to change are:
FullScreenViewPortX and FullscreenViewPortY for width and height in full-screen, or WindowedViewPortX and WindowedViewPortY for windowed mode. These values are toward the end of the file. If they're missing (rare, but I've seen it happen), add them yourselves at the end of the file.

Another issue may be the HUD size. If it's too big or too small, go back to the Default.ini in the System folder and edit it. Under [WindowManager] find the option FOV_d and change its value according to your chosen resolution's aspect ratio: the default FOV_d=67 value is for 4:3, FOV_d=53 is for 16:9 and FOV_d=58 for 16:10.


Finally, you can download and install John P.'s texture mod that reskins a bunch of models in the game to make them considerably less ugly, with not any noticeable slow-downs.

Enjoy!


FOR LINUX USERS

I actually did manage to install and run the game semi-successfully under WINE and PlayOnLinux, in LinuxMint Qiana KDE. There are a couple of issues: sometimes, the menus don't show up at all; not the selection screen, not the options, not the HUD, nothing. This is usually fixed after restarting. Another issue is performance. Unless the game runs at the default 640x480 resolution with most visuals turned to low, the game is stuttering like insane. It's not consistent, either. Sometimes it will stutter, other times it will run at a constant 60fps at 1280x1024 with everything on full. My system obviously covers the requirements for the game, even under the extra weight of WINE, but I do have a problem with the Omega 14.01 drivers for AMD; I have installed them, but they don't work properly. In fact, Synaptic reports the packages as "broken". The drivers work; the Linux native version of Counter-Strike: Global Offensive runs perfectly at 60fps and 1920x1200 with most visual effects on, but Invisible War glitches.

Assuming you don't have a problem with your GPU drivers (the proprietary ones, I wouldn't recommend the standard Xorg drivers for any game), below are the steps to follow to install and run the game. You can install via PlayOnLinux (it's in the repository), but I personally favour vanilla WINE.

Steps:


1) Download WINE. Start a terminal and enter

sudo apt-get install wine winetricks

for Ubuntu and variants, or the equivalent command of your chosen distribution. The current stable WINE version is 1.6.2, but if you're feeling dangerous, you can download 1.7.x and compile it on your own.

2) Make a folder somewhere safe (e.g. /home/username/Games).

3) Make a new prefix via the terminal in the new folder:

env WINEPREFIX="/home/username/Games/DeusEx2" winecfg

 Winecfg will let you configure WINE, if you wish to do so. Do NOT create the game folder (DeusEx2 in the example) manually, or you will get an error. WINE will do it for you.

 A different prefix is useful and advisable when installing any new game. You will need to specify the prefix you want to use with each different program, otherwise the system uses the default .wine installation. A prefix allows different configurations for individual programs and it's advisable, as not all programs and games run well under all configurations. It'd be a pity breaking one game to run another.

Also, remember never, NEVER RUN WINE AS SUPERUSER/ROOT. Never "sudo" a WINE command.

5) Next you will need to use winetricks to install some extras and set some parameters. Again, remember to specify the prefix:

env WINEPREFIX="/home/username/Games/DeusEx2" winetricks d3dx9 dinput8 directsound vcrun6 mfc40 corefonts

These are usual installs for almost all games. The ones that are absolutely necessary for Invisible War are d3dx9 (DirectX) and directsound, which fixes some missing audio issues.

6) Install the game in a similar fashion. This is where things get complicated. I don't know if it's advisable downloading the Steam version or if it's even possible. If you'd like to try it, download the Windows version of Steam, locate the folder you downloaded it in and execute:

env WINEPREFIX="/home/username/Games/DeusEx2" wine Steam.msi

Install Steam and run, again with the same prefix, e.g.

env WINEPREFIX="/home/username/Games/DeusEx2" wine "/home/username/Games/DeusEx2/drive_c/Program Files/Steam/Steam.exe"

Log in Steam, download the game and run it. If all went well, you should be able to play the game just fine. Enjoy!

7) I personally chose to download the CD version for this, as I didn't trust running Steam under WINE (it didn't use to run well when I had tried it before the native version came out). If you own the CD version or an image of it, you'll need to run setup.exe from the disk. If you have an image of the game, you need to mount it first.

Invisible War comes in 2 CDs, so in the terminal, type:

sudo mkdir /mnt/disk1
sudo mkdir /mnt/disk2

You can create only one directory (many place it in /media instead of /mnt) but you'll have to unmount the first disk and mount the second mid-installation, which I find an unnecessary bother. Proceed:

sudo mount /path/disk1.iso /mnt/disk1
sudo mount /path/disk2.iso /mnt/disk2

Where /path is obviously where your iso image files are. Then navigate to /mnt/disk1 and install. Do not forget to specify the prefix:

env WINEPREFIX=/home/username/Games/DeusEx2" wine /mnt/disk1/setup.exe

Complete the installation. If you wish to patch the game or install John P.'s texture pack you can easily do it the same way.

8) Navigate to the game folder and run DX2.exe

env WINEPREFIX=/home/username/Games/DeusEx2" wine "/home/username/Games/DeusEx2/drive_c/Program Files/Deus Ex Invisible War/System/dx2.exe"

9) If you have the GOG version, you can use the same process, only instead of running Steam or setup.exe, you specify the prefix and run GOG's installer. Alternatively, if you run a dual-booting machine, you can copy your installed version from Windows inside the Linux directory and try to run it from there in a similar fashion.


This has been a needlessly maddening process, so I hope my guide may have helped somewhat. Have fun!

In-game shot from Win7 64bit + texture pack

2 comments:

  1. Hi,

    I just wanted to say that this is the only guide that helped me. Thanks so much for sharing! <3

    ReplyDelete