Skip to content

Instantly share code, notes, and snippets.

@davenicoll
Last active June 26, 2025 21:59
Show Gist options
  • Save davenicoll/d54f155d0d0e8af427d7763cc5c425c9 to your computer and use it in GitHub Desktop.
Save davenicoll/d54f155d0d0e8af427d7763cc5c425c9 to your computer and use it in GitHub Desktop.
TrueNAS Scale i915 GPU setup guide

Introduction

Here's how to get Plex hardware transcoding working with an Intel i915 GPU on TrueNAS SCALE 22.12.3 and Linux Kernel 5.15.*. Modified and updated for my setup, originally posted here: https://www.reddit.com/r/truenas/comments/13tpw9x/guidetruenas_scale_22122_enable_1213th_gen_intel/

System Information

OS Version: TrueNAS-SCALE-22.12.3.3
CPU: Intel(R) Celeron(R) N5105 @ 2.00GHz
GPU: Intel UHD Graphics (Jasper Lake) i915

Guide

Note: Here there be dragons, none of these steps are guaranteed to not break your TrueNAS install and you probably won't get much in the way of assistance if you do so be careful and don't attempt this if you're not comfortable with your linux-fu.

Re-enable apt and dpkg, and install Git

chmod +x /usr/bin/dpkg*
chmod +x /usr/bin/apt*
sudo apt update
sudo apt install git

Install Build Dependencies

You'll need to install a few dependencies before you can successfully build the driver. Most of these should already be installed, but flex and bison were missing from my installation.

sudo apt install dkms make debhelper devscripts build-essential flex bison mawk

Clone Intel DKMS + Firmware Repo's

Intel provides i915 Driver DKMS back-ports for kernel 5.15, they're specifically targeting Ubuntu but turns out they compile pretty much fine for Debian with little to no modification needed.

git clone https://github.com/intel-gpu/intel-gpu-cse-backports
git clone https://github.com/intel-gpu/intel-gpu-pmt-backports
git clone -b backport/main --single-branch https://github.com/intel-gpu/intel-gpu-i915-backports
git clone https://github.com/intel-gpu/intel-gpu-firmware

Once you've cloned each repo, follow the build and install instructions in the readme.

Build + Install DKMS modules

Once you've cloned each repo, follow the build and install instructions in the readme for each one. For OS_TYPE assume ubuntu_20.04 as it builds against the same kernel as we do but RTFM applies here.

Install Intel Firmware

You'll need to follow the README.md in the intel-gpu-firmware to copy the new firmware onto your system.

Installing the intel-gpu-i915-backports deb will run update-initramfs, producing warnings and errors. They can safely be ignored. Reboot.

@scyto
Copy link

scyto commented Jul 28, 2024

this is just what i was looking for (i am coming from proxmox)

any idea what i need to do if the chmod doesn't help?
i happen to be on nightly, this is just a test system

root@truenas[~]# chmod +x /usr/bin/dpkg*
chmod: changing permissions of '/usr/bin/dpkg': Read-only file system
chmod: changing permissions of '/usr/bin/dpkg-deb': Read-only file system
chmod: changing permissions of '/usr/bin/dpkg-divert': Read-only file system
chmod: changing permissions of '/usr/bin/dpkg-maintscript-helper': Read-only file system
chmod: changing permissions of '/usr/bin/dpkg-query': Read-only file system
chmod: changing permissions of '/usr/bin/dpkg-realpath': Read-only file system
chmod: changing permissions of '/usr/bin/dpkg-split': Read-only file system
chmod: changing permissions of '/usr/bin/dpkg-statoverride': Read-only file system
chmod: changing permissions of '/usr/bin/dpkg-trigger': Read-only file system
root@truenas[~]# chmod +x /usr/bin/apt*
chmod: changing permissions of '/usr/bin/apt': Read-only file system
chmod: changing permissions of '/usr/bin/apt-cache': Read-only file system
chmod: changing permissions of '/usr/bin/apt-cdrom': Read-only file system
chmod: changing permissions of '/usr/bin/apt-config': Read-only file system
chmod: changing permissions of '/usr/bin/apt-extracttemplates': Read-only file system
chmod: changing permissions of '/usr/bin/apt-ftparchive': Read-only file system
chmod: changing permissions of '/usr/bin/apt-get': Read-only file system
chmod: changing permissions of '/usr/bin/apt-key': Read-only file system
chmod: changing permissions of '/usr/bin/apt-mark': Read-only file system
chmod: changing permissions of '/usr/bin/apt-sortpkgs': Read-only file system
root@truenas[~]# apt update
Package management tools are disabled on TrueNAS appliances.

Attempting to update SCALE with apt or methods other than the SCALE web
interface can result in a nonfunctional system.

@davenicoll
Copy link
Author

They eventually added the relevant drivers, so if you're on TrueNAS Scale 24.x you shouldn't need to do this.

You used to be able to disable the protection using sudo /usr/local/libexec/disable-rootfs-protection but I'm not sure if that's still the recommended way.

@louis-sicko
Copy link

louis-sicko commented Jun 26, 2025

Hey, I just found this.

I have a N5105 and I want to use VAAPI to Transcode HEVC, but I get a lot of errors like this.

Do you have a clue perhaps? Thank you!

