Archive:HOW-TO:Install XBMC 9.11(SVN) on Mythbuntu 9.10 with JYA repos and Asus AT3N7A-I Mainboard: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Rodercot
(Undo revision 15230 by 78.26.187.33 (Talk))
>Rodercot
No edit summary
Line 1: Line 1:
Hello! Can you tell me how i can register mail at <a href="http://google.com">google</a> <a href=http://google.com>google</a> http://google.com
__TOC__<br>
 
<div style="text-align: justify;">'''DISCLAIMER''' This is an unofficial guide not supported by the xbmc-team. The following information is based on my experiences in setting up XBMC on different platforms and configurations. The way I do things in Linux or perform certain steps may not be the simplest or shortest paths but I get the overall result that I want. '''If you use this guide you do so at your own risk...'''</div><br>
'''Difficulty: (Beginner to Intermediate)'''<br>
'''Mythbuntu Release: (9.10)'''<br>
'''MythTV Release: (0.22)'''<br>
'''XBMC Release: (Camelot 9.11 SVN)'''<br>
'''Author: rodercot'''<br>
'''Last Updated: Feb. 22, 2010''' '''Fixed Alsa upgrade section and included links for patching for NV GT2XX & HDMI Audio, added a link to the workaround for xvid ffmpeg green screen fix(temporary).'''
 
==Introduction==
 
I want to first say thanks to all the xbmc-team for a great piece of software, I would also like to thank the countless posters to the various web-sites in some of the resource links I will post later in the guide, without some of your tips or guides I would not have the system running as well as it is - '''So Thanks to You All.''' On with the guide.
 
This guide will explain how to install & configure Mythbuntu 9.10 Front-end Only, update & configure the frontend, add the JY Avenard Repos, update your nvidia-glx drivers with vdpau enabled and finally install XBMC Camelot 9.11 Final from SVN using the Asus AT3N7A-I ION330 Mini-Itx mainboard. This will work with the standard M$ 1039 Rev2 Remote Control and USB Dongle as well. I will include some tips and caveats that I used along the way. The system will also resume and suspend fine within XBMC when complete.<br>
<div style="text-align: center;">'''You should have a Mythbuntu .22 version db dedicated back-end installed and configured PRE using this guide. Do NOT use the guide if your back-end is not .22 as it  will not work with your .21= < version you MUST back-up and update your back-end first.'''</div>
<div style="text-align: center;">'''UPDATE''' This guide is also being used to setup a Zotac IONITX-F-E in the same chassis, I will make any notes or changes to the guide for this specific board as we proceed'''</div>
You should download and setup a couple programs before we get going, you can do most of the stuff from a terminal in the machine you are setting up but it is nice to copy and paste and transfer file to you new machine from a windows remote console, so dwnld putty and filezilla from the software resources below.
 
==Resources==
===Hardware===
* Mainboard - http://asus.com/product.aspx?P_ID=xrR7wto9Z5BL42aU&templete=2
* Chassis - http://usa.aopen.com/products_detail.aspx?Auno=2864
* Slim-DVD - http://us.liteonit.com/us/index.php?option=com_content&task=view&id=270&Itemid=88
* Remote - http://www.mythtv.org/wiki/File:MCE-Remote-2-alt.jpg
===Software===
* Mythbuntu - http://www.mythbuntu.org/9.10/release
* JYA Repos - http://avenard.org/media/Ubuntu_Repository/Ubuntu_Repository.html
* Appswitch - http://www.xpmediacentre.com.au/community/linux-tutorials-guides/33370-myth-tweak-switch-between-myth-xbmc-via-remote.html
* XBMC - https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/9.11_Camelot/
* Alsa-Script - http://ubuntuforums.org/showthread.php?p=6589810#post6589810
* Putty - Windows Version - http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
* Filezilla FTP - Windows Version - http://filezilla-project.org/download.php?type=server
===Caveats===
* USB Autoresume fix - http://ubuntuforums.org/showthread.php?t=1359382
* HDD not-detected workaround - http://ubuntuforums.org/showthread.php?t=1349898
* Bluetooth possible fix - Post 17 -  http://ubuntuforums.org/showthread.php?t=1264532
* wake on device help - [[Enable_Wake-On-Device]] Thanks Outleradam
* xorg configuration - http://ubuntuforums.org/showthread.php?t=1003099&page=2
==My Configuration==
<div style="text-align: justify;">I should tell you a little about my setup so you know to proceed or not. I think I have tried every config I could try to get where I am. myth protocol, primary, secondary back-ends, combined frontend-backend machines - nothing was without constant tinkering so I went this route. '''Note''' If you do not have a dedicated back-end for mythbuntu this setup is rather useless to you - although, you can setup your frontend only machine this way and add your back-end later, this guide will not be extended to include setting up a mythbuntu back-end.</div><br>
* Myth1 - dedicated myth 8.10 backend with 3 pvr-150 and Q950 OTA HD Tuner. Schedules direct for guide information
* Myth2 - Asrock ION330 - Myth 9.10, XBMC 9.11, MCE Remote, 52" Aquos, Denon AVR-988, HDMI (5.1) 195-glx
* Myth3 - Asus AT3N7A-I ION330 - Myth 9.10, XBMC 9.11, MCE Remote, 32" 1080p LG, HDMI (Stereo) 195-glx
* Serv1 - Unraid Media Server for all Media
* Serv2 - Unraid Data Server for all Data<br>
* SD Movies are all Movies1/Movie_Name/Video_TS/file.vob (No Compression)<br>
* HD Movies are all HDMovies1/Movie_Name/file.ts in VC1 or H264 all converted to dts-hd audio<br>
* TVshows are all TVShows1/TVShow_Name/Season/show.name.sxxexx.epname.avi<br>
* Music is all Music1/Artist/Album/song.flac<br>
* NFO's are all handled by Media Companion Gen2 - Thanks Billy<br>
==Step 1 Setup Motherboard & Install Mythbuntu 9.10==
<div style="text-align: justify;">The Asus AT3N7A-I is a pretty compact little board with ATX2 24 and 4 pin Pwr headers. If you read the manual you will note that Asus says you should use a minimum 400W PSU - LOL - Show me a Mini-ITX Chassis with a 400W PSU are we not looking to reduce heat and power consumption here. Ultimately I picked up the little Aopen S135A with an internal DC to DC board and an external psu with advertised 84W - It works just fine.''' A Couple things I should mention about hardware, The case I purchased takes a slim DVD requiring a sata-mini pwr/data connector (PICK ONE UP WHILE YOU ARE IN THE STORE - DOH!!!) My Case had no sata power connectors and the one standard 4 pin connector was split to feed the 4 Pin ATX2 on-board connector and an FDD pwr connector. Make sure you get the connectors you to need to assemble the system.'''</div>
<div style="text-align: justify;">'''PWR-LED''' This Asus board will light the pwr led solid while the system is active and then flash when the system is suspended, I searched for a workaround with no luck. There are plenty of users asking for this to be added as a bios feature but so far no luck. I just disconnected the led completely instead of having a flashing blue light in the bedroom all night. I used a 400Gb WD Sata Drive I had laying around the house to install the system on. When assembled it is practically noiseless without anything playing in the room - Very KEWL.</div>
===Bios===
<div style="text-align: justify;">Power On the system and hit delete on your keyboard to get into the bios, it is pretty standard. setup your clock, date, check that your drives are detected and make sure the ide controller is set to Sata. I left the cpu settings as default after trying unlinked overclocking taking the system to 1.95Ghz from 1.60GHz after about 6 reboots it locked up - it runs fine at 1.60GHz. Under advanced - chipset set your iGPU frame buffer to 512Mb. Under on-board devices I disable the bluetooth module for now. Under power settings I changed suspend mode from auto to S3 Only. Then setup your boot settings as you like. Then save and exit, the system will reboot.</div>
===Mythbuntu===
<div style="text-align: justify;">'''NOTE''' Mythbuntu is a great app to install for a stripped down version of Karmic, you can add the full Karmic desktop features later via system roles. If you do not have a backend installed currently that is fine as well, when you get to the part in the setup that asks for your backend (MySql information) you can just click on test and it will fail the connection but will allow you to continue the installation. When you do get to the system roles during the setup just choose '''Frontend Only''' and continue. Tasks like auto-login, power etc are all taken care of for you in mythbuntu so you do not have those issues later. Also Mythbuntu 9.10 uses Grub2 so editing boot lines etc are different than in previous versions we will see that later End '''NOTE'''</div>
Click on the resource link above for mythbuntu, dwnld the latest 9.10 iso, then burn it to a dvd with your favourite iso burning tool. Once you have the ISO on the dvd place the dvd in your ion system and power it up. It will boot from your ISO and give a menu with a few options like run mythbuntu livecd, install mythbuntu, memtest etc... I always like to run memtest for a couple passes on a new machine just to make sure things are happy, '''NOTE''' that a memtest pass will usually take a minimum of 30 Minutes.<br><br>
<div style="text-align: justify;">'''TIP(The following only needs to be done if your HDD is not being detected by partitioin manager) - I initially built the system with a Seagate sata drive and all would load fine until I hit the partition manager and it was blank not allowing me to do anything to the hard drive. This is documented well across the internet and the most normal fix is setting your bios to IDE mode instead of Sata, This board does not have that option. The next common fix is adding all-generic-ide to the initial grub boot line, this is done by pressing your F6 key at the mythbuntu menu - you will get a white line of text near the bottom of your screen and a pop up window to the right side of your screen hit esc to close the window and at the end of that line of text you will see quiet splash -- after the -- and leaving a space you would type all-generic-ide. That did not work for me on this board. The workaround I found out later is included in the resources under HDD Not Detected link. The fix is basically to boot up the livecd load a livecd session then open up a termnial window in the live session - right click your mouse - system - accessories - terminal in the terminal window type:'''
sudo apt-get remove dmraid
'''Once that has done it's thing close the terminal window and you will be back at the desktop. End TIP'''</div><br>
 
