Environment Variables

From OpenMW Wiki
Jump to navigation Jump to search

There are several environment variables that can be used to change the way OpenMW behaves, for debugging or to test experimental functionality. These variables are not officially supported and not intended for end users. Use at your own risk!


Name Description
OPENMW_DECOMPRESS_TEXTURES If set, S3TC textures will be decompressed in software if there is no hardware support of S3TC compression, and the game cursor will also be decompressed in software. Allows running Morrowind on platforms not supporting S3TC like Raspberry Pi and on platforms that decompress the cursor incorrectly like macOS. This option is not enabled by default and must be switched on by environment variable because it only works with sufficiently new versions of OSG (3.6 or OpenMW/OSG fork).
OPENMW_OPTIMIZE Controls which optimizations are used when loading meshes. Disabling optimization(s) may be useful to narrow down optimizer-related bugs. By default, all optimizations are used. Use '0' or 'OFF' to disable them all or use bitflags, see Rendering Architecture#Optimizer.
OPENMW_DONT_PRECOMPILE If set, disables the use of osgUtil::IncrementalCompileOperation which incrementally pre-loads OpenGL objects that are not yet visible. This flag may be useful for debugging whether or not an issue is caused by this operation.
OPENMW_PHYSICS_FPS If set to a floating point number, overrides the physics framerate from its default of 60. May be useful to run OpenMW on systems that are unable to keep up with 60 physics frames / second and hence spiral to a halt. The effects of using a lower framerate have not been extensively tested.
OPENMW_FULL_MEMDUMP If set, generates a full memory dump when generating a crash dump (Windows only).


Being an OpenSceneGraph application, OpenMW accepts any environment variable used by OpenSceneGraph.

Incomplete documentation on these may be found on the OSG web site: UserGuides/EnvironmentVariables. The remaining variables can be found by searching for 'getenv' in the OSG source code.

Some variables will have no effect because OpenMW explicitely opts for different values at runtime, or because they affect a feature that OpenMW does not use.

Interesting variables:

  • OSG_THREADING (set to 'SingleThreaded' to rule out threading issues while debugging)


There are some OS-specific environment variables that may affect OpenMW. For example, on Linux, the configuration paths can be changed with XDG_CONFIG_HOME and XDG_DATA_HOME.