mirror of
https://github.com/armbian/configng.git
synced 2026-01-06 10:37:41 -08:00
fix(jellyfin): expose MPP/RGA, setup permissions, rectify purge script (#661)
* fix(hwacc): use correct flag for RKMPP detection
The prior flag `"${LINUXFAMILY}" == "rockchip64"` was returning `false` as the actual value was set to `rk35xx` (tested on ROCK 5T, Noble 25.8.1 Minimal), resulting in no access to hardware acceleration from within the container.
Wasn't affecting direct playback, but using any kind of transcoding were resulting in playback error in the Jellyfin clients, and `ffmpeg` error 187 in the container logs.
* fix(hwacc): add udev rules for RKMPP
In addition to activating the RK35XX conditional block to expose the VPU/MPP hardware, we also need to add the correct `udev` rules (to fix up the group permissions) so that the `jellyfin` container (rather, `jellyfin-ffmpeg` within the container) can access the host's HWA features (MPP and RGA).
* chore(formatting): remove stray indentation spaces, use EOT instead of EOF
* fix(purge): use correct app installation path for purging
* fix(purge): only delete the config, to avoid deleting user media by accident
* Fix EOT definitions and style - add tabs
* Drop udev rules upon app removal
---------
Co-authored-by: Igor Pecovnik <igor@armbian.com>
This commit is contained in:
@@ -24,7 +24,19 @@ function module_jellyfin () {
|
||||
|
||||
# Hardware acceleration
|
||||
unset hwacc
|
||||
if [[ "${LINUXFAMILY}" == "rockchip64" && "${BOOT_SOC}" == "rk3588" ]]; then
|
||||
if [[ "${LINUXFAMILY}" == "rk35xx" && "${BOOT_SOC}" == "rk3588" ]]; then
|
||||
# Add udev rules according to Jellyfin's recommendations for RKMPP
|
||||
cat > "/etc/udev/rules.d/50-rk3588-mpp.rules" <<- EOT
|
||||
KERNEL=="mpp_service", MODE="0660", GROUP="video"
|
||||
KERNEL=="rga", MODE="0660", GROUP="video"
|
||||
KERNEL=="system", MODE="0666", GROUP="video"
|
||||
KERNEL=="system-dma32", MODE="0666", GROUP="video"
|
||||
KERNEL=="system-uncached", MODE="0666", GROUP="video"
|
||||
KERNEL=="system-uncached-dma32", MODE="0666", GROUP="video" RUN+="/usr/bin/chmod a+rw /dev/dma_heap"
|
||||
EOT
|
||||
udevadm control --reload-rules && udevadm trigger
|
||||
|
||||
# Pack `hwacc` to expose MPP/VPU hardware to the container
|
||||
for dev in dri dma_heap mali0 rga mpp_service \
|
||||
iep mpp-service vpu_service vpu-service \
|
||||
hevc_service hevc-service rkvdec rkvenc vepu h265e ; do \
|
||||
@@ -76,10 +88,13 @@ function module_jellyfin () {
|
||||
"${commands[1]}")
|
||||
if [[ "${container}" ]]; then docker container rm -f "$container" >/dev/null; fi
|
||||
if [[ "${image}" ]]; then docker image rm "$image" >/dev/null; fi
|
||||
# Drop udev rules upon app removal
|
||||
rm -f "/etc/udev/rules.d/50-rk3588-mpp.rules"
|
||||
udevadm control --reload-rules && udevadm trigger
|
||||
;;
|
||||
"${commands[2]}")
|
||||
${module_options["module_jellyfin,feature"]} ${commands[1]}
|
||||
if [[ -n "${NAVIDROME_BASE}" && "${NAVIDROME_BASE}" != "/" ]]; then rm -rf "${NAVIDROME_BASE}"; fi
|
||||
if [[ -n "${JELLYFIN_BASE}" && "${JELLYFIN_BASE}" != "/" ]]; then rm -rf "${JELLYFIN_BASE}/config"; fi
|
||||
;;
|
||||
"${commands[3]}")
|
||||
if [[ "${container}" && "${image}" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user