Difference between revisions of "User:Mrand"

From MythTV Official Wiki
Jump to: navigation, search
(Random stuff)
m (Steps used for install)
Line 54: Line 54:
 
#:: Option "SuspendTime" "0"
 
#:: Option "SuspendTime" "0"
 
#:: Option "OffTime" "0"
 
#:: Option "OffTime" "0"
#: EndSection  
+
#: EndSection
 +
# [[Mrand/non myth stuff]]
 
# Now for lirc.  Considering how easy everything else is, I'm still trying to figure out why lirc has to be so hard.
 
# Now for lirc.  Considering how easy everything else is, I'm still trying to figure out why lirc has to be so hard.
 
# After many hours of searching on the web for the latest /etc/lirc/lircd.conf file, I stumbled upon a posting that pointed out lirc files in /usr/share/lirc/remotes/mceusb as a possible source.  Amazingly, you still have to download or manually create /home/mythtv/.lircrc and /home/mythtv/.mythtv/lircrc
 
# After many hours of searching on the web for the latest /etc/lirc/lircd.conf file, I stumbled upon a posting that pointed out lirc files in /usr/share/lirc/remotes/mceusb as a possible source.  Amazingly, you still have to download or manually create /home/mythtv/.lircrc and /home/mythtv/.mythtv/lircrc

Revision as of 14:31, 26 April 2008

Electrical engineer with a decent (abet aging) software background (not up on OO programming yet).

Equipment

  • Video in/capture: Hauppauge WinTV-PVR-USB2 using composite inputs from cable box (a DCT2524/1614)
  • Video out: VGA to SVIDEO Scan converter: Scan-IT 1024 Pro Plus (which is a relabeled unit made by Averkey)
  • Hard-drive: 2x Western Digital WD7500AAKS 750 GB SATA, each extracted from a mybook external USB exclosure (p/n WDG1U7500N)
  • Processor: E2200 (2.2 GHz) Core 2 Duo (/proc/cpuinfo says 4392.21 bogomips)
  • Motherboard: an el-cheapo (free, actually) ECS 945GCT-M V2.0 uATX, with
    • 82801G (ICH7) chipset: [8086:27cc] (rev 01)
    • 82801 PCI Bridge: [8086:244e] (rev e1)
    • 82945G/GZ Integrated Graphics and memory Controller [8086:2772] (rev 02)
    • Realtek RTL8101E PCI Express Fast Ethernet controller [10ec:8136] (rev 01)

Steps used for install

