Posts Tagged ‘upgrade’

Fedora 18 pulseaudio/ALSA and nvidia hdmi audio

June 18, 2013 Leave a comment

Fedora 18 replaced my ALSA audio setup with pulseaudio. I managed to get the nvidia hdmi audio disabled, but I still had some issues when I used MythTV’s timestretch feature. The audio would start cracking and the video would also freeze every few frames.

So I decided to revert back to ALSA:
yum erase pulseaudio

This removed the following modules:
pulseaudio pulseaudio-module-gconf pulseaudio-module-bluetooth pulseaudio-esound-compat paprefs gnome-bluetooth bluez

The next problem was that my system was confused whether I wanted audio played through nvidia hdmi or my motherboard. In this case the motherboard is my option.

To fix this, I did “aplay -l” and took note of the card and device ids through which I wanted my audio. Then I put the audio device in /etc/asound.conf (make sure there are no overrides of this file in the user’s home directory):

pcm.!default {
type hw
card 0
device 0

Then I just set mythtv to use the correct ALSA device. After a restart, MythTV is now back to using ALSA audio again.


IRMan serial infrared receiver in Fedora 18

June 18, 2013 Leave a comment

Fedora 18 broke my IRMan serial infrared receiver. It no longer seems to use the configuration defined in /etc/sysconfig/lirc.

Instead, you apparently need to specify the configuration directly in the daemon script /usr/lib/systemd/system/lirc.service:

So I set the correct driver and device parameters in that script:
ExecStart=/usr/sbin/lircd –driver=irman –device=/dev/ttyS0

Also, I found that Fedora 18 no longer automatically started the lirc service after the upgrade. So you need to enable it:
systemctl enable lirc

This should work after a reboot…

If it doesn’t you can try to kill all lircd instances and run:
/usr/sbin/lircd –driver=irman –device=/dev/ttyS0

followed by:

This should produce output whenever you press a button on your remote.

MythTV failing recordings and device mappings

August 3, 2012 1 comment

After upgrading from FC12 to FC16, I began having some issues with failing recordings. After boot, recordings from certain channels would always fail (in this case channels using DVB CAM).

My setup is this:

  • “ST STV0297 DVB-C” -> Free channels
  • “ST STV0297 DVB-C” + CAM -> Pay channels
  • “Philips TDA10023 DVB-C” -> Free channels

I had mythtv configured that my CAM card is on /dev/dvb/adapter2/frontend0.

What I eventually figured out was that after the upgrade from FC12->FC16, my DVB CAM card was no longer always being assigned the above adapter2 mapping. Instead, the hardware used for “adapter2” kept on changing each boot:

Jul 21 14:38:13 localhost kernel: [    7.187973] DVB: registering adapter 2 frontend 0 (ST STV0297 DVB-C)…
Jul 21 19:47:43 localhost kernel: [    8.625730] DVB: registering adapter 2 frontend 0 (ST STV0297 DVB-C)…
Jul 21 19:52:49 localhost kernel: [    8.572348] DVB: registering adapter 2 frontend 0 (Philips TDA10023 DVB-C)…
Jul 21 21:03:04 localhost kernel: [    7.606219] DVB: registering adapter 2 frontend 0 (Philips TDA10023 DVB-C)…

Still, mythtv assumed that adapter 2 had the CAM. This of course led to a situation where mythtv couldn’t record, because it didn’t have the hardware to decode the channel on the specified adapter. This was evident when watching live TV, the “LMSc” never changed to “LMSC”. The capital C means it’s successfully decoding.

So, basically, you need to fix this by manually assigning the device mappings. After doing that, I now have symlinks like these:

/dev/dvb/adapter-ttfree/frontend0 -> ../adapter0/frontend0
/dev/dvb/adapter-ttcam/frontend0 -> ../adapter2/frontend0

The instructions for setting up permanent device mappings can be found here:

This is basically the file I ended up with:

SUBSYSTEM==”dvb”, ATTRS{product}==”anysee*”, PROGRAM=”/bin/sh -c ‘K=%k; K=$${K#dvb}; printf dvb/adapter-anysee/%%s $${K#*.}'”, SYMLINK+=”%c”
SUBSYSTEM==”dvb”, ATTRS{vendor}==”0x1131″, KERNELS==”0000:07:01.0″, PROGRAM=”/bin/sh -c ‘K=%k; K=$${K#dvb}; printf dvb/adapter-ttfree/%%s $${K#*.}'”, SYMLINK+=”%c”
SUBSYSTEM==”dvb”, ATTRS{vendor}==”0x1131″, KERNELS==”0000:08:01.0″, PROGRAM=”/bin/sh -c ‘K=%k; K=$${K#dvb}; printf dvb/adapter-ttcam/%%s $${K#*.}'”, SYMLINK+=”%c”

Note, the file is hardware specified, so you need to create your own according to the instructions on the above page. Next reboot, you should have the device mapping symlinks setup correctly.

Now you just need to configure mythtv to use these symlinks instead of referring to adapterX directly. Personally, I deleted all mythtv capture card configuration and re-did it. I don’t think that’s strictly needed, but I just wanted to clean up my configuration a bit at the same time.

DVB subtitles missing

July 23, 2012 Leave a comment

I did an upgrade from MythTV 0.23 to 0.25. After that I found that the dvb(-c) subtitles (Finland) would sometimes go missing from some recordings. The issue is not with the recording, but with the MythTV player. I wasn’t able to see subtitles on recordings that I had previously recorded and I knew had working subtitles. Also the subtitles could be seen with other applications, e.g. mplayer.

After getting quite desperate, I finally found a bug report that I believe is related to this. Apparently this fix wasn’t available in the Fedora repos yet, so I had to switch to rpmfusion repos to get this fix. After doing that, dvb subtitles are working again!

Linux backup/restore and grub2 reinstall

July 23, 2012 Leave a comment

Not exactly related to MythTV, but very useful because MythTV often breaks when upgrading, so you want to be able to easily restore an old version.

In order to backup linux, I use dump and restore.

You can backup your system drive by booting into rescue mode and running the following:

/sbin/dump -0 -v -a -y -f- -L “Linux root partition” /dev/sda1 1>filename.dump 2>filename.log

To restore, use the rescue mode of the installation DVD and mount the drive you want to restore to. Then go to the root directory of that drive and type:

/sbin/restore -r -f /location-of-dump-file/filename.dump

I’ve used this approach successfully for a long time. Now with the switch to grub2, I had to figure out how to reinstall grub2 on the disk after doing the restore.

After a lot of googling, I finally figured it out and wrote the following script:

read -p “Press ENTER to restore grub2…”

echo Mounting /dev/sda1 to /mnt/sda1 – these may already be mounted
mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1

echo Mounting bindings
mount –bind /dev /mnt/sda1/dev
mount –bind /proc /mnt/sda1/proc
mount –bind /sys /mnt/sda1/sys

read -p “Press ENTER to install grub”;
echo Installing grub and configuring it for local drive
chroot /mnt/sda1/ /bin/sh -c “/sbin/grub2-install /dev/sda; /sbin/grub2-mkconfig -o /boot/grub2/grub.cfg”

WARNING 1: You will want to change your drives/partitions listed in these scripts.

WARNING 2: Always do regular test runs of backup and restore – you want to be 100% sure they work when you need them! This is easy if you get an extra harddrive that you can test with.

WARNING 3: I’m not responsible for your data or the correctness of the scripts above. Use the above scripts/commands at your own risk!

MythTV EIT language

July 23, 2012 Leave a comment

I just upgraded from MythTV 0.23 to 0.25. One of the issues I noticed was that I started getting DVB EIT data with mixed languages. Living in Finland, we get EIT data in both Finnish and Swedish. I set the preferred languages in the MythTV frontend, but they didn’t have an impact. In my data I had listings in both languages.

This can be quite tricky because it will break recoding rules that record by title. Anyway, to get all of them in one language, I inserted the following configuration:

INSERT INTO settings(value, data) VALUES(‘PreferredLanguages’,’fin’);

You can clear the current EIT data by:

DELETE FROM program where starttime>now();

DELETE FROM eit_cache;

Then restart mythbackend, just to be sure. You should now get all the data in the language you’ve specified.

UPDATE: It seems that settings ‘ISO639Language0’ and ‘ISO639Language1’ must also be set to ‘fin’ in order to get non-mixed Finnish EIT data.

MythTV 0.24 mythtvosd is broken

January 7, 2011 1 comment

I did an upgrade from MythTV 0.23.1 to 0.24 a few weeks after 0.24 had been released. I eventually ended up reverting the whole upgrade. There were a few reasons:

  • One of my recordings failed. This happened only once, a few hours after the upgrade. My recordings practically never fail otherwise. I would estimate that about 1 out of 500-1000 recordings fail under normal circumstances. This got me a bit suspicious and I decided it was better to revert as quickly as possible. It could of course have been a coincidence, but I didn’t want to take the risk. Once you’ve had the system up and running for a few days, it’s really to late to (easily) revert the upgrade unless you are prepared to lose all the changes in the database (recordings etc).
  • Another issue in 0.24 was that the mythtvosd utility doesn’t work, see bug report. For those of you not familiar with the utility, it allows you to send text popups to mythfrontend, which are then shown on the screen. I use it to show warnings about low disk space and various other remote controlled system information popups (I might write a post about this later). Apparently they are not planning on fixing it until 0.25 :-( This may mean that I will have to skip 0.24 altogether. If so, it would be the first time I skip a whole MythTV release. Let’s see…

Anyway, I didn’t really see any big must-haves in version 0.24. So, for the moment I’m probably better off with a stable 0.23.1. Of course, it might be that the current 0.24 version is more stable than the one I tried.