Configuration

Generic

Env varExplanation
MACH_DEBUG_AUDIO=trueenable verbose audio debug logging

Linux

On Linux, Mach binaries have both Wayland/X11, and Vulkan/OpenGL/GLES support built-in (loaded dynamically via dlopen.)

Mach will try to use Wayland and Vulkan first. If Wayland is unavailable, it falls back to X11 automatically. If Vulkan is unavailable, it falls back to OpenGL.

For audio, Mach tries backends in the following order: PulseAudio → PipeWire → JACK → ALSA.

Env varExplanation
MACH_FORCE_BACKEND=waylandforce the use of Wayland backend only
MACH_FORCE_BACKEND=x11force the use of X11 backend only
MACH_FORCE_GPU_BACKEND=vulkanforce the use of Vulkan backend only
MACH_FORCE_GPU_BACKEND=openglforce the use of OpenGL backend only
MACH_FORCE_GPU_BACKEND=openglesforce the use of OpenGLES backend only
MACH_FORCE_AUDIO_BACKEND=pulseaudioforce the use of PulseAudio audio backend
MACH_FORCE_AUDIO_BACKEND=pipewireforce the use of PipeWire audio backend
MACH_FORCE_AUDIO_BACKEND=jackforce the use of JACK audio backend
MACH_FORCE_AUDIO_BACKEND=alsaforce the use of ALSA audio backend

Forcing Vulkan hardware acceleration on older Linux distros

Some older Linux distros (e.g. Pop!_OS 20.x, Ubuntu 20.x, Linux Mint 20.x, Elementary OS 6, Debian 11 (Bullseye), etc. around 2020-2022) did not have great ranking for Vulkan loader ICD priority/ranking. As a result, Vulkan may be running on llvmpipe (software rendering), or your integrated graphics card instead of the desired dedicated GPU. In this case, you can force it using e.g.:

Env varExplanation
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.jsonforce llvmpipe (software rendering)
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.jsonforce NVIDIA GPU (or try /etc/vulkan/icd.d/nvidia_icd.json)
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.jsonforce AMD GPU
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.jsonforce Intel GPU

Note: exact filenames may differ for your system, check ls /usr/share/vulkan/icd.d/ and ls /etc/vulkan/icd.d/.

Windows

On Windows, Mach only supports shipping applications with Direct3D, and uses WASAPI for audio.

Sometimes it’s helpful for developers on Windows to test the OpenGL, Vulkan, or OpenGL ES backends on a Windows host. We don’t support shipping games in this configuration, but they can be enabled via build.zig (OpenGL ES support varies across drivers, Vulkan depends on the heavyweight LunarG Vulkan SDK. OpenGL is generally always available.)

macOS

On macOS, Mach only supports Metal, and uses CoreAudio.