Moving a MythTV Master backend

This proved to be a whole lot easier than I thought. It required backing up the mythconverg MySQL database on the old system and restoring it on the new one.

   ~ /usr/share/mythtv/mythconverg_backup.pl
   ~ /usr/share/mythtv/mythconverg_restore.pl --filename mythconverg-VERSION-TIMESTAMP.sql.gz

A further step was needed to update the hostname of existing recordings to the new host.

   mysql> update 'recorded' set hostname='peeves' where hostname<>'peeves'

This machine became the frontend at the same time. The i3 GPU support was included in the xf86-video-intel driver from version 2.10. I ended up using 2.11 which had just become available and added the following entry to /etc/portage/package.keywords.

   =x11-drivers/xf86-video-intel-2.11.0 ~x86

posted by James Gemmell on Sun, 29 Aug 2010 at 12:13 | permalink | tags: , ,

Building a new Gentoo MythTV backend

After a few of years of fairly intensive use I am migrating a MythTV backend from a rather creaky and increasingly unstable Pentium 4 to a shiny new Core i3 530 based box. I was quite impressed with Phoronix's Linux benchmarks of the CPU. The performance of the integrated GPU will help too since this box is destined to run an HD frontend at some point.

It's been a while since I last set up a Gentoo box from scratch and thought I'd give the Gentoo Quick Install a go rather than the LiveCD. The i3's Hyper-Threading support meant that the boot was graced with a 4 penguin salute and I was pleasantly surprised by the performance.

When partitioning the 1TB drive I settled on the following layout, setting aside /dev/sda5 as a future amd64 root partition.

   /dev/sda1	/boot		256MB	ext2
   /dev/sda2	swap		2GB	swap
   /dev/sda3	/		100GB	ext3
   /dev/sda5	[amd64]		100GB	ext3
   /dev/sda6	/mnt/mythtv	729GB	xfs

I diverged from the install guide in a few places. When the gentoo-sources kernel download threatened to take more than a couple of hours I performed the mirror-select step early and portage pulled it from a local mirror. I prefer using genkernel and, setting MAKEOPTS="-j5", this and the emerge world steps took next to no time.

The backend is now up and recording and the next step is to promote it to master backend status and get the frontend working.

posted by James Gemmell on Tue, 20 Apr 2010 at 09:17 | permalink | tags: , ,

Intel XVideo problems following Mythbuntu 9.10 upgrade

Following an upgrade to Mythbuntu 9.10, one of my MythTV frontends failed play back video smoothly and without stuttering. The frontend is a rather old Pentium IIIM/i830M based Asus laptop but it played SD resolution video quite acceptably before the upgrade.

The mythfrontend.log revealed that the problem was that the driver no longer possessed the XVideo extension capability.

   VideoOutputXv Error: Could not find suitable XVideo surface.
   VideoOutputXv: Falling back to X11 video output over a network socket.
         *** May be very slow ***

No kidding. After much Googling of the Ubuntu forums I found a link to the solution in the Ubuntu 9.10 release notes. The trick is to disable kernel-mode-setting (KMS) using the nomodeset kernel boot option.

posted by James Gemmell on Sat, 02 Jan 2010 at 13:54 | permalink | tags: , ,

Upgrading Gentoo MythTV to 0.22

I recently upgraded a frontend to Mythbuntu 9.10 and got MythTV 0.22 as part of the deal. Rather than leap through the fiery hoops required to revert it back to 0.21 I decided to take the plunge and upgrade my other Gentoo-based MythTV backend and frontends to 0.22.

This was trouble free as upgrades go but I did encounter the UTF8/latin1 database encoding problem which requires a backup and restore of the MythTV database after changing the default encoding to latin1. Changing the MySQL server configuration is easy to do on Gentoo as all that is required is to rebuild MySQL with the latin1 USE flag.

My package.keywords now looks as follows;

   >=media-tv/mythtv-0.22 ~x86
   >=media-plugins/mythcontrols-0.22 ~x86
   >=media-plugins/mythgallery-0.22 ~x86
   >=media-plugins/mythmusic-0.22 ~x86
   >=media-plugins/mythvideo-0.22 ~x86
   >=www-apps/mythweb-0.22 ~x86
   >=dev-python/imdbpy-3.8 ~x86
   >=x11-themes/mythtv-themes-0.22 ~x86
   >=x11-themes/mythtv-themes-extra-0.22 ~x86

and my package.use has;

   dev-db/mysql latin1

posted by James Gemmell on Mon, 28 Dec 2009 at 10:36 | permalink | tags: , ,

DTV1000S Linux driver now working

Top of my todo list for some time now has been to get my Leadtek WinFast DTV1000S DVB-T capture card to pay its way on a Gentoo MythTV backend instead of gathering dust on the shelf.

Video4Linux (V4L) drivers exist for the individual DTV1000S components listed below as they have also been used in other DVB cards.

What was lacking was the support for the card. I made an unsuccessful attempt at putting it together at the beginning of the year. Now Michael Krufky has done all the heavy lifting and committed his changes.

The easiest way to incorporate these into the 2.6.30-r8 kernel was to follow the V4L build instructions. Revision 13263 has all the necessary changes.

hg clone http://linuxtv.org/hg/v4l-dvb
cd v4l-dvb
make
sudo make install

I've not tested the IR capabilities of the DTV1000S as I'm using an AverTV DVB-T 777 for that purpose.

I used Steven Toth's instructions to get the TDA10048 firmware drivers from http://steventoth.net/linux/hvr1700/ and followed the readme.txt. Hat tip to Terry for his Leadtek product page.

posted by James Gemmell on Sun, 29 Nov 2009 at 10:17 | permalink | tags: , ,

Gentoo Linux on the Dell Latitude C400

This guide started off some time after I upgraded the 10Gb drive on the C400 to an 80Gb Hitachi and replaced the Debian installation. Gentoo has a wealth of documentation so this is intended as an installation specific supplement.

Disclaimer: This document comes with no guarantees. The steps I followed worked for me but may not necessarily work for you or your hardware.

Configuration

Gentoo
linux-2.6.18-suspend2-r1 kernel
no Windows installation
PIII-M 866MHz CPU
768 Mb RAM (256Mb + 512Mb)
A12 BIOS
Crystal 4205 audio
3c905C-TX FastEthernet adapter (built-in)
80Gb 5400rpm Hitachi 5K80
TrueMobile 1150 wireless (disabled)
Netgear MA401 PCMCIA adapter
Netgear WAG511 PCMCIA adapter

Post-install

genkernel

Thinking the genkernel built kernels to be a little bloated I resorted to using the more traditional make menuconfig and make bzlilo. After much fiddling, recompiling & rebooting every time I needed another driver it was time to give genkernel another shot. I was pleasantly surprised - it actually built most of what I needed! I'm now a genkernel convert.

Custom settings are as follows:

CONFIG_ACPI
is not set
CONFIG_APM
= y
CONFIG_USB_KBD
= m
CONFIG_USB_MOUSE
= m

Xorg

Xorg has replaced XFree86 as the default X server and the Intel i830 chipset is supported out of the box with no extra configuration required.

Starting from an upgrade to Modular Xorg (6.9?) there seems to be a problem with repainting the screen correctly after an APM suspend/resume. I haven't yet taken the time to find out exactly what is at fault but am using suspend2 instead.

i8kutils

The i8kutils package is a collection of tools which can control various Dell specific functionality such as the fan(s) and custom keyboard buttons when used in conjunction with the i8k kernel module. They were initially created for the Inspiron 8000 series but will work with most other Dell laptops. A list is provided in the package.

The module is compiled by default and installed at startup by adding it to the list in /etc/modules.autoload.d/kernel-2.6.

Some other very useful utilities are i810switch and i810rotate from the app-misc/i810switch package which do a better job of switching to an external display than Fn-F8.

Sound

emerge alsa-drivers followed by alsaconf

Wireless network

The factory installed TrueMobile 1150 wireless mini-PCI card tends to lock up following a suspend/resume so I reverted to using an old Netgear MA401 PCMCIA card with the hostap drivers. This driver is WPA capable using wpa_supplicant but that is a work in progress.

The Netgear WAG511 is an Atheros based 802.11a/b/g card which uses the madwifi-ng drivers. A Gentoo package is available but I've stuck to the recommended method of using the subversion source for now. I'm having some problems getting this code to compile with the suspend2-sources but that, too, is a work in progress.

USB

USB on the C400 does not work properly after a suspend to ram and resume. For some time I assumed this was a kernel problem that would eventually be resolved but as my USB usage increased and the drivers improved through 2.6 it begged the question that perhaps the C400 hardware or BIOS was at fault (surely not!)

I eventually got around to re-installing the original supplied W2K on my now defunct 10Gb Toshiba disk and lo! USB failed to work after standby/resume. A quick perusal of the Dell support forums (very useful) has confirmed this to be an issue going back some years to the A08 or A09 BIOS upgrades and Dell (bless them) have not yet stepped forward with a fix.

It is not all bad news though. The workaround is to suspend to disk (hibernate) and then resume and voila - all is well with USB. Not an ideal solution but it works. It has meant though that I get my feet wet with suspend2.

suspend2

This was refreshingly easy to set up using suspend2-sources instead of gentoo-sources for genkernel and following the instructions in the HOWTO. I use a 1000Mb /suspend_file instead of a partition.

Memory Upgrade

The memory upgrade was interesting. The 512Mb SODIMM was bought from Crucial Technology. I tried installing it in the expansion slot under the inspection hatch underneath the C400. The boot failed to recognise the extra memory claiming some sort of parity failure.

I reseated the SODIMM and ended up with a unsupported memory error. Thinking this to be some sort of peculiar SODIMM ordering problem I switched the modules around. This is not a straightforward process and required some disassembly. The Dell User Guide proved quite useful. Switching the 256Mb and 512Mb SODIMMs around worked and I now have a full 768Mb.

While compiling this web page I was unable to remember the exact error messages so I opened the C400 up again and switched the SODIMMs back only to find that everything still worked. I can only conclude that the original problem must have been due to dirty contacts in the memory expansion slot which only really cleared up after reseating the SODIMMs.

Ongoing

IrDA

Not used now that I have a Sony Ericsson V600 with a USB cable.

PCTel Modem

I've no real requirement for this and have removed it. Try the latest PCTel drivers and their instructions.

Fn-Z

The infamous all-fans-on mode is well documented on the linux-dell-laptops mailing list. Also noticed after the upgrade to A04 and persisting in A12. This afflicts a number of different laptop models. Occasionally, after a resume from standby, the indicated CPU temperature will shoot up to 85 and the single fan will spin at full speed. All that is required is to simply reset the on-chip temperature sensor using Fn-Z.

posted by James Gemmell on Wed, 24 May 2006 at 17:09 | permalink | tags: , ,

Linux DVB resources

This is a list of sites I found useful while setting up a Debian Linux system for use as a Video Disk Recorder and router for satellite broadband.

posted by James Gemmell on Fri, 02 May 2003 at 17:29 | permalink | tags: ,

Debian GNU/Linux on the Dell Latitude C400

This document started off early in 2002 when I installed Redhat 7.2 on the C400. I've been through several Redhat versions since 3.0.3 but, after enduring a hard disk crash, I decided for a number of reasons that Debian was the way to go.

Disclaimer: This document comes with no guarantees. The steps I followed worked for me but may not necessarily work for you or your hardware.

Configuration

Debian 3.0r1 Woody
recompiled 2.4.18 kernel
no Windows installation (see later)
PIII-M 866MHz CPU
1x 256Mb RAM
A09 BIOS
Crystal 4205 audio
3c905C-TX FastEthernet adapter (built-in)
10Gb Toshiba MK1517GAP
TrueMobile 1150 wireless (optional)

Installation

Partitioning the disk

The replacement drive was empty. The first step was to create a 768Mb save-to-disk (s2d) partition using mks2d.exe on the disk from Dell. The reason for choosing this size is that I intend adding another 512Mb RAM at some point in the future. Dell recommends that you set it up as 768Mb * 1.01 + 4Mb on the first partition so it's at a little over 800Mb now.

/dev/hda2 is set up as 50Mb boot partition (probably overkill here) and the remainder the root partition. No swap partition required at this stage as I've found swapfiles to be quite adequate in the past.

Installing Debian

This was pretty easy following the menus. Booting using the bf24 option allows you to install the ext3 filesystem.

Post-install

Configuration

This has always been a bit of a Redhat weakness in my opinion. Just as linuxconf was getting really useful they seem to have lumped it all in an gone for the more user friendly guified model of the redhat-config suite. Not that GUIs are a bad thing, mind you. It's just that they can become quite annoying when the underlying infrastructure is obfuscated.

This is where I came to appreciate Debian's relative simplicity. Instead of spreading the network interface configuration over multiple files in several directories, there is just one - /etc/network/interfaces

The dselect package took a little getting used to but it does the job of post-setup package installs quite well in conjunction with other tools like apt-get and friends.

Recompiling the kernel

Thanks to the joys of make menuconfig and make xconfig this is no longer such a bore. Here is a copy of my .config for the 2.4.18 kernel.

i8kutils

The i8kutils package is a collection of tools which can control various Dell specific functionality such as the fan(s) and custom keyboard buttons when used in conjunction with the i8k kernel module. The module is installed at startup by adding it to the list in /etc/modules.

They were initially created for the Inspiron 8000 series but will work with most other Dell laptops (a list is provided in the package.)

XFree86

The default version installed for Debian 3.0 stable is XFree86 4.1 so upgrading to 4.2 from Debian testing is required along with the latest i830 drivers from Intel. Instructions are on that page.

Intel i830 support is now included as of XFree86 4.3.

There is an good history of the problems associated with the Intel i830 chipset support and excellent instructions and links on Manuel Chakravarty's C400 page. Another patch I have used with Redhat 7.2 is on Jon Gans' Gateway page.

Wireless network

The TrueMobile 1150 wireless mini-PCI card is factory installed and looks to the system like a card in a second PCMCIA slot. The card is based on the Hermes chipset and the orinoco_cs driver should be used.

With Redhat 7.2 there was much mucking around with both the kernel-pcmcia and pcmcia-cs versions but I eventually settled on the latter. After one too many suspend/resume cycles, the kernel-pcmcia would stop recognising the card and it would default to "Anonymous Memory". This could only be cured by rebooting. I'm not sure if this remains the case with Debian as I've now stayed with pcmcia-cs.

The version of orinoco_cs supplied with pcmcia-cs-3.1.33 is 0.09b which is a little out of date. I now use the orinoco-0.13e drivers. All this involved was copying over the equivalent files in the /usr/src/pcmcia-cs-3.1.33/wireless directory and recompiling/reinstalling.

Now despite using the same versions of the kernel, driver and wireless tools on both Redhat and Debian installs there seem to be significant performance improvements in network speed. Gnome based tools such as gnucash and jpilot were so slow when used via a remote X server that they were unusable. Removing ssh tunnelling and WEP encryption had a neglible effect. You could conclude that this had something to do with differing versions of gtk but ttcp now shows the raw network speed to be almost 3 times what it was previously. Go figure

Wireless Access Point

The base station is a venerable 256MB Pentium 233, which doubles as an X server and Internet gateway. The wireless PCMCIA card is a Netgear MA401 in a Netgear MA301 PCI adaptor (PLX based.) Initially I used the card in Ad-hoc mode with the wlan-ng drivers but it seems that Prism 2 based cards have problems when run in Ad-hoc mode. Network speed was blindingly slow and the orinoco drivers generated an unsual number of "Tx excessive retries" messages. It was the findings on Jim Carter's wireless page that led me to try the hostap drivers and I'm now on version host-0.0.4. These take advantage of the Prism 2 firmware to place it in managed mode. To the laptop it looks just like an Access Point.

Ongoing

IrDA

Works out of the box using Debian and connects to a Palm III without complaint. Synchronize and restore from jpilot work well. In the BIOS setup, the IR port is set to COM2 and the IR mode to SIR (slow) which enables connections up to 115200 baud. In /etc/irda.conf, IRDADEV=/dev/ttyS1.

I used the GPRS-HOWTO along with Mikko Rapeli's instructions to set up GPRS for the Nokia 6100. It's never going to beat a WiFi link but is a neat solution for mobile e-mail.

Of interest is that the 6100's modem (AT terminal) interface was not usable via IrDA until I first set it up using the Windows drivers.

Gnokii 0.5.1 connects to a Nokia 7110 via IrDA faultlessly but I've had no joy yet with the Nokia 6100.

Sound

This was working with the ESD drivers under Redhat 7.2. All that is required under Debian is to add these lines into /etc/modules.

    ac97_codec
    i810_audio
    options i810_audio      clocking=48000

The next step is to get the KDE aRts sound server to work with it.

PCTel Modem

Still ongoing as I've no real requirement for it at the moment. Try the latest PCTel drivers and their instructions.

Outstanding Issues

posted by James Gemmell on Wed, 30 Apr 2003 at 17:26 | permalink | tags: ,