Glam Prestige Journal

Bright entertainment trends with youth appeal.

Ubuntu 16.04, fresh install.

I don't know what I've done to mess it up, but I have to kill mythbackend (which for some reason is running with root privileges so requires sudo to kill) and start it as my regular user.

Understandably, my wife does not accept having to do this to get the TV working.

So I guess my question is, how do I get it to stop starting up on login as superuser, and then how do I get it to start as my regular user? I would hate to try and do both by running a startup script of some sort.

2 Answers

Apparently a form of this problem has been going on since at least 2008. Several delay/sleep/pause tactics seem to fix the problem but it keeps coming back.

Especially if you have hdhomerun tuners and a solid state disk. When the system boots, it gets to tuner verification before the network is fully functional. Then the tuner acquisition fails and live tv simply does not work, any shows recorded after reboot will seem to exist but will not playback.

Restarting the backend after network communication is established will fix the problem but after the next reboot, the problem returns.

This post on the MythTV Forum offers a possible fix:

You could just add a sleep 10 (or however long it takes for your HDHR to get up and running.) That would go in the mythtv-backend.service file. But, if you modify the one in /lib/systemd/system, then if a new version is released, your changes will go away. So the proper solution is to put the .service file in /etc/systemd/system

Of course then you'd miss any updates to the official version in /lib. You just need to be aware of that.

You could do this. Make sure you understand every command below before starting:

stop the backend:

sudo systemctl stop mythtv-backend
sudo --login systemctl edit --full mythtv-backend

add:

ExecStartPre=sleep 10 

(or append: ;sleep 10 to an existing ExecStartPre line)

reload:

sudo systemctl daemon-reload

restart the backend:

sudo systemctl start mythtv-backend

There is a potentially more comprehensive solution also mentioned, but this is suggested as a basic workaround.

2

Your mythbackend should be running as a mythtv process...

~$ ps auxc|grep myth
mythtv 3706 0.1 0.5 4930284 89092 ? Ssl Aug03 1:29 mythbackend

And your username should be in the mythtv group...

~$ groups
{username} adm dialout fax cdrom sudo audio dip video plugdev netdev fuse lpadmin scanner sambashare vboxusers kismet mythtv input wireshark

If it's not, then...

sudo adduser your_username mythtv

Then logout and log back in to enable.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy