You are not logged in.

#1 2012-12-31 03:01:30

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

mythtv firmware and recording issues systemd

I upgraded my system to systemd over the past couple of days, and have run into some issues.  I have an HVR-2250 card together with a PVR-150 and a PVR-350.  Prior to the systemd switch, all worked fine although I was recording exclusively on the 150 and 350 inputs.

The 2250 has a firmware file that needs to load.  Currently I get information after the initial login prompt showing that it has loaded.  This seems to cause my mythbackend not to correctly start, and I have to stop and restart it before the frontend will run.  If I do that, the frontend does run properly, but I cannot record anything.  I tried to record something this afternoon, but while the frontend showed it recording, if I tried to play it the file was "unavailable".

I tried stalling the startup of mythbackend using some udev information I tracked down.  I have never written udev rules before, so these may be fundamentally wrong.....

My first file is to create fixed names; the first 2 work, the second 2 do not:

# 10-video.rules
#
KERNEL=="video[0-9]*", ATTR{name}=="ivtv0*", SYMLINK+="video-pvr150"
KERNEL=="video[0-9]*", ATTR{name}=="ivtv1*", SYMLINK+="video-pvr350"
KERNEL=="video[0-9]*", ATTR{name}=="saa7164[0]*", ATTR{index}=="0", SYMLINK+="video-pvr2250-0"
KERNEL=="video[0-9]*", ATTR{name}=="saa7164[0]*", ATTR{index}=="1", SYMLINK+="video-pvr2250-1"

My second file is supposed to stall the startup until the firmware loads, this one is cookbook from the mythtv site and I do not understand what it really does.  I only tried this part for the 2250 inputs because the firmware is only for that card:

#
# 99-mythbackend.rules
#Create systemd device units for capture devices
#
SUBSYSTEM=="video4linux", TAG+="systemd"

Wants=dev-video2.device
After=dev-video2.device

Wants=dev-video3.device
After=dev-video3.device

Timezones appear in mysql
I am using a static network but am configuring with netcfg per this post: https://bbs.archlinux.org/viewtopic.php?id=150233
which talks about bug reports, so I'm not sure what the status of this is.

EDIT:

As for the non-recording, I did find this in my everything.log after digging deeper:

Preview: Output path '/srv/mythdata02' is not writeable

, although I have no idea why this should be so.  The permissions on the directory are correct.  I logged in as the myth user and wrote a test file to it just fine.

Re-EDIT:

The permissions on the directory were NOT correct.  While this machine has been up for about a year, suddenly write permissions vanished from the mythtv data directories.  I have restored these and now it appears that I can record.  Sometimes I just have to look at things 15 times to actually see them......

This leaves the issue of stalling the mythbackend startup, but at least I can work around that.

Last edited by timm (2012-12-31 03:48:35)

Offline

#2 2013-01-06 22:19:03

fphillips
Member
From: Austin, TX
Registered: 2009-01-24
Posts: 202

Re: mythtv firmware and recording issues systemd

The 150 and 350 are analog framegrabbers and fall under the v4l subsystem, but the 2250 is something very different so its under the dvb subsystem. Run udevadm info -a -p /sys/class/dvb/dvb0.frontend0 and you will see why your 2250 rules don't match. You should be able to construct working rules from this info. That being said, I don't use udev rules with my cards (1600 and 2250):

[root@central ~]# cat /etc/modprobe.d/modprobe.conf 
options cx18 adapter_nr=2
options saa7164 waitsecs=10 adapter_nr=0,1

Then its just a matter of stalling to wait for the correct devices. See what I told farmerdave about this.

Offline

#3 2013-01-11 04:56:28

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Re: mythtv firmware and recording issues systemd

Thanks for the help; it's up but seems inconsistent.  One boot I have my 150 and 350 available through mythweb, the next time they aren't there.  I may have to set up the udev rules, as it appears on some boots they are video0 and video1, while the next time they may be video2 and video3.

I didn't have a modprobe.conf file, so I created one containing

options saa7164 waitsecs=10 adapter_nr=0,1

I then went to the [Unit] section of /usr/lib/systemd/system/mythbackend.service and added the lines:

Wants=dev-dvb-adapter0-frontend0.device
After=dev-dvb-adapter0-frontend0.device
Wants=dev-dvb-adapter1-frontend0.device
After=dev-dvb-adapter1-frontend0.device

While I have not set up the 2250 (because of bbs.archlinux.org/viewtopic.php?id=155702) at least, for the moment, I can record and I'm no longer missing her important shows....

[edit]Unfortunately, upon a reboot of fixing my other problem, I'm back to having to restart the mythbackend.service before I can get things to work.  I must not be understanding how to stall this thing.

Last edited by timm (2013-01-11 20:15:23)

Offline

#4 2013-01-12 05:07:23

Gnarl
Member
Registered: 2010-11-18
Posts: 63

Re: mythtv firmware and recording issues systemd

My 2250 works fine. I'm using the firmware from here

I made a mythbacked.timer to start up the backend 30 seconds after boot.

Offline

#5 2013-01-14 18:37:00

timm
Member
From: Wisconsin
Registered: 2004-02-25
Posts: 417

Re: mythtv firmware and recording issues systemd

I made a mythbacked.timer to start up the backend 30 seconds after boot.

What did you do?

Offline

Board footer

Powered by FluxBB