Total War: Shogun 2 doesn't use NVIDIA card on linux
Since Total War: Shogun 2 was recently ported to Linux, I decided to install it on my laptop running Arch Linux which has an integrated Intel graphics card (Intel HD 5500) as well as an additional NVIDIA card (NVIDIA GForce 940M), which are setup using bumblebee. However, when starting the game using primusrun
, the game doesn't actually seem to use the dedicated card (entering the video settings in-game shows me that the Intel card is used). Upon researching further, I found out that the game uses a shellscript named Shogun2.sh
to launch itself, and sure enough, running fuser -v /usr/lib/primus/libGL.so.1
shows that Shogun2.sh
has actually loaded the libGl.so.1
from primusrun, but this doesn't seem to extend to the actual binary. Then again, running tr \\0 \\n < /proc/8044/environ
(where 8044 is the PID of the binary) shows that /usr/$LIB/primus
is actually a part of LD_PRELOAD
.
I have tried inserting the primusrun
command into the shellscript so that the binary is executed through it, but to no success.
Another method I thought about was using the "Advanced options" field in the Feral launcher that seems to be baked into the binary and seems to be required to launch the game, but I was unable to find any documentation on supported switches/syntax.
Is there any way to enable the dedicated GPU for Shogun 2: Total War on linux?
Best Answer
After trying some different things and getting deeper into the innards of the game files, I realized that I didn't have the 32-bit version of primus installed. After fixing this, the game now recognizes the dedicated NVIDIA card.
Pictures about "Total War: Shogun 2 doesn't use NVIDIA card on linux"
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Andrea Piacquadio, Nana Dua, Nana Dua, RF._.studio