• 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: Tonemapping on AMD in Docker

     
    • 0 Vote(s) - 0 Average

    SOLVED: Tonemapping on AMD in Docker

    creylon
    Offline

    Junior Member

    Posts: 23
    Threads: 6
    Joined: 2023 Jul
    Reputation: 0
    Country:Germany
    #1
    2024-03-01, 10:49 AM (This post was last modified: 2024-03-06, 02:33 PM by creylon. Edited 1 time in total.)
    Hi,

    I can't get tonemapping to work on my setup. I use an AMD GPU with VA-API for transcoding inside a docker container. All of it works fine. When I enable Tonemapping, however, I cannot play any media. I followed the setup guide in the docs for docker and AMD. Installation of OpenCL ROCm is successful, however, when running the command to confirm it I get the following error:

    Code:
    Splitting the commandline.
    Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
    Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'opencl'.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option v (set logging level) with argument debug.
    Applying option init_hw_device (initialise hardware device) with argument opencl.
    [AVHWDeviceContext @ 0x55af253a3d40] 1 OpenCL platforms found.
    [AVHWDeviceContext @ 0x55af253a3d40] No devices found on platform "AMD Accelerated Parallel Processing".
    [AVHWDeviceContext @ 0x55af253a3d40] No matching devices found.
    Device creation failed: -19.
    Failed to set value 'opencl' for option 'init_hw_device': No such device
    Error parsing global options: No such device

    My setup:

    Docker Image: jellyfin/jellyfin:10.8.13-1
    FFmpeg: jellyfin-ffmpeg6 (6.0.1-3-bullseye)

    GPU:
    Code:
          description: VGA compatible controller
          product: Navi 14 [Radeon RX 5500/5500M / Pro 5500M]
          vendor: Advanced Micro Devices, Inc. [AMD/ATI]
          physical id: 0
          bus info: pci@0000:03:00.0
          version: c5
          width: 64 bits
          clock: 33MHz
          capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
          configuration: driver=amdgpu latency=0
          resources: irq:77 memory:d0000000-dfffffff memory:e0000000-e01fffff ioport:f000(size=256) memory:fcc00000-fcc7ffff memory:fcc80000-fcc9ffff

    VA-API codecs:
    Code:
    Trying display: drm
    libva info: VA-API version 1.20.0
    libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/radeonsi_drv_video.so
    libva info: Found init function __vaDriverInit_1_20
    amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
    If they do, bad things may happen!
    libva info: va_openDriver() returns 0
    vainfo: VA-API version: 1.20 (libva 2.20.0)
    vainfo: Driver version: Mesa Gallium driver 23.2.1 for AMD Radeon Graphics (renoir, LLVM 13.0.1, DRM 3.49, 6.1.63-1-lts)
    vainfo: Supported profile and entrypoints
          VAProfileMPEG2Simple            : VAEntrypointVLD
          VAProfileMPEG2Main              : VAEntrypointVLD
          VAProfileVC1Simple              : VAEntrypointVLD
          VAProfileVC1Main                : VAEntrypointVLD
          VAProfileVC1Advanced            : VAEntrypointVLD
          VAProfileH264ConstrainedBaseline: VAEntrypointVLD
          VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
          VAProfileH264Main              : VAEntrypointVLD
          VAProfileH264Main              : VAEntrypointEncSlice
          VAProfileH264High              : VAEntrypointVLD
          VAProfileH264High              : VAEntrypointEncSlice
          VAProfileHEVCMain              : VAEntrypointVLD
          VAProfileHEVCMain              : VAEntrypointEncSlice
          VAProfileHEVCMain10            : VAEntrypointVLD
          VAProfileHEVCMain10            : VAEntrypointEncSlice
          VAProfileJPEGBaseline          : VAEntrypointVLD
          VAProfileVP9Profile0            : VAEntrypointVLD
          VAProfileVP9Profile2            : VAEntrypointVLD
          VAProfileNone                  : VAEntrypointVideoProc

    Vulkan runtime status:
    Code:
    Splitting the commandline.
    Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
    Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'vulkan'.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option v (set logging level) with argument debug.
    Applying option init_hw_device (initialise hardware device) with argument vulkan.
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Supported validation layers:
    [AVHWDeviceContext @ 0x55d93e6e9dc0] VK_LAYER_MESA_device_select
    [AVHWDeviceContext @ 0x55d93e6e9dc0] VK_LAYER_MESA_overlay
    [AVHWDeviceContext @ 0x55d93e6e9dc0] GPU listing:
    [AVHWDeviceContext @ 0x55d93e6e9dc0]    0: AMD Radeon Graphics (RADV RENOIR) (integrated) (0x1638)
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Device 0 selected: AMD Radeon Graphics (RADV RENOIR) (integrated) (0x1638)
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Queue families:
    [AVHWDeviceContext @ 0x55d93e6e9dc0]    0: graphics compute transfer sparse (queues: 1)
    [AVHWDeviceContext @ 0x55d93e6e9dc0]    1: compute transfer sparse (queues: 4)
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Using device extension VK_KHR_push_descriptor
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Using device extension VK_KHR_sampler_ycbcr_conversion
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Using device extension VK_KHR_synchronization2
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Using device extension VK_KHR_external_memory_fd
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Using device extension VK_EXT_external_memory_dma_buf
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Using device extension VK_EXT_image_drm_format_modifier
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Using device extension VK_KHR_external_semaphore_fd
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Using device extension VK_EXT_external_memory_host
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Using device: AMD Radeon Graphics (RADV RENOIR)
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Alignments:
    [AVHWDeviceContext @ 0x55d93e6e9dc0]    optimalBufferCopyRowPitchAlignment: 1
    [AVHWDeviceContext @ 0x55d93e6e9dc0]    minMemoryMapAlignment:              4096
    [AVHWDeviceContext @ 0x55d93e6e9dc0]    minImportedHostPointerAlignment:    4096
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Using queue family 0 (queues: 1) for graphics
    [AVHWDeviceContext @ 0x55d93e6e9dc0] Using queue family 1 (queues: 4) for compute transfers
    Successfully parsed a group of options.
    Hyper fast Audio and Video encoder

    Thanks
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-03-01, 08:57 PM
    Can you share your docker compose file with us?
    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]
    creylon
    Offline

    Junior Member

    Posts: 23
    Threads: 6
    Joined: 2023 Jul
    Reputation: 0
    Country:Germany
    #3
    2024-03-02, 10:13 AM (This post was last modified: 2024-03-02, 10:14 AM by creylon. Edited 1 time in total.)
    I use the dedicated GPU instead of the onboard, so I map renderD129 and card1 into the container. Setting user to 1000:1000 doesn't work, server won't start due to permission errors.

    Code:
    version: '3'

    services:
      jellyfin:
        container_name: jellyfin
        image: jellyfin/jellyfin:10.8.13-1
        group_add:
          - "989" # render group
          - "986" # video group
          - "993" # input group
        dns:
          - 1.1.1.1
        volumes:
          - "./config:/config"
          - "./cache:/cache"
          - "./config.json:/jellyfin/jellyfin-web/config.json"
          - "/home/media:/media:ro"
        devices:
          # VAAPI Devices
          - /dev/dri/renderD129:/dev/dri/renderD128
          - /dev/dri/card1:/dev/dri/card0
          - /dev/kfd:/dev/kfd
        environment:
          - ROC_ENABLE_PRE_VEGA=1
        ports:
          - 8096:8096
        restart: always

    networks:
      default:
        name: main
        external: true
    nyanmisaka
    Offline

    Team Member

    Posts: 252
    Threads: 0
    Joined: 2023 Jun
    Reputation: 10
    #4
    2024-03-03, 03:02 PM
    Installing AMD OpenCL on Linux is a real hassle. I can't find a problem in the config. I also encountered the same error reported by another user not long ago. I suspect this is an AMD OpenCL issue in ROCm 6.0.

    As an alternative, you can try the Jellyfin 10.9 (unstable branch), which enables Vulkan tone-mapping and eliminates the need for these tedious steps, allowing it to be used out of the box. If there's no rush, the beta/release version should be available within the next month or two.
    jelly.fan
    Offline

    Junior Member

    Posts: 10
    Threads: 2
    Joined: 2023 Dec
    Reputation: 0
    Country:Brazil
    #5
    2024-03-03, 08:21 PM
    (2024-03-03, 03:02 PM)nyanmisaka Wrote: the beta/release version should be available within the next month or two.

    That's nice! I haven't seen a timeframe before, and I'm one of the people affected by the AMD tonemapping issue.

    Are you a Jellyfin contributor / team member? If yes, thank you so much for your work!
    nyanmisaka
    Offline

    Team Member

    Posts: 252
    Threads: 0
    Joined: 2023 Jun
    Reputation: 10
    #6
    2024-03-04, 04:04 AM
    (2024-03-03, 08:21 PM)jelly.fan Wrote:
    (2024-03-03, 03:02 PM)nyanmisaka Wrote: the beta/release version should be available within the next month or two.

    That's nice! I haven't seen a timeframe before, and I'm one of the people affected by the AMD tonemapping issue.

    Are you a Jellyfin contributor / team member? If yes, thank you so much for your work!

    Yes. See release schedule: https://github.com/jellyfin/jellyfin/dis...nt-8562171
    creylon
    Offline

    Junior Member

    Posts: 23
    Threads: 6
    Joined: 2023 Jul
    Reputation: 0
    Country:Germany
    #7
    2024-03-04, 11:55 AM
    (2024-03-03, 03:02 PM)nyanmisaka Wrote: Installing AMD OpenCL on Linux is a real hassle. I can't find a problem in the config. I also encountered the same error reported by another user not long ago. I suspect this is an AMD OpenCL issue in ROCm 6.0.

    As an alternative, you can try the Jellyfin 10.9 (unstable branch), which enables Vulkan tone-mapping and eliminates the need for these tedious steps, allowing it to be used out of the box. If there's no rush, the beta/release version should be available within the next month or two.

    Thank you for taking the time. So I switched to unstable branch, now HDR content looks good on my FireTV, however, any other player I tried I only get a black screen (browser, jellyfin media player and jellyfin on iOS). Do I have to configure anything else?
    berger0
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2024 Jan
    Reputation: 0
    Country:United States
    #8
    2024-03-07, 07:42 PM (This post was last modified: 2024-03-07, 07:42 PM by berger0.)
    Hey FYI, if you are using the Linux Server docker distributions of Jellyfin, AMD Hardware accelerated tone mapping is broken in the nightly branch. This break seems to have started with the LS55 release.

    First release I found that breaks AMD HWA tone mapping: https://github.com/linuxserver/docker-je...table-ls55
    Seems like releases before that one still have AMD HWA tone mapping in a working state.
    I went back to this release until it gets fixed again: https://github.com/linuxserver/docker-je...table-ls54
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 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