Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

AppImage: check it starts on 4/16/64 KiB pages (no bundled jemalloc, 64 KiB ELF alignment on aarch64); guide points Asahi users to ARM64

islandmed23483c512608
diff --git a/changes/fix-jemalloc-16k-pages.md b/changes/fix-jemalloc-16k-pages.md
new file mode 100644
index 00000000..23136e25
--- /dev/null
+++ b/changes/fix-jemalloc-16k-pages.md
@@ -0,0 +1,10 @@
+---
+changed: Linux packaging: every AppImage build checks that it starts on 4, 16 and 64 KiB memory pages (no bundled
+ jemalloc, 64 KiB ELF alignment on ARM64). On Apple Silicon Linux (Asahi) the guide points to the ARM64 build: the
+ x86_64 one runs there only through the FEX emulator, whose own jemalloc stops with "Unsupported system page size".
+testers:
+ - Asahi or another 16 KiB-page ARM64 Linux: the ARM64 AppImage starts and sculpts.
+---
+Root cause: FEX-Emu 2604 (binfmt for x86_64 on aarch64) is built with jemalloc for 4 KiB pages. Even the AppImage's
+static runtime (`--appimage-extract`) aborts under it; our AppImages bundle no jemalloc. In muvm (4 KiB pages) the
+x86_64 AppImage gets past FEX. The 0.11.10 ARM64 AppImage starts natively on 16 KiB pages (M1 Pro, offscreen).
diff --git a/docs/guide/installing.md b/docs/guide/installing.md
index 7b826297..d2bc893f 100644
--- a/docs/guide/installing.md
+++ b/docs/guide/installing.md
@@ -34,8 +34,8 @@ Each link below downloads the newest version. Pick the one for your system:
| Arch Linux | `packaging/arch/PKGBUILD` in the source | `makepkg -si` in that folder (an AUR package is planned) |
| Studio pipelines | `SculptForge-<version>-...-vfx2026.tar.gz` or `...-vfx2027.tar.gz` | See [SculptForge for studios](studios.md) |
-Most PCs are x86_64; ARM64 is for ARM laptops, Raspberry Pi and Apple Silicon Macs running Linux. Older
-versions are on the [releases page](https://github.com/islandmed/SculptForge/releases).
+Most PCs are x86_64; ARM64 is for ARM laptops, Raspberry Pi and Apple Silicon Macs running Linux (it runs on 4,
+16 and 64 KiB memory pages). Older versions are on the [releases page](https://github.com/islandmed/SculptForge/releases).
### Install with one command
diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md
index 6e870bed..5b2b5eb9 100644
--- a/docs/guide/troubleshooting.md
+++ b/docs/guide/troubleshooting.md
@@ -28,6 +28,9 @@ old driver, a remote desktop session or a virtual machine without 3D acceleratio
remote tool that forwards the GPU.
4. **Linux:** on a machine without a working GPU driver, Mesa's software renderer works (slowly):
`LIBGL_ALWAYS_SOFTWARE=1 sculptforge`.
+5. **Linux on Apple Silicon (Asahi) and other ARM machines:** use the ARM64 download. The x86_64 one runs
+ there only through the FEX emulator, which stops at once with `<jemalloc>: Unsupported system page size` on
+ 16 KiB pages; start it in a 4 KiB-page VM with `muvm -- ./SculptForge-linux-x86_64.AppImage` if you need it.
To see why it stopped, start it from a terminal and read the messages. It prints the OpenGL version and GPU it
found at start-up (for example `OpenGL 4.6 (Core Profile) Mesa 26.1.8 on ...`), or the error, such as
diff --git a/packaging/linux/build-appimage.sh b/packaging/linux/build-appimage.sh
index b422b084..a76d659f 100755
--- a/packaging/linux/build-appimage.sh
+++ b/packaging/linux/build-appimage.sh
@@ -71,7 +71,10 @@ for f in "$APPDIR/$ID.png" "$APPDIR/.DirIcon"; do
fi
done
-# 3. The AppImage. appimagetool checks the AppDir first (.DirIcon, the .desktop file) and stops on a problem.
+# 3. It starts on 4, 16 and 64 KiB pages (no bundled jemalloc; 64 KiB ELF alignment on aarch64).
+sh "$SRC/packaging/linux/check-page-size.sh" "$APPDIR" "$ARCH"
+
+# 4. The AppImage. appimagetool checks the AppDir first (.DirIcon, the .desktop file) and stops on a problem.
cd "$OUTDIR"
OUT="SculptForge-$VERSION-$ARCH.AppImage"
ARCH=$ARCH VERSION=$VERSION "$APPIMAGETOOL" --appimage-extract-and-run --runtime-file "$RUNTIME" \
diff --git a/packaging/linux/check-page-size.sh b/packaging/linux/check-page-size.sh
new file mode 100755
index 00000000..4c5dd7e9
--- /dev/null
+++ b/packaging/linux/check-page-size.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# Checks that an AppDir (or an extracted AppImage) starts on 4, 16 and 64 KiB memory pages.
+#
+# packaging/linux/check-page-size.sh APPDIR ARCH
+#
+# 1. No bundled jemalloc: it is built for one page size and aborts at start on bigger ones
+# ("<jemalloc>: Unsupported system page size"); glibc malloc has no such limit.
+# 2. On aarch64 every ELF file's LOAD segments are aligned to 64 KiB: a library linked with
+# -z max-page-size=4096 cannot be mapped on 16 KiB (Asahi, Apple Silicon) or 64 KiB kernels.
+# x86_64 has 4 KiB pages only.
+# That message on Asahi from the x86_64 AppImage is FEX-Emu's own jemalloc (run x86 programs in muvm there).
+set -eu
+[ $# -eq 2 ] || { echo "usage: $0 APPDIR ARCH" >&2; exit 2; }
+APPDIR=$1
+ARCH=$2
+bad=0
+for f in $(find "$APPDIR" -type f \( -path '*/bin/*' -o -name '*.so' -o -name '*.so.*' \)); do
+ head -c 4 "$f" | grep -q 'ELF' || continue
+ if grep -q -a '<jemalloc>' "$f"; then
+ echo "$f: bundles jemalloc (aborts on other page sizes); use glibc malloc" >&2
+ bad=1
+ fi
+ if [ "$ARCH" = aarch64 ]; then
+ for a in $(readelf -lW "$f" | awk '$1 == "LOAD" {print $NF}' | sort -u); do
+ if [ $((a)) -lt 65536 ]; then
+ echo "$f: LOAD segment aligned to $a, needs 0x10000 for 16/64 KiB pages" >&2
+ bad=1
+ fi
+ done
+ fi
+done
+[ $bad -eq 0 ] || exit 1
+echo "$APPDIR: starts on 4, 16 and 64 KiB pages"