Ok! your live session is running - click on the install mythbuntu icon on the desktop. This will start the install program.
Choose your time zone, language and keyboard layout.
now the parition manager will start choose the guided option and let myth create your main (ext4) and swap partitions.
if you prefer your own partition structure then you can choose manual and setup your drive as you like, that is beyond the scope of this guide.
Continue by clicking on forward and answer the next few questions.
You will be asked for your user information.
type in your name, computer name(this is your local host later)
type your user name and password (I suggest you use '''xbmc|xbmc''')for easier editing later)
It will ask if you want to setup your remote and transmitter(for a specific cable box or satellite) I suggest you do as this will populate your ~/.mythtv/lircrc file which you can later edit.
Next is to enable restricted drivers choose yes and this will install nvidia-glx-185.
Finally it will ask you for your mythdatabase information enter that information with the backends ip address, the user and database name should remain unless you changed it on your backend and finally the db password.
(you can get these details from the ~/.mythtv/mysql.txt file on your backend.)'''Password is CASE sensitive so type it in as per'''
After you enter the details click on the test connection and it will either give you a success or fail notification.
'''Sample mysql.txt file for reference'''(I marked the info you need with an > sign) from a terminal or putty login to your backend and type
# cat ~/.mythtv/mysql.txt<br>
>DBHostName=192.168.1.xxx
# By default, Myth tries to ping the DB host to see if it exists.
# If your DB host or network doesn't accept pings, set this to no:
#
DBHostPing=no
>DBUserName=mythtv
>DBPassword=D2ABFbE
>DBName=mythconverg
DBType=QMYSQL3
# Set the following if you want to use something other than this
# machine's real hostname for identifying settings in the database.
# This is useful if your hostname changes often, as otherwise you
# will need to reconfigure mythtv (or futz with the DB) every time.
# TWO HOSTS MUST NOT USE THE SAME VALUE
#
#LocalHostName=my-unique-identifier-goes-here
# If you want your frontend to be able to wake your MySQL server
# using WakeOnLan, have a look at the following settings:
#
"mysql.txt" 39L, 1126C           
 
If All is good then hit forward, myth will supply you with a summary of everything the install will perform.
Press ok and let it install.
Once completed it will ask you to reboot, go ahead and do that. Myth will pop the dvd out of the drive and ask you to hit enter to continue and then restart the system for you.
===Mythbuntu Configuration===
Now you have a clean install of Mythbuntu up and running, by default your mythfrontend will launch you need to choose your language, then it will show you the general screen for setup just click the next icon through and click finish now at the mythfrontend main screen press the left arrow on your keyboard and choose exit mythtv, now you will see a carbon like desktop with a toolbar at the top, on the toolbar left will say applications and on the right will show your wired ethernet connection icon and the clock; Congrats you installed Mythbuntu.
The First thing I like to do is right click on the desktop anywhere and choose '''open terminal here''' the system will launch a terminal window, in the window type:
ifconfig
This will give you your ip address for this machine as well as your details about your e-net connection. pay close attention to the RX, TX Packet lines as well as the collisions line, these will tell you alot about your home networks cabling and connections, '''all my machines are zero except for the txqueuelen which is usually 1000.''' In the Words of Van Wilder "Write that down." LOL, seriously though just make a note of your ip address if your router supplies dhcp you can reserve the address on it later.<br>
next in your terminal let's clean the terminal window by typing:
clear
at the command prompt and that will give us a nice clean terminal window.
Next we a gonna update your operating system for the first time, this will likely take about 20 minutes so get some water, make some coffee and lets go. In your clean terminal window type
sudo apt-get update
then type in your password (if you followed my instructions from above this will be)
xbmc
The system will run through the existing repos in your /etc/apt/sources.list file and return you to the prompt. Now type in
sudo apt-get dist-upgrade
It will list about 200+ upgrades for this first updgrade that is normal go ahead and say Y or n (note the the capital Y) and let it run it's course. When your update is complete it will return you to the command prompt unless there are errors which are not too common on the initial update. go ahead and type
sudo reboot
The will restart your system and return you to the mythbuntu desktop. OK let make sure the nvidia glx drivers are installed OK, right click on your desktop and choose - applications - System - Nvidia X server settings and left click on it. It will open the program if the drivers are loaded OK, you will see a penguin with the nv logo and under that details about the installed driver, it should be 185.xx.xx. If it is not loaded you will not see that screen and it will tell you that there is a problem with your x-drivers - if that is the case head over to the forum and find the thread supporting this guide and we will help you get it sorted out.<br>
===Myth Control Center===
The Mythbuntu control center is the greatest tool, it allows you to change your Myth setup from a GUI without all the work from the command line editing. So let's open it up and get started. Right click on your desktop and choose - applications - System - Mythbuntu Control Centre - click on it and it will open up (it may ask you for your password the first time). You will see a window with a bunch of links down the right side of it, including:
'''Plugins|Proprietary Codecs|Startup Behaviour|System Roles|Themes|Services|Graphics Drivers|Mythexport|Infrared|System Updates|Mysql'''
I am not going to go into details about all of these as you can investigate each one on your own and find out what they do. Alot of the plugins for weather, video, music etc we are going to disable as they are harder to configure and that is what we use XBMC for and trust me it is much easier with xbmc.<br>
So click on the plugins icon you will have a few of them checked off I remove all of them EXCEPT mytharchive and Mythvideo. Mythvideo will give you optical disk support from the mythfrontend for dvd playback etc..you need this plugin for that option. You will also see Mythweb, that allows you to setup schedules and recordings from a browser, I choose to set this up on my backend as that is the machine that is doing the recording anyhow so instead of making things more complicated by having to log into several machines for recording schedules I do not install Mythweb on the frontends.<br>
Now click on Proprietary Codecs on the right and than click on Enable Medibuntu and click apply (you will need to enter your password a few times here) let it do it's thing, it will also remove your plugins at this point. OK! done, now click on enable GPG Keyring and click apply when that is done click on enable w32 or w64 codecs depending on your installed myth version, click on enable libdvd, ffmpeg should already be checked if not check it off now and click on apply and let that all process when complete you will check marks in all the areas other than the not per verion installed codecs is greyed out.<br>
Click on services, SSH should be enabled - if not enable it this gives you access via putty and other remote apps also enable samba and if you want to run a vnc server on your windows or linux desktop for remote access then enable VNC as well. Click apply and wait to finish. Now click on quit we are done with the control centre setup as i said there are many more tools inside here but I will not be going into those in detail, you can find out about all those features from the mythbuntu wiki. '''One more thing, if you are not going to be using the frontend currently then you should stop it from loading at start-up to do this click on startup behaviour and uncheck the automatically start Mythtv Frontend.'''<br>
===JY Avenard repos===
 
let's enable the JYA repos. You can use other repos if you like, but you will be installing several repos to achieve the same goals, the Jya repos include, the latest builds for nvidia-glx driver as well as libs for vdpau and then all the mythbuntu updates and finally the latest compiled mplayer with vdpau enabled. There are three separate repos available release, working, and leading edge, I use the release repos and that is what I will include below.
 
