Neverwinter Nights: Enhanced Edition

Neverwinter Nights: Enhanced Edition

View Stats:
Meldarion Dec 18, 2021 @ 9:57pm
Linux Memory Leak
After playing the game for awhile I noticed that it was getting progressively slower and would eventually freeze my computer, I had to do a hard reset and so no crash log was generated. The more areas you pass through in a module the worse it gets, so I checked my ram usage and it was way too high.

Any other Linux users experienced this? Do you know what patch this started happening so I can rollback?
< >
Showing 1-15 of 23 comments
Delemas Dec 19, 2021 @ 6:19pm 
No works fine here. Perhaps it is related to a mod? I'm only got LSE installed at the moment.
Meldarion Dec 20, 2021 @ 12:13am 
Originally posted by Delemas:
No works fine here. Perhaps it is related to a mod? I'm only got LSE installed at the moment.
I only have the CEP installed, and it happens in all modules. Thanks for the reply, now I know it's probably something to do with my system I'll try reinstalling NWN.
Rodia Dec 21, 2021 @ 12:04pm 
I had a simillar problem, it was a really annoying and as you I had to restart pc to get moving
Serpentax Feb 4, 2022 @ 11:17pm 
Same here on PopOS, with or without mods.. no difference.
Only current solution is to quit and then run BleachBit to clear the RAM... makes playing on a PW basically impossible in more than one hour chunks.
Unaccounʇed4 Oct 7, 2022 @ 4:29pm 
Can confirm. The game keeps loading up the inode and dentries cache and doesn't clean up after itself, not even when you close it. Rebooting or manually cleaning this cache is required after less than hour on an older/RAM limited system.
renaissance_ray Nov 20, 2022 @ 12:14pm 
i just went through all the available builds in the betas tab and it looks like it was introduced in build8193.24

I was able to load multiple tiles in a row without the accumulating memory usage in build8192.23

hope this helps someone. I have already submitted a bug ticket.
Marko Nov 26, 2022 @ 3:22pm 
Yes this is happening to me as well. As I have an older machine, the game becomes completely unplayable even in the campaign within an hour. Online play is impossible within 10 minutes.

This severely breaks the game. I would advise against even buying it in this state if you plan to play on linux.
ghanadaur Feb 13, 2023 @ 4:45pm 
I have the same issue on both native linux and via proton. I can see every new area in a PW consume 100K or more. The PW uses stock assets. No mods. I increased swap to 16G and it eats all memory, vram and most swap before it grinds to a halt. This is on steamdeck. Tried low setting and max and no difference.
Cutter Feb 14, 2023 @ 7:21am 
Originally posted by ghanadaur:
I have the same issue on both native linux and via proton. I can see every new area in a PW consume 100K or more. The PW uses stock assets. No mods. I increased swap to 16G and it eats all memory, vram and most swap before it grinds to a halt. This is on steamdeck. Tried low setting and max and no difference.

There are some pinned topics in the steam forums. Try the 32bit client using proton. Maybe that will work.
Star-X Feb 14, 2023 @ 7:28am 
Originally posted by Cutter:
Originally posted by ghanadaur:
I have the same issue on both native linux and via proton. I can see every new area in a PW consume 100K or more. The PW uses stock assets. No mods. I increased swap to 16G and it eats all memory, vram and most swap before it grinds to a halt. This is on steamdeck. Tried low setting and max and no difference.

There are some pinned topics in the steam forums. Try the 32bit client using proton. Maybe that will work.
Or just try downgrading to beta 8193.23. Still need to do some testing on whether PRC works with that build, but according to posts higher up it's the last build before the nasty memory leak is introduced.
Wreckage Brother Feb 14, 2023 @ 7:38pm 
Some say this memory leak is a kind of shared penitence among the users of the terrible hacker operating system Lunux, developed by the Diabolical Minds of Fryodir Maloslav and Luciyefyr Thanatinov to forever control the minds and freedoms of the masses in the 21st century. Yes, in that cold, siberian lab hiding ancient relics of the past such as the pyramid's salvaged levitation devices - still impossible to reverse engineer as well as the first medical trials of tarantula spider 'necrobot' claw grabbing technologies, that was the cradle of Lunux, where it lay dormant until one day an agent of an unknown organization revealed it to the masses, altering the course of history forever.
Star-X Feb 15, 2023 @ 6:00pm 
Originally posted by Freek:
Some say this memory leak is a kind of shared penitence among the users of the terrible hacker operating system Lunux, developed by the Diabolical Minds of Fryodir Maloslav and Luciyefyr Thanatinov to forever control the minds and freedoms of the masses in the 21st century. Yes, in that cold, siberian lab hiding ancient relics of the past such as the pyramid's salvaged levitation devices - still impossible to reverse engineer as well as the first medical trials of tarantula spider 'necrobot' claw grabbing technologies, that was the cradle of Lunux, where it lay dormant until one day an agent of an unknown organization revealed it to the masses, altering the course of history forever.
Take your meds please.

