Skip to content

[BUG] Broken Intel iHD driver (with fix) #267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
sirjeannot opened this issue Mar 30, 2025 · 8 comments
Closed
1 task done

[BUG] Broken Intel iHD driver (with fix) #267

sirjeannot opened this issue Mar 30, 2025 · 8 comments

Comments

@sirjeannot
Copy link

sirjeannot commented Mar 30, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When using tvheadend (passthrough, no transcoding), the video playback stutters anytime any other application uses vaapi. In my case, frigate or jellyfin. This issue appeared when moving from an Intel J4105 (i915 driver) to an N97 (iHD driver) machine.
What was done :

  • Updated Intel driver
  • Added options i915 enable_guc=3 in /etc/modprobe.d/i915.conf (with update-initramfs -u afterwards)
  • Lowered the load on Frigate: lowered resolution
  • Checked load with intel_gpu_top: always below 5%
  • Increased memory allocation of iGPU in BIOS (aperture size, DVMT Pre-Allocation, ...) to the max for all settings
  • Checked the gpu load : see below.

Image

🪠Fix found🪠
This issue is the same as #186 opened by @psycmos
The iHD driver added in 2021 has apparently not been updated since.
11.05.21: - Added Intel iHD driver support.
Using the host driver resolves the issue:

  volumes:
    - /usr/lib/x86_64-linux-gnu/dri:/usr/lib/dri

The location may be different depending on the distribution used.
Big thanks to @psycmos for hinting the way out of this issue. It didn't make any sense a much newer cpu performs worse than an old one, while not being loaded at all. The upside is, I went into the rabbit hole of vaapi and transcoding.

Expected Behavior

The playback is expected to be stutterless, with or without trancoding.
No Continuity counter error should show up.

Steps To Reproduce

  1. install openmediavautl + docker + compose extension
  2. install intel drivers on host : apt install intel-media-va-driver-non-free intel-gpu-tools
  3. check vainfo recognized the extensions
  4. run any other load, for instance ffmpeg with vaapi : -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi
  5. experience the suttering. either the video hangs, has blocks or parts of the screen in green (data missing): docker logs -f tvheadend

Environment

- OS: Debian/OpenMediaVault
- How docker service was installed: Openmediavault docker compose using compose addon
- CPU/iGPU: Intel N97
- Driver: deb package intel-media-va-driver-non-free
- Kernel: 6.12.12+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.12-1~bpo12+1 (2025-02-23) x86_64 GNU/Linux

CPU architecture

x86-64

Docker creation

services:
    tvheadend:
        container_name: tvheadend
        environment:
            - PUID=1000
            - PGID=1000
            - TZ=Europe/Paris
        ports:
            - 9981:9981
            - 9982:9982
        volumes:
            - /srv/docker/tvheadend/data:/config
            - /srv/nas/video/recordings:/recordings
        devices:
            - /dev/dri:/dev/dri
            - /dev/dvb:/dev/dvb
        restart: unless-stopped
        healthcheck:
            disable: true
        image: linuxserver/tvheadend

Container logs

2025-03-30 11:25:10.516 [WARNING] TS: TNT/522MHz/M6: EAC3 @ #131 Continuity counter error (total 8)
2025-03-30 11:25:10.722 [WARNING] TS: TNT/522MHz/M6: EAC3 @ #132 Continuity counter error (total 13)
2025-03-30 11:26:10.239 [WARNING] TS: TNT/522MHz/M6: H264 @ #120 Continuity counter error (total 70)
2025-03-30 11:26:10.239 [WARNING] TS: TNT/522MHz/M6: EAC3 @ #131 Continuity counter error (total 11)
2025-03-30 11:26:10.470 [WARNING] TS: TNT/522MHz/M6: EAC3 @ #132 Continuity counter error (total 17)
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@sirjeannot
Copy link
Author

Is anyone looking at issues posted in this repository?

@j0nnymoe
Copy link
Member

j0nnymoe commented Apr 7, 2025

We do monitor the issues though it's worth remembering we have 100+ repo's to keep an eye on.
I don't think anyone with the team any longer use tvheadend much (I personally used to use it pretty heavily but that stopped a few years back). It's one of those containers that needs to be reviewed and have some time dedicated to it.

If you're willing to submit a PR to fix the issue, that would definitely help.

@aptalca
Copy link
Member

aptalca commented Apr 7, 2025

The iHD driver added in 2021 has apparently not been updated since.

We didn't add a static library. We added a repo package that gets updated in the alpine repos.

If you're saying the driver is faulty/buggy, you can report it to alpine.

@sirjeannot
Copy link
Author

sirjeannot commented Apr 12, 2025

Hello,

thank you for your replies.
The update of the drivers is also bound to #263
But mostly, unless strictly necessary, a docker image should not have device drivers, for many reasons including this one.

Then this issue is about :

Thank you for taking the time.
Also tvheadend is still largely used, being individuals or professionals such a Telecom service providers.

@aptalca
Copy link
Member

aptalca commented Apr 12, 2025

You're not supposed to map host drivers into a container, not unless you run the same OS on both. That is a very bad idea.

@sirjeannot
Copy link
Author

I'm not the one to convince here :)
Anyways, the arcane of path from the base image to the final container is more complex than it appears as the case was closed, stating there is no such driver in the base image.
I will not look into it any further as it's on no ones plate.

@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Apr 15, 2025
@Roxedus
Copy link
Member

Roxedus commented Apr 15, 2025

The driver gets installed in this repo, here. https://github.com/linuxserver/docker-tvheadend/blob/master/Dockerfile#L180-L181
It is not installed in the baseimage.

The Alpine Linux aports repo is https://gitlab.alpinelinux.org/alpine/aports

  • We do not have the incompatible hardware, and therefore cannot do the triaging for the driver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

4 participants