I installed Truenas SCALE on a Beelink ME Mini with N200. I want to install Frigate and use a Hailo8 PCIe card as detector. Reading in the forum I understood that the drivers are avaiable for RPi5 but apparently not for Intel CPU.
I’m quite new with TN and I wanted to have a confirmation that the best way to obtain the drivers for the card is to enable the developer mode and built the drivers from the code of Hailo GitHub repository.
Developer mode puts you in Unsupported, if you choose to do that. Changes you make can be wiped out by TrueNAS upgrade.
Thanks @SmallBarky , for this reason I wrote this post before proceeding, to check if this is the only way for me to get this driver.
I’d strongly suggest using a VM for this. Yes, virtualization is currently quite a hot topic on TN, so make sure to use 24.10 or wait for 25.04.2 for classic virtualization.
Also I have no Idea how IOMMU groups could be for an N200 but I think the best option is to pass the PCIe device to a where the drivers are either already present or can easily be installed.
You can install Frigate there…
If, for some reason, you really need the driver in TrueNAS, you could do something similiar to what I have done with my installation.
not recommended
My TrueNAS isn’t, strictly speaking, running in developer mode (/usr/bin/install-dev-tools) but I do use /usr/local/libexec/disable-rootfs-protection which is part of install-dev-tools and, I am very sure, still very much unsupported.
I use this to install a full fat CheckMK agent (which is not the recommended way to monitor TrueNAS but has a few advantages for me) and make some binaries available that I find useful.
The way I set this up and that has worked good for me (although again, I would not recommend it, especially to inexperienced users) is to write a script that sets up everything you need and, that’s the important part, is idempotent (-> in this case: can be run even if it has been run before without screwing anything up).
I then put this script on a pool that is not the boot pool so it is update-safe and run it as an init script under “Advanced settings”. That way the script gets executed on every boot, is update-safe and will be applied again when reinstalling TrueNAS and restoring it’s config.
Thanks @TheColin21, I’ve been quickly looking at the topic and I understand there there is a lot ongoing on it.
I’m using 25.04.1 but I’m still in the sandbox phase testing several solutions. It would not be a problem to wait for the 25.04.2 (any forcast date?) or may be also give a try to the 25.10.0 to check the performances.
In fact my doubt is about that: the machine I’m using is not so powerful, has also 12Gb of RAM only. I will have 2 virtualization levels, since Frigate exists in containers only: I shall create a VM on which run Docker to start the container. I’m afraid the result will not be satisfactory.
Considering the cost of a minipc now it could be worthy to buy another small box with N150 on which transfer Frigate that will use the NAS from remote.
About the performance: I don’t know Frigate or your NVR setup so I have no Idea how much RAM you’ll need but CPU performance shouldn’t be any worse in a VM than on bare metal. The heavy lifting will be done by the detector anyway. If you’re worried about the extra bloat that comes with a second is you could use a specialized OS just for containers (like Flatcar - I never tried it, that’s just an example).
A second system just for running Apps and/or VMs is a great idea of course and some would probably say much better than running workloads on TrueNAS directly.
I gave a try creating an Instance with the iso of Flatcar but the system crashed and does not boot anymore. ![]()
I’ll wait for the 25.04.02 and start over again.
Thanks anyway, I will tell you how this story will end.
Take a look at flatcars installation docs then (although I’m not quite sure which variant I’ follow)
I would personally probably just use an Ubuntu as I don’t think it will hinder performance much but thats just because that’s what I’m familiar with.
I don´t think that Flatcar is the issue, I’ll try to create the VM in my PC to review the procedure. I installed from ISO, but after that there should be a console somewhere where I interact with the installation process. Where it appears in Truenas UI? After I started the installation the progress bar just remained 0% forever but not anything like a console appeared, and after that the machine did not answered anymore, neither via UI nor ssh. I could just power off
Very weird, might actually be incus-related
I was wrong, by reading the documentation of Flatcar I understood that it was the most likely reason, an installation as I attempted is not possible. As far as I can see also TN does not allow using custom images, only images existing in linuxcontainers.org. I will see if 25.04.02 has any difference.
You should be able to create a custom app under app, but it uses incus so I would wait a few days for the new version of 25 to be released which will allow classic virtualization.
If you need kernel drivers for the Hailo card neither Docker-based apps nor LXCs are going to work for you. You’ll need a full fat VM and PCIe passthrough.
@TheColin21 thanks for your advice.
Frigate has an image frigate:stable-h8l that support the card, and in future may have it in the stable image. Hailo announced in April the official integration with Frigate.
The idea is to pass the PCIe device to a VM in which I will built the modules.
I found that someone already succesfully compiled the drivers in Truenas, however I decided to follow your recommendation and use a VM first.
I am confused because the truenas frigate app prior to v16 of frigate allowed one to select the hailo image (according to a PR)
i am unclear how this could have ever worked without a sysext package or running the truenas box in developer mode…
@scyto I gave a try using a VM with Docker at which passing the device, and I would build the drivers in it and launch Frigate. But it turned out that while booting the VM the whole TN crash down and I do not know how to debug it.
In fact the only option I had to make it working was to enable the developer mode,
Hi, on the server crash i may have a way to help, i also had that exact issue if the device is passed through with QEMU to a VM (this was on proxmox QEMU test)
I had to use these qemu args…
args: -device pcie-root-port,id=pcie_hailo,slot=10,bus=pcie.0,chassis=10,hotplug=off -device vfio-pci,host=c1:00.0,bus=pcie_hailo,addr=0x0
c1:00.0 was the bus address on the host of the hailo - the key is the hotplug=off this should stop the pcie asserts that crash some servers… its because when the driver loads in the VM it applies the firmware to the hailo cards and that causes it do a hotplug event, even turning off hotplug on that pcie slot in the BIOS didn’t help…
i haven’t truied this on my truenas as a)its virtualized and b)nested virtualization which is what i would have to use is a little iffy and c)i have zero idea how to add qemu args to a VM on TN?
my parents are here for next 3 weeks visiting from england, then i have cataract surgery, after that i plan to use chatgpt to guide me through making a sysext package for TN - i had tried it for custom nvidia drivers and got 65% of the way there before giving up, this is much simpler driver so i am hopeful… but may not be until Nov before i attempt this.
in another thread I got completely another solution related to the reset method of Hailo device.
The system works, but TN does not accept to have the reset method ‘null’, so I cannot use it.
sure, i tried that method first on proxmox (qemu in use is close enough the same to test), it doesn’t work because this is not a bus reset it is a hotplug event
the bus reset is not the issue (though the error messages might make one think it is) the issue is the hotplug event first
this is the sequence
VM boots > firmware is loaded on hailo8 card > hotplug event happens (pcie device completely dissapears from bus because the firmware causes it to do a power reset not a FLR)
there are some bus resets in that, but nothing one needs to do anything about as that method made no difference to me on proxmox
Can anyone make it work?
even in dev mode and build the kernels for Hailo 8?