How to- XBMCBuntu Ubuntu, or Mint on Apple TV 1
Tuesday, March 19th, 2013NOTE: You do this at your own risk. This is not a step by step and it assumes you have some knowledge of Linux and that you have made an image of your ATV hard disk before proceeding. This is only intended to be a guide to help those having issues with Ubuntu/XBMCBuntu/Mint on ATV1. If you can not get through this, we can sell you a preinstalled thumb drive. Contact us for current pricing and information. Also if this guide is helpful, consider donating using the paypal link on the left column.
I used XBMCBuntu Frodo beta. It has been downgraded to Eden 11, and updated to Frodo 12, and now 12.1 . It is based on Ubuntu 12.04 Precise so this pretty much applies to installing precise as well. If installing Ubuntu or Mint you may need to also install the generic kernel instead of the PAE kernel. You should do this upon initial ATV1 boot to linux.
Here are the tricks I learned while refining an installation of xbmcbuntu on Apple TV
IMPORTANT: first connect Apple TV 1 to HDMI TV, Update ATV1 to Apple OS latest. Then go to settings and set HDMI output to RGB High. If not connected to HDMI TV this can not be done.
I will not go into detail of the ATV Bootloader installation here that is well documented everywhere however most of the Linux distros referenced in those posts are older. My goal is to cover Xbmcbuntu/UbuntuPrecise12.04
I found the easiest way to make the apple TV bootloader to work is to leave it in “auto” and use an old style Grub menu.lst (grub 1) .
You should first test the ATV bootloader once you have created it, and see if the apple TV starts a boot sequence. You can then connect the USB or Hard disk to a USB or IDE port on a PC and proceed with the installation on a PC. if booting from USB thumb drive or USB hard disk it is important to understand that SOME ATV units will not boot to a thumb drive if no hard drive is installed. I have never figured out why but some will also not boot to USB at all , even with Hard Disk installed. If you can not boot to a thumb drive or USB disk, you can get a USB to PATA (IDE) adapter and do the install by removing the ATV drive.
Installation of Linux
Because the ATV 1 is quirky it is easiest to do the install on a desktop PC I strongly recommend disconnecting all hard disks other that the ATV hard disk before proceeding.
Boot your PC to XBMCBuntu, Ubuntu or Linux Mint CD or DVD. Perform a custom partition install to ATV Hard disk or USB thumb drive, and install to an EXT3 type filesystem, without erasing the ATV Bootloader partition (THIS MUST BE GPT PARTITION!). I dont think the ATV bootloader is compatible with EXT4 or at least it never worked for me. During the install you should also create a 500Meg swap space, and after the install note the UUIDs of swap and system volume. You can use “sudo blkid” or get them, or by running Gparted.
After the install is complete, create /boot/grub/menu.lst and put the following in the file. Make sure the owner is root, and that you change <UUID> to the UUID of your disk that you got while running the live CD/installer. Note the processor.max_cstate=2 that is important and must be added if you already have a Grub1 menu.lst
title XBMCBuntu, kernel 3.2.0-34-generic
uuid <UUID>
kernel /boot/vmlinuz-3.2.0-34-generic root=UUID=59b56a95-de9c-4c04-ba25-21c057b090dd ro quiet nosplash processor.max_cstate=2
initrd /boot/initrd.img-3.2.0-34-generic
now we will edit /etc/fstab so it looks like this using your UUID and your SwapUUID. You probably will not have to change thew UUIDs unless you have reformatted or changed partitions in some way. The important part is the last line that causes the ATV Bootloader partition to not mount. This prevents you from having to see it in file dialogues.
# / was on /dev/sde3 during installation
UUID=<UUID> / ext3 errors=remount-ro 0 1
# swap was on /dev/sde2 during installation
UUID=<SwapUUID> none swap sw 0 0
LABEL=Recovery Recovery hfsplus noauto
You should now have an ATV bootable hard disk or thumb drive. Proceed to install on ATV1 and boot.
Post installation and first ATV boot. You can do this from ssh if you have ssh access.
sudo apt-get update
sudo apt-get install linux-sound-base alsa alsa-utils nvidia-common nvidia-current nvidia-current-updates nvidia-settings nvidia-settings-updates xbmc git-core libusb-dev pkg-config g++
sudo apt-get autoclean
edit /home/xbmc/.xbmc/userdata/advancedsettings.xml to be the following, removing any other content. You will probably have to create this file, It may not exist.
<advancedsettings>
<loglevel>0</loglevel>
<useddsfanart>false</useddsfanart>
<videolibrary>
<cleanonupdate>false</cleanonupdate>
</videolibrary>
<gui>
<algorithmdirtyregions>1</algorithmdirtyregions>
<nofliptimeout>0</nofliptimeout>
</gui>
<network>
<disableipv6>true</disableipv6>
<cachemembuffersize>2621440</cachemembuffersize>
<curlclienttimeout>60</curlclienttimeout>
</network>
<video>
<fpsdetect>2</fpsdetect>
</video>
<latency>
<delay>0</delay>
</latency>
<cputempcommand>cputemp</cputempcommand>
<gputempcommand>gputemp</gputempcommand>
<samba>
<clienttimeout>30</clienttimeout>
</samba>
</advancedsettings>
Install ATVClient for support of Apple Remote and to make sense of the front panel LED. When LED lights when remoite button is pressed your battery is getting low. This also allows pairing whereas lirc does not.
git clone git://github.com/Evinyatar/atvclient.git
cd atvclient
./configure && make
sudo make install
sudo cp atvclient /etc/init.d/atvclient
sudo update-rc.d atvclient defaults
sudo /etc/init.d/atvclient start
cd ..
Analog and Optical audio fix (not necessary for HDMI only audio)
Edit
/etc/modprobe.d/alsa-base.conf
Comment out the last line and add the second line so that the last two lines showw as below
# options snd-hda-intel enable_msi=0 probe_mask=0xfff2
options snd-hda-intel model=imac24
For HDMI
edit /etc/X11/xorg.conf and use the following removing all other entries.
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 295.40 (buildmeister@swio-display-x86-rhel47-04.nvidia.com) Thu Apr 5 22:33:07 PDT 2012
Section “Monitor”
Identifier “Monitor0″
VendorName “Unknown”
ModelName “Unknown”
HorizSync 28.0 – 33.0
VertRefresh 43.0 – 72.0
Option “DPMS”
EndSection
Section “Screen”
Option “HWCursor” “Off”
Identifier “Screen0″
Device “Device0″
Monitor “Monitor0″
DefaultDepth 24
Option “NoLogo” “True”
Option “DynamicTwinView” “False”
Option “FlatPanelProperties” “Scaling = Native”
SubSection “Display”
Depth 24
EndSubSection
EndSection
Section “InputDevice”
Identifier “Mouse0″
Driver “mouse”
Option “Protocol” “auto”
Option “Device” “/dev/psaux”
Option “Emulate3Buttons” “no”
Option “ZAxisMapping” “4 5″
EndSection
Section “InputDevice”
Identifier “Keyboard0″
Driver “kbd”
# generated from default
EndSection
Section “Extensions”
Option “Composite” “Disable”
EndSection
Section “ServerLayout”
Identifier “Layout0″
Screen 0 “Screen0″
InputDevice “Keyboard0″ “CoreKeyboard”
InputDevice “Mouse0″ “CorePointer”
EndSection
Section “Device”
Identifier “Device0″
Driver “nvidia”
VendorName “NVIDIA Corporation”
Option ”NoLogo” ”True”
Option “DynamicTwinView” “false”
Option “RegistryDwords” “RMDisableRenderToSysmem=1″
Option “NoFlip” “false”
Option “ConnectToAcpid” “0″
Option “HWCursor” “false”
EndSection
For Component or composite out
http://wiki.openelec.tv/index.php?title=AppleTV_Composite_%26_Component_Video
Optional (required for CrystalHD Support) Note: Results can be intermittent. It seems that on both the 70015 and 70012, the heat of the Apple TV is an issue. When the Apple TV heats up the CrystalHD stops working. A reboot will not fix it only allowing the Apple TV to cool down. Consider removing the rubber bottom and clearing glue from Aluminum holes and placing large rubber feet on the bottom. Also consider a solid state drive or removing the disk completely from the inside of the ATV1. I have placed hard disks in external USB cases and used as system drive.
I have tried to install support for Crystal HD from many variants of ubuntu 12.04 (xbmcbuntu, linux Mint, etc) with not too much success . The best way is to install from source
sudo apt-get install checkinstall git-core autoconf build-essential subversion dpkg-dev fakeroot pbuilder build-essential dh-make debhelper devscripts patchutils quilt git-buildpackage pristine-tar git yasm zlib1g-dev zlib-bin libzip-dev libx11-dev libx11-dev libxv-dev vstream-client-dev libgtk2.0-dev libpulse-dev libxxf86dga-dev x11proto-xf86dga-dev git libgstreamermm-0.10-dev libgstreamer0.10-dev automake
git clone git://git.linuxtv.org/jarod/crystalhd.git
cd crystalhd/driver/linux
autoconf
./configure
make
sudo make install
cd ../../linux_lib/libcrystalhd/
make
sudo make install
sudo modprobe crystalhd
Reboot
run “alsamixer” from the prompt turn up all volumes and unmute anything showing as MM. (use the M key)
Enjoy Linux on ATV1 with XBMC Frodo 12.1!
If you can not get through this, we can sell you a preinstalled thumb drive. Contact us using the links at the bottom of the page for current pricing and information. Also if this guide is helpful, consider donating using the paypal link on the left column.


