Please tell me how to find and install the correct Graphics Driver for this system

Hi.

Can someone please tell me how to find and install the correct Graphics Driver for this system?

Ubuntu Version:
Ubuntu 24.04.2 LTS

Desktop Environment (if applicable): ubuntu:GNOME

Problem Description:
I don’t know how to find and install the correct Graphics Driver for my specific hardware so e.g. video processing can use Hardware Encoding.

Relevant System Information:
Ref 1:
[ https://community.intel.com/t5/Graphics/OBS-Studio-on-Ubuntu-24-04-doesn-t-offer-Intel-Encoding-on-Core/m-p/1672537 ]

Ref 2:
[ https://dgpu-docs.intel.com/devices/hardware-table.html ]

In Ref 1, VonM_Intel [ @VonM_Intel ] says, “… the Intel Core i3-N3550 features an integrated Intel HD Graphics GPU that supports Intel Quick Sync for hardware video encoding.” I don’t know whether that name, Intel Quick Sync, is unique or otherwise useful, or if it only applies in the Windows ecosystem, or what. Can someone please clear up this doubt?

I ran lscpi and got this info:

james@NUC14Ess:~$ sudo lspci -nn | grep -Ei ‘VGA|DISPLAY’
[sudo] password for james:
00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-N [Intel Graphics] [8086:46d3]
james@NUC14Ess:~$

… and, following further instructions from Intel Support Community, I found the PCI device ID is 46d3 and I find it in the table on the WWW page at Ref 2. The 6.9 under Kernel is the minimum kernel version, and 32 is the quantity of Execution Units in the Graphics hardware:

PCI IDs           Name         Architecture      Codename      Kernel     EU number
  46D3     Intel® Graphics       Xe             Alder Lake-N     6.9             32

What I’ve Tried:
I tried to get the actual Graphics Driver name and installation instructions, or any relevant help, from Intel, and I got only a couple interesting tidbits, which I have quoted here. If you want to spend a lot of time, you can read the whole sad story at Ref 1, and here is the final reply I got: “… get the Graphics Driver from your Linux distro provider”.

Thanks for any help.

Jim

What does this show? Does it show the i915 or the xe driver? Very new have xe2 and xe3 will soon be released. The i915 has been the standard Intel driver forever.

lspci -k | grep -EA3 'VGA|3D|Display'

Upstreamed for Linux 6.8 is the experimental Xe kernel graphics driver that is a modern replacement to the “i915” Direct Rendering Manager driver. The Xe kernel driver targets Tigerlake graphics and newer while it won’t be until Lunar Lake / Xe2 when it aims to become the default driver for Intel iGPU/dGPU graphics.
https://www.phoronix.com/news/Intel-Xe-DRM-Linux-6.9-Pull

Thanks, Fred.

I won’t be able to answer your question, “What does this show?”, until maybe this weekend or even later, because I will not be at the location of the subject system. I will run that command and send the results ASAP.

Meanwhile, please tell me:

  • If I have the i915 driver, does it support Hardware Video Encoding?
  • Is it possible that the standard install of Ubuntu Desktop 24.04.2 LTS did not install any Graphics drivers for my hardware such that e.g. video processing can use Hardware Encoding?

(To save time and more posting of “interim results” and questions and replies) In case I discover that in fact I have no such driver, please tell me how to obtain and install the i915 driver or the Xe driver (whichever you recommend), and I will try that too, and report those results also.

Thanks again!

Jim

Do not know about video encoding.
Intel video is normally automatically installed.

My 2017 Skylake system has this with Kubuntu 24.04.2:
Kernel: 6.11.0-19-generic
Intel Corporation HD Graphics 530 (rev 06)
Kernel driver in use: i915

My Dell with Intel 11th Gen has this:
Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Dell
driver: i915 v: kernel bus-ID: 0000:00:02.0

I now do not install video cards as I do not game, nor do work with video. So Intel default video & driver is all I need. I have not attempted to experiment with the Xe driver on my Dell. But with Dell I now use external SSD for Kubuntu and want compatiblity with both my systems.

Thanks again, Fred.

I don’t understand the significance of most of your last post.

Anyway, I’m continuing on the path we were on, following your previous post.

I just got back home and did this:

james@NUC14Ess:~$ sudo lspci -k | grep -EA3 ‘VGA|3D|Display’
[sudo] password for james:
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-N [Intel Graphics]
DeviceName: Onboard - Video
Subsystem: ASUSTeK Computer Inc. Device 88e8
Kernel driver in use: i915
james@NUC14Ess:~$

Can I install the Xe driver without fear of breaking my Desktop/Display so that I can’t use it? I would be severely hampered if I had to try to switch to only the CLI.

If yes, please tell me how, and in that case, I think I understand that I will also need to disable the i915 driver (and maybe first enable the Xe driver) etc., and I am a newbie at this sort of thing on Linux, so I will need some explicit step-by-step instructions. Or someone can refer me to Ubuntu Help, or any article on the WWW, where I can learn in general how to find, install, enable, and disable (if necessary) drivers. I have tried a few ways, following the standard/obvious methods and Ubuntu-related links, and found only incredibly ancient pages and nothing that seems to me to be useful for this problem.

Thanks again for help.

Jim

this might help …
https://www.intel.com/content/www/us/en/architecture-and-technology/quick-sync-video/quick-sync-video-installation.html

as I don’t usually have intel processors newer than 6th gen so I’m not sure if it will assist the OP

Here’s a WWW page with a lot of very relevant posts. It seems that the i915 driver doesn’t actually do hardware-accelerated video encoding on Xe architecture or Alder Lake CPUs, even though various diagnostic reports seem to indicate that it does (or something like that; all of this is way over my head):

[ https://forums.debian.net/viewtopic.php?t=154438 ]

IHTH

Jim

@sgt-mike , thanks for trying to help.

I actually found that page several days ago, and it adds to my belief that the problem is that my driver (which I now know is i915, but I didn’t then) does not properly support hardware/accelerated video encoding on my Xe architecture. However, I am nowhere near enough of a Linux tech to attempt the activities that page describes. I would rather delay my project, which really requires hardware encoding, and wait until an easier solution comes along; I’m hoping that simply upgrading to Ubuntu 25.04 will include support for hardware/accelerated video encoding on my Xe architecture. Besides, ASUS only promises support of my computer on one flavor of Linux, Ubuntu 24.04 LTS (and I hope they will still accept a trouble ticket when I’m on 25.04), but they almost certainly won’t if I build something from source.

Does this make sense to you, or do you think I am misunderstanding something and/or coming to inappropriate conclusions?

makes perfect sense to me …

I do not understand what your are using that needs hardware encoding. Just about every newer system just works.

More info on the va-api that implements various types of hardware encoding.
https://wiki.archlinux.org/title/Hardware_video_acceleration

Does this show the encoding you are looking for?
vainfo

I am gathering more info from my target system, and from help I am finding on the WWW, and I will provide more details if/when I find something that probably will help this discussion/thread, but for now I hope this will be sufficient:

I have started a project to demonstrate the feasibility of using FFmpeg on a “mini PC” for real-time video processing (including transcoding) from e.g. a webcam. I chose the ASUS NUC-14 Essential with the best available CPU, the Intel Core i3-N3550 (please don’t waste everyone’s time discussing choosing something else), and I added top-end RAM 16GB and a fast NVMe 1TB SSD, and I installed Ubuntu 24.04.x LTS (starting with .1 and now at .2), which is the only non-Windows OS ASUS supports on this device. I have spent a lot of time interacting with ASUS and Intel and as a result I am convinced this system is more than adequate, if only it is configured to use Hardware Accelerated Encoding, which the CPU is very capable of, using Intel Intel Quick Sync, and the correct Graphics Driver.

Thus I asked my original question, “Can someone please tell me how to find and install the correct Graphics Driver for this system?”.

Through much research on the WWW and various interactions with persons trying to help (and I appreciate the education I have received in the process), it seems clear that the i915 driver is not the correct driver, because FFmpeg is apparently not using Hardware Accelerated Encoding, and as a result the CPU load is unacceptably high, so that there are not enough CPU resources left available to complete the other tasks that will be included in my project.

Following the suggestion by @oldfred , I did this:

james@NUC14Ess:~/Downloads$ sudo vainfo
Trying display: wayland
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Trying display: x11
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
james@NUC14Ess:~/Downloads$

I am now trying to learn how to determine for sure that the i915 driver is not compatible with the Xe architecture for Hardware Accelerated Encoding, and (hopefully) that a different driver will fix this.

Here is some output from a preliminary FFmpeg command, without attempting transcoding. FFmpeg is clearly using libx264 for encoding, which is a software encoder, so I think this means it is not using Hardware Accelerated Encoding; correct?

Output #0, mp4, to ‘webcam.mp4’:
Metadata:
encoder : Lavf60.16.100
Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv422p(tv, progressive), 640x480, q=2-31, 30 fps, 15360 tbn
Metadata:
encoder : Lavc60.31.102 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc60.31.102 aac

If this is not sufficient info, please tell me what else I can do, or please just tell me how to install the Xe driver, if that can be done in a way that will not “break my system”.

Again, thanks for help.

Jim

that driver lives in the intel-media-va-driver-non-free package …

My laptop with Xe

fred@m2-noble:~$ lspci -k | grep -EA3 'VGA|3D|Display'
0000:00:02.0 VGA compatible controller: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] (rev 03)
        Subsystem: Dell TigerLake-LP GT2 [Iris Xe Graphics]
        Kernel driver in use: i915
        Kernel modules: i915, xe
fred@m2-noble:~$ kinfo
Operating System: Kubuntu 24.04
KDE Plasma Version: 5.27.12
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13
Kernel Version: 6.11.0-17-generic (64-bit)
Graphics Platform: offscreen
Processors: 8 × 11th Gen Intel® Core™ i5-11320H @ 3.20GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics

I have not done anything special, just installed & updated defaults.
and vainfo gives a huge list of drivers

A bit over a year ago the tests showed experimantal Xe driver slower than standard i915 driver.
https://www.phoronix.com/review/intel-xe-benchmark
An update
https://www.phoronix.com/news/Intel-Xe-More-Last-Minute-6.11

Thanks again to all who are trying to help. I hope you don’t think I’m being crabby; I just want to simplify at this point, so I’m going to ask my two remaining questions simply and clearly:

  1. Can anyone tell me if my perception is correct, that FFmpeg is in fact not using any hardware acceleration?

  2. Can anyone tell me how to find and install the Xe driver for Ubuntu 24.04.x, without breaking my GUI desktop? (Note, I have no idea how to find or install any driver in Linux.)

Regards to All,

Jim

No, it is not, ffmpeg will use whatever you tell it to (it has a gazillion of command line options and switches)… By default it will en- and decode in software, if you tell it to use libva and libva has a hardware accelerated driver to use it will use that…

I told you above, just install the package I pointed to above to get the closed source libva driver onto your system (it will in that course uninstall the open source version of that package)… Note that rendering your GUI is completely distinct from en- and decoding video streams and one should not affect the other at all, so whatever you do with the libva side of things will not influence your OpenGL capabilities (or break your GUI)

Thanks , Oliver.

I really appreciate you trying so hard to help me, but I don’t think you understand how abysmally ignorant/unskilled I am. When I said I don’t know how to install that driver, I literally meant I don’t know how to tell my system to do so. At this point, The only thing I could even try is something like

sudo apt install iHD_drv_video.so

… which I will try this evening when I get back next to the target system, and I will report results.

I will check this forum before I do that, in case someone says, “NO, NO, you idiot, Jim! You will be UNABLE TO USE YOUR SYSTEM if you do that!”"

I will also try to learn more about an appropriate command to ffmpeg so that it will actually try to use hardware encoding (and I hope it will report whether it met success or failure), and I will try such commands and report those results also.

Thanks again to everyone for help, and especially to Oliver for giving me the courage to try this, believing that it will not break my system :grin: .

Jim

That’s not what he said to do. You need this:

sudo apt install intel-mesa-va-driver-non-free

You can’t simply “apt install” a missing file.

2 Likes

Regarding ffmpeg command options to use hardware encoding:

I will try to learn how to do that, but at this point I know nothing about it, except I have found multiple WWW pages claiming to be the “complete guide” to ffmpeg, including the one that I think really is:

[ https://ffmpeg.org/ffmpeg.html ]

If someone has time, and could easily send the ffmpeg command option(s) to use the libva driver and/or Hardware Acceleration, I would appreciate it.

Thanks!

Jim

@eeickmeyer,

Thanks very much for that clarification. I’m glad you understand that, to a self-proclaimed newbie, such as I am, and as I have tried to make clear that I am, explicit, unambiguous CLI code/commands/text is much more helpful than saying “install [this]”.

And, is it

sudo apt install intel-mesa-va-driver-non-free

or as @ogra said,

sudo apt install intel-media- va-driver-non-free

?

:grin:

Oh, absolutely. Hence I provided the clarification. :grin: