Playback Error and Tuner Service hang when changing to new channel in Live TV & DVR (tuner Segmentation Violation)

Wow – This is crasy, issue from last year that i’m experiencing as well! I literally just started using Plex LiveTV on my RHEL7 box and am getting the same segfault errors you’re seeing! Why can Plex not take a look at this further? There MUST be something wrong with the way Plex is handling this on linux…

So, I took a stab at the script and it is a bit more robust now in that it can grab the variable on its own using rpm (I run rhel, you can alter this with your version of package installer) and it has a logging mechanism to log to a file which i’ve setup on logrotate.d as well. I changed it to run every 30 seconds instead of 5.

Here it is!

#!/bin/bash
VERSION=$(rpm -q plexmediaserver | cut -c 17- | head -c -8)

exec &> >(while read line; do echo "$(date +'%h %d %H:%M:%S') $line" >> /var/log/plex_keep_alive.log; done;)

while [ 1 = 1 ]
do
        PID=$(pidof "Plex Tuner Service")

        if [ -z "$PID" ]
        then
              echo "Not Running - Starting Up"
              /usr/lib/plexmediaserver/Plex\ Tuner\ Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmedia
server/Resources/Tuner/Shared $VERSION &
              echo "Started - Sleeping for 30 seconds"
        else
              echo "Running - Checking if Listening"

              LISTENING=$(netstat -tnlp 2>/dev/null| grep :32600)

              if [ -z "$LISTENING" ]
                then
                        echo "Not Listening - Killing Process"
                        killall -9 "Plex Tuner Service"

                else
                        echo "All Good - Sleeping for 30 seconds"
                fi
        fi

sleep 30
done
1 Like