[Guide]Enable Mesa Panfrost driver on Orion O6 based on Debian12

1. Required Resources

2. Compatibility Note

The default Debian 12 image ships with Linux Kernel 6.1. However, the CIX Panthor driver is supported only from Linux Kernel 6.6 onward. Therefore, you will need to build and replace the kernel with version 6.6.

3. Download and Build CIX Kernel 6.6

3.1 Obtain CIX SDK Source Code

Reference: CIX SDK Source

mkdir cix-sdk
cd cix-sdk
repo init https://gitlab.com/cix-linux/linux_repo/cix-manifest.git -b origin/ee8f6/48bff/cix_p1_K6.6_2025Q3_dev
repo sync

3.2 Compile the Linux Kernel

Reference: CIX SDK Build Guide

cd cix-sdk
source build-scripts/envtool.sh
build kernel

Note:

DT version of the Panthor driver is enabled by default on the cix_p1_K6.6_2025Q3_dev branch (no extra modification needed).

ACPI version requires you to apply this patch

4. Replace the Debian 12 Kernel

4.1 Replace Kernel Files

cd cix-sdk/output/cix_evb
# Copy files to your Orion O6 machine
scp Image sky1-orion-o6.dtb <orion-o6-ip>:/tmp/

On the Orion O6 device:

sudo su root
mkdir /mnt/data_boot
mount /dev/nvme0n1p1 /mnt/data_boot/
cp /tmp/Image /tmp/sky1-orion-o6.dtb /mnt/data_boot/
sync

4.2 Install New Kernel Packages

Copy the following .deb files from cix-sdk/output/cix_evb/debs/ to any directory on Orion O6:

  • linux-headers-6.6.89-xxx.deb
  • linux-image-6.6.89-xxx.deb
  • linux-libc-dev_6.6.89-xxx.deb

Install them with:

dpkg -i linux-headers-6.6.89-xxx.deb
dpkg -i linux-image-6.6.89-xxx.deb
dpkg -i linux-libc-dev_6.6.89-xxx.deb

5. Enable the Panthor Driver

5.1 Disable the Default mali_kbase Driver

Edit /usr/bin/load-modules.sh and comment out the following lines:

#insmod /lib/modules/$linux_version/extra/protected_memory_allocator.ko
#insmod /lib/modules/$linux_version/extra/memory_group_manager.ko
#insmod /lib/modules/$linux_version/extra/mali_kbase.ko

Then load the panthor driver:

modprobe panthor

5.2 Adapt the linlondp Driver

The linlondp driver enables the render node by default, which conflicts with the panthor driver’s usage. To disable it:

touch /etc/modprobe.d/linlon-dp.conf
echo "options linlon-dp enable_render=0" > /etc/modprobe.d/linlon-dp.conf

6. Mesa Panfrost Driver Compilation and Configuration

6.1 Build Mesa Panfrost on Orion O6

# download mesa code
wget https://gitlab.freedesktop.org/mesa/mesa/-/archive/25.1/mesa-25.1.tar.gz
tar -zxf mesa-25.1.tar.gz

# update meson
echo "deb http://deb.debian.org/debian bookworm-backports main" | tee /etc/apt/sources.list.d/backports.list
apt update
apt install -t bookworm-backports meson

apt install -y build-essential meson ninja-build pkg-config
apt install cmake git libclc-19-dev python3-mako python3-yaml zlib1g-dev libexpat1-dev libdrm-dev libudev-dev
apt install llvm-15 llvm-15-dev clang-15 libclang-15-dev lld-15 liblld-15-dev libllvm15 llvm-15-tools libllvmspirvlib-15-dev 

# build and install spirv-tools
git clone https://github.com/KhronosGroup/SPIRV-Tools.git
cd SPIRV-Tools/
git checkout vulkan-sdk-1.3.296
cd SPIRV-Tools/external/
git clone https://github.com/KhronosGroup/SPIRV-Headers.git
mv SPIRV-Headers/ spirv-headers/
cd spirv-headers/
git checkout vulkan-sdk-1.3.296
cd ../..
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
make install -j10

# build and install waylands
wget https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.23.0/downloads/wayland-1.23.0.tar.xz
tar -xf wayland-1.23.0.tar.xz
cd wayland-1.23.0/
meson setup build --prefix=/usr -Ddocumentation=false
ninja -C build install

# build and install wayland-protocols
wget https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/1.41/wayland-protocols-1.41.tar.gz
tar -xvf wayland-protocols-1.41.tar.gz
cd wayland-protocols-1.41/
meson setup build --prefix=/usr
ninja -C build install

apt install libelf-dev libssl-dev libpng-dev byacc bison flex 
apt install libxcb-dri3-dev libxcb-randr0-dev libx11-dev libxext-dev libxfixes-dev libxcb-glx0-dev libxcb-shm0-dev
apt install libx11-dev libx11-xcb-dev libx11-dev libxcb-present-dev libxshmfence-dev libxxf86vm-dev libxrandr-dev ocl-icd-opencl-dev

cp /usr/lib/llvm-15/lib/clang/15.0.6/include/opencl-c-base.h  code/mesa-25.1/include/
cp /usr/lib/llvm-15/lib/clang/15.0.6/include/opencl-c.h  code/mesa-25.1/include/

# build and install mesa
cd mesa-25.1
meson . build/ --reconfigure -Dprefix=/usr -Dgallium-drivers=panfrost -Dvulkan-drivers=panfrost -Dbuildtype=release
ninja -C build install

6.2 Debian System Configuration

  • Backup and delete the following directories, these files will conflict with the Panfrost driver :
    • /opt/cixgpu-compat
    • /opt/cixgpu-pro
  • Replace Xwayland with the default system version:
    • apt install xwayland=2:22.1.9-1
  • Delete the following Vulkan configuration files if they exist:
    • /etc/vulkan/icd.d/mali.json
    • /etc/vulkan/implicit_layer.d/VkLayer_window_system_integration.json

7. Final Steps and Verification

7.1 Reboot System

Reboot your Orion O6 device for the Panthor and Panfrost drivers to take effect

7.2 Verification

Check if the Panthor Driver is Loaded

After reboot, check the kernel logs for confirmation:

DT Version:

root@orion-o6:/home/radxa# dmesg | grep panthor
[    2.646559] [pid:313,cpu3,(udev-worker)]panthor 15000000.gpu: [drm] clock rate = 900000000
[    2.646615] [pid:313,cpu3,(udev-worker)]panthor 15000000.gpu: error -ENODEV: _opp_set_regulators: no regulator (mali) found
[    2.652245] [pid:313,cpu0,(udev-worker)]panthor 15000000.gpu: [drm] mali-unknown id 0xc870 major 0x0 minor 0x0 status 0x8
[    2.652250] [pid:313,cpu0,(udev-worker)]panthor 15000000.gpu: [drm] Features: L2:0x8130306 Tiler:0x809 Mem:0x301 MMU:0x2830 AS:0xff
[    2.652253] [pid:313,cpu0,(udev-worker)]panthor 15000000.gpu: [drm] sky1_harvesting_reg_val=0xf sky1_harvesting_core_mask=0x550555
[    2.652255] [pid:313,cpu0,(udev-worker)]panthor 15000000.gpu: [drm] shader_present=0x550555 l2_present=0x1 tiler_present=0x1
[    2.654872] [pid:313,cpu7,(udev-worker)]panthor 15000000.gpu: [drm] Firmware protected mode entry not be supported, ignoring
[    2.654937] [pid:313,cpu7,(udev-worker)]panthor 15000000.gpu: [drm] Firmware git sha: 17edf0fe034e91ac1779419ce5413342a2fb535e
[    2.655241] [pid:313,cpu7,(udev-worker)]panthor 15000000.gpu: [drm] CSF FW using interface v3.13.0, Features 0x10 Instrumentation features 0x71
[    2.656805] [pid:313,cpu10,(udev-worker)][drm] Initialized panthor 1.2.0 20230801 for 15000000.gpu on minor 0

ACPI Version:

root@orion-o6:/home/radxa# dmesg | grep panthor
[    9.276118] [pid:336,cpu10,(udev-worker)]panthor CIXH5000:00: [drm] clock rate = 900000000
[    9.295007] [pid:336,cpu10,(udev-worker)]panthor CIXH5000:00: error -ENODEV: _opp_set_regulators: no regulator (mali) found
[    9.311693] [pid:336,cpu9,(udev-worker)]panthor CIXH5000:00: [drm] mali-unknown id 0xc870 major 0x0 minor 0x0 status 0x8
[    9.311701] [pid:336,cpu9,(udev-worker)]panthor CIXH5000:00: [drm] Features: L2:0x8130306 Tiler:0x809 Mem:0x301 MMU:0x2830 AS:0xff
[    9.311707] [pid:336,cpu9,(udev-worker)]panthor CIXH5000:00: [drm] shader_present=0x550555 l2_present=0x1 tiler_present=0x1
[    9.313626] [pid:336,cpu9,(udev-worker)]panthor CIXH5000:00: [drm] Firmware protected mode entry not be supported, ignoring
[    9.313683] [pid:336,cpu9,(udev-worker)]panthor CIXH5000:00: [drm] Firmware git sha: 17edf0fe034e91ac1779419ce5413342a2fb535e
[    9.313869] [pid:336,cpu10,(udev-worker)]panthor CIXH5000:00: [drm] CSF FW using interface v3.13.0, Features 0x10 Instrumentation features 0x71
[    9.314137] [pid:336,cpu9,(udev-worker)][drm] Initialized panthor 1.2.0 20230801 for CIXH5000:00 on minor 0
[    9.318996] [pid:336,cpu0,(udev-worker)]<dst::do_boottime_initcall:99> initcall panthor_init+0x0/0x1000 [panthor] returned 0 after 86794 usecs

Check if Panfrost is Working:

After the Debian desktop environment starts, go to: Settings → About → Graphics
You should see “Mali-G720(Panfrost)” or a related entry displayed.

If you see the panthor and panfrost information as described above, the drivers have been enabled successfully.

Run glmark2:

Run vkcube:

Note:

If using Mesa Panfrost 25.2 or above, Xwayland 24.1 or newer is required; otherwise, X11 applications might not run correctly.

Build and Install Xwayland 24.1 on Orion O6

# update xorgproto
git clone https://gitlab.freedesktop.org/xorg/proto/xorgproto.git
cd xorgproto
meson setup build --prefix=/usr
ninja -C build install

# update libdrm
git clone https://gitlab.freedesktop.org/mesa/libdrm.git
cd libdrm/
git checkout libdrm-2.4.125
meson setup build -Dprefix=/usr
ninja -C build install

apt install libpixman-1-dev libxkbfile-dev libxfont-dev libxcvt-dev libepoxy-dev libxcb-dri2-0-dev

# get the xserver code and checkout to xwayland-24.1 branch
git clone https://gitlab.freedesktop.org/xorg/xserver.git
cd xserver
git checkout xwayland-24.1

meson setup build --prefix=/usr -Ddocs=false
systemctl stop gdm
cp build/hw/xwayland/Xwayland /usr/bin/
systemctl start gdm
3 Likes

Can Radxa please make this kernel available as an update for the existing debian image? will there be an updated debian image for download to test?
thanks in advance
Uli

That’s nice work. Thank you! Do you know if the Panfrost driver works with DEs other than GNOME? When I tried to run anything else (like XFCE or Sway) with the stock Radxa Debian image, I would just get GPU hangs and nothing displayed.

That’s great news. Is there a plan for mainline integration?

Very nice! I won’t have time to test this for a while but any idea if it works well with Llama.cpp + Vulkan yet?

Whatever the stock Radxa Debian Image was using was extremely slow (much slower than CPU).

Several reasons we did not implement this in our Debian 12 (and in foreseeable future):

  1. We use ACPI, and this relies on a patch outside of CIX’s official SDK. Unless this is part of the official SDK we cannot guarantee it would be continually supported in future releases.
  2. Conflict with existing Mali driver means 2 configurations are incompatible, and requires manual steps to configure. Failure in this process = no display = potential support issue.
  3. You have to manually rebuild Mesa. So either this is one more point of failure, or we need to maintain our own Mesa packages for Debian 12. Debian 13 has latest enough Mesa in backports but CIX does not support this release yet.
  4. At API level Panthor did not offer more than the Mali driver. On other platforms the main benefit is to have OpenGL support, but this API is supported on the G720 Mali driver.

Ultimately, for Debian, we are looking to have a production and commercially supportable system, which means we try to avoid such big changes unless absolutely necessary.

I have worked on NixOS for O6 series. Since we do not officially support them, I had the freedom to pick panthor as my GPU driver. NixOS also makes using newer Mesa easy, and there is no existing Mali packages to begin with. Basically every issues listed above does not apply to NixOS, and that makes panthor a natural choice there, but not on Debian.

With panthor on NixOS I have Hyprland working fine.

1 Like

It is a pleasure to hear officialy from radxa that they are not intersted to support acceleration with the orion gpu.

A closed source for the cix drivers does nobody help and isnt open source at all.

Hopefully anyone who bought an orion with false information will react and anyone interested in orionN will not get the the same desaster. We have blacklisted Radxa and the orion will be on the shelf or the wastebin.

Hmm I have gone through this tutorial several times and I cannot seem to get it to work. I get a black screen and either cannot SSH into it all, or only SSH access with a black screen. However, the Dmesg command looks identical to what you have shown up there. Anyone able to build a successful image and throw it up on Mega or Google Drive?

Make sure you have done step 5.2 and probably need a sudo update-initramfs -u before reboot.

1 Like

Hi, I followed your guide to replace the Mali proprietary stack with the upstream panthor driver on my O6N (NOT O6). I’m running into an issue, and after debugging I think I understand the root cause, so I’d like to confirm whether this setup is currently expected to work with GNOME / GDM.

This comment was assisted by ChatGPT,

but all analysis is based on my own system, logs, and testing.

Root cause (summary)

This platform uses a split render / display architecture:

  • panthor (CIXH5000)

    • Provides GPU rendering
    • Exposes /dev/dri/renderD128
    • No KMS / no display output
  • linlon_dp (CIXH5010:x)

    • Provides display controller (atomic KMS)
    • Exposes /dev/dri/card1..card5
    • No EGL / no render capability by default, and disabled render function according to your guide

Modern desktop compositors (GNOME Wayland, and Xorg modesetting) assume the primary GPU supports both KMS and EGL on the same DRM device.
On this platform, that assumption is not met, so both Wayland and Xorg fail by design.

Wayland failure (GNOME / mutter)

Mutter selects a KMS device with a connected monitor (linlon_dp), but fails because that GPU has no EGL support:

Failed to open gpu '/dev/dri/card0': No suitable mode setting backend found
Added device '/dev/dri/card5' (linlondp) using atomic mode setting
GPU /dev/dri/card5 selected as primary (has connected monitor)
Failed to setup: The GPU /dev/dri/card5 chosen as primary is not supported by EGL

So:

  • panthor: EGL/render OK, but no modesetting
  • linlon_dp: modesetting OK, but no EGL

Wayland exits immediately.

Xorg failure (modesetting)

Xorg detects all DRM devices but cannot create any usable screen:

(II) modeset(G0): using drv /dev/dri/card1
(II) modeset(G1): using drv /dev/dri/card2
(EE) No devices detected.
(EE) no screens found

DRM device layout (confirmed)

card0        -> panthor (render, no KMS)
renderD128  -> panthor

card1..5    -> linlon_dp (KMS only, no EGL)

Question

Is this combination currently expected not to work with GNOME / GDM?

I noticed linlon_dp has a module parameter:

enable_render: Enable render node support (bool)

Is this meant to be enabled to allow desktop compositors (KMS + EGL on the same DRM device), or is this platform currently intended for DRM-direct / Weston / embedded-style usage only?

Thanks — just want to confirm whether this is a limitation of the current driver stack rather than a configuration mistake on my side.

If you need further information, please leave a comment, THANK YOU !

1 Like

Hi lwzheng,

From the logs you provided, the main error is:
“Failed to setup: The GPU /dev/dri/card5 chosen as primary is not supported by EGL.”

First, please double-check if you have correctly followed the steps in Section 6.2.

If the Mali proprietary EGL files have not been fully removed, the system will prioritize using the Mali EGL path. However, the render128 device is created via the Panthor driver, and the Mali EGL cannot recognize this render device, which leads to the error above.

I suggest you try the following steps:
systemctl stop gdm
rm -rf /opt/cixgpu-compat # Back up these files if needed
rm -rf /opt/cixgpu-pro
cd mesa-25.1
ninja -C build install
systemctl start gdm