this post was submitted on 21 Sep 2024
45 points (95.9% liked)

Selfhosted

60758 readers
173 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

Having a bit of trouble getting hardware acceleration working on my home server. The cpu of the server is an i7-10700 and has a discrete GPU, RTX 2060. I was hoping to use intel quick sync for the hardware acceleration, but not having much luck.

From the guide on the jellyfin site https://jellyfin.org/docs/general/administration/hardware-acceleration/intel

I have gotten the render group ID using "getent group render | cut -d: -f3" though it mentions on some systems it might not be render, it may be video or input which i tried with those group ID's as well.

When I run "docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo" I get back

libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/nvidia_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Trying to open /usr/lib/dri/nvidia_drv_video.so
libva info: Trying to open /usr/local/lib/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

I feel like I need to do something on the host system since its trying to use the discrete card? But I am unsure.

This is the compose file just in case I am missing something

version: "3.8"
services:
  jellyfin:
    image: jellyfin/jellyfin
    user: 1000:1000
    ports:
      - 8096:8096
    group_add:
      - "989" # Change this to match your "render" host group id and remove this comment
      - "985"
      - "994"
    # network_mode: 'host'
    volumes:
      - /home/hoxbug/Docker/jellyfin/config:/config
      - /home/hoxbug/Docker/jellyfin/cache:/cache
      - /mnt/External/Movies:/Movies
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
networks:
  external:
    external: true

Thank you for the help.

top 17 comments
sorted by: hot top controversial new old
[–] sk@hub.utsukta.org 14 points 2 years ago

On my system i was able to use my integrated iGPU wit the follwing:

    devices:     - /dev/dri:/dev/dri

The rest of your compose looks fine.

[–] sneezycat@sopuli.xyz 9 points 2 years ago (1 children)

Isn't your GPU an Nvidia RTX 2060? Why are you trying to use the Intel GPU acceleration method? I'm confused

[–] hoxbug@lemmy.world 2 points 2 years ago (1 children)

It just seemed the easiest route, but I may just give using the GPU a go.

[–] __ghost__@lemmy.ml 2 points 2 years ago (1 children)

From personal experience intel QSV wasn't worth the trouble to txshoot on my hardware. Mine is a lot older than yours though. Vaapi has worked well on my arc card

[–] entropicdrift@lemmy.sdf.org 8 points 2 years ago

QSV is the highest quality video transcoding hardware acceleration out there. It's worth using if you have a modern Intel CPU (8th gen or newer)

[–] bobslaede@feddit.dk 5 points 2 years ago (1 children)

This is how mine works, with a Nvidia GPU

services:
  jellyfin:
    volumes:
      - jellyfin_config:/config
      - jellyfin_cache:/cache
      - type: tmpfs
        target: /cache/transcodes
        tmpfs:
          size: 8G
      - media:/media
    image: jellyfin/jellyfin:latest
    restart: unless-stopped
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              device_ids:
                - "0"
              capabilities:
                - gpu
[–] notfromhere@lemmy.ml 3 points 2 years ago (1 children)
[–] bobslaede@feddit.dk 8 points 2 years ago (1 children)

Temp files for transcoding. No need to hit the disk.

[–] __ghost__@lemmy.ml 4 points 2 years ago (3 children)
[–] baduhai@sopuli.xyz 3 points 2 years ago
[–] 486@lemmy.world 2 points 2 years ago (1 children)

It is. It might end up on disk in swap, if you run low on memory (and have some sort of disk-based swap enabled), but usually it is located in RAM.

[–] __ghost__@lemmy.ml 1 points 2 years ago* (last edited 2 years ago) (1 children)

You can create a tmpfs on other storage devices as well, just curious what their setup looked like

[–] 486@lemmy.world 1 points 2 years ago* (last edited 2 years ago)

No, tmpfs is always located in virtual memory. Have a look at the kernel documentation for more information about tmpfs.

[–] bobslaede@feddit.dk 1 points 2 years ago

Hmm. I would think so. But I haven't actually checked. That was my thought.

[–] JustEnoughDucks@feddit.nl 1 points 2 years ago

Do you have the Intel drivers installed on your machine? Are GuC and HuC working?

sudo reboot
sudo dmesg | grep i915
sudo cat /sys/kernel/debug/dri/0/gt/uc/guc_info
sudo cat /sys/kernel/debug/dri/0/gt/uc/huc_info

On Debian I had to manually download the i915 full driver Zip, extract it, take out the Intel drivers, and put it in /usr/lib/firmware

Then hardware acceleration worked on my Arc380.

If you use QSV, your CPU iGPU will be the one that can use it, so make sure to set your render device in docker to the iGPU and not the RTX 2060

[–] HumanPerson@sh.itjust.works 1 points 2 years ago* (last edited 2 years ago)

I have an arc for transcoding, and I had to set the device to /dev/dri without the renderD128 part. If I were you, I would just use the 2060. If it's there for llama or something I'd still try it and see how it does doing both at once, as it should be separate parts of the gpu handling that.

[–] entropicdrift@lemmy.sdf.org 1 points 2 years ago* (last edited 2 years ago)

If you switch the devices line to

- /dev/dri:/dev/dri

as other have suggested, that should expose the Intel iGPU to your Jellyfin docker container. Presently you're only exposing the Nvidia GPU.