Fix Antigravity IDE's "Language server killed with signal SIGILL" crash on older CPUs.
Antigravity (Google's VS Code fork) ships a language server binary compiled for modern CPUs. On older processors that lack certain instruction set extensions, the binary crashes immediately with SIGILL (Illegal Instruction), breaking all AI features (code completion, chat, inline suggestions).
This project provides a zero-config, universal fix using QEMU user-mode emulation to transparently run binaries with full CPU feature emulation. Version 1.6.0 introduces Multi-Directory Discovery, automatically detecting both ~/.antigravity-server (classic) and ~/.antigravity-ide-server (v2.0+) installations β the auto-patch watcher monitors all discovered directories simultaneously.
When connecting to a remote server via SSH Remote, Antigravity installs and runs a language server binary. This binary is compiled with CPU features that older processors don't support:
| Architecture | Required Feature | Affected CPUs |
|---|---|---|
| ARM64 (aarch64) | LSE Atomics, SHA-512 | Cortex-A53, Cortex-A35, all ARMv8.0 |
| x86_64 (amd64) | AES-NI, AVX2, FMA, BMI1/2, MOVBE | Pre-Haswell Intel, Pre-Excavator AMD |
(Antigravity) Language server killed with signal SIGILL
(Antigravity) Failed to start language server: Error: Language server exited before sending start data
Or on x86:
FATAL ERROR: This binary was compiled with aes enabled, but this feature is not available on this processor
We use QEMU user-mode emulation to wrap the language server binary. QEMU emulates the host CPU microarchitecture with only the missing instruction sets added, minimizing emulation overhead.
- Dynamic Discovery: The script recursively scans your Antigravity installation for ELF binaries.
- Smart Detection: It tests each binary to see if it actually crashes with
SIGILLon your hardware. - Transparent Wrapping: Crashing binaries are moved to
*.realand replaced by a tiny bash wrapper. - Emulated Execution: The wrapper runs the real binary through QEMU with host-matched CPU emulation.
- Universal Compatibility: Antigravity sees no difference β any component (language server, search tools, etc.) is protected.
# For a remote server accessible via SSH:
cat patch.sh | ssh user@your-server "bash -s"
# From Windows (PowerShell):
type patch.sh | ssh user@your-server "tr -d '\r' | bash -s"curl -fsSL https://raw.githubusercontent.com/trefeon/antigravity-universal-patch/main/patch.sh | bash
# or
wget -qO- https://raw.githubusercontent.com/trefeon/antigravity-universal-patch/main/patch.sh | bashgit clone https://github.com/trefeon/antigravity-universal-patch.git
cd antigravity-universal-patch
chmod +x patch.sh
./patch.sh- Linux (Debian/Ubuntu, Fedora/RHEL, Arch, Alpine supported)
- Root access or sudo privileges (for installing QEMU)
- ~70MB disk space for QEMU user-mode package
./patch.sh --diagnose./patch.sh --restoresudo ./patch.sh --installThis installs a systemd service that watches for Antigravity updates and automatically re-patches new binaries using inotifywait. It now monitors the entire installation root, providing hands-off, long-term protection for all current and future binaries.
sudo ./patch.sh --uninstallANTIGRAVITY_DATA_DIR=/custom/path ./patch.shWith auto-patch service installed (--install): patches are applied automatically within seconds of an update. No action needed.
Without the service: re-run the patch manually after each Antigravity server update:
cat patch.sh | ssh user@your-server "bash -s"| Device | CPU | Architecture | Status |
|---|---|---|---|
| Amlogic S9xx Box | Cortex-A53 (ARMv8.0) | aarch64 | β Working |
| Acer Laptop | Intel i3-2330M (Sandy Bridge) | x86_64 | β Working |
| Acer Laptop | Intel i3-M330 (Westmere) | x86_64 | β Working |
| Raspberry Pi 3 | Cortex-A53 | aarch64 | Should work |
| Raspberry Pi 2 | Cortex-A7 (ARMv7) | armhf | Not supported* |
* ARMv7 (32-bit) is a different architecture entirely and not supported by Antigravity's server.
QEMU user-mode emulation translates CPU instructions at runtime. When running on the same base architecture (e.g., x86_64 on x86_64), QEMU's TCG (Tiny Code Generator) translates only the instructions the physical CPU can't execute natively.
Instead of using a generic -cpu max (which emulates everything and wastes CPU), the patch detects the host CPU microarchitecture and selects the closest QEMU model, adding only the missing instruction sets:
| Host CPU | QEMU Model | Added Extensions |
|---|---|---|
| Westmere (i3-M330) | Westmere-v2 |
+aes,+avx,+avx2,+bmi1,+bmi2,+fma,+movbe,+pclmulqdq |
| Sandy/Ivy Bridge | SandyBridge-v2 |
+aes,+avx2,+bmi1,+bmi2,+fma,+movbe |
| ARM Cortex-A53 | max |
Full emulation (different ISA level) |
This reduces TCG translation overhead by 40-60% compared to -cpu max on x86 hosts.
The wrapper applies several performance optimizations for smooth operation on low-resource hardware:
| Setting | Purpose |
| --- | --- | --- |
| GOMAXPROCS=1 | Limits Go runtime to 1 thread β reduces synchronization overhead under emulation |
| nice -n 10 | Lowers QEMU scheduling priority so the host system stays responsive |
| GODEBUG=asyncpreemptoff=1 | Disables Go async preemption that causes deadlocks under QEMU emulation |
| MALLOC_ARENA_MAX=2 | Reduces glibc heap fragmentation on low-RAM systems |
- Thread Hang Fix: Go binaries compiled for newer systems heavily utilize asynchronous preemption for their garbage collectors. QEMU user-mode emulation struggles translating these rapid signal interruptions, leading to deadlocks/hanging. The
GODEBUG=asyncpreemptoff=1flag ensures the language server runs rock-solid under emulation. - Log Noise Suppression: Under QEMU emulation, Google's TCMalloc/Abseil will trip up on the
rseq(Restartable Sequences) syscall and spam the IDE logs with harmless but confusing warnings. The wrapper filters these out (grep -v) for a clean experience.
The language server runs under partial emulation, so there's a ~1.5-3x CPU overhead (reduced from ~2-4x with the generic -cpu max approach). Since the LS is primarily I/O-bound (waiting for API responses, processing text), the impact on real-world usage is minimal and imperceptible for most workflows. Idle CPU usage is typically 4-8%.
MIT License β see LICENSE.