[hevc_vaapi @ 0x55c44a1fdbc0] Failed to map output buffers: 24 (internal encoding error).
[hevc_vaapi @ 0x55c44a1fdbc0] Output failed: -5.
[vost#0:0/hevc_vaapi @ 0x55c44a200ac0] Error submitting video frame to the encoder
Conversion failed!

GPU LOGS:
[    8.735174] i915 0000:00:02.0: [drm] VT-d active for gfx access
[    8.735208] i915 0000:00:02.0: vgaarb: deactivate vga console
[    8.735289] i915 0000:00:02.0: [drm] Using Transparent Hugepages
[    8.737301] i915 0000:00:02.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    8.739466] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_ops [i915])
[    8.739766] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/icl_dmc_ver1_09.bin (v1.9)
[    8.742832] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0
[    8.745196] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   10.456891] i915 0000:00:02.0: [drm] Cannot find any crtc or sizes
[   12.211457] i915 0000:00:02.0: [drm] Cannot find any crtc or sizes
[   13.924890] i915 0000:00:02.0: [drm] Cannot find any crtc or sizes
[  270.178314] i915 0000:00:02.0: [drm] Resetting vcs0 for CS error
[  270.178405] i915 0000:00:02.0: [drm] ffmpeg[11811] context reset due to GPU hang
[  270.180820] i915 0000:00:02.0: [drm] GPU HANG: ecode 11:4:83c7c7c7, in ffmpeg [11811]
[  270.197719] i915 0000:00:02.0: [drm] Resetting vcs0 for CS error
[  270.197809] i915 0000:00:02.0: [drm] ffmpeg[11811] context reset due to GPU hang
[  270.199349] i915 0000:00:02.0: [drm] GPU HANG: ecode 11:4:83c7c7c7, in ffmpeg [11811]
[  270.206098] i915 0000:00:02.0: [drm] Resetting vcs0 for CS error
[  270.206183] i915 0000:00:02.0: [drm] ffmpeg[11811] context reset due to GPU hang
[  270.207711] i915 0000:00:02.0: [drm] GPU HANG: ecode 11:4:83c7c7c7, in ffmpeg [11811]
[  560.432145] i915 0000:00:02.0: [drm] Resetting vcs0 for CS error
[  560.432235] i915 0000:00:02.0: [drm] ffmpeg[14350] context reset due to GPU hang
[  560.433803] i915 0000:00:02.0: [drm] GPU HANG: ecode 11:4:135f9e2f, in ffmpeg [14350]```

@davenicoll
Copy link
Author

Hey, I just found this.

I have a N5105 and I want to use VAAPI to Transcode HEVC, but I get a lot of errors like this.

Do you have a clue perhaps? Thank you!

[hevc_vaapi @ 0x55c44a1fdbc0] Failed to map output buffers: 24 (internal encoding error).
[hevc_vaapi @ 0x55c44a1fdbc0] Output failed: -5.
[vost#0:0/hevc_vaapi @ 0x55c44a200ac0] Error submitting video frame to the encoder
Conversion failed!

GPU LOGS:
[    8.735174] i915 0000:00:02.0: [drm] VT-d active for gfx access
[    8.735208] i915 0000:00:02.0: vgaarb: deactivate vga console
[    8.735289] i915 0000:00:02.0: [drm] Using Transparent Hugepages
[    8.737301] i915 0000:00:02.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    8.739466] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_ops [i915])
[    8.739766] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/icl_dmc_ver1_09.bin (v1.9)
[    8.742832] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0
[    8.745196] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   10.456891] i915 0000:00:02.0: [drm] Cannot find any crtc or sizes
[   12.211457] i915 0000:00:02.0: [drm] Cannot find any crtc or sizes
[   13.924890] i915 0000:00:02.0: [drm] Cannot find any crtc or sizes
[  270.178314] i915 0000:00:02.0: [drm] Resetting vcs0 for CS error
[  270.178405] i915 0000:00:02.0: [drm] ffmpeg[11811] context reset due to GPU hang
[  270.180820] i915 0000:00:02.0: [drm] GPU HANG: ecode 11:4:83c7c7c7, in ffmpeg [11811]
[  270.197719] i915 0000:00:02.0: [drm] Resetting vcs0 for CS error
[  270.197809] i915 0000:00:02.0: [drm] ffmpeg[11811] context reset due to GPU hang
[  270.199349] i915 0000:00:02.0: [drm] GPU HANG: ecode 11:4:83c7c7c7, in ffmpeg [11811]
[  270.206098] i915 0000:00:02.0: [drm] Resetting vcs0 for CS error
[  270.206183] i915 0000:00:02.0: [drm] ffmpeg[11811] context reset due to GPU hang
[  270.207711] i915 0000:00:02.0: [drm] GPU HANG: ecode 11:4:83c7c7c7, in ffmpeg [11811]
[  560.432145] i915 0000:00:02.0: [drm] Resetting vcs0 for CS error
[  560.432235] i915 0000:00:02.0: [drm] ffmpeg[14350] context reset due to GPU hang
[  560.433803] i915 0000:00:02.0: [drm] GPU HANG: ecode 11:4:135f9e2f, in ffmpeg [14350]```

Ever since TrueNAS 24.x, the GPU on the N5105 has had native support - so you shouldn't need the drivers, it should "just work". What version of TrueNAS are you running?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment