torstai 27. kesäkuuta 2019

How I got Watch_dogs 2 to run on Devuan Linux

Introduction

I played through Watch_dogs on my laptop few years ago, and I really liked the game even though I found some aspectes of it stupid (e.g. missions where it was necessary to kill everyone instead of sneaking around). My laptop just barely run the game but it was fun nonetheless.

I bought Watch_dogs 2 also (from Steam), and while it launched on the laptop the framerate was so low that the game was unplayable.

Now that I got my new computer, I decided to try the game again. This time, however, I had Linux which made things a bit more complicated.

As I mentioned in the previous post, I use Devuan Linux with the Beowulf (testing) branch, because only that has decent enough AMD graphics (and Vulkan) drivers for many games.

Installation from Steam

Originally I bought the game from Steam. The game is also visible on Uplay, but I decided to try installing the game from Steam first. This might have made things a bit more complicated in the end...

To install the (Windows) game from Steam I first had to enable the Steam Play compatibility layer for all games. I did it according to e.g. this guide. After that I could install the game.

Watch_dogs 2 requires Uplay (Ubisoft game launcher/store) to work, so when launching the game for the first time, it installed Uplay and some DirectX libraries and whatnot.

Running with Steam Play

After installation through Steam I tried to play the game. Sometimes it got stuck on the splash screen, other times I got it to launch Uplay only, and from tere I could try to start the game but it would just get stuck on the splash screen.

Some sources told to try giving a parameter -eac_launcher to run the game, but it didn't really help. So in the end I gave up trying to run Watch_dogs 2 with Steam Play and Proton (I think the version was 4.0.something) and try manually with Wine.

I already had the game downloaded by Steam, and I used winecfg to add a drive so that it would include the Steam directory with the game. However I didn't know where Uplay was installed and it was not visible in the default wineprefix, so I decided to download it and install with Wine. It installed fine, but did not launch due to some errors.

Wine version

The current Wine version in Devuan Beowulf is 4.0. However it didn't work any better than Steam Play, maybe even worse, didn't launch Uplay nor the game. So I decided to update Wine.

The current development version of Wine, is 4.11, I decided to try that. I followed the Debian guide on Wine homepage and it seemed to work fine with Devuan. I.e. I added
deb https://dl.winehq.org/wine-builds/debian/ stretch main
to sources.list. I assumed that Debian strect would be close to Devuan Beowulf. I then installed the winehq-devel package. This installed the 4.11 development version.

This, however, did not work. I don't remember the errors I got anymore, but I could not get the game to run, probably because Uplay would not launch. I found similar results in the WineHQ AppDB for Uplay, wine version 4.11 was given garbage rating.

There was promising result for version 4.8 though, everything should work. So I decided to give it a try. First I removed (apt-get remove ...) everything wine related, and then installed the wine-development 4.8 for Debian stretch:
apt-get install winehq-devel=4.8~stretch
 if I remember correctly. I might check the actual package names later.

Note: Since my installation a new test with wine 4.11-staging shows gold results if corefonts (maybe same as arial, see below) is installed with winetricks. So it might not be necessary to downgrade the wine version.

Install dxvk

Dxvk is open source Vulkan implementation of Direct3D 11/10. It is necessary to run these games, so I installed that one; version 0.96 (which i think is the latest) is already in Devuan Beowulf, so following command was enough:
apt-get install dxvk dxvk-wine64-development

Winetricks

I think with wine 4.8 Uplay launched a bit longer, but still crashed. I went to check what the Lutris installation script for Uplay did and saw that it does call winetricks with arial, win7 and d3dcompiler_43. In my case the last one failed to install, but doing
winetricks arial
winetricks win7
to install arial font and change default windows version to 7 did the trick and Uplay started just fine.

Uplay options

I multiple places it is preferred to set startup parameters for Watch_dogs 2 in Uplay to include
-eac_launcher
which disables the Easy AntiCheat, and also disables multiplayer, I think. I added this. I also disabled the Uplay overlay in Uplay preferences after one crash, as was suggested somewhere. After that I've only crashed the game once and it was when I was exiting the game. So I recommend disabling the overlay.

Install wine steam

At this point I had Uplay running but of course the game was not visible in it since it was installed with Steam. So I launched the game from the steam installation directory with wine. It launched but it wanted to install Steam again... Probably the wine version cannot directly communicate with Linux Steam. After a few tries I decided to go ahead and install the windows version of Steam with wine (clicking ok when the game prompted to install).

After Wine Steam was installed, it wanted to re-download Watch_dogs 2, since the game was not in the default library. Since I had already mapped the Linux Steam library in a wine drive, I added it to Wine Steam. Now Wine Steam saw that I had the game already.

I added the same -eac_launcher command line in Steam as well.

Note: It is VERY bad idea to use same library for Linux and Windows Steam. The Wine client tried to update all Linux games instantly to their Windows counterparts... See below how I fixed this.

Trying it out

At this point I can launch the game from Steam. Launching it brings up Uplay, and after first start the game is also visible in Uplay and can be launched from there as well. It works perfecly (as far as I can tell). I'm not interested in the multiplayer, so it does not matter if it does not work (though the game suggest online missions still... dunno what's the deal).

So, it was quite an adventure to get the game to work and I think I did it the hard way, but in the end I can play the game! I'm not going to touch the setup until I've finished the game, then I can try if it is easier to just install the game from Uplay or something.

About the steam library

As I mentioned, it was a bad idea to share the steam library between Linux and Windows client. Since I had already installed the game with Steam Linux (SteamPlay), I had to move it. I created a new directory, and made the .../Steam/steamapps/common/ tree there. I moved the Watch_dogs 2 directory from the Linux tree to there, as well as the appmanifest file under .../Steam/steamapps/. The manifest is just text, I looked into all of them until I found the correct one.

I changed the winecfg drive mapping so that the old path in wine would now end up in the new directory with only Watch_dogs 2 in it. After restarting Steam(s), the Linux client no longer sees Watch_dogs 2 as installed, and the Wine Steam sees only that, no other games. Now it works just fine.

Conclusion

So in the end I think the relevant parts could be:
  • Install latest wine-devel (I used 4.8 but I think the latest could also work)
  • winetricks arial
  • winetricks win7
  • Install latest dxvk and dxvk-wine64-development
  • Install Uplay
  • Install windows Steam client with Wine
  • Install Watch_dogs 2 with the Wine Steam client (or directly from Uplay?)
  • Disable Uplay overlay
  • Add -eac_launcher parameter in Uplay and in Steam for the game
  • Launch the game from Uplay or Steam and enjoy!

Ei kommentteja:

Lähetä kommentti