Running Windows games on Linux

Dec 21, 2024

I have been running Linux as my main OS for two years now. There have been ups and downs, like some softwares plain not working on Linux but have to run on Windows. Games are the biggest offenders. However, thanks to the efforts of Valve with Proton, the Wine project, DXVK, VKD3D-Proton, I was able to get some games playing, namely God of War 2018 and The Plucky Squire.

Install Wine

First, you need Wine, a translation layer for running Windows applications on Linux. Follow instructions on their website on how to do that. I recommend installing the development branch to get the latest features while maintaining stabilities. Staging is newer, but prone to bugginess.

Getting the games running

The games I mentioned earlier require DirectX, which doesn't exist on Linux, as Linux is an Open Source OS. So they use Vulkan instead. That's where DXVK and VKD3D. These libraries translate API calls from DirectX to Vulkan, which helps games that can't run on Wine on its default DirectX libraries.

Just download the libraries from the links, then copy the DLL files d3d11.dll, dxgi.dll, d3d12.dll, d3d12_core.dll to the system32 folder of your Wine folder. For instance,

/home/ubuntu/.wine/drive_c/windows/system32

similar to Windows folder structure.

After that, open the terminal and type winecfg. With the interface, add these files in the dialog to override the default of Wine. With each file, edit it to have Native (Windows) order.

When you are done, double-click on the executable of the game, it should work. It did for God of War 2018. Not so much for The Plucky Squire

DirectX 12 with VKD3D issue

When I tried running the Squire game, it got me an error saying Fatal error. Switching d3d12 and d3d12core to builtin Wine libraries didn't help. It just said it didn't support DirectX12. Switching every files to builtin gave me this render.

So how do you fix this? Well apparently, according to this release of Proton, I was supposed to match the version of DXVK with a right one on VKD3D. So I downloaded DXVK 2.5.1 with VKD3D-proton 2.13. It worked at last. I'm not sure how does that make any sense. Something new to learn then. However, DirectX 12 requires the game to cache shaders to disk, so it takes a while to start the game. Your mileage may vary.