Also, having toyed around with 8195.34 some more (i.e. latest build) I don't see any memory leak on my Nvidia PC. Possible it's an AMD/Steam Deck only issue?

May also involve specific graphics options too; I turned everything down to mostly match Diamond Edition, so it's possible it only affects those with the more advanced graphical options enabled.
Star-X Feb 21, 2023 @ 9:23am 
So yeah, turned on the function on the Steam Deck to view ram usage, and you're right, it chews up more and more memory as it runs.

Need to compare it to my desktop PC with an Nvidia GPU, but it definitely is noticeable. Hopefully the next build fixes this bug. If not, then I guess the game will require playing only a few hours at a time, with a reboot afterwards to clean out garbage from the RAM.
Wreckage Brother Feb 22, 2023 @ 6:30am 
In previous parlays with the devious Lunux operating system I noticed that this memory leak doesn't seem to occur when played in single-player. It would only happen when I played multiplayer, which is incidentally also the only way I play the game. If the next patch doesn't resolve this leak I don't think there'll be much hope it ever gets fixed. Despite the claims there's a next patch on the way I'm pretty sure it's gonna end up being the last patch they ever do to this. What a shame since I got EE thinking they'd continue patching it up as the years went by.

What a kafkaesque way to die.
Star-X Feb 22, 2023 @ 11:30am 
I made a bash script that at least removes the garbage data after a play session. Note that it's not perfectly secure as it requires replacing PASSWORD with your password, and thus your password is technically in a plaintext file, however on Steam Deck it shouldn't be an issue.

Script below:

#!/usr/bin/env bash echo PASSWORD | sudo -S sync echo PASSWORD | sudo -S sysctl -w vm.drop_caches=3

Save the script somewhere you can easily remember it (your home directory, or any other user-accessible directory, up to you) with a name like nwngarbagecleanup.sh, then set your launch options for NWN to the following:

%command%; /path/to/script.sh

What this basically does is, after closing the game it runs the bash script, which clears all unused garbage data NWN left behind after closing. Thanks to echo PASSWORD | sudo -S, it runs automatically without requiring your password, which on Steam Deck is incredibly useful as it's kinda hard to enter in a password in game mode, especially one on the terminal.

Worth noting that this doesn't FIX the memory leak, it just cleans up after NWN closes so that you don't have multiple gigabytes of garbage stuck in your RAM, meaning after closing the game and reloading the game it should be as close to a fresh reboot as possible without rebooting. In testing on the Steam Deck, rebooting and immediately running the game after rebooting had 1.6 gb of ram used up at launch, while the script cleaned up the RAM to about 2.2 gb or so after closing and reopening the game; way better than without the script, where RAM just kept on getting higher until it eventually hit such a high number that the Steam Deck promptly forcibly rebooted from a lack of available RAM.

I'd recommend also that if you're using Protontricks to load the toolset using the NWNEE prefix presumably created before switching back to the native Linux build, that you use the following bash script to run the toolset instead of right clicking the toolset and running it through Protontricks:

#!/usr/bin/env bash cd /path/to/nwnee/install/directory/bin/win32 protontricks-launch --appid 704450 ./nwtoolset.exe /path/to/garbage/cleanup/script.sh

Basically the above bash script runs the toolset using the NWNEE proton prefix, then when it closes it runs the garbage cleanup script above. This is in case the toolset has the same memory leak. At the moment I'm not sure it does, but better safe than sorry. Obviously not needed if you're actively using Proton instead of the native build; in that case the launch argument further above above should suffice.
Last edited by Star-X; Feb 22, 2023 @ 11:46am
< >
Showing 1-15 of 23 comments
Per page: 1530 50

Date Posted: Dec 18, 2021 @ 9:57pm
Posts: 23