How To Play Crash Bandicoot N. Sane Trilogy on Ubuntu 18.04 using DXVK

Requirements:

  • The latest Wine Staging release.
  • DXVK 0.72+
  • A Vulkan supporting GPU and drivers
  • Ubuntu 18.04 LTS

I will have assumed you have setup your Vulkan Driver (For Nvidia, it’s 396.54.06 and for AMD it’s Mesa 18.1.3+) so we’re only covering Wine installation. Those having trouble installing Nvidia drivers, in very brief terms, do this:

sudo nano /etc/default/grub
#And where "GRUB_CMDLINE_LINUX_DEFAULT" is, add this to the end before the quotation mark:
nomodeset
#and run
sudo update-grub
sudo update-initramfs -u

And then after a reboot you can install your Nvidia drivers straight from Nvidia, after marking it with something like this: (assuming you are in the download folder)

chmod +x NVIDIA-Linux-x86_64-396.54.09.run

and launching it with this:

./NVIDIA-Linux-x86_64-396.54.09.run

You can get the Nvidia Linux Vulkan drivers here: https://developer.nvidia.com/vulkan-driver

Installing Wine Staging:

Open a Terminal, then do the following commands in order:

wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
sudo apt update
sudo apt install --install-recommends winehq-staging
sudo apt install winetricks

Each time sudo is called, you’ll be asked for the password you setup your installation of Ubuntu with.

Then, launch winecfg in Terminal. It will download necessary components.

Once a window called “Wine Configuration” opens, go to the “Staging” tab and checkmark these on:

  • Enable_CSMT
  • Enable_VAAPI
  • Hide Wine version

Next, go to the “Libraries” tab and add the following:

d3d11
d3d_compiler47
dxgi
nvapi
nvapi64

Now click “Edit” on each entry and click “Native (Windows)” for these:

d3d11
d3d_compiler47
dxgi

and click “Disable” for these:

nvapi
nvapi64

Use Winetricks to get the corefonts required:

winetricks corefonts

Grab a Steam installer from store.steampowered.com, and run it in Wine. Go to where you downloaded it, open a Terminal, and type wine and a space into the terminal. Drag and drop the Steam installer and start installing Steam.

Getting rid of debug messages:

To get rid of debug messages, type this in a terminal:

sudo nano /etc/environment

Add this below what already exists in the file:

WINEDEBUG=-all,fixme-all

and press Ctrl+X and exit while saving.

Reboot the machine.


OPTIONAL

For the best performance out of Nvidia drivers, add these environment variables:

__GL_THREADED_OPTIMIZATIONS=1
__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1

Save these to /etc/environment and reboot.


Get DXVK version 0.80 here: https://github.com/doitsujin/dxvk/releases/tag/v0.80
Builds newer than git commit 3359b89 will work best with Crash NST. Version 0.80+ implement a pipeline cache, resulting in less stutter the more you play.

Extract all the files.

Run the setup_dxvk.verb with winetricks.

winetricks --force setup_dxvk.verb

If it fails for whatever reason, copy all the files in “x32” to /home/(username)/.wine/drive_c/windows/syswow64 and all the files in “x64” to /home/(username)/.wine/drive_c/windows/system32, where (username) is the username you setup your Ubuntu install. Overwrite the files when prompted.

Launch winecfg from console again and click “Add application”. Find Steam.exe and Steamwebhelper.exe. (likely in Program Files (x86)/Steam and Program Files (x86)/Steam/bin/cef/cef.win7) and add them to the Application Settings list. Once those EXEs are in there (and this might sound stupid, but it works) click on it, and set the Windows version to “Windows XP” for both Steam.exe and steamwebhelper.exe. This ensures you can browse the Steam Store using Wine. Make sure “Default Settings” once clicked is still Windows 7, that will allow NST to run.


ALTERNATE INSTRUCTIONS:

Once Wine is installed, before running winecfg again to do the step involving the “Add application” button, replace /opt/wine-staging with the latest tkg-nopulse build from https://lutris.net/api/runners?search=wine (newer builds at the bottom of the page)

Extract the tar.gz and rename the folder wine-staging. Rename the current /opt/wine-staging to wine-staging-old, and copy the new wine-staging to /opt

Make sure to run these in order afterwards:

sudo apt-mark hold wine*
winecfg

Now follow the instructions on Lutris’ “How to Esync” and change your /etc/security/limits.conf file:

Don’t forget to add this to /etc/environment:

WINEESYNC=1

