Jump to content

Linux Hardware Transcoding - N150 - Ubuntu Server 24.10 - emby 4.8.10


Recommended Posts

Posted

Having some trouble getting Hardware Transcoding working on emby 4.8.10
from what I can glean from the logs, the emby-server is having trouble initializing /dev/dri/renderD128....but the debug logs tell another story? - I'm not sure sure.
Getting good output from VAinfo - Fresh Install of Ubuntu server 24.10
Libva, gmmlib, and intel media-driver built from source (it was the only way I could get vainfo to seem to play)
Any idea where to go from here?

embyserver.txt hardware_detection-63870974595.txt vainfo.txt

rotational467
Posted (edited)

Make sure user "emby" is a member of groups "render" and "video".

edit: with the current drivers + stable emby you might need to this too:

 

Edited by rotational467
Posted

Thanks for this.

I do have the emby user as a member of the video and render groups.
The deeper I dive, the less this looks like an emby problem and more like an issue with my hardware.
When running ffmpeg (not the emby binaries)  I'm still getting errors whether I try to debug OpenCL or qsv

 

Spoiler

ffmpeg -v debug -init_hw_device opencl
ffmpeg version 7.0.2-3ubuntu1 Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 14 (Ubuntu 14.2.0-2ubuntu1)
  configuration: --prefix=/usr --extra-version=3ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-libmfx --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'opencl'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option init_hw_device (initialise hardware device) with argument opencl.
[AVHWDeviceContext @ 0x6362e4a17280] 2 OpenCL platforms found.
[AVHWDeviceContext @ 0x6362e4a17280] 1 OpenCL devices found on platform "Intel(R) OpenCL".
[AVHWDeviceContext @ 0x6362e4a17280] 0.0: Intel(R) OpenCL / Intel(R) N150
[AVHWDeviceContext @ 0x6362e4a17280] 1 OpenCL devices found on platform "Intel(R) OpenCL Graphics".
[AVHWDeviceContext @ 0x6362e4a17280] 1.0: Intel(R) OpenCL Graphics / Intel(R) Graphics
[AVHWDeviceContext @ 0x6362e4a17280] More than one matching device found.
Device creation failed: -19.
Failed to set value 'opencl' for option 'init_hw_device': No such device
Error parsing global options: No such device

Spoiler

ffmpeg -v debug -init_hw_device qsv
ffmpeg version 7.0.2-3ubuntu1 Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 14 (Ubuntu 14.2.0-2ubuntu1)
  configuration: --prefix=/usr --extra-version=3ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-libmfx --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'qsv'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option init_hw_device (initialise hardware device) with argument qsv.
[AVHWDeviceContext @ 0x55936ded53c0] Trying to use DRM render node for device 0, with matching kernel driver (i915).
[AVHWDeviceContext @ 0x55936ded53c0] libva: VA-API version 1.23.0
[AVHWDeviceContext @ 0x55936ded53c0] libva: User requested driver 'iHD'
[AVHWDeviceContext @ 0x55936ded53c0] libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x55936ded53c0] libva: Found init function __vaDriverInit_1_22
[AVHWDeviceContext @ 0x55936ded53c0] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x55936ded53c0] Initialised VAAPI connection: version 1.23
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x41524742 -> bgra.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x41424752 -> rgba.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x58524742 -> bgr0.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x58424752 -> rgb0.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x30335241 -> unknown.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x30334241 -> unknown.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x30335258 -> x2rgb10le.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x30334258 -> unknown.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x36314752 -> unknown.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x56555941 -> unknown.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x56555958 -> vuyx.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x30303859 -> gray.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x3132564e -> unknown.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x32595559 -> yuyv422.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x30323449 -> yuv420p.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x50313134 -> yuv411p.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x48323234 -> yuv422p.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x56323234 -> yuv440p.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x50343434 -> yuv444p.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x33434d49 -> unknown.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x30313050 -> p010le.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x32313050 -> p012le.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x36313050 -> unknown.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x30313259 -> y210le.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x32313259 -> y212le.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x36313259 -> unknown.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x30313459 -> xv30le.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x32313459 -> xv36le.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x36313459 -> unknown.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x50424752 -> unknown.
[AVHWDeviceContext @ 0x55936ded53c0] Format 0x50524742 -> unknown.
[AVHWDeviceContext @ 0x55936ded53c0] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 24.4.3 ().
[AVHWDeviceContext @ 0x55936ded53c0] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x55936ded5280] Use Intel(R) oneVPL to create MFX session, API version is 2.9, the required implementation version is 1.3
[AVHWDeviceContext @ 0x55936ded5280] Error creating a MFX session: -9.
Device creation failed: -1313558101.
Failed to set value 'qsv' for option 'init_hw_device': Unknown error occurred
Error parsing global options: Unknown error occurred

