Documentation Index
Fetch the complete documentation index at: https://mintlify.com/magefree/mage/llms.txt
Use this file to discover all available pages before exploring further.
XMage runs on the Java Runtime Environment, which means its rendering pipeline is configurable through standard JVM flags. If you have a modern GPU, switching from the default software renderer to a hardware-accelerated one can dramatically improve frame rates, card animation smoothness, and overall UI responsiveness — often with a single flag. This page documents the flags sourced from the official readme and Java 2D documentation so you can tune the client to your hardware.
How to Apply JVM Flags
All JVM flags are entered directly in the XMage Launcher. No file editing is required.
Open the XMage Launcher
Start XMageLauncher as you normally would.
Open Settings
In the launcher menu bar, click Settings. The Settings window will open.
Navigate to the Java tab
Click the Java tab inside the Settings window.
Edit Client Java Options
Find the Client java options text field. Add your desired flags here, separated by spaces. For example:-Dsun.java2d.opengl=true -Xmx2G
Restart the client
Close the client if it is running and relaunch it from the launcher. The new flags take effect on the next client start.
The full list of Java 2D system properties supported by JRE 8 is available in the official Oracle documentation. XMage targets JRE 8, so all flags on that page are potentially applicable.
Flag Reference Table
The table below summarises the flags most relevant to XMage performance.
| Flag | Platform | Description | Example value |
|---|
-Dsun.java2d.opengl | Linux | Enable OpenGL hardware acceleration via Java 2D | true |
-Dsun.java2d.xrender | Linux | Enable XRender pipeline (lighter than OpenGL) | true |
-Dsun.java2d.d3d | Windows | Disable Direct3D acceleration to fix rendering artifacts | false |
-Xmx | All | Set maximum JVM heap size | 2G, 4G |
On Windows, Java 2D uses Direct3D for hardware acceleration by default. This works well on most systems but can produce visual glitches — distorted card art, broken button borders, or other GUI artifacts — on certain GPU and driver combinations.Disable Direct3D (artifact fix):This switches rendering to a software fallback. You lose Direct3D acceleration but eliminate the artifacts. If your system renders correctly without this flag, there is no benefit to adding it.Increase heap memory:See the Memory section below for details. Linux has two hardware-accelerated Java 2D pipelines worth trying: OpenGL and XRender. Both can significantly reduce CPU usage and improve rendering speed compared to the default software pipeline.Enable OpenGL:There is a known JDK bug (JDK-6545140) that causes the file chooser dialog to malfunction when OpenGL is enabled. You encounter this dialog when loading a deck from disk. The officially suggested workaround triggers a crash in XMage, so it is not a safe option. If you rely on the file chooser regularly, use XRender instead.Workaround for i3 window manager users: Toggle the window’s floating mode to force a re-render after the file chooser closes. This avoids the crash without disabling OpenGL. Enable XRender:-Dsun.java2d.xrender=true
XRender uses the X server’s XRender extension to delegate 2D drawing to the GPU. It does not have the file chooser bug that affects OpenGL, making it the safer first choice on Linux.Increase heap memory:See the Memory section below for details. On macOS, Java 2D uses Quartz by default. There are no official GPU-acceleration flags equivalent to OpenGL or XRender for the macOS pipeline in JRE 8.The most impactful tuning you can do on macOS is to increase the available heap memory:If you are on Apple Silicon (M1/M2), ensure you are using an ARM-native JDK first — an x86 JRE running under Rosetta will not benefit from any rendering flags. See the macOS M1/M2 issue for the correct JDK sources.
Increase Heap Memory
A safe and universally applicable starting point for any platform is -Xmx2G. This raises the maximum heap to 2 GB, giving XMage more room before the garbage collector has to work hard — which translates directly to fewer frame drops during large multiplayer games. If you have 8 GB of RAM or more, this change carries essentially no downside.
XMage loads a large number of card images and game objects into memory during a session. The default JVM heap is often too small for long or complex games, causing the garbage collector to run frequently and producing visible stutters.
Increase the value further if you have spare RAM:
Note that increasing memory beyond what actually gets used has no benefit — if -Xmx2G results in stable play, raising it to -Xmx8G will not make the game faster.
More background on JVM memory settings: Stack Overflow reference.
Combining Flags
You can combine multiple flags in the Client java options field, separated by spaces. A typical high-performance Linux configuration might look like:
-Dsun.java2d.xrender=true -Xmx2G
And a Windows artifact-fix configuration with extra memory:
-Dsun.java2d.d3d=false -Xmx2G
Always test one flag at a time so you can identify which change caused a regression if something breaks.