Hi,
First for all, sorry for my bad English and also FreeBSD knowledge.
After serverals testing using 2 machines with FreeBSD 11.2 and 12.0, I can say HW Acceleration is working on host and jail, at least based on my testing.
-
Machine 1: NUC6CAHY. FreeBSD 11.2 and 12 install from scratch working fine on host and jail using latest drm-kmod. drm-fbsd11.2-kmod for 11.2 and drm-fbsd12.0-kmod for 12.0
Also instlled latest intel libva @Cephas guidance.
-
Machine 2: My NAS. Intel 3210, 16GB, 6x2TB Raidz2.
- XigmaNAS 12.0.0.4.6412. Using 1 boot drive and 1 boot for storage working fine on host and jail. But it always problem when I put a lot off HDD and indicated same problem with @zperetz.
After trial and error, got interesting finding when I checked sysctl parameters related to dri.
xigmanas: /tmp# sysctl -a |grep hw.dri
hw.dri.timestamp_precision: 20
hw.dri.vblank_offdelay: 5000
hw.dri.debug: 1
hw.dri.0.modesetting: 1
hw.dri.0.busid: pci:0000:00:02.0
hw.dri.0.vblank:
hw.dri.0.bufs:
hw.dri.0.clients:
hw.dri.0.vm:
hw.dri.0.name: i915 0x182
I don’t know how I called above 0x182 address, port address or something? maybe anyone here can explainded about this name.
If that port address above 0x180, VAAPI not working. I have to make it 0x17f or below for VAAPI working. I think this is assigned port address automatically from OS for devices on startup. When we load i915kms ( earlier or later ) will be affected to this port address.
When using minimal setup only using 2 HDDs and few numbers of partitions, that address will be got low number. But when I put a lot off HDDs and of course also lot of Partition, will got higher than 0x180
I tried to load i915kms earlier on loader.conf. All modules loaded but it’s not working. but when i915kms load on rc.conf or preinit command script, it was too late and got address above 0x180
i915kms loading also need drm.ko, debugfs.ko and linuxkpi_gplv2.ko. The trick is load drm.ko on loader.conf and load i915kms on rc.conf or preinit command script. Address will reserved when drm.ko loaded before i915kms loaded on rc.conf
This trick works for me. I got low address and VAAPI working fine for vainfo excecution and also plex HW transcoding.
xigmanas: /tmp# sysctl -a |grep hw.dri
hw.dri.timestamp_precision: 20
hw.dri.vblank_offdelay: 5000
hw.dri.debug: 0
hw.dri.0.modesetting: 1
hw.dri.0.busid: pci:0000:00:02.0
hw.dri.0.vblank:
hw.dri.0.bufs:
hw.dri.0.clients:
hw.dri.0.vm:
hw.dri.0.name: i915 0x71
PS. Xigmanas 12 will blacklisted module for drm and i915kms. So, I have to manually unset parameter when every boot.
- Freenas 11.2. Using 6x2TB Raidz2 and 2 additional HDDs it still fine using above trick. But, in Freenas still got high number even below 0x180
root@dodol02:/ # sysctl -a |grep hw.dri
hw.dri.timestamp_precision: 20
hw.dri.vblank_offdelay: 5000
hw.dri.debug: 0
hw.dri.0.modesetting: 1
hw.dri.0.busid: pci:0000:00:02.0
hw.dri.0.vblank:
hw.dri.0.bufs:
hw.dri.0.clients:
hw.dri.0.vm:
hw.dri.0.name: i915 0x172
vainfo test working, ffmpeg test working but plex not working. I got message GPU hang and resetted when debbug on drm. So, final workaound is override file kernel modules related to i915kms on /boot/modules using latest gpu-firmware-kmod.
all of i915*, drm.ko, debugfs.ko and linuxkpi_gplv2.ko.
Finally it working on plex, at least for me.
So, resume for me:
- Follow @Cephas guidance for using latest package for 11.2 or 12.0 and also devfs guidance for jail
- Make sure port address on sysctl parameters.
Thanks