User:AndrewAllison

From MythTV Official Wiki
Revision as of 16:10, 24 April 2013 by AndrewAllison (talk | contribs)

Jump to: navigation, search

Hardware

Asus M4A77TD motherboard
AMD Phenom II X4 965 Processor
nVidia Corporation NV44 [GeForce 6200 TurboCache
Hauppaupe HVR-950
Hauppauge 150
Hauppauge 500 
Pinnacle Systems, Inc. Remote Kit Infrared Transceiver

Standard Files

Because these files are spread out everywhere, I usually get a mismatched set :-(
/etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
key_buffer = 16M
table_cache = 128
sort_buffer_size = 2M
myisam_sort_buffer_size = 8M
query_cache_size = 16M
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


/etc/lirc/lircd.conf
#
#
# contributed by Andrew Allison
#
# brand:         PCTV (Hauppauge) USB MCE Remote
# model no. of remote control: RRS9002-8601FC
# devices being controlled by this remote: Pinnacle IR Receiver / Blaster
#
begin remote
 name  pctv.usb.remote
 bits           13
 flags RC6|CONST_LENGTH
 eps            30
 aeps          100
 header       2694   840
 one           471   413
 zero          471   413
 pre_data_bits   24
 pre_data       0x1BFF83
 gap          105342
 min_repeat      2 
#  suppress_repeat 2
#  uncomment to suppress unwanted repeats
 toggle_bit_mask 0x8000
 rc6_mask    0x100000000
     begin codes
         KEY_POWER                0x13
         KEY_PAUSE                0x037FF07BE7
         KEY_RECORD               0x037FF07BE8
         KEY_STOP                 0x037FF07BE6
         KEY_REWIND               0x037FF07BEA
         KEY_PLAY                 0x037FF07BE9
         KEY_FORWARD              0x037FF07BEB
         KEY_FRAMEBACK            0x037FF07BE4
         KEY_FRAMEFORWARD         0x037FF07BE5
         KEY_BACK                 0x1BDC
         KEY_INFO                 0x1BF0
         KEY_LEFT                 0x1BDF
         KEY_RIGHT                0x1BDE
         KEY_OK                   0x037FF07BDD
         KEY_UP                   0x1BE1
         KEY_DOWN                 0x1BE0
         KEY_VOLUMEUP             0x037FF07BEF
         KEY_VOLUMEDOWN           0x037FF07BEE
         KEY_RESSTART             0x1BF2
         KEY_CHANNELDOWN          0x037FF07BEC
         KEY_CHANNELUP            0x037FF07BED
         KEY_MUTE                 0x1BF1
         KEY_SWITCHVIDEOMODE      0x1BB7
         KEY_EPG                  0x1BD9
         KEY_TV                   0x1BDA
         KEY_VIDEO                0x1BDB
         KEY_1                    0x1BFE
         KEY_2                    0x1BFD
         KEY_3                    0x1BFC
         KEY_4                    0x1BFB
         KEY_5                    0x1BFA
         KEY_6                    0x1BF9
         KEY_7                    0x1BF8
         KEY_8                    0x1BF7
         KEY_9                    0x1BF6
         KEY_0                    0x1BFF
         KEY_CLEAR                0x037FF07BF5
         KEY_ENTER                0x037FF07BF4
         KEY_RED                  0x037FF07BA4
         KEY_GREEN                0x037FF07BA3
         KEY_YELLOW               0x037FF07BA2
         KEY_BLUE                 0x037FF07BA1
         KEY_NUMERIC_STAR         0x037FF07BE2
         KEY_NUMERIC_POUND        0x037FF07BE3
         KEY_SUBTITLE             0x037FF07BA5
     end codes
end remote


/home/mythtv/.lircrc

  1. brand: PCTV (Hauppauge) USB MCE Remote
  2. model no. of remote control: RRS9002-8601FC
  3. devices being controlled by this remote: Pinnacle IR Receiver / Blaster
begin remote
 name  pctv.usb.remote
 bits           13
 flags RC6|CONST_LENGTH
 eps            30
 aeps          100
 header       2694   840
 one           471   413
 zero          471   413
 pre_data_bits   24
 pre_data       0x1BFF83
 gap          105342
 min_repeat      2
#  suppress_repeat 2
#  uncomment to suppress unwanted repeats
 toggle_bit_mask 0x8000
 rc6_mask    0x100000000
     begin codes
         KEY_POWER                0x13
         KEY_PAUSE                0x037FF07BE7
         KEY_RECORD               0x037FF07BE8
         KEY_STOP                 0x037FF07BE6
         KEY_REWIND               0x037FF07BEA
         KEY_PLAY                 0x037FF07BE9
         KEY_FORWARD              0x037FF07BEB
         KEY_FRAMEBACK            0x037FF07BE4
         KEY_FRAMEFORWARD         0x037FF07BE5
         KEY_BACK                 0x1BDC
         KEY_INFO                 0x1BF0
         KEY_LEFT                 0x1BDF
         KEY_RIGHT                0x1BDE
         KEY_OK                   0x037FF07BDD
         KEY_UP                   0x1BE1
         KEY_DOWN                 0x1BE0
         KEY_VOLUMEUP             0x037FF07BEF
         KEY_VOLUMEDOWN           0x037FF07BEE
         KEY_RESSTART             0x1BF2
         KEY_CHANNELDOWN          0x037FF07BEC
         KEY_CHANNELUP            0x037FF07BED
         KEY_MUTE                 0x1BF1
         KEY_SWITCHVIDEOMODE      0x1BB7
         KEY_EPG                  0x1BD9
         KEY_TV                   0x1BDA
         KEY_VIDEO                0x1BDB
         KEY_1                    0x1BFE
         KEY_2                    0x1BFD
         KEY_3                    0x1BFC
         KEY_4                    0x1BFB
         KEY_5                    0x1BFA
         KEY_6                    0x1BF9
         KEY_7                    0x1BF8
         KEY_8                    0x1BF7
         KEY_9                    0x1BF6
         KEY_0                    0x1BFF
         KEY_CLEAR                0x037FF07BF5
         KEY_ENTER                0x037FF07BF4
         KEY_RED                  0x037FF07BA4
         KEY_GREEN                0x037FF07BA3
         KEY_YELLOW               0x037FF07BA2
         KEY_BLUE                 0x037FF07BA1
         KEY_NUMERIC_STAR         0x037FF07BE2
         KEY_NUMERIC_POUND        0x037FF07BE3
         KEY_SUBTITLE             0x037FF07BA5
     end codes
end remote


My Backup script

date= date -I
nice -n 19 mysqldump -u  --password= --extended-insert --no-create-db --add-drop-table --database mythconverg  > `date -I`_myth_backup_data.sql
nice -n 19 mysqldump -u  --password= --extended-insert --database mythconverg  > `date -I`_myth_complete_backup_data.sql
nice -n 19 gzip `date -I`_myth_backup_data.sql
nice -n 19 gzip `date -I`_myth_complete_backup_data.sql
chmod 777 `date -I`_myth_backup_data.sql.gz
chmod 777 `date -I`_myth_complete_backup_data.sql.gz
mv `date -I`_myth_backup_data.sql.gz /storage1/Database/ 
mv `date -I`_myth_complete_backup_data.sql.gz /storage1/Database/

My Restore

mysql -u root -p < myth_complete_backup_data.sql

Setting Atrpms.repo

[atrpms]
name=Fedora Core $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/f$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
enabled=1
gpgcheck=1

Setting up Autologin

/etc/gdm/custom
# GDM configuration storage
[daemon]
TimedLoginEnable=true
TimedLogin=mythtv
TimedLoginDelay=5
[security]
[xdmcp]
[greeter]
[chooser]
[debug]

Crontab

* 3 * * *  /home/mythtv/backup-mysql.sh
* 4 1 * *  /home/mythtv/optimize-myth-db.sh


/etc/rc.local

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
mount /dev/sda1 /storage1
mount /dev/sdc1 /storage3
mount /dev/sdd1 /storage2
/sbin/modprobe lirc_dev debug=1 && modprobe lirc_zilog
/etc/init.d/mysqld start
/etc/init.d/lirc start
/etc/init.d/mythbackend start
/etc/init.d/mythjobqueue start


Mythtv->Setup-General

LIRC daemon socket    /var/run/lirc/lircd

Notes on Fedora 15 Install

Using the default nouveau video driver GeForce 6200 SVideo

        Add boot option to grub.conf nouveau.tv_norm=NTSC-M 

kernel /vmlinuz-2.6.40.6-0.fc15.x86_64 ro root=UUID=4b78f456-a78b-4f2b-b4b6-392bd5a2b215 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us nouveau.tv_norm=NTSC-M quiet initrd /initramfs-2.6.40.6-0.fc15.x86_64.img

Installing MS Core Fonts

yum install rpm-build cabextract ttmkfdir wget
wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec
rpmbuild -ba msttcorefonts-2.0-1.spec
yum install --nogpgcheck /root/rpmbuild/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm


Useful Links

http://blog.grantgoodyear.org/2010_05_01_archive.html

Notes

Crash in MythNews

2012-01-01 10:26:35.859302 I  MythUIWebBrowser: Loading css from - file:///usr/local/share/mythtv/themes/default/htmls/mythbrowser.css
2012-01-01 10:26:35.866052 I  MythUIWebBrowser: enabling plugins
** (process:7422): DEBUG: NP_Initialize
** (process:7422): DEBUG: NP_Initialize succeeded
** (process:7422): DEBUG: NP_Initialize
** (process:7422): DEBUG: NP_Initialize succeeded
/builddir/build/BUILD/icedtea-web-1.0.6/plugin/icedteanp/IcedTeaNPPlugin.cc:2016: thread 0x2793a60: Error: Invalid plugin function table.
** (<unknown>:7422): DEBUG: NP_Initialize
** (<unknown>:7422): DEBUG: NP_Initialize succeeded
** (<unknown>:7422): DEBUG: NP_Initialize
** (<unknown>:7422): DEBUG: NP_Initialize succeeded
Solution
   Remove all files in .mythtv/MythNews
SQL Profiling script
Please remember to put the password for your admin user at the point marked XXX.
The script waits for the SQL load to get over 75% then starts to dump
a file called sqlload'timestamp' to your Desktop, it stops when the
load falls back below 75%.
If a few users could run it for testing it would be useful, it ONLY
starts to dump when load is > 75%
#!/bin/sh
FILENOW=`date +%a"."%b%d"."%H":"%M":"%S`
COUNT="0"
cd ~/Desktop
LOADOUTPUT="sqlload@""$FILENOW"
touch "$LOADOUTPUT"
SQLLOAD="0"
while [ "$SQLLOAD" -le 75 ] ; do
SQLLOAD=`top -b -n 1 | grep mysqld | awk -F " " '{ print $9 }'`
done;
while [ "$SQLLOAD" -ge 75 ]; do
mysql -uroot -pXXXADDYOURPASSWORDHEREXXX -e"SHOW full processlist;" >>
"$LOADOUTPUT"
NEWNOW=`date +%a"."%b%d"."%H":"%M":"%S`
echo -e "**************\n\n\n$NEWNOW\n\n\n Next Pass" >> "$LOADOUTPUT"
COUNT=`echo "$COUNT + 1" | bc`
echo "Count $COUNT  sqlload $SQLLOAD"
sleep 1
SQLLOAD=`top -b -n 1 | grep mysqld | awk -F " " '{ print $9 }'`
done
echo "Glitch finished at $NEWNOW, end of Run" >> "$LOADOUTPUT"

_______________________________________________

UDEV

KERNEL=="video[0-9]", DRIVERS=="ivtv", ATTRS{subsystem_device}=="0x8801",  SYMLINK+="PVR150-0"
KERNEL=="video[0-9]", DRIVERS=="ivtv", ATTRS{subsystem_device}=="0xe807",  SYMLINK+="PVR150-1"
KERNEL=="video[0-9]", DRIVERS=="ivtv", ATTRS{subsystem_device}=="0xe817",  SYMLINK+="PVR150-2"
DRIVERS=="em28xx", SYMLINK+="HVR950-0"
#KERNEL=="dvb0.frontend0", DRIVERS=="em28xx", SYMLINK+="HVR950-0"
#KERNEL=="video[0-9]", DRIVERS=="cx18", SYMLINK+="HVR1600-1"
#KERNEL=="video[0-9]*", DRIVERS=="cx18", ATTRS{subsystem_device}=="0x8389",  SYMLINK+="HVR1600-1"


Fedora 16 Service Configuration

chkconfig --list
systemctl enable mysqld.service
systemctl enable mythbackend.service
systemctl enable mythjobqueue.service