In the hopes of helping other less experienced people being able to bring up their own system without spending as much time as I had to spend hunting down various items, here is a step by step list of what I used to install:

  1. Grabbed alternate install .iso CD for Ubuntu, because I wanted to do RAID
  2. Installed Ubuntu:
    • Partitioned two drives identically:
      1. XFS for /var, w/allocsize in /etc/fstab set to 512 Meg to reduce fragmentation): noatime,nodiratime,logbufs=8,allocsize=512m
      2. EXT3 for /boot
      3. EXT3 for everything else
    • Set each partition to be RAID 1 protected with its twin on the other drive
    • Set LVM on top of the RAID 1 for each partition except boot
    • Possibly a few other steps I've forgotten
  3. Let Ubuntu update itself
  4. $ apt-get install mythbuntu-desktop
  5. Get VNC working (seems like myth control center should do this when you enable VNC)
    • Add "DisallowTCP=false" to file "/etc/gdm/gdm.conf-custom" so remote vnc will work
    • Uncomment the unset line in ~/.vnc/xstartup
    • chmod 0750 xstartup (may already be that way)
    • add gnome-session& or xfce4-panel & xfwm4 to xstartup
      (KDE isn't installed by default)
    • I wasn't happy with the default 1024x768 resolution when I launched vncserver and connected to it with a vnc client, so I created an alias:
      alias vnc='echo "vncserver -geometry 1280x1024";vncserver -geometry 1280x1024'
      (if and when I want a smaller 1024 window, I just run vncserver rather than my alias)
  6. Enable mythfilldatabase to run regularly (yet another thing that should be prompted at install and auto configured): "mythfilldatabase Log Path" must be set to a writable filename (ex: /var/log/mythtv/mythfilldatabase.log), not a directory name.
  7. Needed channel changer controller:
    • Hunt for hours to find the name of the serial-port channel changing program for Motorola cable boxes. Finally found it on the Ubuntu website. Turns out that it is: dct-channel.tar.bz2
    • Downloaded it
    • $ apt-get install libc6 (install C compiler - includes libc6-dev)
    • $ tar xjvf dct-channel.tar.bz2
    • $ make
    • For firewire, check out User:Steveadeff#6200changer.sh
  8. $ apt-get install hddtemp (temperature reading util)
  9. $ apt-get install xfsdump (XFS filesystem Administrative utils) - maybe not needed
  10. Install UPS stuff per security domain writeup:
    • $ apt-get install nut-cgi (UPS monitoring utils)
    • Use useradd or adduser to create users nutdev' and nutsrv'. Put them both in a group called 'nut'.
    • Needum files in /etc/nut, per Linux Lore
  11. Keep screen saver from starting:
    Section "ServerFlags"
    Option "BlankTime" "0"
    Option "StandbyTime" "0"
    Option "SuspendTime" "0"
    Option "OffTime" "0"
    EndSection
  12. Mrand/non myth stuff
  13. Now for lirc. Considering how easy everything else is, I'm still trying to figure out why lirc has to be so hard.
  14. After many hours of searching on the web for the latest /etc/lirc/lircd.conf file, I stumbled upon a posting that pointed out lirc files in /usr/share/lirc/remotes/mceusb as a possible source. Amazingly, you still have to download or manually create /home/mythtv/.lircrc and /home/mythtv/.mythtv/lircrc
    • I might need a newer version of lirc because I have a SMK version of the MCE remote.
    • Ubuntu forums to the rescue again. Other examples of building exist as well.
  15. Image quality (especially color depth) is lacking. Maybe resolution/mode related?
  16. Enable S.M.A.R.T. monitoring to watch for this type of thing
  17. I need to open up a small hole/port in my firewall so I can have remote ssh access. And need to check security via nmap, and securing the application in general, including securing phpmyadmin. Maybe Webmin will make sure I don't miss something.
  18. I'm interested in giving TVWish a try, although I'll probably wait until 0.21 arrives next month. I've noticed plenty of good shows and movies are on at strange times and I'd like to not have to monitor t.v. listings to find them. This may be my undoing - MythTV is more a toy than a tool to me... if I have lots of good t.v. to watch, I may actually watch it - and I don't have time for that![1]
  19. I'm also interested in Pluto and maybe home automation. Someday. The wife might be interested in MythRecipe also.

Stuff to keep an eye on

  • /var/log is where all the logs are kept
  • vaapi, to be available in libva, may lower the power consumption and increase playback speed and quality. Someday. Hopefully sooner than later.
  • After rebooting, my mythfilldatabase sometimes stops running... need to investigate. Do I need to prime it?


If When there's a problem...

  • I've removed "quiet" from the kernel line of /boot/grub/menu.lst
  • If there are major boot troubles, you can remove the word "splash" from the kernel line as well

VFS: busy inode on changed media

If you make the mistake of ejecting with the button on the front of your CD/DVD drive, the OS may be unable to unmount it and will flood /var/log/messages (the System Log) with "VFS: busy inodes on changed media." Solution is to let the apps eject the disk. But if you forget:

  1. $sudo eject
  2. Let it eject and then push the button on your drive to pull the empty CD tray back in.
  3. sudo eject -t (wasn't even necessary for me)


SQL/database corruption

Happens most often when a reboot without graceful shutdown occurs:

/etc/myth/mysql.txt contains all the important details (username and password). Interesting log files:

  • /var/log/mysql/mysql.log
  • /var/log/mysql/mysql.err

I have a script that I've created:

$ less cleandatabase.sh
echo '/etc/init.d/mythtv-backend stop'
/etc/init.d/mythtv-backend stop

echo '/etc/init.d/mysql stop'
/etc/init.d/mysql stop

echo 'check/fix database corruption'
echo 'cd /var/lib/mysql/mythconverg'
cd /var/lib/mysql/mythconverg
echo 'myisamchk -f -r *.MYI'
myisamchk -f -r *.MYI

echo '/etc/init.d/mysql start'
/etc/init.d/mysql start
echo '/etc/init.d/mythtv-backend start'
/etc/init.d/mythtv-backend start


Random stuff

submitting bug report

When submitting a bug report, include frontend and backend logs, with "-v network" and "-v record,channel,siparser" if at all possible. GDB output is highly desirable too.

boot problems

sudo apt-get install bootchart

will install a program which will create a .png image showing you the process time during boot

Future ideas

  • Measure hd performance (with hdparam?) and when I eventually roll out RAID5 or something, try: "echo "1024" >> /sys/block/md0/md/stripe_cache_size" (2048 is probably too high in most cases - and this setting goes away at each reboot). Also investigate /sys/block/md0/md/sync_speed_max and sync_speed_min.

Improve signal quality

The ivtv wiki] has some mostly common sense things to do to improve signal quality, originally suggested by Andy Walls:

  • Ensure you are using 75 ohm splitters that cover your desired frequency range (55 - 802 MHz for the current US NTSC broadcast allocation).
  • Ensure that all unused cable runs, wall jacks, or splitter outputs are properly terminated in a 75 ohm load.
  • Replace RG-58/U cables with RG-6/U cables. RG-6/U has about 3 dB less loss per 100 feet at 400 MHz than RG-58/U according to one manufacturer. (according to this source: http://www.rfcafe.com/references/electrical/coax_chart.htm).
  • Add a broadband TV amplifier as close as you can to where the signal comes into your location, ideally before any splitters or long cable runs. If you don't also use your cables to receive FM radio signals and the amplifier has an FM trap, set the FM trap to "IN" to reduce intermodulation products induced in the tuner by the FM broadcasts in the 88-108 MHz band. Set the trap to "OUT" if amplifying a cable television feed. Cable uses frequencies in the FM broadcast range for TV channels. Please be aware that when you have a cable internet modem you will have to put this before the amplifier!!!! The amplifier will filter out the frequencies used by the cable company to transport the network data.
  • Make sure you have an in-line lightning protection/grounding unit installed in the cable close to where the signal comes into your location. Grounding the shield of the coax protects your gear from electrical transients induced by nearby lightning. "Full stop Grounding the shield of the coaxial cable using the lightning protector may also improve the signal quality in you location especially if using a consumer-quality antenna amplifier.  :)"