The current state of Intel Arc support on FreeBSD
People had been keen-eared when Intel released its first discrete GPU since the i740 (if you don't count the ca. 50 pieces of i752 that were never sold) on Halloween of 2020. It was the Intel Iris Xe MAX GPU aimed at Laptops and a first dedicated graphics card that kind of served as a proof of concept for its successors, only ASUS and GUNNIR actually built dedicated cards based on this discrete GPU.
That's also what the codename DG1 stands for, the first generation of a discrete GPU that could be either used in mobile devices, embedded devices or in dedicated desktop graphics cards.
All the different codenames can be quite confusing so I made a little table to overview all the current and future generations.
| DG Code | Name | Architecture | Codename | Linux Kernel ¹ ² |
|---|---|---|---|---|
| DG1 | Iris Xe | Xe | DG1 | 5.16 |
| DG2 | Arc A | Xe-HPG | Alchemist | 5.19 |
| DG3 | Arc B | Xe2 | Battlemage | 6.11 |
| DG4 | Arc C | Xe3 | Celestial | 6.13 |
| DG5 | Arc D | Xe4 | Druid | - |
But Intel seems to follow the footsteps of Nvidia and now focuses more on GPUs for embedded devices, mobile devices and handheld devices, as the new Intel Arc G-Series proves. Which is also a little bit confusing as these are based on the Intel Arc B370 and B390 GPUs whose B-letter would suggest a Battlemage base, yet they are based on the Xe3 Architecture which correlates to the Celestial codename. We just can hope that Intel will yet release a last Druid based dedicated graphics card based on the Druid Xe4 architecture before the Desktop market is no more than a niche.
But now to the current state of DG2 and DG3 on FreeBSD. When I tested my Sparkle Arc A380 ELF on GhostBSD 26.1-R15.0p2/FreeBSD 15.0-RELEASE I got a vpanic about the missing function vmap_pfn. This function was only implemented recently into the LinuxKPI (aka "Linuxulator") in FreeBSD 16.0-CURRENT and backported to 15.0-STABLE although I only saw it finally in the code of 15.1-RELEASE.
The vmap_pfn function was not implemented in the i915kms driver in DRM until version 6.10. And as FreeBSD usually uses the DRM version that corresponds with the Linux LTS kernel the first supported version is DRM 6.12.
Unfortunately drm-612-kmod is not included as a package in the FreeBSD 15.1 repository but we can still install it as a port. It may be included by default in 15.2. Because it is a kernel module it not only needs the ports tree but also the system source tree.
If you had not selected the ports tree and the system source tree during the setup you can still install it and compile the DRM drivers (following commands run as root therefore no sudo/doas/mdo).
pkg install git
git clone --branch releng/15.1 https://git.freebsd.org/src.git /usr/src
git clone --depth 1 https://git.freebsd.org/ports.git /usr/ports
cd /usr/ports/graphics/drm-612-kmod/
make install clean
If you forget to install the source tree you will receive an error message in the form of "file:4: Cannot open /usr/src/sys/conf/kern.opts.mk in make[1] in directory "/usr/ports/graphics/drm-612-kmod/work/drm-kmod-drm_v6.12.85_2"" during compiling. After this you only have to install the firmware for the Intel Arc (DG2) GPU and load the i915kms driver.
pkg install gpu-firmware-intel-kmod-dg2
kldload i915kms
No more "panic: vmap_pfn() is not implemented" message but there still is a kernel panic.
But now there is another kernel panic "Fatal trap 12: page fault while in kernel mode". This time I have no idea what the cause of that kernel panic is, I guess we have to wait till FreeBSD 15.2 to do another test.
Regarding DG3 drivers you'll have to wait even longer as the necessary Xe driver was not yet ported from Linux to FreeBSD. While DG2 (as well as Tiger Lake and Alder Lake) devices are supported by both the old i915 and the new Xe driver, DG3 devices are only supported by the Xe driver.

Comments
Post a Comment