Unable to access OpenCL device in Jellyfin LXC container on AMD

randomuser1990

New Member
Feb 20, 2023
21
3
3
Hello,

I'm running Proxmox 7.3-6 with an AMD 5900HX CPU. I have set up a Jellyfin LXC container and added the following lines to the container's configuration file at `/etc/pve/nodes/<host>/lxc/<id>.conf`:


Code:
lxc.cgroup2.devices.allow: c 226:* 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


I'm able to do VAAPI hardware accelerated decoding/encoding in the container, but I'm unable to access the OpenCL device for tone mapping in Jellyfin.

When I run `clinfo` on the host, I can see the OpenCL device listed. Here's the output:

Code:
Number  of platforms:                             1
  Platform Profile:                              FULL_PROFILE
  Platform Version:                              OpenCL 2.1 AMD-APP (3513.0)
  Platform Name:                                 AMD Accelerated Parallel Processing
  Platform Vendor:                               Advanced Micro Devices, Inc.
  Platform Extensions:                           cl_khr_icd cl_amd_event_callback


  Platform Name:                                 AMD Accelerated Parallel Processing
Number of devices:                               1
  Device Type:                                   CL_DEVICE_TYPE_GPU
...

However, when I run `clinfo` in the Jellyfin container, I get the following output:

Code:
Number of platforms:                             1
  Platform Profile:                              FULL_PROFILE
  Platform Version:                              OpenCL 2.1 AMD-APP (3513.0)
  Platform Name:                                 AMD Accelerated Parallel Processing
  Platform Vendor:                               Advanced Micro Devices, Inc.
  Platform Extensions:                           cl_khr_icd cl_amd_event_callback


  Platform Name:                                 AMD Accelerated Parallel Processing
Number of devices:                               0

I'm not sure why the OpenCL device is not being detected in the Jellyfin container. Can anyone help me troubleshoot this issue? I've already tried adding the necessary device entries to the container's configuration file, but that didn't seem to help. Any suggestions would be greatly appreciated.

Thanks in advance!
 
I`m add to `/etc/pve/nodes/<host>/lxc/<id>.conf`:
lxc.mount.entry: /dev/kfd dev/kfd none bind,optional,create=file
lxc.cgroup.devices.allow: c 235:* rwm
And all work.
 
Can you check if rocminfo works? Doesn't work for me...
Code:
root@ollama:~# rocminfo
ROCk module is loaded
Unable to open /dev/kfd read-write: Operation not permitted
root is member of render group
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!