• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting SOLVED: Setting uid & gid of my user with official docker image breaks Jellyfin

     
    • 0 Vote(s) - 0 Average

    SOLVED: Setting uid & gid of my user with official docker image breaks Jellyfin

    Garret
    Offline

    Junior Member

    Posts: 4
    Threads: 1
    Joined: 2024 Jul
    Reputation: 0
    #1
    2024-07-10, 05:59 PM (This post was last modified: 2024-07-11, 09:24 AM by Garret. Edited 1 time in total.)
    I have been running for several years Jellyfin via a docker container from the linuxserver image on a Raspberry Pi 4. Recently I switched to an Intel N100 machine and installed NixOS. I wanted to take full advantage of the QuickSync hardware acceleration offered by the N100 platform but found out that the linuxserver image did not contain all the necessary drivers. After trying the official container image, hardware acceleration seems to work to its full potential (even though I have to dig more in all the settings...).

    I only have one issue: with the linuxserver container, I could set uid & gid through docker environment variables. Everything worked. I could see I could do the same with the official image by adding user: uid:gid in the docker-compose. When I do that, Jellyfin starts but it is a bit half-broken: not all preview pictures load, some settings are not saved when clicking "save" (sometimes an error message appears) and playback does not start when transcoding is needed. All the issues disappear when I comment user: uid:gid, thus the container runs as root.

    Before running the container, I made sure to chown all the Jellyfin folders with the uid & gid belonging to my user. My user belongs to the group wheel and users(this is the one I used as gid), but I also added it to the groups video and render. After restarting the container, the issues are still there.

    Do you know how could I achieve to run the Jellyfin official docker container with the uid & gid of my user? I have plenty of other containers (mostly from linuxserver) and they all run fine by setting the uid & gid of my user.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-07-10, 06:19 PM (This post was last modified: 2024-07-10, 06:20 PM by TheDreadPirate. Edited 1 time in total.)
    Did you remember to add the "group_add" variable and pass in the render group ID?

    My docker compose for reference.

    Code:
    jellyfin-testing:
        image: jellyfin/jellyfin:10.9.7
        container_name: jellyfin-testing
        user: 105:104
        group_add:
          - "993" # Intel render group
        networks:
          blackmoon:
            ipv4_address: 172.16.100.2
        expose:
          - 8096
        volumes:
          - ./jellyfin-stable-data/config:/config
          - ./jellyfin-stable-data/cache:/cache
          - /media/library:/media/library:ro
          - /media/storage2:/media/storage2:ro
        devices:
          - /dev/dri/renderD128:/dev/dri/renderD128
        restart: 'unless-stopped'

    I also have Jellyfin installed directly on Ubuntu and I piggy back on the UID/GID it generates for all my jellyfin test containers. But the important part is "group_add" for your problem.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    Garret
    Offline

    Junior Member

    Posts: 4
    Threads: 1
    Joined: 2024 Jul
    Reputation: 0
    #3
    2024-07-10, 06:44 PM
    I tried by still get Jellyfin working weirdly (and for example playing a video where transcoding is needed in ending soon because of an error playback). Just to be more clear, this is what I did. I stopped the container and run:

    Code:
    sudo chown -R garret:users /home/garret/docker/apps/jellyfin

    My user and groups (at the moment I have removed video and render but added them in the docker compose, see more below):

    Code:
    garret@server ~> groups
    users wheel docker

    This is the status of my /dev/dri and the gid of video and render:

    Code:
    garret@server ~> ls -l /dev/dri
    total 0
    drwxr-xr-x 2 root root        80 Jul 10 17:37 by-path
    crw-rw---- 1 root video  226,  0 Jul 10 17:37 card0
    crw-rw-rw- 1 root render 226, 128 Jul 10 17:37 renderD128
    garret@server ~> getent group video | cut -d: -f3
    26
    garret@server ~> getent group render | cut -d: -f3
    303

    And this is the docker-compose:

    Code:
    version: '3'
    services:
        jellyfin:
            container_name: jellyfin
            image: jellyfin/jellyfin
            restart: unless-stopped
            user: ${PUID}:${PGID}
            environment:
              - TZ=${TIMEZONE}
            volumes:
              - ${CONFIG_FOLDER}/jellyfin:/config
              - ${CONFIG_FOLDER}/temp/jellyfin:/cache
              - ${LIBRARY_FOLDER}/series:/series
              - ${LIBRARY_FOLDER}/shows:/shows
              - ${LIBRARY_FOLDER}/movies:/movies
            group_add:
              - 26  # Video group
              - 303 # Render group
            devices:
              - /dev/dri:/dev/dri
            ports:
              - 8096:8096
              - 7359:7359/udp # Optional - Allows clients to discover Jellyfin on the local network.

    I think it is kind of a permission issues since running as root everything works fine.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-07-10, 07:13 PM
    Can you share your full jellyfin log via pastebin?

    Also, when you migrated from the LSIO image to the official image, you started from scratch, right? The LSIO image locates key files in different paths which causes /config directories from LSIO instances to NOT be interchangable with official instances.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    Garret
    Offline

    Junior Member

    Posts: 4
    Threads: 1
    Joined: 2024 Jul
    Reputation: 0
    #5
    2024-07-11, 09:24 AM
    Yes, I had started from scratch with the official Jellyfin docker container.

    I think I may have found the culprit. As I thought, it was a permission issues. I had restored the uid & gid for the config folder after running the container as root but forgot to do the same for the cache folder. That is why some preview pictures could not be open and transcoding could not start. Now it seems fine.

    Do you know how can I be sure I am using hardware acceleration (QuickSync in my case) to its full potential? I can see that when Jellyfin is transcoding on the fly and I run "sudo intel_gpu_top" the video activity goes to almost 100%.

    [Image: 3C3cVoz.png]

    This is how I setup the initial part of the "Playback" settings:

    [Image: 4vLkLpp.png]
    Efficient_Good_5784
    Offline

    Community Moderator

    Posts: 1,167
    Threads: 3
    Joined: 2023 Jun
    Reputation: 50
    #6
    2024-07-11, 10:19 AM
    From your screenshot, disable VP8 decoding. The N100 CPU doesn't support it.

    Also, it's a low-level CPU. That level for video usage of the iGPU seems normal.
    Garret
    Offline

    Junior Member

    Posts: 4
    Threads: 1
    Joined: 2024 Jul
    Reputation: 0
    #7
    2024-07-11, 10:56 AM
    Thank you! I disabled VP8 decoding. I will share the rest of the Playback section. May I kindly ask for an optimal configuration for an N100 hardware? In particular, I have an Asrock N100DC-ITX and a Noctua fan spinning on it.

    I have heard that opencl/tone mapping could also need some proper configuration but I am less than zero in knowing that topic. The same for hardware encoding. Is it wise to enable H265 encoding or should I leave the default H264?

    Let me know it if I am going too far off topic and it is better to open a new topic instead.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #8
    2024-07-11, 03:42 PM
    You should be able to get at least one tone mapped stream from your N100. Keep in mind that tone mapping only happens when you play HDR content on a client that doesn't support HDR (or the specific kind of HDR) and the server then converts it to SDR. Since you are using the official image all you have to do is check the VPP tone mapping and tone mapping check boxes. Nothing else is required.

    H265 encoding is definitely not a problem on the N100. Definitely enable encoding for that codec.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    1
    « Next Oldest | Next Newest »

    Users browsing this thread: 2 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode