Ubuntu – Neverwinter Nights hangs at startup in the Kubuntu 14.10 VMWare Guest

kubuntuvmware

All right, I'm setting up Neverwinter Nights yet again~ ..And I've hit a pretty heavy snag that I've never seen before, and I'm really not sure how to progress.

I unzipped all the zips in order (and I do mean ALL the zips), added my license keys, ran ./fixinstall, and started the game…and was met with missing libraries (I think libGL.so.1 was first.) I installed them as they were reported, and was finally met with everyone's favorite error message "SDL Parachute Deployed." To get around that, I installed some more libraries (SDL and sundry) and removed the ./libs folder from the library path NWN exports.

Now, when I try to launch it, it just hangs. The nwmain process is still running, but it doesn't appear to be doing anything. I used strace to peer inside, and all threads appeared to be stuck on futex locks except for one that looked like it might be the game loop, but was only doing this over and over:

gettimeofday({1416876489, 342686}, NULL) = 0
nanosleep({0, 1000000}, 0xf0fff2c0)     = 0
gettimeofday({1416876489, 344658}, NULL) = 0
nanosleep({0, 1000000}, 0xf0fff2c0)     = 0

No errors are reported to the console and nothing is written to NWN's log files. ..And I'm at a loss as to how to troubleshoot further. Any advice/insight would be appreciated..

Best Answer

I experienced the same symptoms: no output, no window, no logging, almost no CPU usage and a similar strace when running Neverwinter Nights. This was on Kubuntu 14.04 from a NWN installation that used to work fine with 13.10 and older versions.

Someone clever on the ArchLinux forums (https://bbs.archlinux.org/viewtopic.php?id=155009) traced the problem back to libtxc-dxtn-s2tc0 using gdb debugging. This libtxc-dxtn-s2tc0 is an optional OpenGL extension for texture compression. Optional. :)

I removed it with

apt-get remove libtxc-dxtn-s2tc0:i386

and now NWN starts again and I can load a save game from the official campaign without any noticeable problems.

However, some textures, e.g. from the community expansion project, are missing (white) in game. This is likely due to them being compressed with the s3tc algorithm (which is implemented by above library). The good news is that some (most?) graphic cards can deal with compressed textures directly. To force OpenGL to simply pass the compressed textures to the graphics card, set the environment variable

force_s3tc_enable=true

before starting NWN. That fixed the white textures for me, but might not be a complete substitute for the library, as someone warns here: Is there an easy way to enable S3TC on Intel graphics?

Note, this libtxc-dxtn-s2tc0:i386 library is also supposed to improve graphics performance, but NWN is so old, it should not matter. Since the above command only removes the 32-bit version of the library, 64bit games should not be affected at all.

Related Question