So first we need to open a terminal, so on your desktop right click and choose open terminal here, then in the terminal window type:
cd ~ (enter)
Now we need to get the gpg signing key for the repos you can do that pasting this line into your terminal window hit enter and type in your password.
wget http://www.avenard.org/files/ubuntu-repos/ubuntu-repos.key && sudo apt-key add ubuntu-repos.key && rm ubuntu-repos.key
Now lets add the repository to your local list. '''THIS REPO IS FOR KARMIC(myth9.10) ONLY''' so now paste this line in your terminal window
echo "deb http://www.avenard.org/files/ubuntu-repos karmic release" | sudo tee /etc/apt/sources.list.d/avenard.list
Great! you have added the repo. Now we have a little bit of a workaround to perform here. Type into your terminal window
clear (enter)
We currently have nvidia-glx-185, nvidia-185-libvdpau and nvidia-185-kernel-source installed locally, well we need libvdpau1 to upgrade to the newest drivers but libvdpau1 conflicts with a file in nvidia-185-libvdpau. So we need to download libvdpau1 and install manually. So lets do that. First I like to make a directory for all my downloaded files in one location. I would suggest you follow along as we will use this later as well. In the terminal window type
cd ~ (enter)
sudo mkdir install (enter)
sudo chmod 777 install (enter)
cd install
We are now in our newly created install directory go ahead and paste this line into your terminal window.
wget http://www.avenard.org/files/ubuntu-repos/release/libvdpau1_0.3-0ubuntu1_i386.deb
let it download and then in your terminal window paste this making sure you are still in your /install directory.
sudo dpkg --force-all -i libvdpau1_0.3-0ubuntu1_i386.deb
The above package also has a dependendancy that we need to install as well, so to install vdpau-driver-all type or paste
sudo apt-get install -f
OK! lets update the video drivers to the latest. paste this command into your terminal window.
sudo apt-get update (enter)
sudo apt-get install nvidia-glx-195 nvidia-195-libvdpau nvidia-195-kernel-source
We also need to get one more file for XMBC to configure with VDPAU enabled get this file like so
sudo apt-get install libvdpau-dev
This will remove the existing 185 version glx drivers and install the newest 195 drivers as well as libvdpau-dev; when it's all completed type:
sudo reboot (enter)
Reboot the system and let it load up exit mythfrontend and then load up the nvidia-settings program to check the driver rev. remember right click - application - system - Nvidia X server setting and click on that. It should list 195.XX as the driver installed. This is Good. OK now let's do an update, this will be a big one as it will update a ton of myth files and possibly your kernel and a few others. right click and launch terminal here and type or paste:
sudo apt-get update (enter)
sudo apt-get dist-upgrade (enter)
It will likely take a while, when it finishes installing let reboot again type or paste:
sudo reboot
Congrats, you have finished the second part of the tutorial and your mythfrontend is now .22 with the latest nvidia drivers and all the JYA Updates installed.
===Setting USB Ports to Wake-Up the sytem as well as permissions===
With my system I had a couple issues here one it would not wakup via the remotes power button and when I got that working it would auto resume the system by itself. I fixed both of these issues as follows. I would suggest that you do the first part and try it and then come back and fix the autoresume later if you run into that problem. I am posting some commands from outleradam's wiki [[Enable_Wake-On-Device]]. right click and launch a terminal and we need to be root to perform the following so type or paste
sudo su
Then we need to see if our devices are awake or not,
cat /proc/acpi/wakeup
You will get a list that looks something like the following (Example Only) We are concerned about the USBX devices.
root@zotac-ion:/home/xbmc# cat /proc/acpi/wakeup
Device  S-state  Status  Sysfs node
SMB0      S4    disabled  pci:0000:00:03.2
USB0      S4    disabled  pci:0000:00:04.0
USB2      S4    disabled  pci:0000:00:04.1
US15      S4    disabled  pci:0000:00:06.0
US12      S4    disabled  pci:0000:00:06.1
NMAC      S5    disabled  pci:0000:00:0a.0
PBB0      S4    disabled  pci:0000:00:09.0
HDAC      S4    disabled  pci:0000:00:08.0
XVR0      S4    disabled  pci:0000:00:0c.0
XVR1      S4    disabled
P0P5      S4    disabled
P0P6      S4    disabled  pci:0000:00:15.0
P0P7      S4    disabled  pci:0000:00:16.0
P0P8      S4    disabled  pci:0000:00:17.0
P0P9      S4    disabled  pci:0000:00:18.0
PWRB      S4    *enabled
We want to enable only one of those USBX devices as enabling both tends to cause problems, we will enable USB0 it tends to be most common, you can also take a look at lspci or dmesg to get at little more information on the devices and what you have hooked up.
lets wakeup USB0 by pasting this
echo USB0 > /proc/acpi/wakeup
we will now check that by pasting
cat /proc/acpi/wakeup
again and you will now see that USB0 is enabled but that is for this session only and we need it to happen on every boot so we need to edit our /etc/rc.local file. I use vim to edit my files I like it it is simple and quick if you want to use vim it needs to be installed or you can just use your prefferred editor. skip the next line if you use your own editor
sudo apt-get install vim
Ok lets edit the /etc/rc.local file. '''You only need 1 exit 0 in this file and it is already there so just add this line and save the file
sudo vim /etc/rc.local
This will open the file for editing. now hit the I button on the keyboard that allows you to enter text with vim. '''if you make a mistake just hit :q! to escape the file without changes. Allright let past this line into the file above the existing exit 0 line. make sure there is still one line space above the new line and no line space between the line we are pasting and exit0
echo USB0 > /proc/acpi/wakeup
and the file should look like this
<pre>root@zotac-ion:/home/xbmc# sudo vim /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
 
echo USB0 > /proc/acpi/wakeup
exit 0</pre>
 
We are done so now hit esc which takes us out of editing mode in VIM (you will notice the INSERT comment goes away at the bottom of the screen) now type :wq (that is shift colon lower case w and q)to save the file. Good Job.
===Autoresume===
Now lets fix the autoresume issue.'''NOTE If you do ntt have this problem you should not perform this step until after the system is tested so follow the rest of the guide and then come back here if you have the autoresume issue''' So the description of this problem is you suspend the system within XBMC and right away it resumes or wakes up again. This is how I fixed my system There is also a link in the above resource section to get some more info from the ubuntu forums. Thanks to the author of that post. We need to edit our grub boot line in order to accomplish this fix and we are now using Grub2 with 9.10 so things are a little different so first lets get out of root by typing
exit
at the command prompt and you should be back at your regular command prompt which will look like this
xbmc@zotac-ion:~$
So we are going to edit out default grub boot line, so paste this into your terminal window
sudo vim /etc/default/grub
The file will now open and the line we want to fix is GRUB_COMMAND_LINE_DEFAULT="quiet splash" we are going to add a couple things in here one is the autoresume fix but there is also a conflict on these ion boards between nvidia SMbus and acpi and we want to fix that so we will do that now as well, this is only a workaround currently and it may be fixed in later kernels so you can find the bug reports on google and track them to know when you'll want to remove this line here is a link to one https://bugs.launchpad.net/ubuntu/+source/linux/+bug/440780. Allright hit the I on your keyboard to get into editing mode in vim. now paste this into that line BETWEEN THE QUOTES and leaving a space after the h in splash.
usbcore.autosuspend=-1 acpi_enforce_resources=lax
Now the line should look like this after editing
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1 acpi_enforce_resources=lax"
OK that's added let hit esc to exit editing mode and then type ''':wq''' to save the file. Now we need to update grub let's do that by pasting this
sudo update-grub
ok now lets reboot to make sure we did not screw anything up - LOL :) The final part of this section is to add some persmissions. We will be using PM-Suspend via XBMC and possibly later on some custom /etc/pm/sleep.d custom scripts to help resume or suspend and in order to do that sudo will need to be used and without adding permissions to run sudo without a password the scripts will fail so let add that permission. Yet again open a terminal window you should know how by now. and type
sudo su
now we are going to edit your /etc/sudoers file this is the root permissions file so take your time. paste this line in your terminal window
visudo
voila! the file opens and looks like this (Sample File Only)
<pre>root@zotac-ion:/home/xbmc# visudo
  GNU nano 2.0.9            File: /etc/sudoers.tmp
 
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#
 
Defaults        env_reset
 
# Host alias specification
 
# User alias specification
 
# Cmnd alias specification
 
# User privilege specification
root    ALL=(ALL) ALL
 
# Uncomment to allow members of group sudo to not need a password
                              [ Read 25 lines ]
^G Get Help  ^O WriteOut  ^R Read File ^Y Prev Page ^K Cut Text  ^C Cur Pos
^X Exit      ^J Justify  ^W Where Is  ^V Next Page ^U UnCut Text^T To Spell</pre>
Scroll down the file & below the %admin ALL=(ALL) ALL line paste this below that line '''xbmc is YOUR username you use to login with if it is not then change to what yours is'''
xbmc ALL=(ALL) NOPASSWD: /usr/sbin/pm-suspend
OK now hit ctl-x to exit then shift y for a capital Y for yes and then enter to write to the sudoers file. now type
exit
to leave root mode and we can now test this right away before setting up xbmc. so paste the following into your terminal window.
sudo pm-suspend
'''notice you did not have to enter a password here that was achieved by editing the /etc/sudoers file''' if all is working right then everything should go-to sleep just fine and then you should be able to power back on with your remotes pwr button. '''NOTE I am setting up an Zotac IONITX-F-E board for one of my family and all the above in this section I needed to do but in the bios I need to set the bios to S3(STR) and repost video on S3 resume to (NO). and it works that way. The rest of the guide also works on this board as well if anything is different I will post a tip referencing this board as we proceed. Were getting there.
===Alsa Configuration===
Mythbuntu 9.10 ships with Alsa rev 1.0.20 which works just fine out of the gate, all you need to do is the following open a terminal and paste.
alsamixer
then make sure you master and pcm volumes are all the way up well 90% anyhow then scroll over to the iec958 channels and under each one hit your M key on the keyboard to unmute those channels and then hit your esc key to exit alsamixer. '''If you want to set up the latest and greatest alsa version then do the following - '''THIS IS ONLY IF YOU WANT THE LATEST SOUND WORKS FINE WITH 1.0.20'''
'''UPDATE''' If you are wanting HDMI Audio with your new GTXXX Nvidia Cards Then you need to install the latest version of Alsa and then you need to patch your downloaded alsa source with a patch created by paoleary, I have tested this on a GT220/GT240 on an ION platform with all NV drivers from 185-195.36.03 and they all work fine with LPCM audio via hdmi.
<pre>cd ~
cd install
http://www.scottcraftboats.com/downloads/linux/AlsaUpgrade-1.0.22.1-2.tar
tar xvf AlsaUpgrade-1.0.22.1-2.tar
sudo ./AlsaUpgrade-1.0.22.1-2.sh -d this will download the source code for you as well as some updates needed.
now if you want to patch your Alsa for a Nvidia GT220 see here:</pre>
[[HOW-TO set up HDMI audio on nVidia GeForce G210,  GT220, or GT240|Patch Your NV GT2XX]] (Thanks paoleary)
 
<pre> Follow all the directions from the patch wiki and then you can continue here with your setup.
OK! all patched. Then we need to compile and install Alsa.
cd ~/install
sudo ./AlsaUpgrade-1.0.22.1-2.sh -c let the script compile your alsa build and then finally
sudo ./AlsaUpgrade-1.0.22.1-2.sh -i to install the build. Now Reboot to completele the install.
sudo reboot</pre>
 
launch a terminal and run alsamixer again
alsamixer (if you patched your alsa for new cards then you will only have to unmute the one spdif channel now)
It will list your new alsa version at the top of the page is should say 1.0.22 or the like. Ok again turn up the main and pcm volumes if present and unmute your iec958 channels by pressing m on your keyboard under each channel. The next thing most people report sound issues in xbmc like playing to fast etc, I have only had one issue with some weird .mp3 tv show encoding hdmi and iec958 have always worked for me with just the std setup in XBMC sound properties like default-iec958 or default-hdmi or iec958-iec958 or finally hdmi-hdmi but if you notice some files that playback strange then here is a .asoundrc file you can try it works for me but there are plenty of version on the xbmc forums you can try by searching. here is my file
<pre>pcm.dmixer {
  type dmix
  ipc_key 1024
  ipc_key_add_uid false
  ipc_perm 0660
  slave {
      pcm "hw:0,3"
      rate 48000
      channels 2
      format S32_LE
      period_time 0
      period_size 1024
      buffer_time 0
      buffer_size 4096
  }
}
 
pcm.!default {
  type plug
  slave.pcm "dmixer"
}</pre>
if you want to use this file then in your terminal window do this
<pre>cd ~
sudo vim .asoundrc</pre>
Now hit i on your keyboard and copy the above file completely and paste it into your terminal window then hit esc and ''':wq''' to save the file. This concludes this section on Alsa.
==XBMC==
I know you can install XBMC from ppa and it is somewhat easier but I like to use my own configure lines as well and I also always have to directories to build in one for the current stable svn version and then the latest build directory to test when I want to so let's get started first we need to install all the dependencies to build xbmc I use a combined list from both the readme.ubuntu and the readme.linux and finally I add a couple files like ccache. Open a terminal window and paste the following
<pre>sudo apt-get install -y subversion make g++ gcc gawk pmount libtool nasm automake cmake gperf unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev python-sqlite libglew-dev libcurl3 libcurl4-openssl-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbis-dev libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libfaac-dev libenca-dev libxt-dev libxtst-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmms-dev libmpeg3-dev libfaad-dev libflac-dev libiso9660-dev libass-dev libssl-dev libavcodec-dev libavformat-dev libpostproc-dev libswscale-dev libmpeg2-4-dev libwavpack-dev liba52-dev libdts-dev zip ccache </pre>
let that install it will take some time. Now we are going to check out the Camelot 9.11 SVN by doing the following
<pre>
cd ~
svn co https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/9.11_Camelot XBMC911</pre>
This will check out the latest Camelot svn build and place it all in a directory called XBMC911 on your system as I said I also check out the latest svn on the same machine if you want to do that as well then do this '''THIS IS NOT NEEDED BUT I LIKE TO BE ABLE TO TEST THE NEWEST VERSION ONCE IN A WHILE'''
<pre>
cd ~
svn co https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk XBMCSVN</pre>
The above will checkout the latest SVN version and place it in a XBMCSVN directory on your system there are also a couple deps required to build the latest svn version you can get those this way
sudo apt-get install fp-compiler gdc libmicrohttpd-dev libmodplug-dev
'''This is only if you want to build the latest version as well for testing you do not need to finish the guide''' OK! now lets continue with the Camelot svn build in your terminal do this
<pre>
cd XBMC911
./bootstrap</pre>
let it do it's thing and then here is my configure line, you do not need to use this you can use a shorter one if you like. Mine disables pulse audio, use /usr as the prefix and enables some external libs. if you want a simple configure line then use this one '''currently there seems to be a bug with Mpeg4 Part files and FFmpeg where you will see a green screen when trying to view any xvid movies. There is a workaround for this which can be found here [http://forum.xbmc.org/showthread.php?t=69363]you need to apply this fix before running configure.'''
./configure --prefix=/usr --disable-pulse
If you want to use external libs then here is my configure line to use
<pre>./configure --prefix=/usr --disable-pulse --enable-external-libmad --enable-external-liba52 --enable-external-libdts --enable-external-libfaad --enable-external-libmpeg2 --enable-external-libflac --enable-external-libvorbis --enable-external-libogg --enable-external-libmpcdec --enable-external-libwavpack --disable-external-libass --disable-external-python --enable-external-ffmpeg</pre>
Let XBMC configure everything and when it is done you can type or paste
make
This will build xbmc for you and make it ready to install, when the make portion is completed you can then paste or type
sudo make install
This will install xbmc for you and it is ready to run now lets reboot again
sudo reboot
Congrats you now have XBMC installed and ready to run if you right click on your desktop - application - multimedia you will see that we can call XBMC from the main menu now as well. KEWL
===XBMC Autostart===
Autostarting XBMC in Mythbuntu is really simple. right click on your desktop - settings - xfce4 Settings Manager then click on Session and Startup. Now goto Application Autostart in the toolbar across the top and click on Add, a Window will pop up and type in the name (XBMC) description (Media Center or Whatever you want) and then command (xbmc) if you want to start xbmc with options you can enter them here as well like standalone etc... click ok and close the windown.<br>
Lets de-activate the gnome screensaver at the same time. right click on the desktop - applications - settings - screensaver; now uncheck "activate screensaver when computer is idle" then click on Power Management at the bottom of the window; and under the Display section change this to say NEVER and finally click on the General Tab at the top and change "When the power button is pressed" to read shutdown. OK! that is configured. let's move on to appswitching with the remote's LiveTV button.
===Appswitch===
The guys over at the Aussie Media Center site have a great app to allow you to switch on the fly between XBMC and Mythfrontend. It will switch to either program and will kill all whichever program is currently running. This is also great if you are running an htpc with just the remote and no keyboard or mouse so if you do get a crash of these programs and you land on the desktop you can just press the livetv button on your remote and voila you are back in business. So lets set it up. OK launch a terminal window and then do this
<pre>
cd ~/install
wget http://www.scottcraftboats.com/downloads/linux/appswitch.tar</pre>
Now lets make a script directory '''NOTE in the chown commands below xbmc is the username make sure you type the username you login with if it is not xbmc'''
<pre>
cd ~
sudo mkdir scripts
sudo chmod 777 scripts
cd install
tar xvf appswitch.tar
mv irexec ~/.lirc
mv appswitch.pl ~/scripts
sudo chmod +x ~/scripts/appswitch.pl
sudo chown xbmc:users ~/scripts/appswitch.pl
sudo chown xbmc:users ~/.lirc/irexec</pre>
Now we need to edit our ~/.lircrc file so that irexec will start on reboot so lets do that.
<pre>
cd ~
sudo vim .lircrc </pre>
ok! now we are going to add this line to the bottom of the file first hit i to enter editing mode then scroll down the file to the last "include" line and enter this below it;
include ~/.lirc/irexec
ok now hit esc to exit editing mode and type ''':wq''' to save the file. Now the final thing here we have to do is edit our mythtv lircrc file to define the button press. First we need to find out how the buttons label is defined in your lircd.conf file. '''Remember this guide is using an MCE Remote so it is working around those definitions''' OK! in your terminal type this
cat /usr/share/lirc/remotes/mceusb/lircd.conf.mceusb
If we look at the list we will see that livetv is defined as "Livetv" write that down now we are going to edit the lircrc file so
<pre>
cd ~
cd .mythtv
sudo vim lircrc</pre>
Now scroll down through the file and see if the Livetv button is defined anywhere in the mceusb_hauppauge section if not then we need to add it so let do that, press the i key on your keyboard to go into editing mode, then scroll to somewhere in the mceusb section and paste this in after an "end and before a begin" section leaving a space between them.
<pre>begin
    remote = mceusb_hauppauge
    prog = irexec
    button = Livetv
    config = /home/xbmc/scripts/appswitch.pl
end</pre>
now hit the esc key to exit editing mode and type ''':wq''' to save the file. And finally
sudo reboot
When it boots back up you can test it, remember if you do not have a back-end yet that you will likely get an error in mythfrontend just exit out of it back to your desktop and hit the livetv button to restart xbmc.
===Setup XBMC===
more to come...

Revision as of 14:22, 26 February 2010


DISCLAIMER This is an unofficial guide not supported by the xbmc-team. The following information is based on my experiences in setting up XBMC on different platforms and configurations. The way I do things in Linux or perform certain steps may not be the simplest or shortest paths but I get the overall result that I want. If you use this guide you do so at your own risk...


Difficulty: (Beginner to Intermediate)
Mythbuntu Release: (9.10)
MythTV Release: (0.22)
XBMC Release: (Camelot 9.11 SVN)
Author: rodercot
Last Updated: Feb. 22, 2010 Fixed Alsa upgrade section and included links for patching for NV GT2XX & HDMI Audio, added a link to the workaround for xvid ffmpeg green screen fix(temporary).

Introduction

I want to first say thanks to all the xbmc-team for a great piece of software, I would also like to thank the countless posters to the various web-sites in some of the resource links I will post later in the guide, without some of your tips or guides I would not have the system running as well as it is - So Thanks to You All. On with the guide.

This guide will explain how to install & configure Mythbuntu 9.10 Front-end Only, update & configure the frontend, add the JY Avenard Repos, update your nvidia-glx drivers with vdpau enabled and finally install XBMC Camelot 9.11 Final from SVN using the Asus AT3N7A-I ION330 Mini-Itx mainboard. This will work with the standard M$ 1039 Rev2 Remote Control and USB Dongle as well. I will include some tips and caveats that I used along the way. The system will also resume and suspend fine within XBMC when complete.

You should have a Mythbuntu .22 version db dedicated back-end installed and configured PRE using this guide. Do NOT use the guide if your back-end is not .22 as it will not work with your .21= < version you MUST back-up and update your back-end first.
UPDATE This guide is also being used to setup a Zotac IONITX-F-E in the same chassis, I will make any notes or changes to the guide for this specific board as we proceed

You should download and setup a couple programs before we get going, you can do most of the stuff from a terminal in the machine you are setting up but it is nice to copy and paste and transfer file to you new machine from a windows remote console, so dwnld putty and filezilla from the software resources below.

Resources

Hardware

Software

Caveats

My Configuration

I should tell you a little about my setup so you know to proceed or not. I think I have tried every config I could try to get where I am. myth protocol, primary, secondary back-ends, combined frontend-backend machines - nothing was without constant tinkering so I went this route. Note If you do not have a dedicated back-end for mythbuntu this setup is rather useless to you - although, you can setup your frontend only machine this way and add your back-end later, this guide will not be extended to include setting up a mythbuntu back-end.


  • Myth1 - dedicated myth 8.10 backend with 3 pvr-150 and Q950 OTA HD Tuner. Schedules direct for guide information
  • Myth2 - Asrock ION330 - Myth 9.10, XBMC 9.11, MCE Remote, 52" Aquos, Denon AVR-988, HDMI (5.1) 195-glx
  • Myth3 - Asus AT3N7A-I ION330 - Myth 9.10, XBMC 9.11, MCE Remote, 32" 1080p LG, HDMI (Stereo) 195-glx
  • Serv1 - Unraid Media Server for all Media
  • Serv2 - Unraid Data Server for all Data
  • SD Movies are all Movies1/Movie_Name/Video_TS/file.vob (No Compression)
  • HD Movies are all HDMovies1/Movie_Name/file.ts in VC1 or H264 all converted to dts-hd audio
  • TVshows are all TVShows1/TVShow_Name/Season/show.name.sxxexx.epname.avi
  • Music is all Music1/Artist/Album/song.flac
  • NFO's are all handled by Media Companion Gen2 - Thanks Billy

Step 1 Setup Motherboard & Install Mythbuntu 9.10

The Asus AT3N7A-I is a pretty compact little board with ATX2 24 and 4 pin Pwr headers. If you read the manual you will note that Asus says you should use a minimum 400W PSU - LOL - Show me a Mini-ITX Chassis with a 400W PSU are we not looking to reduce heat and power consumption here. Ultimately I picked up the little Aopen S135A with an internal DC to DC board and an external psu with advertised 84W - It works just fine. A Couple things I should mention about hardware, The case I purchased takes a slim DVD requiring a sata-mini pwr/data connector (PICK ONE UP WHILE YOU ARE IN THE STORE - DOH!!!) My Case had no sata power connectors and the one standard 4 pin connector was split to feed the 4 Pin ATX2 on-board connector and an FDD pwr connector. Make sure you get the connectors you to need to assemble the system.
PWR-LED This Asus board will light the pwr led solid while the system is active and then flash when the system is suspended, I searched for a workaround with no luck. There are plenty of users asking for this to be added as a bios feature but so far no luck. I just disconnected the led completely instead of having a flashing blue light in the bedroom all night. I used a 400Gb WD Sata Drive I had laying around the house to install the system on. When assembled it is practically noiseless without anything playing in the room - Very KEWL.

Bios

Power On the system and hit delete on your keyboard to get into the bios, it is pretty standard. setup your clock, date, check that your drives are detected and make sure the ide controller is set to Sata. I left the cpu settings as default after trying unlinked overclocking taking the system to 1.95Ghz from 1.60GHz after about 6 reboots it locked up - it runs fine at 1.60GHz. Under advanced - chipset set your iGPU frame buffer to 512Mb. Under on-board devices I disable the bluetooth module for now. Under power settings I changed suspend mode from auto to S3 Only. Then setup your boot settings as you like. Then save and exit, the system will reboot.

Mythbuntu

NOTE Mythbuntu is a great app to install for a stripped down version of Karmic, you can add the full Karmic desktop features later via system roles. If you do not have a backend installed currently that is fine as well, when you get to the part in the setup that asks for your backend (MySql information) you can just click on test and it will fail the connection but will allow you to continue the installation. When you do get to the system roles during the setup just choose Frontend Only and continue. Tasks like auto-login, power etc are all taken care of for you in mythbuntu so you do not have those issues later. Also Mythbuntu 9.10 uses Grub2 so editing boot lines etc are different than in previous versions we will see that later End NOTE

Click on the resource link above for mythbuntu, dwnld the latest 9.10 iso, then burn it to a dvd with your favourite iso burning tool. Once you have the ISO on the dvd place the dvd in your ion system and power it up. It will boot from your ISO and give a menu with a few options like run mythbuntu livecd, install mythbuntu, memtest etc... I always like to run memtest for a couple passes on a new machine just to make sure things are happy, NOTE that a memtest pass will usually take a minimum of 30 Minutes.

TIP(The following only needs to be done if your HDD is not being detected by partitioin manager) - I initially built the system with a Seagate sata drive and all would load fine until I hit the partition manager and it was blank not allowing me to do anything to the hard drive. This is documented well across the internet and the most normal fix is setting your bios to IDE mode instead of Sata, This board does not have that option. The next common fix is adding all-generic-ide to the initial grub boot line, this is done by pressing your F6 key at the mythbuntu menu - you will get a white line of text near the bottom of your screen and a pop up window to the right side of your screen hit esc to close the window and at the end of that line of text you will see quiet splash -- after the -- and leaving a space you would type all-generic-ide. That did not work for me on this board. The workaround I found out later is included in the resources under HDD Not Detected link. The fix is basically to boot up the livecd load a livecd session then open up a termnial window in the live session - right click your mouse - system - accessories - terminal in the terminal window type:
sudo apt-get remove dmraid
Once that has done it's thing close the terminal window and you will be back at the desktop. End TIP


Ok! your live session is running - click on the install mythbuntu icon on the desktop. This will start the install program.

Choose your time zone, language and keyboard layout.
now the parition manager will start choose the guided option and let myth create your main (ext4) and swap partitions.

if you prefer your own partition structure then you can choose manual and setup your drive as you like, that is beyond the scope of this guide.

Continue by clicking on forward and answer the next few questions.

You will be asked for your user information.

type in your name, computer name(this is your local host later)
type your user name and password (I suggest you use xbmc|xbmc)for easier editing later)
It will ask if you want to setup your remote and transmitter(for a specific cable box or satellite) I suggest you do as this will populate your ~/.mythtv/lircrc file which you can later edit.
Next is to enable restricted drivers choose yes and this will install nvidia-glx-185.

