Jump to content


Sacred 2 on Linux (Lubuntu 22.04 LTS) help running? (Solution Found!)


Recommended Posts

So I got a new computer. I really, really hate windows. Windows is like meth, I don't want to use it, but I don't have much choice since nothing else works.

18.04 was my last try, and I just gave up and used dual-boot back then. Windows 7 ran Sacred 2 quite perfectly, occasional crashes, but rare enough to not be an issue.

So now I can install Sacred 2 Gold just fine. There's been a few errors during installation, I think? but same happened with Sacred UW. Sacred 1 just works fine, I didn't exactly play much yet, but I guess I'll play it for now since Sacred 2 is not working.

I've tried just about everything. Winetricks, Wine 6, Wine8, Lutris GEs, various other Lutris versions, etc. If I run in desktop mode + fullscreen in Lutris, the game just hangs on launching. All other methods lead to one tiny error:

00ec:err:sync:RtlLeaveCriticalSection section 00D4B874 "?" is not acquired

Nowhere on the internet does it say what the issue is. WIth Sacred UW I got a whole laundry list of errors, put PlayVideo=0 (since the issue was the video) and it runs fine. Wine or lutris don't spit out any useable info  with Sacred 2 for a total Linux newbie.

Tried 64 bit, 32 bit, no PhysX, PhysX redist, PhysX winetricks, DirectX9 redist (I know this is bad now, but I did it and all other things tested on clean wineprefixes), Vulcan DX9, winetrick DX9, Fullscreen, windowed, 16 bit color, etc.

Do I just give up? Are there other things I can try? I mean, can I learn how to resolve these kinds of issues? Wine and Lubuntu are way better than when I last tried it (tons of stuff didn't work well), but now all my go-to apps work just fine, only problem is I want Sacred 2 :(

My guess is it's associated with Windowed mode or not, DX9/PhysX and/or color depth. Just tried running as many native settings as possible but no go. I saw Chattius got it to work, so there must be a way? If it worked for nobody I wouldn't even have tried, but so many people run it just fine.

EDIT:
Played Sacred UW all day with no issues. Runs way smoother than on windows, but that might be due to better system specs + SSD HD. The game has basicly no load times or lag.

  • Like! 1
Link to comment
 
  • 9 months later...

Hi Shinryuu.

 

I don't know whether you were able to get it running. I wasn't able to make it happen from my hard-copy version.

So I bought it on steam which of course also didn't work out of the box. But thankfully there is a way to get it running that worked for me on that version. Question is whether you'd cough up another 15 bucks for it^^

supasheng wrote (man.... Aug, 2018 already.... I didn't find it back then either):

Quote

I got it to work with a workaround. It needs the "PhysX" installer to run before the game game run.

 - Go into "SteamLibrary/steamapps/common/Sacred 2 Gold/redist/PhysX" folder and copy the "PhysX_9.10.0513_SystemSoftware.exe"

 - Paste the executable into "SteamLibrary/steamapps/common/Sacred 2 Gold/system/" folder.

 - Rename the file "sacred2.exe" to "sacred2.exe.old"

 - Rename "PhysX_9.10.0513_SystemSoftware.exe" to "sacred2.exe".

 - Run the game from Steam and let the PhysX installer run and install it.

 - Go back to the "SteamLibrary/steamapps/common/Sacred 2 Gold/system/" and rename (or delete) the "sacred2.exe" dummy file and rename the "sacred2.exe.old" back to "sacred2.exe".

Launch the game again and it should run.

I know this isn't an ideal solution going forward but it will allow the game to run for now. Hope this helps.

This is what I did, for CM as well, worked "fine" (I think I have to redo it, because I didn't delete the "cm-Sacred 2 exe" fast enough during installation, so the exe is unpatched. but I was quick enough on this laptop and everything is fine :D ).

https://github.com/ValveSoftware/Proton/issues/545 is where that's from. Below that post is a suggestion by nstgc for wine I think or steam.... idk...:
 

Quote

 

Launch the game for the first time to set up the prefix

run WINEPREFIX="/path/to/Sacred 2/prefix" "/path/to/proton/beta/wine64" "/path/to/PhysXInstaller"

 

Hope this helps. And also hope that more people switch to linux. Even though there are hardships, nothing beats it. I'm a 20+yr windows user on Manjaro and at least on the laptop the transition is easy XD

Have a nice day.

  • Like! 1
Link to comment
 

Thanks for the reply.

It's not really the 15 bucks. I just don't like steam and only use it for games exclusively on there. There's numerous guides out there that describe how to run the game, but none of them work for me. It's probably an intel iGPU thing. Either that or it's the newer wine.

 

  • Like! 1
Link to comment
 
On 9/1/2024 at 1:39 AM, MasterN said:

Hi Shinryuu.

 

I don't know whether you were able to get it running. I wasn't able to make it happen from my hard-copy version.

So I bought it on steam which of course also didn't work out of the box. But thankfully there is a way to get it running that worked for me on that version. Question is whether you'd cough up another 15 bucks for it^^

supasheng wrote (man.... Aug, 2018 already.... I didn't find it back then either):

This is what I did, for CM as well, worked "fine" (I think I have to redo it, because I didn't delete the "cm-Sacred 2 exe" fast enough during installation, so the exe is unpatched. but I was quick enough on this laptop and everything is fine :D ).

https://github.com/ValveSoftware/Proton/issues/545 is where that's from. Below that post is a suggestion by nstgc for wine I think or steam.... idk...:
 

Hope this helps. And also hope that more people switch to linux. Even though there are hardships, nothing beats it. I'm a 20+yr windows user on Manjaro and at least on the laptop the transition is easy XD

Have a nice day.

Welcome to the forums MasterN,  and thank for the post!  I actually found this topic while running through google for linux, sacred 2, DarkMatters.. Bravo on getting it working on Linux!

:superman: 

gogo

Link to comment
 

Major breakthrough!

I can now run the game. In what I can only describe is 64x48 pixels or w/e.

If I can fix the resolution I can get it to work!

Link to comment
 

Alright, if one of the mods can mark it with Solution Found! Then maybe others can get help out of this if they have severe trouble getting it to run. I haven't played much, just blew up a bunch of kobolds and boar (Nearly got killed too because follow camera sux and I can't get the manual camera to work lol, forgot how to do it). After saving and quitting game froze, so it definitely ain't perfect.I will try a bit of shopping later maybe, I mainly wanted to get this to work not to play, but because I just couldn't stop thinking about it.

Solution:

Wine Version: 9.0

Install 32-bit wine prefix.

Install Sacred 2 Gold (this is the version I have)

Install DirectX9. This is a little wonky, I actually installed both PhysX and DirectX through the "redists". PhysX will not work like that. So after that I also installed PhysX through Winetricks. Wine -q PhysX could also work, but I used winetricks. I am 99% sure I also installed DirectX9 through wine after that, but please try first without doing this.

Install DXVK through Winetricks. Don't ask me why.

Set Wine renderer (winetricks works) to OpenGL. Otherwise you go wine regedit (make sure you select the right wine prefix as I would not run Sacred 2 on anything other than it's own dedicated prefix) and make HKEY_CURRENT_USER > Software > Wine > Direct3D > then add a REG_SZ type named renderer with gl as value.

This could work. Again, Sacred 2 is wonky. This is getting it to work on gen11 i7 with Intel HD Graphics. Diff GPU, diff CPU and everything could change. If everything works, then game should go into menu. However, it will be absolutely tiny. We are not even talking Amiga resolution here. Set winecfg "Virtual Desktop" to 1024x768 (others might work too, but this is first go). Boom. Full screen and it gets you to menu.

My missing step all along was the DXVK.

Finally (I have to mention this in case it has an effect!) the only reason I installed DXVK is because I needed that to get dgVoodoo2 to work. It's a little program that allows you to play Sacred UW in full HD mode and other nifty things. It basicly translates old DX to DX11. When I tried Sacred 2 as that, the dgVoodoo2 .dll was causing a page fault in wine. Since this was my final hail mary, I gave up after that. I decided to do a bit of troubleshooting and decided to just remove dgvoodoo2 altogether and run as opengl. Boom. It worked. Now, this SHOULD not have an effect. But one other thing I did was add all of the dgvoodoo2 .dll's as overrides so that wine uses them instead of wine native. Again, this should not be needed since the way I'm running the game now, Wine *should* be using it's native .dll's and the overrides mean nothing as wine can't find them. I am not messing with this since this wonky house of cards is finally running, I'm bloody scared a reboot is going to break this lol. But maybe try that too in case problems arise. It's also entirely possible that on another wine build/hardware set dgVoodoo2 could get the game to run.

Also: Final message:

Copy protection can mess things up as well. Let's just say it isn't an issue for me and that this is also the reason I still have working game CD's from the 00's. Make sure you have the CP solution. GOG.com offers Sacred 2 without CP afaik. So that can remove the CP equation from the list of issues in case you are interested in it.

Edited by Shinryuu
Link to comment
 
  • The title was changed to Sacred 2 on Linux (Lubuntu 22.04 LTS) help running? (Solution Found!)
1 hour ago, Shinryuu said:

Alright, if one of the mods can mark it with Solution Found! Then maybe others can get help out of this if they have severe trouble getting it to run. I haven't played much, just blew up a bunch of kobolds and boar (Nearly got killed too because follow camera sux and I can't get the manual camera to work lol, forgot how to do it). After saving and quitting game froze, so it definitely ain't perfect.I will try a bit of shopping later maybe, I mainly wanted to get this to work not to play, but because I just couldn't stop thinking about it.

Solution:

Wine Version: 9.0

Install 32-bit wine prefix.

Install Sacred 2 Gold (this is the version I have)

Install DirectX9. This is a little wonky, I actually installed both PhysX and DirectX through the "redists". PhysX will not work like that. So after that I also installed PhysX through Winetricks. Wine -q PhysX could also work, but I used winetricks. I am 99% sure I also installed DirectX9 through wine after that, but please try first without doing this.

Install DXVK through Winetricks. Don't ask me why.

Set Wine renderer (winetricks works) to OpenGL. Otherwise you go wine regedit (make sure you select the right wine prefix as I would not run Sacred 2 on anything other than it's own dedicated prefix) and make HKEY_CURRENT_USER > Software > Wine > Direct3D > then add a REG_SZ type named renderer with gl as value.

This could work. Again, Sacred 2 is wonky. This is getting it to work on gen11 i7 with Intel HD Graphics. Diff GPU, diff CPU and everything could change. If everything works, then game should go into menu. However, it will be absolutely tiny. We are not even talking Amiga resolution here. Set winecfg "Virtual Desktop" to 1024x768 (others might work too, but this is first go). Boom. Full screen and it gets you to menu.

My missing step all along was the DXVK.

Finally (I have to mention this in case it has an effect!) the only reason I installed DXVK is because I needed that to get dgVoodoo2 to work. It's a little program that allows you to play Sacred UW in full HD mode and other nifty things. It basicly translates old DX to DX11. When I tried Sacred 2 as that, the dgVoodoo2 .dll was causing a page fault in wine. Since this was my final hail mary, I gave up after that. I decided to do a bit of troubleshooting and decided to just remove dgvoodoo2 altogether and run as opengl. Boom. It worked. Now, this SHOULD not have an effect. But one other thing I did was add all of the dgvoodoo2 .dll's as overrides so that wine uses them instead of wine native. Again, this should not be needed since the way I'm running the game now, Wine *should* be using it's native .dll's and the overrides mean nothing as wine can't find them. I am not messing with this since this wonky house of cards is finally running, I'm bloody scared a reboot is going to break this lol. But maybe try that too in case problems arise. It's also entirely possible that on another wine build/hardware set dgVoodoo2 could get the game to run.

Also: Final message:

Copy protection can mess things up as well. Let's just say it isn't an issue for me and that this is also the reason I still have working game CD's from the 00's. Make sure you have the CP solution. GOG.com offers Sacred 2 without CP afaik. So that can remove the CP equation from the list of issues in case you are interested in it.

Gratz on getting to solution! Thanks for the thorough notes. Getting Sacred to play is a returning issue for many players, your observations regarding DXVK will help others.

This Topic's title has been amended as requested

Sacred 2 has been released!

:dance2:

gogo

Link to comment
 

Pin it!

 

More and more ppl are leaving win behind  and move on to linux. I'll do it too one day, but for now there is no other way to run certain tools and stuff.

Congrats to the found solution!

  • Like! 1
Link to comment
 
  • The topic was pinned
43 minutes ago, Dax said:

Pin it!

 

More and more ppl are leaving win behind  and move on to linux. I'll do it too one day, but for now there is no other way to run certain tools and stuff.

Congrats to the found solution!

Thanks Dax, good idea

Pinned and done

:yay:

gogo

Link to comment
 

Been doing a bit more testing. Made a new wineprefix, and got it to work without DXVK.

Not sure when this happened (don't remember, maybe it checks your screen resolution and copies that for use in options.txt?) but game starts off at 1920x1200 (my resolution). This causes problems when DXVK isn't used. By changing options.txt (users/[USERNAME]/local/Game Saves/etc) and making resolution 1024x768, the game runs. Then it eats all my memory like a hungry hungry hippo.

Problem with DXVK is after a few load screens (haven't fought mobs yet, but it seriously happens in 10 mins of shopping) game just crashes.

Without DXVK and just running on gl (I only installed redists! No winetricks installs used at all!) it decided to install everything properly for some reason and works. Again, it eats all the memory. Not sure what's going on, but without DXVK it happens a lot faster (2-3 loads on min settings). Except now it doesn't really crash immediately, but I get graphics distortion as the game seems to write new info in the old memory and everything just garbles up as you would expect. Still enough time to exit and leave game.

Now I'm looking at game settings to make the game more than playable (My goal is around 1-2 hours of gameplay before memory issues) and I'm looking at options.txt going like "What the hell is mgpu?". Is there any in-depth guide on what all these options do?

Just want to keep the game from bugging out as I have 32 gigs of ram so really, it's not a resource issue. More of a resource management issue. Sacred 2 was always like that messy roommate that never cleans up after itself, but it always ran for 1-2 hours for me without issue.

Edit: to explain, since I am running on iGPU, perhaps I can run the game as "laptop". In other words, mess with the existing .dlls so the game uses the laptop ones. Usually the problem with many people is it uses the laptop dll's for people with an actual GPU and it screws things up, Maybe the game starts managing it's memory more effectively if it gets the right info from my system.

Edit2:

So with tweaks I'm running it at max around 18 mins with DXVK. Whenever the load screen comes, however, it spits out an error: 014c:fixme:wincodecs:jpeg_decoder_get_metadata_blocks stub

Not sure what it means, but I'm guessing something messes up with the loading screen jpegs and that's possibly what eventually causes the memory issue. I haven't tried to do lots of fighting or something without loading game, I guess that's the next step. If that works then I suppose it's mostly my shopping suffering from 15 min runs.

Any idea's on how to fix this jpeg issue within wine or a way to disable (maybe even change the file types?) would be appreciated. Would be nice to troubleshoot this. Amount of memory I set in options.txt is affected and does increase the time it takes, same for lower settings (all of this is at minimum settings), but it still isn't sufficient time to shop I think.

Most of this just has me going like "What in the hell does this game do with memory?!". Without DXVK the game spits out tons of fixme's. Shader issues, etc. DXVK fixes those, I guess. I've read that it crashes beyond 1.3gig or so (my game runs smooth between 600-800 MB ram, then shoots up to 900+ when the crash happens on load). I run both out of video memory and virtual memory, so it's hitting me from both sides. Naturally this is not a system limitation. Even allowing Wine to handle up to 4 gigs of ram does nothing for the virtual memory, and somehow I doubt a 512 MB game is running out of video memory when I'm running an iGPU with 32 gigs of ram. If I fix 1 the other takes me out eventually.

Never realized on windows but by god did ascaron do a :eek:ty job at coding this thing. Properly handling memory is like super basic :eek:.

 

EDIT3:

Turns out to get rid of that little fixme was simple: Just delete the load files. No real improvement. Got a new 22m record before crash, but the jpegs clearly have nothing to do with the issue since I also had a bunch of 7 min crashes. Tried to troubleshoot with the CM patch. Problem: It's an .exe, and wine doesn't like it. Guys guys, you know that when making patches, it's a lot easier to just dump all the necessary files that you need to replace in a .zip, right? Would be nice for any linux users anyway, in case wine doesn't play nice.

So I can't test CM patch right now. I am not interested in using it myself (even if it does fix the crashes), but it would be nice to put this bug to rest and see if the CM patch fixes it. For myself, in case Flix is still out there, it would be nice to have some info on which files specifically address the crashing/memleak bugs. I'd ask how to fix it myself, but afaik Flix has no knowledge of that as it was someone called Dmitry that did those fixes (I think)?

I don't want to be rude and msg him, in case anyone can get Flix in here that would be nice. Or really anyone that could help to get the CM files in .zip that I could test out by simply replacing files in the directory.

Edited by Shinryuu
  • Respect! 1
Link to comment
 
 
6 hours ago, Shinryuu said:

New discovery, new post.

In short, I believe the game is running roughly at Windows level now for me, with a few quirks and maybe a bit worse. Have yet to test serious combat and leveling, but shopping is now do-able.

While I did initially set 1-2 hours as a goal, I just got in 2 40 minute shopping sessions. In short, on my DXVK-less install I put v1.10.3 DXVK instead of the latest version (can be installed through winetricks). While the latest version of DXVK runs videos and generally performs better, it seems to have some issue with Sacred 2 regarding video-memory, and the virtual memory allocation issues with Sacred 2 makes it instantly crash everything.

With DXVK v1.10.3 the game runs fine for 15-20 minutes (Same as new DXVK) and then it starts with virtual memory allocation errors. It starts at like 310000 (which, according to an online calculator is around 3 MB). The worst times before crashing it tends to rise to fd1000 (which is around 16 MB, not exactly system killing amounts). I'm assuming this is in bytes, and not KB (in that case it's way more... which sounds more understandable in killing the process, lol). A few interesting things happen, load screens turn black (same as when I removed the jpeg loader files!). Presumably because the virtual memory the game wanted to store it in couldn't be reached. Eventually the "loads" are just the game freezing and then instantly sending me to the new area. This is exactly what I remember in Windows as well. Obviously I just had no clue what was going on under the hood then. Finally, when it gets real bad, you get extremely long freezes. This can also happen on a load screen. It can easily take minutes for the game to continue, but eventually it does (also distinctly remember this from Windows). Under the hood, the game is just spamming virtual memory errors like crazy. Screens full of em every second. I can only guess that this is the exact same thing that happens in Windows.

The only caveat is that I'm using a modified options.txt, basicly all my memory manager settings are at 0. Someone said this was "no limit" but it doesn't seem like that to me. When I check mem mgr, the mem used is extremely low. I will try with base settings a bit later, and see how it runs then. It could crash much sooner then, in which case it's not running anywhere close near Windows (where I never touched the settings). I always played with minimum settings (mostly because of fear of dying in combat due to minor frame skips), so no difference there.

I will continue testing (only more gameplay can do this). I still have 18 more chance to halve regen ammies left, and still need DM double mitigation armor so, plenty of time to test shopping at least. I will probably update my earlier post when I find the best setup, or make an entirely new thread and just detail how to run the game (at least for me) there. Whatever the mods fancy.

 

You've created an adventurous topic. Your tremendous patience and wild hunger to get this game  going with your caveats has been successful :bounce:  I like the way you're going down a list of  what you've done and what outcomes were. Very organized. This'd made a good guide in point form, invaluable for Sacred 2 Players.

Thanks for continued posting of your results journey

:)

 

gogo

  • Like! 1
Link to comment
 

And adventure continues. On my other DXVK install I put the purist fixpatch. Just took the system folder and copied it over and overwrite everything. Seems to run fine then suddenly crashes with an exception error that I would normally never get.

Would be nice if Flix could share the .dll that actually contains the "memory fix" and if there's any other fixes in there. And perhaps what files are required for the purist fixpatch as I can't use the "mod thing" as that of course, doesn't run on wine.

Edit:

Not sure why, but I rebooted and everything worked. Forgive me Flix, for I have sinned. I used my old characters with the PFP. Didn't run into any bugs, and as my "real" characters are on my other wine prefix, losing them or corruption wouldn't have been a problem. I have never been so reckless in the swamps. I played for about 30-40 minutes, doing all sorts of crazy stuff in the swamp. Skeletons exploding from seraphim light, you get the gist. Also, what the hell is a bog demon and why did they almost kick my ass? Tried mummy priests too but my out-of-date trash silver gear wouldn't be giving me a quick kill on that so I just gave up.

Basicly the patch fixes any and all issues with the latest DXVK drivers, so it's essentially all the problem of the memory bugs, even though DXVK on the vanilla install crashes a ton of times giving video memory errors instead of virtual memory errors. Much better FPS too, something I never had even on Windows, but that could be hardware limitation (gen1 i3 and all).

So pretty please, with a cherry on top, what's the .dll that fixes the memory bugs? Cause it would be nice to finally play with max settings and not worry about video lag death. And I assume it's compatible with old characters?

 

Edited by Shinryuu
Link to comment
 
1 hour ago, Shinryuu said:

I can't use the "mod thing" as that of course, doesn't run on wine.

If by the "mod thing" you're referring to the generic mod enabler, that one isn't needed for anything. It just copies stuff in and keeps a backup of things that would otherwise would have been overwritten. It also remembers the order of mods applied, so that the correct backups can be restored when partially going back on multiple mods etc.
The download should provide you with some kind of folder named somewhat like "Purist Fixpack 1.4" and inside is an exact mirror of the folder structure from the sacred 2 folder. So what's in "pak" here goes into sacred 2/pak etc. Obviously only the changed files are in here so don't delete everything else :)

The mod enabler is supposed to help stupid people... and also make it less tedious for players to switch between different mods.


 

1 hour ago, Shinryuu said:

Would be nice if Flix could share the .dll that actually contains the "memory fix" and if there's any other fixes in there.

I can try summoning @Flix but I have a really bad success rate with it...

1 hour ago, Shinryuu said:

what files are required for the purist fixpatch

"required" to have the full effects of the pfp are only the things in the folder I named above. The Christmas thing is an optional change and the disc version fix should only apply to people who installed an actual disc version, think old original releases physical copy of the game.

Link to comment
 

Thanks. I did exactly that, but got a weird error and thought it was my fault. Something just went wonky. I only started it one more time after a reboot, so maybe I'm forgoing being thorough but honestly I just want to play "my real" save. So much shopping to do. If I can get the info on the .dll that fixes the mem bugs I can do tons of testing on it, assuming it doesn't package a ton of other changes in that could corrupt.affect characters.

I'm bout 99% sure it works perfectly with PFP on the original setup described. The 1.10.3 DXVK has tons of other issues but works better on vanilla.

Edited by Shinryuu
Link to comment
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...