Wednesday, February 12, 2014

My OpenELEC & MythTv (mythbuntu12.04 LTS) setup

The real key is step 6 the other steps were needed, but it was step 6 that makes the difference!

I'm now running Raspberry Pi frontends with a MythTV backend.  In short it works. But you need the decoder licenses and willingness to seriously overclock it. 

WARNING I VOIDED THE WARRANTY ON MY Pi TO MAKE THIS WORK. I'M NOT RESPONSIBLE FOR ANY CONSEQUENCES OR EVENTUAL REPERCUSSIONS.

Beyond the obvious, "Can I do it" question, my other driver was to cut power. Ok it's not a great savings, the power cost of a 500+ watt computer is small compared to a refrigerator or a air conditioner.  In contrast, when comparing the aforementioned computer's power demands and heat generated, a Raspberry Pi is negligible, even when running as hard as I'm pushing them.  And not having fan noise, or extra heat in the media cabinet was a plus as well.

Now, go get the decoder licenses. It took about 5 hours for them to come, so ordering them early isn't bad. Also I'm using a powered usb hub that is capable of powering the pi and serving three usb ports for processing you will need this. I'm using this sd card, some people have problems, so get two and keep a hot backup image, just in case.  And finally, for a remote control I'm using StreamZap. I did try a Logitech mini diNovo but for now wanted the look of a typical remote. Extra stuff: male to male audio cable, for music playback without using the tv; usb extension cables to get the usb Wi-Fi dongle away from the tv; Tenda 300Mbps Dual Band Wireless N USB Adapter (W522U), heat sinks.

(all the above links are to the actual items I used, except for the audio cable. I bought mine at a local parts store years ago.)

Steps

  1. Install OpenELEC
  2. Fix the double press issue with the remote.
    1. Windows, 
      1. open an explorer window to the pi and go to the Configfiles folder.
      2. create a folder for udev.rules.d.
      3. create a file named remote-control-lirc.rules and put the following in it as one line. SUBSYSTEM=="rc", ATTRS{protocols}=="*rc-5-sz*" RUN+="/bin/sh -c 'echo rc-5-sz > /sys$env{DEVPATH}/protocols'"
    2. SSH
      1. cd or mkdir to /storage/.config/udev.rules.d
      2. follow step 3 above
  3. Change shutdown button to reboot. 
    1.  Windows
      1. explorer...  Userdata\keymaps
      2. create a file called keymaps.xml and add:
        <keymap>
          <global>
            <remote>
              <power>XBMC.Reboot()</power>
            </remote>
          </global>
        </keymap>
    2. SSH
      1. /storage/.xbmc/userdata/keymaps
      2. step 2
  4. Overclock
    1. your on your own, but here's my settings
      gpu_mem=100
      gpu_mem_512=128
      arm_freq=1000
      arm_freq_min=900
      core_freq=500
      core_freq_min=450
      gpu_freq=600
      sdram_freq=600
      over_voltage=7
      over_voltage_min=7
      current_limit_override=0x5A000020
      force_turbo=1
      hdmi_force_hotplug=1
      hdmi_group=1
      hdmi_mode=5
      hdmi_ignore_cec_init=1

  5. Adjust the XBMC advanced settings
    1. Windows
      1. Userdata
      2. advancedsettings.xml
        <advancedsettings>

          <network>
            <cachemembuffersize>134217728</cachemembuffersize>
          </network>

        </advancedsettings>

    2. SSH
      1. /storage/.xbmc/userdata/advancedsettings.xml
  6. Adjust the Network Buffer Size! (CRITICAL)
    1. Windows
      1. Configfiles\sysctl.conf

        net.core.wmem_max=67108864
        net.core.rmem_max=67108864
        net.core.rmem_default=67108864
        net.core.wmem_default=67108864

        net.ipv4.tcp_rmem= 67108864 67108864 67108864
        net.ipv4.tcp_wmem= 67108864 67108864 67108864

         
    2. SSH
      1. /storage/.config/sysctl.conf
  7. config the cmyth pvr plugin.

No comments:

Post a Comment