Finally it will ask you for your mythdatabase information enter that information with the backends ip address, the user and database name should remain unless you changed it on your backend and finally the db password.

(you can get these details from the ~/.mythtv/mysql.txt file on your backend.)Password is CASE sensitive so type it in as per
After you enter the details click on the test connection and it will either give you a success or fail notification.

Sample mysql.txt file for reference(I marked the info you need with an > sign) from a terminal or putty login to your backend and type

# cat ~/.mythtv/mysql.txt
>DBHostName=192.168.1.xxx # By default, Myth tries to ping the DB host to see if it exists. # If your DB host or network doesn't accept pings, set this to no: # DBHostPing=no >DBUserName=mythtv >DBPassword=D2ABFbE >DBName=mythconverg DBType=QMYSQL3 # Set the following if you want to use something other than this # machine's real hostname for identifying settings in the database. # This is useful if your hostname changes often, as otherwise you # will need to reconfigure mythtv (or futz with the DB) every time. # TWO HOSTS MUST NOT USE THE SAME VALUE # #LocalHostName=my-unique-identifier-goes-here # If you want your frontend to be able to wake your MySQL server # using WakeOnLan, have a look at the following settings: # "mysql.txt" 39L, 1126C

If All is good then hit forward, myth will supply you with a summary of everything the install will perform.

Press ok and let it install.

Once completed it will ask you to reboot, go ahead and do that. Myth will pop the dvd out of the drive and ask you to hit enter to continue and then restart the system for you.

Mythbuntu Configuration

Now you have a clean install of Mythbuntu up and running, by default your mythfrontend will launch you need to choose your language, then it will show you the general screen for setup just click the next icon through and click finish now at the mythfrontend main screen press the left arrow on your keyboard and choose exit mythtv, now you will see a carbon like desktop with a toolbar at the top, on the toolbar left will say applications and on the right will show your wired ethernet connection icon and the clock; Congrats you installed Mythbuntu. The First thing I like to do is right click on the desktop anywhere and choose open terminal here the system will launch a terminal window, in the window type:

ifconfig

This will give you your ip address for this machine as well as your details about your e-net connection. pay close attention to the RX, TX Packet lines as well as the collisions line, these will tell you alot about your home networks cabling and connections, all my machines are zero except for the txqueuelen which is usually 1000. In the Words of Van Wilder "Write that down." LOL, seriously though just make a note of your ip address if your router supplies dhcp you can reserve the address on it later.
next in your terminal let's clean the terminal window by typing:

clear

at the command prompt and that will give us a nice clean terminal window. Next we a gonna update your operating system for the first time, this will likely take about 20 minutes so get some water, make some coffee and lets go. In your clean terminal window type

sudo apt-get update

then type in your password (if you followed my instructions from above this will be)

xbmc

The system will run through the existing repos in your /etc/apt/sources.list file and return you to the prompt. Now type in

sudo apt-get dist-upgrade 

It will list about 200+ upgrades for this first updgrade that is normal go ahead and say Y or n (note the the capital Y) and let it run it's course. When your update is complete it will return you to the command prompt unless there are errors which are not too common on the initial update. go ahead and type

sudo reboot

The will restart your system and return you to the mythbuntu desktop. OK let make sure the nvidia glx drivers are installed OK, right click on your desktop and choose - applications - System - Nvidia X server settings and left click on it. It will open the program if the drivers are loaded OK, you will see a penguin with the nv logo and under that details about the installed driver, it should be 185.xx.xx. If it is not loaded you will not see that screen and it will tell you that there is a problem with your x-drivers - if that is the case head over to the forum and find the thread supporting this guide and we will help you get it sorted out.

Myth Control Center

The Mythbuntu control center is the greatest tool, it allows you to change your Myth setup from a GUI without all the work from the command line editing. So let's open it up and get started. Right click on your desktop and choose - applications - System - Mythbuntu Control Centre - click on it and it will open up (it may ask you for your password the first time). You will see a window with a bunch of links down the right side of it, including:

Plugins|Proprietary Codecs|Startup Behaviour|System Roles|Themes|Services|Graphics Drivers|Mythexport|Infrared|System Updates|Mysql

I am not going to go into details about all of these as you can investigate each one on your own and find out what they do. Alot of the plugins for weather, video, music etc we are going to disable as they are harder to configure and that is what we use XBMC for and trust me it is much easier with xbmc.
So click on the plugins icon you will have a few of them checked off I remove all of them EXCEPT mytharchive and Mythvideo. Mythvideo will give you optical disk support from the mythfrontend for dvd playback etc..you need this plugin for that option. You will also see Mythweb, that allows you to setup schedules and recordings from a browser, I choose to set this up on my backend as that is the machine that is doing the recording anyhow so instead of making things more complicated by having to log into several machines for recording schedules I do not install Mythweb on the frontends.
Now click on Proprietary Codecs on the right and than click on Enable Medibuntu and click apply (you will need to enter your password a few times here) let it do it's thing, it will also remove your plugins at this point. OK! done, now click on enable GPG Keyring and click apply when that is done click on enable w32 or w64 codecs depending on your installed myth version, click on enable libdvd, ffmpeg should already be checked if not check it off now and click on apply and let that all process when complete you will check marks in all the areas other than the not per verion installed codecs is greyed out.
Click on services, SSH should be enabled - if not enable it this gives you access via putty and other remote apps also enable samba and if you want to run a vnc server on your windows or linux desktop for remote access then enable VNC as well. Click apply and wait to finish. Now click on quit we are done with the control centre setup as i said there are many more tools inside here but I will not be going into those in detail, you can find out about all those features from the mythbuntu wiki. One more thing, if you are not going to be using the frontend currently then you should stop it from loading at start-up to do this click on startup behaviour and uncheck the automatically start Mythtv Frontend.

JY Avenard repos

let's enable the JYA repos. You can use other repos if you like, but you will be installing several repos to achieve the same goals, the Jya repos include, the latest builds for nvidia-glx driver as well as libs for vdpau and then all the mythbuntu updates and finally the latest compiled mplayer with vdpau enabled. There are three separate repos available release, working, and leading edge, I use the release repos and that is what I will include below.

So first we need to open a terminal, so on your desktop right click and choose open terminal here, then in the terminal window type:

cd ~ (enter)

Now we need to get the gpg signing key for the repos you can do that pasting this line into your terminal window hit enter and type in your password.

wget http://www.avenard.org/files/ubuntu-repos/ubuntu-repos.key && sudo apt-key add ubuntu-repos.key && rm ubuntu-repos.key

Now lets add the repository to your local list. THIS REPO IS FOR KARMIC(myth9.10) ONLY so now paste this line in your terminal window

echo "deb http://www.avenard.org/files/ubuntu-repos karmic release" | sudo tee /etc/apt/sources.list.d/avenard.list

Great! you have added the repo. Now we have a little bit of a workaround to perform here. Type into your terminal window

clear (enter)

We currently have nvidia-glx-185, nvidia-185-libvdpau and nvidia-185-kernel-source installed locally, well we need libvdpau1 to upgrade to the newest drivers but libvdpau1 conflicts with a file in nvidia-185-libvdpau. So we need to download libvdpau1 and install manually. So lets do that. First I like to make a directory for all my downloaded files in one location. I would suggest you follow along as we will use this later as well. In the terminal window type

cd ~ (enter)
sudo mkdir install (enter)
sudo chmod 777 install (enter)
cd install 

We are now in our newly created install directory go ahead and paste this line into your terminal window.

