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
eager-peach2y ago
Try without using steam runtime but the game itself complains about missing libGLEW.so.2.1
gradual-turquoise
gradual-turquoiseOP2y ago
no difference, same error
gradual-turquoise
gradual-turquoiseOP2y ago
yeah, I am not exactly sure what that is or how to fix that maybe something to do with wine?
eager-peach
eager-peach2y ago
it's a native game you can try with wine though would need to uninstall the game and reinstall windows version
gradual-turquoise
gradual-turquoiseOP2y ago
I'd prefer the native version
eager-peach
eager-peach2y ago
I don't have any experience with nix so I can't really help here ¯\_(ツ)_/¯ hopefully someone else sees this and helps
gradual-turquoise
gradual-turquoiseOP2y ago
ok, I'll ask in the nixos unofficial discord too and post the solution here if they find it.
continuing-cyan
continuing-cyan2y 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 Fedora
gradual-turquoise
gradual-turquoiseOP2y ago
Nixpkgs does have a glew package, will try that later
continuing-cyan
continuing-cyan2y 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
absent-sapphire2y 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-turquoise
gradual-turquoiseOP2y ago
nixpkgs has 2.2 :c
continuing-cyan
continuing-cyan2y ago
yeah, same with Fedora and Arch. chalk it up to GOG native games being frozen in time
gradual-turquoise
gradual-turquoiseOP2y ago
I'll try to see if I can make a custom nixOS package
continuing-cyan
continuing-cyan2y ago
There’s also the risk that the native build is out of date in terms of game content and patches
gradual-turquoise
gradual-turquoiseOP2y 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
eager-peach2y ago
try adding LD_LIBRARY_PATH env var to point there
gradual-turquoise
gradual-turquoiseOP2y ago
well, now it doesn't find libcurl progress
eager-peach
eager-peach2y ago
:sunglase: try this out with steam runtime too
gradual-turquoise
gradual-turquoiseOP2y ago
aight that's even worse
eager-peach
eager-peach2y ago
aight then don't
gradual-turquoise
gradual-turquoiseOP2y ago
without steam runtime
gradual-turquoise
gradual-turquoiseOP2y ago
maybe I can download it somehwere and copy it there (this is so scuffed) man istg
gradual-turquoise
gradual-turquoiseOP2y ago
I manually downlaoded a precompiled libcurl from arch, and now it wants another goddamn library
gradual-turquoise
gradual-turquoiseOP2y ago
screw this I'll try the windows version
continuing-cyan
continuing-cyan2y ago
The thing I was doing had me install 3-4 different ones, one at a time
gradual-turquoise
gradual-turquoiseOP2y 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
continuing-cyan2y ago
You have to completely redownload the game to switch to the windows build. Did you do that?
gradual-turquoise
gradual-turquoiseOP2y ago
Yes
continuing-cyan
continuing-cyan2y ago
Post a log
gradual-turquoise
gradual-turquoiseOP2y ago
gradual-turquoise
gradual-turquoiseOP2y 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
absent-sapphire2y ago
Are you using the same prefix in both cases?
gradual-turquoise
gradual-turquoiseOP2y 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
absent-sapphire2y ago
And what is the non-Heroic command you're using to run the game?
gradual-turquoise
gradual-turquoiseOP2y 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)
CommandMC
CommandMC2y ago
You're not using the same prefix and Wine version then
gradual-turquoise
gradual-turquoiseOP2y ago
oof
CommandMC
CommandMC2y ago
Use the Winetricks button in Heroic (game settings) to install the components you listed above
gradual-turquoise
gradual-turquoiseOP2y ago
I did that's how I got those components installed
gradual-turquoise
gradual-turquoiseOP2y ago
No description
CommandMC
CommandMC2y ago
Hmm, maybe try downloading the redist from here and installing it using "Run EXE in prefix"? As an aside, please update to Heroic 2.12.1
gradual-turquoise
gradual-turquoiseOP2y 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
CommandMC
CommandMC2y ago
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-turquoise
gradual-turquoiseOP2y 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
continuing-cyan2y ago
Delete your prefix, disable Dxvk-NVAPI, use wine-GE, install d3dcompiler_47
gradual-turquoise
gradual-turquoiseOP2y 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
continuing-cyan2y ago
Add that too
CommandMC
CommandMC2y ago
Assuming you didn't do something entirely wrong (as in, running the executable by just double-clicking it or something), this is impossible
gradual-turquoise
gradual-turquoiseOP2y ago
I did everything as you said
continuing-cyan
continuing-cyan2y ago
NVAPI is enabled in your log yet you have AMD
CommandMC
CommandMC2y ago
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 log
gradual-turquoise
gradual-turquoiseOP2y ago
d3dx9 is already installed as well as d3dcompiler_47. dxvk-NVAPI is disabled
continuing-cyan
continuing-cyan2y ago
But d3d9 should be provided by wine ge Your log showed system wine
CommandMC
CommandMC2y ago
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
continuing-cyan2y ago
Post a new log
gradual-turquoise
gradual-turquoiseOP2y ago
I'm not trying to run it as heroic launcher anymore
eager-peach
eager-peach2y ago
👏DXVK👏
gradual-turquoise
gradual-turquoiseOP2y ago
d3dcompiler alone isn't enough
CommandMC
CommandMC2y ago
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-turquoise
gradual-turquoiseOP2y ago
well evidently when i was running it with wine it wasn't using the global prefix then
continuing-cyan
continuing-cyan2y ago
I’d still want to see a failed attempt after changing the runner to wine-GE instead of system wine
CommandMC
CommandMC2y ago
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-turquoise
gradual-turquoiseOP2y ago
well, all I know is it worked yesterday, I tried installing that thing you said and now it doesn't work anymore
gradual-turquoise
gradual-turquoiseOP2y ago
continuing-cyan
continuing-cyan2y ago
You still didn’t switch to wine GE
gradual-turquoise
gradual-turquoiseOP2y ago
not yet
continuing-cyan
continuing-cyan2y 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-turquoise
gradual-turquoiseOP2y ago
I did I don't even know what package does nixos ship wineGE as
continuing-cyan
continuing-cyan2y ago
It’s in the wine manager in heroic
CommandMC
CommandMC2y ago
Please click the "winecfg" button in Heroic (right next to Winetricks), head to the "Libraries" tab, and take a screenshot
gradual-turquoise
gradual-turquoiseOP2y ago
No description
No description
No description
gradual-turquoise
gradual-turquoiseOP2y ago
all right
CommandMC
CommandMC2y ago
Right, whatever you deleted was not the prefix Since those overrides wouldn't be there if you would've deleted it
gradual-turquoise
gradual-turquoiseOP2y ago
downloading wine GE, will see if it installs given it's an immutable distro which ones
CommandMC
CommandMC2y ago
All of them
gradual-turquoise
gradual-turquoiseOP2y 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
continuing-cyan2y ago
It gets installed in Heroic’s config folder in user space
gradual-turquoise
gradual-turquoiseOP2y ago
ok
CommandMC
CommandMC2y ago
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-turquoise
gradual-turquoiseOP2y ago
yes, heroic's wine prefix is ~/Games/Heroic/Prefixes/default/Mount and Blade. I rm-rfed Mount and Blade
CommandMC
CommandMC2y ago
Could you run cat "/home/lorenzob/Giochi/Heroic/Prefixes/default/Mount Blade Warband/winetricks.log"?
gradual-turquoise
gradual-turquoiseOP2y ago
gradual-turquoise
gradual-turquoiseOP2y ago
everything in there I installed after deleting the prefix ok, installed wineGE
gradual-turquoise
gradual-turquoiseOP2y ago
without adding any other component
CommandMC
CommandMC2y ago
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
continuing-cyan2y ago
Now do what commandmc says about d3dcompiler It’s needed for dx9 games many times
gradual-turquoise
gradual-turquoiseOP2y 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
continuing-cyan2y ago
That’s when you install d3dcompiler_47 only
gradual-turquoise
gradual-turquoiseOP2y 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
CommandMC
CommandMC2y ago
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-turquoise
gradual-turquoiseOP2y ago
It only gave it once so far

Did you find this page helpful?