07 November 2025

Jellyfin LXC iGPU passthrough

As the server my Jellyfin LXC is running on now has an iGPU, I wanted to see if I could use it to enable hardware acceleration for transcoding.


Map the video and render groups

  • Proxmox root node
    • Find the group ids for video and render
      • cat /etc/group
      • For me it was 44 and 104
    • Allow the mapping of those 2 gids
      • vi /etc/subgid
      • Add
        • root:44:1
        • root:104:1
    • Determine the name of the card and render device
      • ls -al /dev/dri
      • For example mine are
        • /dev/dri/card1
        • /dev/dri/renderD128
  • Jellyfin container
    • Note what its ID is. For my example I will use XXX
    • Find the group ids for video and render
      • cat /etc/group
      • For me it was 44 and 104 as well
    • Make sure jellyfin user is part of the video and render groups
      • groups jellyfin
  • Proxmox root node
    • Map the group ids
      • vi /etc/pve/lxc/XXX.conf
      • Add the following:
lxc.idmap: u 0 100000 65536
lxc.idmap: g 0 100000 44
lxc.idmap: g 44 44 1
lxc.idmap: g 45 100045 58
lxc.idmap: g 104 104 1
lxc.idmap: g 105 100105 65431


Device Passthrough

  • Map the device
    • Proxmox -> jellyfin -> Resources
    • Add -> Device Passthrough
      • Device: /dev/dri/card1
      • Advanced: check
      • gid: 44
      • Click "Add"
    • Add -> Device Passthrough
      • Device: /dev/dri/renderD128
      • Advanced: check
      • gid: 104
      • Click: "Add"


Finalize changes

  • Restart the Jellyfin container
  • Turn on hardware acceleration in the Jellyfin UI
    • Dashboard -> Playback -> Transcoding
    • Hardware Acceleration: "Intel Quicksync (QSV)"


Results

Unfortunately, my Haswell processor (Xeon E3-1275 v3) doesn't support Intel Quicksync (QSV) in Jellyfin. It does support Video Acceleration API (VAAPI), but the quality was horrible and doesn't completely remove the load from the processor. With this in mind, I just kept hardware acceleration to None and video transcoding disabled on the users.


Appendix

Sources




Migrating Proxmox Containers to a Different Server

 Here are the steps that I used to migrate from my Proxmox containers from my Dell r730xd to my Lenovo TS140


New (old) Server Setup


Migrate LXC containers and ZPool drives

As I was going to move my drives containing my main ZPool, I decided that the easiest way to migrate my containers was to back them up to the drives themselves. This way after moving the drives over and importing the array, I can simply restore them from the backups on the new server.


Backup Existing LXC containers

  1. Create a destination for proxmox backups on the drives to move over:
    • zfs create storage/encrypted/proxmox
    • mkdir /storage/encrypted/proxmox/backups
  2. Add this backup destination to Proxmox:
    • Datacenter -> Storage
    • Add -> Directory
    • Set "Content" to "Backups"
  3. Create backup of each LXC that you want to migrate
    • Choose the LXC
    • Click "Shutdown"
    • Select "Backup"
    • Click "Backup now"
    • Select your backup directory
    • Click "Backup"
    • Make note of any bind mount points that you will need to recreate
  4. Disable Auto-Start
    • Select "Options"
    • Select "Start at boot"
    • Click "Edit"
    • Uncheck and click "OK"
  5. Repeat 3 + 4 for each LXC that you are migrating
  6. Unmount and export the ZPool
    • zpool export storage


Recreate Users and Groups

For file permissions to transfer seamlessly, it is best to have the same users and groups on both servers

  • Old Server
    • View current users
      • cat /etc/passwd
    • View current groups
      • cat /etc/group
    • Note the user/group name as well as its ID
    • View the mapping files
      • cat /etc/subuid
      • cat /etc/subgid
  • New Server
    • For each needed group run:
      • groupadd -g <gid_number> <group_name>
    • For each needed user run:
      • useradd -u <uid_number> -g <gid_number> <username>
    • Set users primary group
      • usermod -g <primary_group> <username>
    • Add user to group(s)
      • usermod -aG <group1>,<group2> <username>
    • Update mapping files
      • vi /etc/subuid
      • vi /etc/subgid


Physical Changes

  1. Shutdown both the old and new server
  2. Move the HDDs over to the new server
  3. Turn on the new server


Restore LXC containers

  1. Import the ZPool
    • zpool import storage
  2. Add the backup destination to Proxmox
    • Datacenter -> Storage
    • Add -> Directory
  3. Restore the LXC
    1. Select the LXC backup that you want to restore
    2. Click "Restore"
    3. Edit the CT ID if desired
    4. Click "Restore"
  4. Repeat step 3 for each LXC


Results

The containers spun up without issue and I didn't have to change any client configs!


Appendix

Sources