wget http://www.avenard.org/files/ubuntu-repos/release/libvdpau1_0.3-0ubuntu1_i386.deb

let it download and then in your terminal window paste this making sure you are still in your /install directory.

sudo dpkg --force-all -i libvdpau1_0.3-0ubuntu1_i386.deb

The above package also has a dependendancy that we need to install as well, so to install vdpau-driver-all type or paste

sudo apt-get install -f 

OK! lets update the video drivers to the latest. paste this command into your terminal window.

sudo apt-get update (enter)
sudo apt-get install nvidia-glx-195 nvidia-195-libvdpau nvidia-195-kernel-source

We also need to get one more file for XMBC to configure with VDPAU enabled get this file like so

sudo apt-get install libvdpau-dev

This will remove the existing 185 version glx drivers and install the newest 195 drivers as well as libvdpau-dev; when it's all completed type:

sudo reboot (enter) 

Reboot the system and let it load up exit mythfrontend and then load up the nvidia-settings program to check the driver rev. remember right click - application - system - Nvidia X server setting and click on that. It should list 195.XX as the driver installed. This is Good. OK now let's do an update, this will be a big one as it will update a ton of myth files and possibly your kernel and a few others. right click and launch terminal here and type or paste:

sudo apt-get update (enter)
sudo apt-get dist-upgrade (enter)

It will likely take a while, when it finishes installing let reboot again type or paste:

sudo reboot

Congrats, you have finished the second part of the tutorial and your mythfrontend is now .22 with the latest nvidia drivers and all the JYA Updates installed.

Setting USB Ports to Wake-Up the sytem as well as permissions

With my system I had a couple issues here one it would not wakup via the remotes power button and when I got that working it would auto resume the system by itself. I fixed both of these issues as follows. I would suggest that you do the first part and try it and then come back and fix the autoresume later if you run into that problem. I am posting some commands from outleradam's wiki Enable_Wake-On-Device. right click and launch a terminal and we need to be root to perform the following so type or paste

sudo su

Then we need to see if our devices are awake or not,

cat /proc/acpi/wakeup

You will get a list that looks something like the following (Example Only) We are concerned about the USBX devices.

root@zotac-ion:/home/xbmc# cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
SMB0      S4     disabled  pci:0000:00:03.2
USB0      S4     disabled  pci:0000:00:04.0
USB2      S4     disabled  pci:0000:00:04.1
US15      S4     disabled  pci:0000:00:06.0
US12      S4     disabled  pci:0000:00:06.1
NMAC      S5     disabled  pci:0000:00:0a.0
PBB0      S4     disabled  pci:0000:00:09.0
HDAC      S4     disabled  pci:0000:00:08.0
XVR0      S4     disabled  pci:0000:00:0c.0
XVR1      S4     disabled
P0P5      S4     disabled
P0P6      S4     disabled  pci:0000:00:15.0
P0P7      S4     disabled  pci:0000:00:16.0
P0P8      S4     disabled  pci:0000:00:17.0
P0P9      S4     disabled  pci:0000:00:18.0
PWRB      S4    *enabled

We want to enable only one of those USBX devices as enabling both tends to cause problems, we will enable USB0 it tends to be most common, you can also take a look at lspci or dmesg to get at little more information on the devices and what you have hooked up. lets wakeup USB0 by pasting this

echo USB0 > /proc/acpi/wakeup 

we will now check that by pasting

cat /proc/acpi/wakeup 

again and you will now see that USB0 is enabled but that is for this session only and we need it to happen on every boot so we need to edit our /etc/rc.local file. I use vim to edit my files I like it it is simple and quick if you want to use vim it needs to be installed or you can just use your prefferred editor. skip the next line if you use your own editor

sudo apt-get install vim

Ok lets edit the /etc/rc.local file. You only need 1 exit 0 in this file and it is already there so just add this line and save the file

sudo vim /etc/rc.local

This will open the file for editing. now hit the I button on the keyboard that allows you to enter text with vim. if you make a mistake just hit :q! to escape the file without changes. Allright let past this line into the file above the existing exit 0 line. make sure there is still one line space above the new line and no line space between the line we are pasting and exit0

echo USB0 > /proc/acpi/wakeup

and the file should look like this

root@zotac-ion:/home/xbmc# sudo vim /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

echo USB0 > /proc/acpi/wakeup
exit 0

We are done so now hit esc which takes us out of editing mode in VIM (you will notice the INSERT comment goes away at the bottom of the screen) now type :wq (that is shift colon lower case w and q)to save the file. Good Job.

Autoresume

Now lets fix the autoresume issue.NOTE If you do ntt have this problem you should not perform this step until after the system is tested so follow the rest of the guide and then come back here if you have the autoresume issue So the description of this problem is you suspend the system within XBMC and right away it resumes or wakes up again. This is how I fixed my system There is also a link in the above resource section to get some more info from the ubuntu forums. Thanks to the author of that post. We need to edit our grub boot line in order to accomplish this fix and we are now using Grub2 with 9.10 so things are a little different so first lets get out of root by typing

exit

at the command prompt and you should be back at your regular command prompt which will look like this

xbmc@zotac-ion:~$

So we are going to edit out default grub boot line, so paste this into your terminal window

sudo vim /etc/default/grub

The file will now open and the line we want to fix is GRUB_COMMAND_LINE_DEFAULT="quiet splash" we are going to add a couple things in here one is the autoresume fix but there is also a conflict on these ion boards between nvidia SMbus and acpi and we want to fix that so we will do that now as well, this is only a workaround currently and it may be fixed in later kernels so you can find the bug reports on google and track them to know when you'll want to remove this line here is a link to one https://bugs.launchpad.net/ubuntu/+source/linux/+bug/440780. Allright hit the I on your keyboard to get into editing mode in vim. now paste this into that line BETWEEN THE QUOTES and leaving a space after the h in splash.

usbcore.autosuspend=-1 acpi_enforce_resources=lax

Now the line should look like this after editing

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1 acpi_enforce_resources=lax"

OK that's added let hit esc to exit editing mode and then type :wq to save the file. Now we need to update grub let's do that by pasting this

sudo update-grub

ok now lets reboot to make sure we did not screw anything up - LOL :) The final part of this section is to add some persmissions. We will be using PM-Suspend via XBMC and possibly later on some custom /etc/pm/sleep.d custom scripts to help resume or suspend and in order to do that sudo will need to be used and without adding permissions to run sudo without a password the scripts will fail so let add that permission. Yet again open a terminal window you should know how by now. and type

sudo su

now we are going to edit your /etc/sudoers file this is the root permissions file so take your time. paste this line in your terminal window

visudo 

voila! the file opens and looks like this (Sample File Only)

root@zotac-ion:/home/xbmc# visudo
  GNU nano 2.0.9            File: /etc/sudoers.tmp

# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults        env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL) ALL

# Uncomment to allow members of group sudo to not need a password
                               [ Read 25 lines ]
^G Get Help  ^O WriteOut  ^R Read File ^Y Prev Page ^K Cut Text  ^C Cur Pos
^X Exit      ^J Justify   ^W Where Is  ^V Next Page ^U UnCut Text^T To Spell

Scroll down the file & below the %admin ALL=(ALL) ALL line paste this below that line xbmc is YOUR username you use to login with if it is not then change to what yours is

xbmc ALL=(ALL) NOPASSWD: /usr/sbin/pm-suspend

OK now hit ctl-x to exit then shift y for a capital Y for yes and then enter to write to the sudoers file. now type

exit

to leave root mode and we can now test this right away before setting up xbmc. so paste the following into your terminal window.

sudo pm-suspend

notice you did not have to enter a password here that was achieved by editing the /etc/sudoers file if all is working right then everything should go-to sleep just fine and then you should be able to power back on with your remotes pwr button. NOTE I am setting up an Zotac IONITX-F-E board for one of my family and all the above in this section I needed to do but in the bios I need to set the bios to S3(STR) and repost video on S3 resume to (NO). and it works that way. The rest of the guide also works on this board as well if anything is different I will post a tip referencing this board as we proceed. Were getting there.

Alsa Configuration

Mythbuntu 9.10 ships with Alsa rev 1.0.20 which works just fine out of the gate, all you need to do is the following open a terminal and paste.

alsamixer 

then make sure you master and pcm volumes are all the way up well 90% anyhow then scroll over to the iec958 channels and under each one hit your M key on the keyboard to unmute those channels and then hit your esc key to exit alsamixer. If you want to set up the latest and greatest alsa version then do the following - THIS IS ONLY IF YOU WANT THE LATEST SOUND WORKS FINE WITH 1.0.20 UPDATE If you are wanting HDMI Audio with your new GTXXX Nvidia Cards Then you need to install the latest version of Alsa and then you need to patch your downloaded alsa source with a patch created by paoleary, I have tested this on a GT220/GT240 on an ION platform with all NV drivers from 185-195.36.03 and they all work fine with LPCM audio via hdmi.

cd ~
 cd install
 http://www.scottcraftboats.com/downloads/linux/AlsaUpgrade-1.0.22.1-2.tar
 tar xvf AlsaUpgrade-1.0.22.1-2.tar
 sudo ./AlsaUpgrade-1.0.22.1-2.sh -d this will download the source code for you as well as some updates needed.
 now if you want to patch your Alsa for a Nvidia GT220 see here:
Patch Your NV GT2XX (Thanks paoleary)
 Follow all the directions from the patch wiki and then you can continue here with your setup.
 OK! all patched. Then we need to compile and install Alsa. 
 cd ~/install 
 sudo ./AlsaUpgrade-1.0.22.1-2.sh -c let the script compile your alsa build and then finally
 sudo ./AlsaUpgrade-1.0.22.1-2.sh -i to install the build. Now Reboot to completele the install.
 sudo reboot

launch a terminal and run alsamixer again

alsamixer (if you patched your alsa for new cards then you will only have to unmute the one spdif channel now)

It will list your new alsa version at the top of the page is should say 1.0.22 or the like. Ok again turn up the main and pcm volumes if present and unmute your iec958 channels by pressing m on your keyboard under each channel. The next thing most people report sound issues in xbmc like playing to fast etc, I have only had one issue with some weird .mp3 tv show encoding hdmi and iec958 have always worked for me with just the std setup in XBMC sound properties like default-iec958 or default-hdmi or iec958-iec958 or finally hdmi-hdmi but if you notice some files that playback strange then here is a .asoundrc file you can try it works for me but there are plenty of version on the xbmc forums you can try by searching. here is my file

pcm.dmixer {
   type dmix
   ipc_key 1024
   ipc_key_add_uid false
   ipc_perm 0660
   slave {
      pcm "hw:0,3"
      rate 48000
      channels 2
      format S32_LE
      period_time 0
      period_size 1024
      buffer_time 0
      buffer_size 4096
   }
}

pcm.!default {
   type plug
   slave.pcm "dmixer"
}

if you want to use this file then in your terminal window do this

cd ~
sudo vim .asoundrc

Now hit i on your keyboard and copy the above file completely and paste it into your terminal window then hit esc and :wq to save the file. This concludes this section on Alsa.

XBMC

I know you can install XBMC from ppa and it is somewhat easier but I like to use my own configure lines as well and I also always have to directories to build in one for the current stable svn version and then the latest build directory to test when I want to so let's get started first we need to install all the dependencies to build xbmc I use a combined list from both the readme.ubuntu and the readme.linux and finally I add a couple files like ccache. Open a terminal window and paste the following

sudo apt-get install -y subversion make g++ gcc gawk pmount libtool nasm automake cmake gperf unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev python-sqlite libglew-dev libcurl3 libcurl4-openssl-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbis-dev libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libfaac-dev libenca-dev libxt-dev libxtst-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmms-dev libmpeg3-dev libfaad-dev libflac-dev libiso9660-dev libass-dev libssl-dev libavcodec-dev libavformat-dev libpostproc-dev libswscale-dev libmpeg2-4-dev libwavpack-dev liba52-dev libdts-dev zip ccache 

let that install it will take some time. Now we are going to check out the Camelot 9.11 SVN by doing the following

cd ~
svn co https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/9.11_Camelot XBMC911

This will check out the latest Camelot svn build and place it all in a directory called XBMC911 on your system as I said I also check out the latest svn on the same machine if you want to do that as well then do this THIS IS NOT NEEDED BUT I LIKE TO BE ABLE TO TEST THE NEWEST VERSION ONCE IN A WHILE

cd ~
svn co https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk XBMCSVN

The above will checkout the latest SVN version and place it in a XBMCSVN directory on your system there are also a couple deps required to build the latest svn version you can get those this way

sudo apt-get install fp-compiler gdc libmicrohttpd-dev libmodplug-dev

This is only if you want to build the latest version as well for testing you do not need to finish the guide OK! now lets continue with the Camelot svn build in your terminal do this

cd XBMC911
./bootstrap

let it do it's thing and then here is my configure line, you do not need to use this you can use a shorter one if you like. Mine disables pulse audio, use /usr as the prefix and enables some external libs. if you want a simple configure line then use this one currently there seems to be a bug with Mpeg4 Part files and FFmpeg where you will see a green screen when trying to view any xvid movies. There is a workaround for this which can be found here [1]you need to apply this fix before running configure.

./configure --prefix=/usr --disable-pulse 

If you want to use external libs then here is my configure line to use

./configure --prefix=/usr --disable-pulse --enable-external-libmad --enable-external-liba52 --enable-external-libdts --enable-external-libfaad --enable-external-libmpeg2 --enable-external-libflac --enable-external-libvorbis --enable-external-libogg --enable-external-libmpcdec --enable-external-libwavpack --disable-external-libass --disable-external-python --enable-external-ffmpeg

Let XBMC configure everything and when it is done you can type or paste

make

This will build xbmc for you and make it ready to install, when the make portion is completed you can then paste or type

sudo make install

This will install xbmc for you and it is ready to run now lets reboot again

sudo reboot

Congrats you now have XBMC installed and ready to run if you right click on your desktop - application - multimedia you will see that we can call XBMC from the main menu now as well. KEWL

XBMC Autostart

Autostarting XBMC in Mythbuntu is really simple. right click on your desktop - settings - xfce4 Settings Manager then click on Session and Startup. Now goto Application Autostart in the toolbar across the top and click on Add, a Window will pop up and type in the name (XBMC) description (Media Center or Whatever you want) and then command (xbmc) if you want to start xbmc with options you can enter them here as well like standalone etc... click ok and close the windown.
Lets de-activate the gnome screensaver at the same time. right click on the desktop - applications - settings - screensaver; now uncheck "activate screensaver when computer is idle" then click on Power Management at the bottom of the window; and under the Display section change this to say NEVER and finally click on the General Tab at the top and change "When the power button is pressed" to read shutdown. OK! that is configured. let's move on to appswitching with the remote's LiveTV button.

Appswitch

The guys over at the Aussie Media Center site have a great app to allow you to switch on the fly between XBMC and Mythfrontend. It will switch to either program and will kill all whichever program is currently running. This is also great if you are running an htpc with just the remote and no keyboard or mouse so if you do get a crash of these programs and you land on the desktop you can just press the livetv button on your remote and voila you are back in business. So lets set it up. OK launch a terminal window and then do this

cd ~/install
wget http://www.scottcraftboats.com/downloads/linux/appswitch.tar

Now lets make a script directory NOTE in the chown commands below xbmc is the username make sure you type the username you login with if it is not xbmc

cd ~
sudo mkdir scripts
sudo chmod 777 scripts
cd install
tar xvf appswitch.tar
mv irexec ~/.lirc
mv appswitch.pl ~/scripts
sudo chmod +x ~/scripts/appswitch.pl
sudo chown xbmc:users ~/scripts/appswitch.pl
sudo chown xbmc:users ~/.lirc/irexec

Now we need to edit our ~/.lircrc file so that irexec will start on reboot so lets do that.

cd ~
sudo vim .lircrc 

ok! now we are going to add this line to the bottom of the file first hit i to enter editing mode then scroll down the file to the last "include" line and enter this below it;

include ~/.lirc/irexec

ok now hit esc to exit editing mode and type :wq to save the file. Now the final thing here we have to do is edit our mythtv lircrc file to define the button press. First we need to find out how the buttons label is defined in your lircd.conf file. Remember this guide is using an MCE Remote so it is working around those definitions OK! in your terminal type this

cat /usr/share/lirc/remotes/mceusb/lircd.conf.mceusb 

If we look at the list we will see that livetv is defined as "Livetv" write that down now we are going to edit the lircrc file so

cd ~
cd .mythtv
sudo vim lircrc

Now scroll down through the file and see if the Livetv button is defined anywhere in the mceusb_hauppauge section if not then we need to add it so let do that, press the i key on your keyboard to go into editing mode, then scroll to somewhere in the mceusb section and paste this in after an "end and before a begin" section leaving a space between them.

begin
    remote = mceusb_hauppauge
    prog = irexec
    button = Livetv
    config = /home/xbmc/scripts/appswitch.pl 
end

now hit the esc key to exit editing mode and type :wq to save the file. And finally

sudo reboot

When it boots back up you can test it, remember if you do not have a back-end yet that you will likely get an error in mythfrontend just exit out of it back to your desktop and hit the livetv button to restart xbmc.

Setup XBMC

more to come...