2025-03-07, 08:11 AM
(This post was last modified: 2025-03-07, 08:13 AM by kuckenberg. Edited 1 time in total.
Edit Reason: code syntax error, wasnt done
)
Hey there,
its been a while since you posted, just want to let others know I am having the same issue. Proxmox with GPU (1650 ti) passthrough into vm into jellyfin docker container.
I cant find any disconnects or errors, neither on VM level nor on Proxmox OS level, but the container at some point loses connection to that GPU.
I am solving it with a small bash script that looks at the log files in my log dir, and if there is this message it restarts the container, solving this issue for me.
I use a txt file to store the info on which logs have been scanned.
Please note that you have to initially add the existing logs to that file processedlist.txt, otherwise you get a restart for existing errors in log files (which doesnt hurt but...)
just schedule this as cron every few minutes
its been a while since you posted, just want to let others know I am having the same issue. Proxmox with GPU (1650 ti) passthrough into vm into jellyfin docker container.
I cant find any disconnects or errors, neither on VM level nor on Proxmox OS level, but the container at some point loses connection to that GPU.
I am solving it with a small bash script that looks at the log files in my log dir, and if there is this message it restarts the container, solving this issue for me.
I use a txt file to store the info on which logs have been scanned.
Code:
#!/bin/bash
# Directory containing your transcode logs
LOG_DIR="/home/user/jellyfin/config/log"
# File that records the processed log files
PROCESSED_LIST="/home/user/jellyfin/config/log/processedlist.txt"
# Docker container name
CONTAINER="jellyfin"
# Ensure the processed list file exists
touch "$PROCESSED_LIST"
# Flag to indicate if any file encountered the error
ERROR_FOUND=0
# Loop over all .log files in the directory
for logfile in "$LOG_DIR"/*.log; do
# Check if this file has already been processed
if ! grep -Fxq "$logfile" "$PROCESSED_LIST"; then
# Search for the specific error message in the file
if grep -q "CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected" "$logfile"; then
echo "Error detected in $logfile"
((ERROR_FOUND++))
fi
# Add the log file's name to the processed list to avoid rechecking in future runs
echo "$logfile" >> "$PROCESSED_LIST"
fi
done
# If any file had the error, restart the container once
if [ "$ERROR_FOUND" -gt 0 ]; then
echo "Restarting container $CONTAINER due to detected error."
docker restart "$CONTAINER"
fi
just schedule this as cron every few minutes