[Linux] Running KC:D with Wine

Hello Tux lovers with a thing for historical RPGs! Just like many others I’ve been backing this game for many reasons and multiplatformity was one of them. As the release date was getting near, it was more and more evident we won’t be lucky enough to ever see the beautiful meanders of Sazava river . Fear not, it’s not all lost yet!

Last year Wine, a windows-to-*nix compatibility layer, has finally started getting patches for DX11. While their work is far from complete, it turns out the support is mature enough to be able to run certain games. Lo and behold how you run Kingdom Come: Deliverance on Linux today.

:star: How to :star:

First, I got the best results with wine-staging 2.21. Use your distribution repositories or grab an appropriate package at https://wiki.winehq.org/Download . Follow the instructions to install WIne-staging, make sure you have both 32-bit and 64-bit versions (usually called i386 and AMD64 respectively). After the installation you can run winecfg from terminal to make sure your virtual windows version is set to 7 or higher. You don’t need to install or configure anything specific, all further dependencies (DX libs, vcrun redistributable) are handled by Steam.

Second, you should get a Steam account and download a Steam installer (is there a standalone KC:D version at all?). Open terminal and run
wine SteamSetup.exe
from where you’ve downloaded the file. Follow the installer instructions to install Steam. If you install to non-default location, change all paths as needed in further steps.

Third, run Steam. You can do it either from your application menu if it’s been added in there or from terminal:
wine ~/.wine/drive_c/Program Files (x86)/Steam/Steam.exe
You should be able to log in to Steam without problems. Any steamwebhelper.exe errors can be safely ignored. You can now add your KC:D Steam key if you haven’t done that already and install the game.

Fourth, once the game is installed, you need to copy two files – d3dcompiler_46.dll and d3dcompiler_47.dll from:
~/.wine/drive_c/Program Files (x86)/Steam/steamapps/common/KingdomComeDeliverance/Bin/Win64Shared/
to:
~/.wine/drive_c/Program Files (x86)/Steam/steamapps/common/KingdomComeDeliverance/Bin/Win64/
Not sure if this is a Wine bug or a KC:D one, but if you skip this step, your game will end up with northing more than a black screen (so black it would make sjw happy… :yum:).

Fifth, as the files are copied you can start the game. You can either hit the Play button from Steam or run it from terminal:
wine ~/.wine/drive_c/Program Files (x86)/Steam/steamapps/common/KingdomComeDeliverance/Bin/Win64/KingdomCome.exe
If you can hear the music but do not see anything, repeat step four. Once you get into the game menu, I’d recommend lowering the graphics settings to minimum due to poor performance you’ll gonna get unless you’ve got a hell-of-a-beast machine. No matter of what details level you want or set, set Water details option to at least Very high. With anything lower than that the game engine tends to draw a graphical glitch which you can see on a video below.

This should be enough for you to get the game running relatively fine given your PC is powerful enough. At least it does for me. Want a proof? Here you go:

https://www.youtube.com/watch?v=a1rWblKK-dY

:star: Performance :star:

On my setup I’ve been able to run the game without major boogs on a relatively stable 25-30 fps on low details. I know it’s nothing amazing but it still makes it playable. I did some testing but this is as high as I could get.

My spec:
Debian 9.3 Stretch x86_64
Linux kernel 4.14.12 Liquorix
Wine 2.21-staging (64-bit prefix)
nvidia binary 384.111

HW:
Intel i7 -4790K
32GB RAM
GeForce GTX 970

With Wine-staging 2.21:
Low = 25-30 fps
High = 20 fps
Very High = 15 fps

With Wine-devel 3.1:
Low = 5 fps

Yes, the newer version’s performance was terrible for me, I believe the extra patches in staging might make the difference here. Enabling CSMT in Wine-staging had no noticeable effect on performance.

:star: Known issues :star:

  • Low water details cause broken polygons to be displayed. Fixed by setting Water quality to Very high or better. https://imgur.com/a/GksRd
  • Temporary screen corruption may happen when stamina is too low and the picture is supposed to get blue-ish. Picture gets back to normal when stamina is regained. https://imgur.com/a/J2DpJ
  • Desktop gamma does not get reset after quitting the game and it is reapplied with every start. This causes gamma to keep constantly increasing/decreasing depending on your in-game gamma settings. You can reset desktop gamma with a command in terminal: xgamma -gamma 1.0
  • After burying Henry’s parents there’s an interactive scene when’s Henry dreaming unconscious. This scene is supposed to have a reddish ambient lighting but for some reason it is almost completely black instead. Try to reach the exit by following objective A shown on compass.
  • Torches don’t work properly. While the screen edges do actually glow, Henry’s field of view is dark like something is blocking the lighting effect. NPCs seem to not be affected by this.
  • For non-US keyboard layouts it is not possible to bind certain keys.

.

:star: Final thoughts :star:

If this little guide did help you make it run, great. Please feel free to share your performance numbers as I’m quite curious if it’s possible to bump the framerate a bit higher.

Since Wine does also support MacOS to some extent, the half-eaten-apple users might want to try out these steps to make it run on their systems too but I cannot guarantee it’s gonna work for you.

There are bugs already filed in WineHQ bugzilla related to KC:D if you want to chime in. Credits for the DLL copy trick go to the actual bug reporter.
https://bugs.winehq.org/show_bug.cgi?id=44520
https://bugs.winehq.org/show_bug.cgi?id=44521

5 Likes
1 Like

Thanks for the DLL copy hint. Seems I might be able to run the game after all :grinning:.

Other than that, I can confirm that performance with wine-staging is much better than with wine-devel. It might be something completely different, but for Witcher 3, the following patch was essential for performance: https://github.com/wine-compholio/wine-staging/blob/master/patches/wined3d-buffer_create/0001-wined3d-Do-not-pin-large-buffers.patch

Unfortunately, this no longer applies to Wine 3.x. There’s been some discussion to get the underlying issue addressed (https://bugs.winehq.org/show_bug.cgi?id=42592#c57), so perhaps the situation will improve somewhat in the future.

Unfortunately, since Steam is 32bit and KC:D 64bit, it’s not as simple to compile a custom version of wine. So it’s waiting for some official wine 3.2 packages to see if anything improved. Too bad we couldn’t opt for the upcoming GOG release instead, which wouldn’t require the WoW64 stuff that’s complicating things.

Been able to play for a little bit, though I did not really experiment much. With wine-staging 2.21 at 1280x720 with medium settings I see framerates between 20 and 30, with some drops to 15 in between.

Ubuntu 16.04
Linux kernel 4.13
nVidia binary 384.111
Intel i5 4460
8GB RAM
GeForce GTX 950

Re-tested with Wine-devel 3.2, which gives around 10 FPS with the same medium settings. It’s an improvement, but wine-staging still remains the better choice for the time being.

1 Like

Thanks a lot for posting Lyon. Followed the steps roughly on Kubuntu 17.10 and got the game working. There are some particle artefacts but other than that it’s playable. I just wish Warhorse hand the Linux port to Feral or Aspyr soon so we have a decent performance and higher details.

HW: Ryzen 1600, Radeon RX480, 16GB RAM
SW: Kubuntu 17.10, MESA 17.3, Wine Staging 2.21
Settings: Full HD, Medium (+Very High Water)
Performance: 18 - 30 FPS

1 Like

Thanks for sharing your experience guys. I’ve added a couple more bugs I’ve encountered, especially the torch bug is a bit annoying when playing at night. If someone figures it out please let us know. :slight_smile:

Works for me.

Worked for me too, though it was pretty dark, red. Couldn’t see too far.

Can confirm that one.

Thanks for the post, we all want to see a native linux version but we all know its not gonna happen so we have to run it on wine unfortunately…
I am running at 20-35 at low quality with water at very high for bug fix on the 2.21-staging, really slow on 3.2, nvidia gtx 1060

After a year, Kingdom Come runs pretty good and is fully playable in Wine with DXVK (or Valve Proton). It is, however, still required to copy the d3dcompiler_46.dll and d3dcompiler_47.dll (and if you are using AMD graphics card, also amd_ags_x64.dll) DLLs from Bin/Win64Shared/ to Bin/Win64/.

I had played for about 50 hours, up to the battle at Pribyslavitz, without major problems.

With the last DLC out soon, I’ll see if I can grab a complete copy off of GOG and continue where I left off. Despite the game never making it to Linux natively, I think getting the physical edition from the Kickstarter was a steal. Having another copy that’s actually complete and DRM free will make me a bit more happy and allows me to show my gratitude for such a unique game.

Hope that Warhorse will repay me in kind and put a bit more effort into Linux support with their future titles!

2 Likes