Skip to content

Instantly share code, notes, and snippets.

@valconius
Last active November 19, 2023 20:46
Show Gist options
  • Save valconius/1c5d037478fa0533d93cc98a51634057 to your computer and use it in GitHub Desktop.
Save valconius/1c5d037478fa0533d93cc98a51634057 to your computer and use it in GitHub Desktop.
Baldurs Gate 3 Early Access on NixOS

On all OSes, you need to use the beta or "next" version of Proton. In your games library, search for "Proton", right-click on the "5.0" entry, and opt-in to the beta in the "next" branch. If you do not do this, then nothing will work.

On NixOS, install amdvlk by adding the following to your configuration.nix. For more information, refer to the relevant nixos/nixpks pull request. You can test this with vulkaninfo or vkcube, both of which should just work. If you do vulkaninfo | grep GPU, then on radv you see (AMD RADV ...) but on amdvkl you see (Radeon ...).

hardware.opengl.extraPackages = [ pkgs.amdvlk ];
environment.variables.VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/amd_icd64.json";

Some believe the launcher works with protontricks 1086940 dotnet48, but that did not work for me. Therefore, I needed to refer to this ValveSoftware/Proton issue to forcibly use bg3.exe instead of the launcher.

$ cd "$HOME/.local/share/Steam/steamapps/common/Baldurs Gate 3/"
$ cp --reflink=auto bin/ bin.bak/
$ cp --reflink=auto Launcher/ Launcher.bak/
$ ln -s bin Launcher
$ cd Launcher
$ ln -s bg3.exe LariLauncher.exe
$ cd ..
$ cp Launcher.bak/*.dll bin

If, for some reason, amdvlk is not available, then you must use bg3_dx11.exe with radv.

When, in the future, the launcher works, just revert these actions and re-verify the steam localdata for this game.

Finally, you must launch the game twice from the Steam GUI. Others have used the CLI to launch the game, and on NixOS you should be able to use steam-run or a nix-shell in a buildFHSUserEnv context to do so, but I have not gotten that to work at all. So, open Steam, run the game... and wait about ten minutes while it downloads new shaders and does magic. The game will launch, bug-out, show a bunch of weird graphics artifacts, and then crash. Re-launch the game and wait another several minutes while it does more shader magic. The game will then launch, and then it will finally work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment