Friday, May 29, 2009

MythTV MythBuntu tweaking

Here are some tweaks I made to my MythBuntu install, which is a distribution of MythTV


MythTV is similar to TiVo, but it is free to use, and free to change, and is much more powerful. It is usually easy to set up a basic install, but depending on your hardware, and the distribution you chose, and your special requirements, it can be fiendishly complex to get running to your satisfaction.



MythTV Volume Too Low


There are 4 places to look if the volume is too low when watching TV. First check in your distribution's volume control in the regular menus. This assumes you have the line out connected to your TV, rather than your headphone out. I suggest being sure your master volume and PCM are set to at least 90%. Then look in your MythTV menus (frontend setup>setup>general) and ensure both volume controls are at 90%. Next, SSH into your Myth computer and run


# alsamixer




Again set the master volume and PCM to at least 90%. So the volume change sticks on reboot, run


# sudo alsactl store




Finally while watching TV or a recording, try pressing F10 and F11 to change the frontend in-viewer volume control. Between this and the TV volume control, you should be able to get it loud enough, and equal to the live TV volume when watching through the TV tuner






Run The Schedule Grabber

The job that fills the TV listing is called mythfilldatabase. It initially grabs 14 days of listings, but if the listings are present, it only grabs tomorrows listings and the listings for the 14th day from now. This is to catch schedule changes at the last minute, and limit the amount of data required.

For some asenine reason, MythBuntu isn't set up to automatically run mythfilldatabase daily. So if you don't set it up, every day you will notice you have one less day of listings available. To set it up, go to

Utilities/Setup -> Setup -> TV Settings -> General -> 7th screen, enable "Automatically run mythfilldatabase". For "Log Path" I used "/tmp/mythfilldatabase.log".


Power Saving

Reduced power mode for the advanced audio output isn't enabled by default
# sudo -i

# echo 60 > /sys/module/snd_hda_intel/parameters/power_save
Gives a timeout of 60 seconds
# echo Y > /sys/module/snd_hda_intel/parameters/power_save_controller
Disables the controller, but will click on wakeup
# exit
You can cat these settings to see what they are, the first one 0 is disabled


Folding At Home

Even though it shouldn't be able to do this, FoldingAtHome can sometimes steal enough CPU cycles to make Flash videos in Firefox choppy. To start and stop it pre Ubuntu 9.10 run -
sudo /etc/init.d/foldingathome [stop|start|restart|status]
To start and stop it on Ubuntu 9.10 and after, run -
sudo service foldingathome [stop|start|restart|status]


Live TV Idle Timeout

If you forget to turn off live TV viewing, it can run for days with the television off. This increases your power consumption and decreases your hard drive life due to the way MythTV works, to be able to record a TV show from the beginning when you are in the middle of watching it. If you'd like live TV to stop after a period of inactivity, you'll need to add a database record.
First you need to find your mysql password
myth@myth:~$ nano /etc/mythtv/mysql.txt
Now sign into mysql
myth@myth:~$ mysql -u mythtv -p mythconverg
Enter Password:
Enter the initial settings (this will shut down the live TV front end on a box called 'myth' after 2 hours)

mysql> INSERT INTO `mythconverg`.`settings` (`value`, `data`, `hostname`) VALUES ('LiveTVIdleTimeout', '240', 'myth');
If you'd like to change it so all live TV frontends shut down after an hour, then you do an update
mysql> UPDATE `mythconverg`.`settings` SET `settings`.`hostname` = null, `settings`.`data` = '120'  WHERE `settings`.`value` = 'LiveTVIdleTimeout';
To see what you have set, do a 
mysql> SELECT * FROM `mythconverg`.`settings` WHERE `settings`.`value` = 'LiveTVIdleTimeout';
Exit when you are happy
mysql> exit
myth@myth:~$

1 comment: