HGL
gradual-turquoise
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
eager-peach•2y ago
Try without using steam runtime
but the game itself complains about missing
libGLEW.so.2.1
gradual-turquoiseOP•2y ago
no difference, same error
gradual-turquoiseOP•2y ago
yeah, I am not exactly sure what that is
or how to fix that
maybe something to do with wine?
eager-peach•2y ago
it's a native game
you can try with wine though
would need to uninstall the game and reinstall windows version
gradual-turquoiseOP•2y ago
I'd prefer the native version
eager-peach•2y ago
I don't have any experience with nix so I can't really help here ¯\_(ツ)_/¯
hopefully someone else sees this and helps
gradual-turquoiseOP•2y ago
ok, I'll ask in the nixos unofficial discord too and post the solution here if they find it.
continuing-cyan•2y 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 Fedoragradual-turquoiseOP•2y ago
Nixpkgs does have a glew package, will try that later
continuing-cyan•2y 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
absent-sapphire•2y 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.gradual-turquoiseOP•2y ago
nixpkgs has 2.2 :c
continuing-cyan•2y ago
yeah, same with Fedora and Arch. chalk it up to GOG native games being frozen in time
gradual-turquoiseOP•2y ago
I'll try to see if I can make a custom nixOS package
continuing-cyan•2y ago
There’s also the risk that the native build is out of date in terms of game content and patches
gradual-turquoiseOP•2y 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
eager-peach•2y ago
try adding
LD_LIBRARY_PATH
env var to point theregradual-turquoiseOP•2y ago
well, now it doesn't find libcurl
progress
eager-peach•2y ago
:sunglase:
try this out with steam runtime too
gradual-turquoiseOP•2y ago
aight
that's even worse
eager-peach•2y ago
aight
then don't
gradual-turquoiseOP•2y ago
without steam runtime
gradual-turquoiseOP•2y ago
maybe I can download it somehwere and copy it there (this is so scuffed)
man istg
gradual-turquoiseOP•2y ago
I manually downlaoded a precompiled libcurl from arch, and now it wants another goddamn library
gradual-turquoiseOP•2y ago
screw this I'll try the windows version
continuing-cyan•2y ago
The thing I was doing had me install 3-4 different ones, one at a time
gradual-turquoiseOP•2y 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
continuing-cyan•2y ago
You have to completely redownload the game to switch to the windows build. Did you do that?
gradual-turquoiseOP•2y ago
Yes
continuing-cyan•2y ago
Post a log
gradual-turquoiseOP•2y ago
gradual-turquoiseOP•2y ago
this is what hapens if I try to run it via heroic
if I run the actual exe with wine however it works
absent-sapphire•2y ago
Are you using the same prefix in both cases?
gradual-turquoiseOP•2y 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
absent-sapphire•2y ago
And what is the non-Heroic command you're using to run the game?
gradual-turquoiseOP•2y 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
gradual-turquoiseOP•2y ago
oof
Use the Winetricks button in Heroic (game settings) to install the components you listed above
gradual-turquoiseOP•2y ago
I did
that's how I got those components installed
gradual-turquoiseOP•2y ago

gradual-turquoiseOP•2y 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)gradual-turquoiseOP•2y 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
continuing-cyan•2y ago
Delete your prefix, disable Dxvk-NVAPI, use wine-GE, install d3dcompiler_47
gradual-turquoiseOP•2y 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
continuing-cyan•2y 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
gradual-turquoiseOP•2y ago
I did everything as you said
continuing-cyan•2y 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 loggradual-turquoiseOP•2y ago
d3dx9 is already installed as well as d3dcompiler_47. dxvk-NVAPI is disabled
continuing-cyan•2y 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)
continuing-cyan•2y ago
Post a new log
gradual-turquoiseOP•2y ago
I'm not trying to run it as heroic launcher anymore
eager-peach•2y ago
👏DXVK👏
gradual-turquoiseOP•2y 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
gradual-turquoiseOP•2y ago
well evidently when i was running it with wine it wasn't using the global prefix then
continuing-cyan•2y 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
gradual-turquoiseOP•2y ago
well, all I know is it worked yesterday, I tried installing that thing you said and now it doesn't work anymore
gradual-turquoiseOP•2y ago
continuing-cyan•2y ago
You still didn’t switch to wine GE
gradual-turquoiseOP•2y ago
not yet
continuing-cyan•2y 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
gradual-turquoiseOP•2y ago
I did
I don't even know what package does nixos ship wineGE as
continuing-cyan•2y 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
gradual-turquoiseOP•2y ago



gradual-turquoiseOP•2y ago
all right
Right, whatever you deleted was not the prefix
Since those overrides wouldn't be there if you would've deleted it
gradual-turquoiseOP•2y ago
downloading wine GE, will see if it installs given it's an immutable distro
which ones
All of them
gradual-turquoiseOP•2y 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
continuing-cyan•2y ago
It gets installed in Heroic’s config folder in user space
gradual-turquoiseOP•2y 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)
gradual-turquoiseOP•2y 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"
?gradual-turquoiseOP•2y ago
gradual-turquoiseOP•2y ago
everything in there I installed after deleting the prefix
ok, installed wineGE
gradual-turquoiseOP•2y 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)continuing-cyan•2y ago
Now do what commandmc says about d3dcompiler
It’s needed for dx9 games many times
gradual-turquoiseOP•2y 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
continuing-cyan•2y ago
That’s when you install d3dcompiler_47 only
gradual-turquoiseOP•2y 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)gradual-turquoiseOP•2y ago
It only gave it once so far