You can now proceed without adding Steam EXE specific OS version compatibility values.

Please note this means from now on, the procedure has to be repeated to manually update your Wine version with pre-built versions from Lutris.

Also, switch back to the apt installed wine-staging when you have to install a new application in Wine. The Lutris builds are based off of different path variables compared to your apt installation so icons and paths could break if you install new programs with the Lutris pre-build. To be on the safe side, switch back to your PPA sourced wine-staging installation when you have to run a installer.


Launch Steam and let it update again. Now you can install NST.

Before the download completes, add this to the “Set Launch Options…” under “Properties” when you right click the game in Steam:

-4kb

This is optional on later versions of DXVK, but if you feel like it, or if you’re running wined3d, you can add this to be sure.

Once the download completes, VERY IMPORTANT: Turn Steam into Offline Mode, and relaunch Steam. Leaving Steam online will cause the game to crash.

Open winecfg again from a terminal, go to the “Graphics” tab, and checkmark “Emulate a Virtual Desktop” and make the desktop size 3840x2160, and click apply. Leave winecfg running when you launch the game for the first time.

Launch the game.

If everything goes right, it will not crash past the splash screen and you will be able to see the Vicarious Visions intro. At this point, if you can see the Vicarious Visions intro, plug in your controller. Leave your controller disconnected when launching the game each time, THEN connect when you can see the Vicarious Visions intro. This ensures the controller works correctly. You can then skip to the logo, and exit the game.

Uncheck the “Virtual Desktop” in winecfg and click apply. Remove -4kb in “Set Launch Options” if you intend to play without 4K textures, otherwise, leave it in there.

Congrats! You can now play NST using Vulkan on Linux and you can report your performance playing the game to whereever. Currently Cold Hard Crash is the laggiest map even on a GTX 1080 running Vulkan if you use the release DXVK version 0.64, but if you use DXVK 0.70+, performance is completely gained back and is on par with the Windows version.

Updates to DXVK with new releases might help performance too, so update releases often: https://github.com/doitsujin/dxvk/releases

Nvidia driver 396.54.05 also had a dramatic boost to performance for all Vulkan titles, so anything past that will see great gains to performance.

There is however a major bug with a level in Crash 2 where the giant bear in “Un-Bearable” doesn’t break wooden platforms to reveal a secret area. This bug only exists if you play the game on Wine, making 100% completion with the gems impossible for Crash 2. It is not due to game save corruption. I made sure to double check that. Hopefully some skilled debuggers will figure this out for a future Wine Staging release.

Make sure to file bug reports to the game’s page on the Wine AppDB: https://appdb.winehq.org/objectManager.php?sClass=version&iId=36959 (They only accept wined3d reports)

That’s it! Remember to (distro) spin those GNU Penguins away in the snow levels and feel proud that Crash NST is now running on your system on Linux!

6 Likes

BIG NEWS:

As of DXVK Git version 0.64-14-g3359b89, the -4kb argument is no longer required! You can still do it just to be sure, but it should work now, changing resolutions and everything, out of the box!

Un-Bearable is still broken though.

Okay, looks like Wine AppDB rejects all submissions using DXVK if that was the primary way to run the game, so if your Wine AppDB submission for this game got rejected cause you used DXVK, post your results here instead. It’s looking like the AppDB people are going to be uptight about DXVK (even though it’s growing in popularity)

@wendell, this is a big thing to tell people for your Wine/DXVK video. Cause the AppDB rejects DXVK results so we don’t have accurate bug reports for DXVK right now.

Here’s a video of the “Un-Bearable” bug.

Steam Play instructions: (As of Proton 3.7)

USE OFFLINE MODE and the recommended DXVK drivers (Mesa 18.1.3+, Nvidia 396.54.05+)

Performance issues will be solved once Proton has a rebase upstream with a new Wine version.

Un-Bearable bug still exists.

That’s it.

How about just dual boot and play it on Windows? Just saying …

The point of Steam Play/Proton, which is based on Wine/DXVK, is independence from Windows.

Try saying that in this thread:

This is SO CLOSE. It’s just that Un-Bearable bug that is stopping this from being on par with Windows.

Also, @Wendell himself said in his DXVK video it’s time for a change to get Linux gaming through whichever way is appropriate out slowly to the masses.

3 Likes

Updated in light of recent events to use the release versions of DXVK.

The haagch nightly builds are extremely risky to use, because it was a reason multiplayer bans were being executed. Use the release builds from now on.