Any advice for dealing with what you see above is appreciated, but at this point I'm convinced I need to take a step back and look at it a layer below emby.

Posted

You're trying to run Emby on an Intel CPU which I think isn't even officially released yet. I can't find any details about it on the Intel site. I don't know if it's been included in the Linux kernel or Media SDK so maybe @softworkz has developer access to info about this one.

 

Posted

Yeah. I'd seen those but no info from Intel itself which leads me to believe that no stable software or drivers are available yet either.

 

  • Agree 1
rotational467
Posted

I had to bang on a fresh 24.04 install for a bit to get my DG2-based card working properly and learned way more than I wanted about intel gpu drivers on Linux, so here's something to try if you want to mess with it.  That GPU (ADL-N) "should" work with the current stable 24.3.4 driver, but yeah that is a bleeding edge CPU so it's not a guarantee.  If you're not too far in, starting over with a fresh OS install couldn't hurt.  I restarted clean after first building the Intel drivers from source as well. 

Note that you need at least kernel 6.8 or 6.9 for ADL-N, and some models require setting a kernel parameter:

https://dgpu-docs.intel.com/devices/hardware-table.html 

Once you have your GPU ID'd and the OS otherwise set, follow steps for 24.10 or whichever you use:

https://dgpu-docs.intel.com/driver/client/overview.html

Also install package "intel-fw-gpu"

That should install everything needed unless you plan to build stuff from source that needs qsv/opencl support, like ffmpeg or handbrake, then you'll need some of the -dev packages from Intel's repo and the ocl-icd-opencl-dev package in addition to opencl-headers.

At this point you should be able to see qsv in ffmpeg:

ffmpeg -v debug -init_hw_device qsv

and Emby should also see it:

/opt/emby-server/bin/emby-ffmpeg -v debug -init_hw_device qsv

 If OpenCL HW Tone Mapping still doesn't work on 4.8.10.0 at this point (which was what I encountered), the info in my post above fixed that for me.

Posted

Thanks @rotational467@Q-Droidand @Neminem
I've got to take a pause on this for a minute, but when I get back to it I'll work through those suggestions and let everybody know.
The N150 has me a little confused. On one hand it's definitely being 'sold as' a new processor. But in other respects, it's just being called an n100 with a slightly higher clock rate.
But then it's identify isn't even on intel's chart yet.
What's really interesting in that others in other forums with the exact same setup as me seem to be having no problem at all getting hw_accel running with some of the same basic steps.Oh well.
Thanks again.

Posted

HI, please keep us posted. Thanks.

  • 3 weeks later...
Posted

I gave up on this. Due to whatever combination of circumstances, I could not get Hardware Transcoding working.
Eventually swapped out the N150 for an intel i5 with an otherwise identical setup and everything worked near out of the box. Oh well.
 

Thanks for all the support.

  • Thanks 1
  • 2 months later...
Posted (edited)

Ran into the same issue yesterday on my n150 running debian 12 with proxmox. Upgrading to debian 13 is not possible so I started backporting and it works now.

 

Instructions adapted from https://wiki.debian.org/SimpleBackportCreation

Add testing source to /etc/sources.list

deb-src http://deb.debian.org/debian/ testing main non-free-firmware non-free

 

Get the source of the required packages

apt source libigdgmm-dev/testing
apt source libva-dev/testing
apt source libdrm-dev/testing

Install 6.11 kernel

apt install proxmox-kernel-6.11

 

Build the packages (example for the first, build others accordingly)

Setup environment, use 4 cores

export EMAIL=<name>@<provider>
export DEB_BUILD_OPTIONS='parallel=4' 


Start building and install dependencies
They can be removed via apt autoremove after the builds are done

cd intel-gmmlib-22.7.0+ds1
sudo mk-build-deps --install --remove


Create changelog, build with fakeroot, create packages

dch --bpo
fakeroot debian/rules binary
dpkg-buildpackage --build=binary --unsigned-changes

 

Now install the packages in the parent directory (ignore the debug builds), build and install the remaining packages, reboot and you have the renderD128 device back.

❯ ls -l /dev/dri
drwxr-xr-x 2 root root         80 Mar 30 12:09 by-path
crw-rw-rw- 1 root video  226,   0 Mar 30 12:09 card0
crw-rw-rw- 1 root render 226, 128 Mar 30 12:09 renderD128

 

Edited by xkonni
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...