preload
Jun 09

Well recently I split my two myth boxes into a true slave and master configuration. I have to admit this was more troublesome that I expected. I decided my myth box in the living room would be a slave with no tuner. Since the case (silverstone lc10m) has the built in imon IR receiver, I figured I was all set.

I was even more impressed when I found out lirc now offers direct support and I no longer had to use venky’s build.

However as usual I encountered an issue. I was able to compile and install lirc without issue. Using irw produces output from the multi-median remote. But it also highlights another issue. The ir receiver just randomly stops receiving signals and hangs for about a minute. This was very frustrating and I hit the forums trying to find an answer. All I could find was from an earlier revision of lirc from around 2005, after that nothing.

As far as I can understand it, it appears that LCDproc is interfering with the ir receiver somehow. So here I am stuck with lirc that kinda works and no real solution. I will continue to search for the answer but until then, I’m stuck using a keyboard, which is not ideal.

Any suggestions would be greatly appreciated.

Tagged with:
Jun 09

So very recently I setup up another mythtv pvr that runs in my bedroom. The point of this was to encourage me to get to bed at a decent hour and to put a stop to me falling asleep on the couch.

The setup went okay, although I must admit I encountered some issues with the whole frontend/backend slave setup which I will detail in a later post.

This post is about blanking the screen as I often fall asleep while watching a movie or show. This increases the chance of screen burn in, and is something I want to avoid.

I am still researching how this can be done automatically but in the interim I have come up with the following solution. I have setup the power button on my hauppauge remote to execute a script with changes the runlevel from 5, to 3. Essentially stopping the frontend and bringing the system down to a terminal.

Since most default installs automatically blank the terminal after a set period of time of inactivity I am set. Now when I am drifting off and far to cozy to get out of bed to shut off the monitor I can simply press power and let the system enter runlevel 3. Then after a few minutes the screen will blank automatically.

To get this to work I added the following configuration to the .lircrc file in /home/mythtv.

# Power Button begin
prog = irexec
button = Power
config = /home/mythtv/powerbutton.sh
end

With that done the next step is to create the actual script that will switch runlevels. (Keep in mind this assumes your mythtv user has sudo access to run the init command) The following script is run from /home/mythtv/powerbutton.sh.

#!/bin/bash
 
RL=`/sbin/runlevel | awk '{print $2}'`;
LOG="/home/mythtv/pb.log";
 
if [ $RL -eq 5 ]
then
   # shutdown
   sudo /sbin/init 3;
   printf "`date`: powerbutton.sh: [$RL] switching to runlevel 3\n" >> $LOG
   killall irexec
   sleep 1;
   /usr/bin/irexec &
   printf "`date`: powerbutton.sh: starting irexec.\n" >> $LOG
   sleep 1;
   setterm -reset
   printf "`date`: powerbutton.sh: resetting terminal.\n" >> $LOG
   sleep 20;
   RL=`/sbin/runlevel | awk '{print $2}'`;
   printf "`date`: powerbutton.sh: switched to [$RL], exiting.\n" >> $LOG
else
   # startup
   sudo /sbin/init 5;
   printf "`date`: powerbutton.sh: [$RL] switching to runlevel 5\n" >> $LOG
   sleep 20;
   RL=`/sbin/runlevel | awk '{print $2}'`;
   printf "`date`: powerbutton.sh: switched to [$RL], exiting.\n" >> $LOG
fi
exit 0

With that done, all that is left is to test it out. Of course you will need to either reboot to pickup the changes or restart lircd, then the mythtv frontend.

Keep in mind this is just temporary solution and not something I plan to keep doing. I know there are probably far better ways of doing this and I will be looking into them in the future.

Tagged with:
Jun 09

Before I get into another howto about my experiences in MythTV, I have to say I created the following instructions mostly for myself, because everytime I redo my MythTV box, it takes me forever to get the damn LCD working. Now finally I have written it down. If it helps someone else, even better.

The following instructions describe how to successfully setup the imon vfd for use with MythTV on a Fedora Core 5 system running at least a 2.6.16 kernel and above. These instructions are modified where needed from the original site venky.ws. Also these instuctions do not activate the IR receiver that comes included in the imon vfd in the LC10M enclosure, simply just the lcd display.

Stand Alone Driver for imon vfd

Prerequisites:
You must have the kernel source or headers in /usr/src/linux that exactly match your running kernel. The installation instructions below assume you are running a 2.6.16 kernel or above.

Installation:

Download the stand alone driver here

# tar xvzf imon_vfd.tgz
# cd imon

Remove the following lines from the imon_vfd.c file:

line 122 owner = THIS_MODULE 
line 147 owner = THIS_MODULE 
line 162 mode = DEVFS_MODE

Check for devfs_fs_kernel.h

# ls /usr/src/kernels/`uname -r`-`uname -m`/include/linux/devfs_fs_kernel.h
No such file or directory

If you do not have the devfs_fs_kernel.h file, just create a blank file.

# touch /usr/src/kernels/`uname -r`-`uname -m`/include/linux/devfs_fs_kernel.h

Before we run the make command I like to modify the Makefile and remove the `name -r` bit. Replace it with the real name of your kernel.

# make -C /usr/src/linux SUBDIRS=$PWD
# modules
# make install
# depmod -a
# modprobe imon_vfd

Now check to make sure the lcd device has been created.

# ls /dev/lcd0
/dev/lcd0

LCDproc 0.4.5 for imon

This is the most recent stable version of LCDproc together with the iMON patch.
Prerequisites:
You must have the kernel source or headers in /usr/src/linux that exactly match your running kernel.
Make sure you have the autoconf and automake packages installed.
Make sure you have ncurses-devel installed.
Install the standalone iMON VFD driver.

Installation:

Download LCDproc from here

# tar xvzf lcdproc-0.4.5-imon.tgz 
# cd lcdproc-0.4.5-imon
# aclocal; autoheader; autoconf; automake -a 
# ./configure
# make
# make install (as root) 
# cp LCDd.conf /etc

Now add an entry for the imon_vfd so it will be loaded at boot time.

# echo "/sbin/modprobe imon_vfd" >> /etc/sysconfig/modules/lirc.modules

Finally add LCDd to the rc.local file so that it is started at boot time.

# echo "/usr/local/sbin/LCDd &" >> /etc/rc.local

Lastly be sure to enable the option for LCD output in the MythTV options menu.

Tagged with: