Yesterday I took the plunge and upgraded my Mythbuntu install from Trusty to Xenial. Except for a few heart-stopping moments, it went smoothly.

Things I wish I’d known about the upgrade

There’s a bug with upgrading MySQL when you have the Mythbuntu tweaks installed. As a result, the upgrade fails to install MySQL properly – and then everything looks broken. Ouch. You can find out more about the defect here. The symptom is the message “[ERROR] unknown variable ‘table_cache=128’ ” which scrolls off the screen when you do an upgrade (or dpkg –configure -a). The fix is to change

table_cache = 128

to

table_open_cache = 128

in /etc/mysql/conf.d/mythtv-tweaks.cnf.

During the upgrade, I got prompted for which user to use for the database. (With the recommendation to use “root” if you don’t thoroughly understand the permissions models.) But of course “root” didn’t work. What did work was the default, debian-sys-maint.

After install, lirc didn’t work. I uninstalled lirc using Mythbuntu Control Center and rebooted; that appeared to fix things and now my Streamzap remote is being detected as a keyboard device with the appropriate mappings. (I get a warning about a plugin using MCC, but hey, it seems to work.)

Next, I got warnings using apt. Probably due to the upgrade failure, I had a file called 50unattended-upgrades.ucf-old left over in /etc/apt/apt.conf.d. Nuking that fixed things.

It looks as if mythfrontend and mythbackend are using different users now. I’m not sure why, but some day I’ll need to go through and fix permissions / unify those two users.

I had to go into mythtv-setup and assign directories for music and music art. (Since I didn’t have an art directory, I created one under my music directory. That seems to work.)

Probably as a result of the botched upgrade, mythweb was broken. I installed php7.0-mysql, then removed/installed mythweb and it was working again.

Finally, I tried to look into mythconverg. In this release the admin user is debian-sys-maint, and the password for that user is stored in /etc/mysql/debian.cnf.

Recently I decided to finally take the plunge and upgrade my Mythbuntu installation from Lucid (10.04) to Precise (12.04). I’d been getting prompts to do the release upgrade for a while, and I knew if I put it off too long then the upgrade path would disappear and I’d have to do a full reinstall.

The upgrade process was mostly painless. I did:
sudo do-release-upgrade

and walked away for quite a while. I had to kill X, and while churning the upgrade noticed that I’d modified /etc/sysctl.conf for the HDHomeRun:
net.core.rmem_max=2097152

The big issue was lirc – the StreamZap remote has been turned into a devinput device by default, meaning it behaves like a keyboard. I decided that I would rather have the old lircd behaviour where different apps could have different keys. Here’s what I had to do:

This tells X not to treat the StreamZap remote as a keyboard. That means lirc has a shot at getting the keystrokes, and means that only one keystroke will be generated (rather than 2 – one from lirc and one from the devinput driver).

I didn’t do this first, which led me to problems. (I ended up pushing the Mute button, which muted a bunch of my audio devices which I then had to undo.)

2. sudo dpkg-reconfigure lirc

I’m not sure how often I did this (I did it more than once). I also made sure to select the Streamzap remote in the Mythbuntu Control Centre. At the end, here’s what my /etc/lirc/lircd.conf looked like:

#This configuration has been automatically generated via
#the Ubuntu LIRC package maintainer scripts.
#
#It includes the default configuration for the remote and/or
#transmitter that you have selected during package installation.
#
#Feel free to add any custom remotes to the configuration
#via additional include directives or below the existing
#Ubuntu include directives from your selected remote and/or
#transmitter.
#Configuration for the Streamzap PC Remote remote:
include "/usr/share/lirc/remotes/streamzap/lircd.conf.streamzap"

Here’s what the first stanza of my /etc/lirc/hardware.conf looked like:

I also set the power button to be another Escape, and Forward to PgDown and Backwards to PgUp.

You want to make sure the remote = Streamzap_PC_Remote, not the devinput remote.

Edit: Ha, I spoke too soon. I’m troubled by endless “Sorry, Ubuntu 12.04 has experienced an internal error” passwords. Luckily, this post explains how to at least turn them off, if not fix the problems.

I’ve started looking around for a quiet but thermally good case for a MythTV box. My first thought was to do an HTPC case – the Lian Li HTPC C60 looked good.

But then I started worrying about airflow around the case. I’ve got a fairly narrow spot to put it in – about 46 cm – so a PC that’s 44 cm wide doesn’t leave a lot of room for cooling.

I decided to look into mini towers instead. The Lian Li V600F looks like it would be nice, but it has these ugly blue fans.

I also looked into the NZXT H2 (some were saying it was too flimsy), Antec P183 (too tall, not a mini tower) and Silverstone TJ-8e (an 18 inch fan in front, but only that. How hard to get a replacement when it dies?)

Now I’m leaning towards the Lian Li B10. It’s too bad that SPCR hasn’t reviewed it – they seem to know a thing or two about quiet and heat.

I recently ran into an interesting problem with my MythTV audio. When I played back a program, it would play back with varying degrees of echo in the audio. Usually the echo would be around 100 ms behind, but if I skipped forward or back I could get it up to 3 seconds behind. This problem did not happen outside of MythTV.

First I started with alsa-mixer. There I determined that there was no level I could change to affect the echo. Changing the level always changed both the first audio and the echo.

Next I tried reinstalling the AC97 sound driver, because I saw a website that noted when the driver was corrupt you could get an echo. No dice.

I had two copies of mythfrontend.real running! Both were getting the lirc keypresses and acting on them. This meant everything (including the player) was being run twice… hence an echo slightly behind the main audio.

Somehow the Gnome session state had been saved with a mythfrontend.real running, and when it was restored it would restore with that mythfrontend.real as well as start a new one. I made sure the session state wasn’t being saved (under Settings), killed all the running mythfrontend.real instances, and then logged out saving the session. Next I logged in and out but unchecked the button to save session on logout. That seems to have done the trick.

When I switched my video card after the capacitors burnt out on the old one, I found I could no longer do 1366×768 video on a Samsung LN32A450C. Most frustrating was the fact that I’d see the video for about four seconds, before the TV decided it didn’t want to display it and showed “Mode not supported”.

Apparently, this is a common problem with Samsung TVs – and cvt was no help.

Luckily, I found this post – so here is the modeline for the Samsung LN32A450C

I just had to add that to my Monitor section of /etc/X11/xorg.conf and the autodetection on Ubuntu 9.04 did the rest. This is actually 1360×768, not the specified 1366×768 that Samsung is supposed to support – but I don’t miss the few pixels on either side.