Guide Passthrough iGPU Intel vers LXC¶
Configuration complète du passthrough du GPU Intel HD 2000 vers conteneur LXC pour transcoding Jellyfin.
Prérequis¶
Vérifications préalables :
# 1. iGPU détecté sur host
lspci | grep VGA
# 2. Devices DRM présents
ls -la /dev/dri/
# 3. Module i915 chargé
lsmod | grep i915
# 4. Groupes devices
stat -c "%g" /dev/dri/card0
stat -c "%g" /dev/dri/renderD128
Résultats attendus :
- card0 : groupe video (GID 44)
- renderD128 : groupe render (GID 104 ou 105)
Configuration Host Proxmox¶
Étape 1 : Éditer Configuration LXC¶
Backup configuration existante :
Éditer fichier config :
Ajouter les lignes suivantes :
# GPU Intel HD 2000 passthrough pour transcoding Jellyfin
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri/card0 dev/dri/card0 none bind,optional,create=file
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
Explication paramètres :
- c 226:0 : Device caractère majeur 226, mineur 0 (card0)
- c 226:128 : Device caractère majeur 226, mineur 128 (renderD128)
- rwm : Read + Write + Mknod permissions
- bind,optional,create=file : Mount bind, créer si absent, ne pas fail si manquant
Étape 2 : Appliquer Configuration¶
# Redémarrer conteneur
pct reboot 100
# OU arrêt/démarrage complet
pct stop 100
sleep 5
pct start 100
# Vérifier devices montés
pct exec 100 -- ls -la /dev/dri/
Résultat attendu :
Configuration Conteneur LXC¶
Étape 3 : Installer Drivers VA-API¶
Entrer dans conteneur :
Installer paquets nécessaires :
apt update
apt install -y \
intel-media-va-driver \
i965-va-driver \
vainfo \
mesa-utils \
mesa-va-drivers
# Optionnel : paquets additionnels
apt install -y \
intel-media-va-driver-non-free \
intel-gpu-tools
Étape 4 : Vérifier VA-API¶
Sortie attendue :
libva info: VA-API version 1.18.0
vainfo: Driver version: Intel i965 driver for Intel(R) Sandy Bridge
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
Si erreur : Voir Troubleshooting iGPU
Configuration Docker Jellyfin¶
Étape 5 : Modifier docker-compose.yml¶
Éditer fichier :
Ajouter section devices au service Jellyfin :
services:
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
user: 1000:1000
network_mode: host
environment:
- TZ=Europe/Paris
volumes:
- /opt/docker/jellyfin/config:/config
- /opt/docker/jellyfin/cache:/cache
- /mnt/storage/media:/media:ro
- /mnt/bulk/media:/media-bulk:ro
# AJOUTER CES LIGNES
devices:
- /dev/dri/renderD128:/dev/dri/renderD128
- /dev/dri/card0:/dev/dri/card0
group_add:
- "104" # GID groupe render (à vérifier)
restart: unless-stopped
Vérifier GID render correct :
Étape 6 : Redémarrer Jellyfin¶
cd /opt/docker
# Recréer conteneur avec nouvelle config
docker compose up -d --force-recreate jellyfin
# Vérifier devices montés
docker exec jellyfin ls -la /dev/dri/
Résultat attendu :
Vérifier groupes user Jellyfin :
Configuration Jellyfin WebUI¶
Étape 7 : Activer Hardware Acceleration¶
- Ouvrir Jellyfin : http://192.168.1.100:8096
- Dashboard → Playback
- Section Hardware acceleration
Paramètres recommandés :
| Paramètre | Valeur | Raison |
|---|---|---|
| Hardware acceleration | Video Acceleration API (VA-API) | Driver Intel i965 |
| VA-API Device | /dev/dri/renderD128 |
Device rendering headless |
| Enable hardware decoding | ✅ H.264, MPEG-2, VC-1 | Codecs supportés iGPU |
| Enable hardware encoding | ✅ H.264 | Codec supporté iGPU |
| Hardware encoding options | H.264: Low latency | Réduit délai |
| Allow encoding in HEVC | ❌ Désactivé | HD2000 incompatible |
| Enable Tone mapping | ❌ Désactivé | Pas OpenCL sur iGPU |
| Throttle transcodes | ✅ Activé | Éviter surcharge |
Paramètres avancés :
Encoder preset: veryfast
H.264 encoding CRF: 23
Max simultaneous transcodes: 2
Transcode throttle: 120 seconds
Validation et Tests¶
Test 1 : Détection GPU¶
Dans Jellyfin Dashboard → Playback :
- Doit afficher : "Intel i965 driver" détecté
- Device : /dev/dri/renderD128
- Supported codecs : H.264, MPEG-2, VC-1
Test 2 : Transcoding Hardware¶
Lancer lecture vidéo :
- Choisir vidéo 1080p H.264
- Forcer transcodage (limiter qualité client)
- Dashboard → Activity
- Vérifier "(hw)" après codec
Exemple Activity :
Test 3 : Monitoring Performances¶
Sur host Proxmox :
# Charge CPU (doit rester <30%)
top -bn1 | grep Cpu
# Utilisation GPU (si intel-gpu-tools installé)
intel_gpu_top
Dans LXC 100 :
# Logs transcoding
docker logs -f jellyfin | grep -E "transcode|hwaccel"
# Charge conteneur
docker stats jellyfin --no-stream
Performances attendues : - Transcoding speed : 3-4x temps réel - Charge CPU : 20-30% (vs 80-95% software) - Charge GPU : 60-80% - Latence démarrage : ~3-5 secondes
Test 4 : Multiple Streams¶
# Lancer 2-3 transcodings simultanés
# Dashboard → Activity : tous doivent indiquer (hw)
# CPU doit rester <50%
Rollback¶
En cas de problème :
# 1. Restaurer config LXC
cp /root/100.conf.backup /etc/pve/lxc/100.conf
pct reboot 100
# 2. Retirer devices Docker
cd /opt/docker
nano docker-compose.yml
# Supprimer sections devices et group_add
docker compose up -d jellyfin
# 3. Désactiver dans Jellyfin WebUI
# Dashboard → Playback → Hardware acceleration: None
Monitoring Production¶
Script vérification santé :
cat > /usr/local/bin/check-igpu << 'EOF'
#!/bin/bash
if ! pct exec 100 -- test -e /dev/dri/renderD128; then
echo "ALERT: iGPU missing in LXC 100!" >&2
exit 1
fi
if ! pct exec 100 -- docker exec jellyfin test -e /dev/dri/renderD128; then
echo "ALERT: iGPU missing in Jellyfin!" >&2
exit 1
fi
echo "OK: iGPU accessible"
EOF
chmod +x /usr/local/bin/check-igpu
# Cron (toutes les heures)
echo "0 * * * * /usr/local/bin/check-igpu || logger -t igpu 'Check failed'" | crontab -
Troubleshooting¶
Voir guide complet : Problèmes iGPU courants
Problèmes fréquents :
- Devices DRI absents dans LXC → Vérifier syntaxe config, redémarrer
- VA-API driver non trouvé → Installer tous drivers Intel
- Jellyfin ne détecte pas iGPU → Vérifier group_add, recréer conteneur
- Transcoding retombe sur CPU → Codec non supporté ou config incorrecte
- Performance dégradée → Vérifier throttling thermique, I/O disque
Ressources¶
- Jellyfin Hardware Acceleration Guide
- Proxmox LXC Container Configuration
- VA-API Documentation
- Intel i965 Driver
Durée installation : 20-30 minutes
Difficulté : Facile (4 lignes config LXC + Docker)
Dernière mise à jour : 27 janvier 2026