Dell XPS 13 / graphics

Laptop GPU hangs: i915 GTT mmap version on FreeBSD 15.1

After a routine pkg upgrade the desktop started freezing: the mouse still moved, everything else stopped. 62 times in one month.

A laptop whose screen says GPU HANG, with a worried raspberry imp in the corner.

fixed upstream Fixed in drm-kmod; the ports update to 2026Q4 was requested in FreeBSD PR 300726, now closed as fixed. Source: spagu/freebsd-drm-i915-gtt3. Longer story: the write-up on tradik.com.

Symptom

drmn0: [drm] GPU HANG: ecode 8:1:85dfffff

kwin_x11 sits at 100% CPU and the screen stops updating. The first hang came 90 minutes after pkg upgrade replaced drm-66-kmod with drm-612-kmod 6.12.85.

Cause

i915_gem_mmap_gtt_version() returns 5 on FreeBSD 15.1, because a version check compares against 1600000 instead of 1501000. Mesa's iris and anv drivers see version 5 and switch to the GEM_MMAP_OFFSET path, and the hangs start. The fix is upstream commit 1d054ae556. The rebuilt module differs from the packaged one by a single instruction: mov $0x5,%eax becomes mov $0x3,%eax.

If the installed package is still the broken one

sh build-i915-gtt3.sh           # fetches drm_v6.12.85_3, patches, builds i915kms.ko (about 3 minutes)
sudo sh install-i915-gtt3.sh    # creates a boot environment, backs up, installs
sudo shutdown -r now

Roll back:

sudo cp -p /boot/modules/i915kms.ko.pkg-6.12.85_2 /boot/modules/i915kms.ko
sudo shutdown -r now

Installed on 12 November 2026 at 17:05 UTC; no hang since. A 3D slicer that used to hang the GPU within minutes ran for more than 15 minutes clean.

Upstream discussion: drm-kmod issue #464, cross-referenced in #467 and #509.

Built with ssg