Mount and Blade Warband won't start on NixOS
Hello, I'm having issues running mount and blade warband's native linux version on NixOS. Here's the log, it says something is missing but I'm not sure exactly what it is:
92 Replies
rival-black•16mo ago
Try without using steam runtime
but the game itself complains about missing
libGLEW.so.2.1
inland-turquoiseOP•16mo ago
no difference, same error
inland-turquoiseOP•16mo ago
yeah, I am not exactly sure what that is
or how to fix that
maybe something to do with wine?
rival-black•16mo ago
it's a native game
you can try with wine though
would need to uninstall the game and reinstall windows version
inland-turquoiseOP•16mo ago
I'd prefer the native version
rival-black•16mo ago
I don't have any experience with nix so I can't really help here ¯\_(ツ)_/¯
hopefully someone else sees this and helps
inland-turquoiseOP•16mo ago
ok, I'll ask in the nixos unofficial discord too and post the solution here if they find it.
relaxed-coral•16mo ago
I just dealt with libGLEW this morning while trying to use the Sonic Mania decomp. I also needed
libGLEW.so.2.1
, but (1) I am using an immutable Fedora, so I had to spin up a distrobox container and (2) using an arch container, I found that the only way to get libGLEW.so.2.1
was to get it from the AUR, so I had to install paru into the container because I don't know how to pull from AUR otherwise
the version of libGLEW on the Arch repos was newer and not backward compatible
and I couldn't use it in a Fedora container because according to this https://rpmfind.net/linux/rpm2html/search.php?query=libGLEW.so.2.1()(64bit), it isn't even available as a package for Fedorainland-turquoiseOP•16mo ago
Nixpkgs does have a glew package, will try that later
relaxed-coral•16mo ago
Check to see if it matches the one sought. There’s a newer libglew available on Arch that isn’t back compatible to the one above
flat-fuchsia•16mo ago
@termdisc This is a bit off-topic, but installing an AUR package without the use of a helper isn't terribly difficult, in the general case. Each package has a URL you can clone its Git repository from, and then you simply run
makepkg -srci
where the PKGBUILD file is.inland-turquoiseOP•16mo ago
nixpkgs has 2.2 :c
relaxed-coral•16mo ago
yeah, same with Fedora and Arch. chalk it up to GOG native games being frozen in time
inland-turquoiseOP•16mo ago
I'll try to see if I can make a custom nixOS package
relaxed-coral•16mo ago
There’s also the risk that the native build is out of date in terms of game content and patches
inland-turquoiseOP•16mo ago
ok so far I have managed to override the version attribute to 2.1.0
I'll let you know if it works
nope
it installed but it doesn't see it
wait a minute, libGLEW is in the game files
rival-black•16mo ago
try adding
LD_LIBRARY_PATH
env var to point thereinland-turquoiseOP•16mo ago
well, now it doesn't find libcurl
progress
rival-black•16mo ago
:sunglase:
try this out with steam runtime too
inland-turquoiseOP•16mo ago
aight
that's even worse
rival-black•16mo ago
aight
then don't
inland-turquoiseOP•16mo ago
without steam runtime
inland-turquoiseOP•16mo ago
maybe I can download it somehwere and copy it there (this is so scuffed)
man istg
inland-turquoiseOP•16mo ago
I manually downlaoded a precompiled libcurl from arch, and now it wants another goddamn library
inland-turquoiseOP•16mo ago
screw this I'll try the windows version
relaxed-coral•16mo ago
The thing I was doing had me install 3-4 different ones, one at a time
inland-turquoiseOP•16mo ago
Ok so here's what I did
Installe wine and winetricks
Then installed d3dcompiler_43 and 47
Then d3dx9, d3dx9_43, d3dx10, d3dx10_43 and d3dx11_43
Now it runs if I execute the exe file with wine.
It doesn't seem like the heroic launcher manages to launch it yet but I will check tomorrow
relaxed-coral•16mo ago
You have to completely redownload the game to switch to the windows build. Did you do that?
inland-turquoiseOP•16mo ago
Yes
relaxed-coral•16mo ago
Post a log
inland-turquoiseOP•16mo ago
inland-turquoiseOP•16mo ago
this is what hapens if I try to run it via heroic
if I run the actual exe with wine however it works
flat-fuchsia•16mo ago
Are you using the same prefix in both cases?
inland-turquoiseOP•16mo ago
yeah I think so
I used the heroic launcher to install the components in the prefix
so in theory it should use the same prefix
flat-fuchsia•16mo ago
And what is the non-Heroic command you're using to run the game?
inland-turquoiseOP•16mo ago
Two things work: wine ./mb_warband.exe on the working directory (I setup a shortcut to do that) or right click and run with Wine (same thing, on KDE)
You're not using the same prefix and Wine version then
inland-turquoiseOP•16mo ago
oof
Use the Winetricks button in Heroic (game settings) to install the components you listed above
inland-turquoiseOP•16mo ago
I did
that's how I got those components installed
inland-turquoiseOP•16mo ago

