The Linux Rain Linux General/Gaming News, Reviews and Tutorials

Getting Divinity: Original Sin to Run on AMD Graphics

By Andrew Powell, published 05/08/2017 in Game-Fixes


If you're running an AMD graphics card with Mesa (open source) drivers and tried playing the great RPG Divinity: Original Sin, chances are you simply ran into a crash upon launching the game. Thankfully, the community comes to the rescue and there is a work around. Here's how.

To be perfectly honest I'm still not entirely sure myself exactly why this happens with this game and the Mesa drivers on AMD cards. It seems Mesa needs to be told to force enable a "midshader" extension of some kind and also, as you will see in a second, needs to do some LD_PRELOAD trickery to load a couple of patches at run time (as opposed to patching all of Mesa itself) in order to get the game to run. Full details can be seen in this bug report.

Thankfully, in my experience (with Mesa-git and a AMD 380X GPU), once this is done the game actually does run sweetly.

Let's do it!

Credit goes to user soulsource on the Gaming On Linux article who commented with a nice step-by-step on how to do this, which is what I followed and it worked just fine.

  1. Download the source for the LD_PRELOAD shim (right click the link -> save as -> name it divos-hack.so)
  2. Compile it using the command below inside the directory where you saved the downloaded patch file. This will give you a divos-hack.so file.
  3. cd ~/Downloads && gcc -s -O2 -shared -fPIC -o divos-hack.{so,c} -ldl
  4. Copy the just created divos-hack.so file to your Divinity: Original Sin game folder (the subfolder called game, within the install path)
  5. The above step will depend on what version of the game you have. For GOG.com, the game folder will be in a folder such as "/home/<your username>/GOG Games/". For Steam, likely somewhere such as "/home/<your username>/.steam/steam/steamapps/common/".

Now, for the next part, if on the standalone game from say GOG.com, either navigate to the game folder in terminal and run the following command:

allow_glsl_extension_directive_midshader=true LD_PRELOAD="divos-hack.so" ./runner.sh

Or, in the case of the Steam version, navigate to the game in your Steam library, right click on the entry and go to Preferences and open the "Set Launch Options" dialogue. There, put the following:

allow_glsl_extension_directive_midshader=true LD_PRELOAD="divos-hack.so:$LD_PRELOAD" %command%

Then just run the game from Steam as you normally would. Voila!

I hope that helped and if any questions, by all means leave them in the comments below. Divinity: Original Sin seems to be a great RPG experience that, for me, seems to fill a void that combines elements of games such as Baldurs Gate with the likes of Diablo II. Well, I'm sure some would disagree, but that's been my impression so far. Either way, it's nice to actually be able to play it!

In theory, in future at some point (as aluded to in Liam's Gaming On Linux article earlier), this hack won't be needed.



About the author

Andrew Powell is the editor and owner of The Linux Rain who loves all things Linux, gaming and everything in between.

Tags: game-fixes tutorials divinity-original-sin gaming
blog comments powered by Disqus