inland-turquoiseOP•16mo ago
I'm using whatever Heroic version is shipped with NixOS 23.11
I'd hope that doesn't mess with the fix
the game itself runs, just not through Heroic
Heroic runs the game, and any executables you run using "Run EXE on prefix", in the game's Wineprefix. Anything you do inside there will thus not affect your global prefix (what's used when just running
wine ...
/ opening a Windows application using your file manager
The output of winetricks list-installed
might also give some clues (that lists the verbs installed in your global prefix; make sure all of those are also installed in Heroic)inland-turquoiseOP•16mo ago
winetricks list-installed gives me this:
with wine-8.0.2 and WINEARCH=win32
d3dcompiler_47
did not work
and it also borked my fix
great
just great
I'm gonna try and undo that and just stick with my fix.
I'll leave this open for others who either want the fix or find out a solution to run this on heroic
relaxed-coral•16mo ago
Delete your prefix, disable Dxvk-NVAPI, use wine-GE, install d3dcompiler_47
inland-turquoiseOP•16mo ago
I'm getting
0024:err:module:import_dll Loading library d3d9.dll (which is needed by L"Z:\home\lorenzob\Giochi\Heroic\Mount and Blade - Warband\mb_warband.exe") failed (error c000035a).
0024:err:module:LdrInitializeThunk Importing dlls for L"Z:\home\lorenzob\Giochi\Heroic\Mount and Blade - Warband\mb_warband.exe" failed, status c0000135
from the terminal rn
relaxed-coral•16mo ago
Add that too
Assuming you didn't do something entirely wrong (as in, running the executable by just double-clicking it or something), this is impossible
inland-turquoiseOP•16mo ago
I did everything as you said
relaxed-coral•16mo ago
NVAPI is enabled in your log yet you have AMD
Right, I do fail to see how something happening in one Wineprefix can influence another, but alright
Please delete Heroic's Wineprefix (
/home/lorenzob/Giochi/Heroic/Prefixes/default/Mount Blade Warband
), only install d3dcompiler_47
via Winetricks in Heroic, and run the game again. Assuming that doesn't work, send in a game loginland-turquoiseOP•16mo ago
d3dx9 is already installed as well as d3dcompiler_47. dxvk-NVAPI is disabled
relaxed-coral•16mo ago
But d3d9 should be provided by wine ge
Your log showed system wine
This isn't a case of it being missing, it's there but failing to load
I don't even know how well native d3dx9 works in Wine, but seeing as their default prefix has (well, had) the game working and that doesn't have the verb installed, I'm thinking to just skip it (not sure why OP chose to install it in the first place)
relaxed-coral•16mo ago
Post a new log
inland-turquoiseOP•16mo ago
I'm not trying to run it as heroic launcher anymore
rival-black•16mo ago
👏DXVK👏
inland-turquoiseOP•16mo ago
d3dcompiler alone isn't enough
That's all you had in your global prefix and it worked there
I'm just thinking that we might want to try one step at a time. Installing d3dx9 is easy, removing it again is impossible
inland-turquoiseOP•16mo ago
well evidently when i was running it with wine it wasn't using the global prefix then
relaxed-coral•16mo ago
I’d still want to see a failed attempt after changing the runner to wine-GE instead of system wine
That's not how this works. Unless you provide a custom prefix path (with the WINEPREFIX env var), you're using the default (global) prefix
And if you did provide a custom prefix path via the env var, it'd also apply to Winetricks above, and that'd list the verbs in that custom prefix
inland-turquoiseOP•16mo ago
well, all I know is it worked yesterday, I tried installing that thing you said and now it doesn't work anymore
inland-turquoiseOP•16mo ago
relaxed-coral•16mo ago
You still didn’t switch to wine GE
inland-turquoiseOP•16mo ago
not yet
relaxed-coral•16mo ago
Which presumably means you didn’t delete the prefix
Wine GE comes with gaming patches
Do that before you spin out on stuff that might be moot
inland-turquoiseOP•16mo ago
I did
I don't even know what package does nixos ship wineGE as
relaxed-coral•16mo ago
It’s in the wine manager in heroic
Please click the "winecfg" button in Heroic (right next to Winetricks), head to the "Libraries" tab, and take a screenshot
inland-turquoiseOP•16mo ago



inland-turquoiseOP•16mo ago
all right
Right, whatever you deleted was not the prefix
Since those overrides wouldn't be there if you would've deleted it
inland-turquoiseOP•16mo ago
downloading wine GE, will see if it installs given it's an immutable distro
which ones
All of them
inland-turquoiseOP•16mo ago
I literally rm -rfed the wine prefix directory
this is how it was also when it launched yesterday
at least, as far as I can tell
relaxed-coral•16mo ago
It gets installed in Heroic’s config folder in user space
inland-turquoiseOP•16mo ago
ok
Are you... sure you rm'd the right directory?
All I can tell you is that a regular Wineprefix has none of those overrides in there
(overrides are stored in the per-prefix registry, so it's not like they persist or anything)
inland-turquoiseOP•16mo ago
yes, heroic's wine prefix is ~/Games/Heroic/Prefixes/default/Mount and Blade. I rm-rfed Mount and Blade
Could you run
cat "/home/lorenzob/Giochi/Heroic/Prefixes/default/Mount Blade Warband/winetricks.log"
?inland-turquoiseOP•16mo ago
inland-turquoiseOP•16mo ago
everything in there I installed after deleting the prefix
ok, installed wineGE
inland-turquoiseOP•16mo ago
without adding any other component
Alright, let me clarify: delete the prefix, only install
d3dcompiler_47
, try to run the game. Assuming that doesn't work, send in another game log
Installing d3dx9
, be that via Winetricks or via the standalone installer, will not work and will bork your prefix (as you've seen a couple times now)relaxed-coral•16mo ago
Now do what commandmc says about d3dcompiler
It’s needed for dx9 games many times
inland-turquoiseOP•16mo ago
ok deleted all prefixes
now I deleted all prefixes and run game without doing anything, launcher starts, game probably won't but will try
relaxed-coral•16mo ago
That’s when you install d3dcompiler_47 only
inland-turquoiseOP•16mo ago
ok, now it works
at least, seems to work
it gave me a weird graphical glitch at startup but the game itself apparently works
marking this as solved
thanks @termdisc @CommandMC
In case you want to solve this, send in a new game log
Might just need
d3dcompiler_43
as well installed (installing that and _47 is usually harmless; as in it doesn't break anything like d3dx9 does)inland-turquoiseOP•16mo ago
It only gave it once so far