• 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
Apple TV Performance with CrystalHD
#61
A few months back I promised I would post my notes on how to lose the boot stick at the end of the install. I think most people only use the apple for XBMC so it’s nice to have the USB port for a Bluetooth transmitter for the keyboard and mouse or a remote. I just finished this on my second Apple TV and though I would document it and post for everybody since I could never get any good info on this topic and one externally hosted site that had any is gone

Assumtions
You Have followed the guide on installing XBMC on the AppleTV
http://wiki.xbmc.org/index.php?title=HOW...he_AppleTV
and have modified the Apples Partition and installed ubuntu and XBMC.

You currently leave the USB Thumbdrive\Stick in the Apple TV for it to boot.
See http://code.google.com/p/atv-bootloader/...USBPenBoot
and you would like to loose the USB stick and use the port for another device.

Theory

On The Apple:

1) In the root is the apple kernel "mach_kernel"
2) In System/Library/CoreServices is the Apple logo file "BootLogo.png"

On The USB-Thumb:
1) In the root is the kernel "mach_kernel"
2) In the root is the penguin logo file "BootLogo.png"

To Boot the Apple:
In System/Library/CoreServices is the com.apple.Boot.plist file which is an XML file which the apple tv uses to determine which kernel to start.

So if we move our kernel to the root and put our trusty penguin in place we can completely loose the stick and our thumb image will boot off the hard drive and then transfer to the real linux kernel on the newer partition.

To not delete or change the original files, if we rename our kernel file and logo file, we can place our files next to the originals - now it's totally up to the plist files data on how the apple will boot

To make things cool we could have Three plist files (actual,Apple,Linux) and if we copy over the "Actual" one with either the Apple or Linux version - the apple TV will show either logo and boot either kernel.

So let’s preserve the original Plist file copying it to a plist.atv and then copy it again to a plist.linux which we can then edit with nano or vi to change the parameters

Boot the AppleTV from USB-Thumb and SSH in as root account (not xbmc)

Mount the apple os (typically sda3)

mkdir /tmp/atv
sudo mount -t hfsplus -o rw,force /dev/sda3 /tmp/atv


The Above mount might fail depending on how the iTV was shut down. OSx Journal must be in a clean state for Linux to force mount it. For me the "Parted" command fixed the journal when the partitions were resized, others who have followed this guide disabled the journaling by following http://www.ehow.com/how_2061559_enab...ng-mac-os.html
I hope that it mounts cleanly if not, you can also try booting the apple tv again and try to shut it down again.
If any other Linux wizards know any other cheats to clean the filesystem under ubuntu like "Parted" please let me know.


Create two copies of the original Plist file

cd /tmp/atv/System/Library/CoreServices
sudo cp com.apple.Boot.plist com.apple.Boot.plist.atv
sudo cp com.apple.Boot.plist com.apple.Boot.plist.linux
cd


Now Edit the .linux version

sudo nano /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist.linux

change mach_kernel.prelink to mach_kernel_linux (All Lower Case - note the _ )
change BootLogo.png to BootLogoLinux.png (Note Capital L)
change <string></string> to <string>atv-boot=auto video=vesafb</string>
(exit and save)

Mount the patch USB-Thumb(typically sbd2)

mkdir /tmp/thumb
sudo mount /dev/sdb2 /tmp/thumb


Move the Thumbs kernel and logo to atv root under new names

sudo cp /tmp/thumb/mach_kernel /tmp/atv/mach_kernel_linux
sudo cp /tmp/thumb/BootLogo.png /tmp/atv/System/Library/CoreServices/BootLogoLinux.png
cd



Lets now copy the modified plist.linux over the actual

sudo cp /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist.linux /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist

Close our mount points
sudo umount /tmp/thumb
sudo umount /tmp/atv


If you pull the USB-Thumb and reboot the Apple TV should boot Directly into Linux\XBMC


Now I have some scripts both for XBMC and ATV to automate the switching using the GUIs which I will try to post,

While I finish the scripts and decide how to post them public, here is how to switch the boot

To Boot Linux\XBMC
(Using USB-Thumb boot)
sudo mount -t hfsplus -o rw,force /dev/sda3 /tmp/atv
sudo cp /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist.linux /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist

sudo umount /tmp/atv

(Using a cracked appletv, telnet\ssh into osx)
cp /System/Library/CoreServices/com.apple.Boot.plist.linux /System/Library/CoreServices/com.apple.Boot.plist

To Boot Apple TV - (ssh \ telnet into linux)
sudo mount -t hfsplus -o rw,force /dev/sda3 /tmp/atv
sudo cp /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist.atv /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist

sudo umount /tmp/atv


Hope it helps
Mike Pisano
Reply
#62
so i have a updated dharma2 beta with latest crystal hd drivers on my stick - and this guide will take all of this and transfer it to the atv internal drive while also keeping my atvos intact? if so - cool!

couple of questions.
(I'm running ssh via putty btw).
1 - "boot with patchstick" - the linux one yes? (not the original patchstick that we all had to use?) ok - so now "log in as root account" - what is this? i've only ever logged in as xbmc/xbmc or frontrow/frontrow (prior to linux). what's the root password?

now mounting the apple os - "typically sda3" - how can I tell?

i'll probably have more questions once i get past the initial hurdles. again, thanks for taking time to put your processes down for all of us.
Reply
#63
Thnmnt

Yes, it will leave the original Apple OS intact. But Note this is NOT the live stick!
This is the boot stick used to crack the apple and repartition the disk to install ubuntu. After you leave in the usb slot to boot.

Currently the patchstick is only a boot image, control is transfered to the internal hard drive during the boot process. Linux, dharma and crystal are already on your apples internal repartitioned hard drive.

Root account will be the one used during the install of ubuntu - See
http://wiki.xbmc.org/index.php?title=HOW...he_AppleTV
look for - "When asked for username, do NOT use “xbmc”, create an admin user "
personally I followed the convention and used frontrow for my admin account during install.
if you "ls /home" you should be see directory entries for the defined users

You will know if it's sda3 because after the mkdir and forced Mount of sda3 to tmp/atv if you do a
ls /tmp/atv
you should see the apple kernel file "mach_kernel.prelink"

Same with the stick mount at /tmp/stick except it's just "mach_kernel"

Since your not overwriting files until you copy over the plist file - nothing should go wrong - and even if you edit the plist file incorrectly, if you swap back the oririnal "atv" one, the apple will boot again.

If you get stuck let me know, else - please give me feedback on grey areas so I can update the guild for others.
Reply
#64
Mike Pisano Wrote:Root account will be the one used during the install of ubuntu - See
http://wiki.xbmc.org/index.php?title=HOW...he_AppleTV
look for - "When asked for username, do NOT use “xbmc”, create an admin user "
personally I followed the convention and used frontrow for my admin account during install.
if you "ls /home" you should be see directory entries for the defined users

Thanks for clearing that part up - but I (as many others have I'm sure) used pin87a's image for my install of live/ubuntu so I didn't go through any of the steps outlined in the guide you linked. I'm not sure where that leaves me.
Reply
#65
Sorry thnmnt,

Believe pin87a is entirely on the stick - great idea and effort for a quick way to use the apple tv for XMBC.

This guide as you have probably figured out is more for the people who have installed linux and xbmc on the internal hard drive and most dont care about the appletv functions (although still usable) and really want the USB port for a keyboard\mouse for linux\firefox or bluetooth remote....

Without this guide, everytime you power cycle the apple box you need to unplug your keyboard\transmitter and plug in the thumb to boot. it's a pain.

I have updated the post to make it clear that it's not for Live or PatchStick and it's UsbPENBoot \ USB-Thumb based.

Thanks for the help and sorry if I got you excited.

Regards,
Mike
Reply
#66
Mike Pisano Wrote:Without this guide, everytime you power cycle the apple box you need to unplug your keyboard\transmitter and plug in the thumb to boot. it's a pain.

Two words, USB Hub. Smile
Reply
#67
I guess, I just need one for my bluetooth stick and the USB hub I have requires power. This makes everything so much cleaner.

Also – in case you missed it, please look at my earlier post just before the guide (bottom of page 6) on your wiki guide. I did run into a few snags during my second apple install that I pointed out which might help others. You probably have little time right now with Dharma about to release, maybe one day Smile

Again - Thanks Scott for all the effort – Really appreciate it

Regards,
Mike
Reply
#68
Mike Pisano Wrote:I guess, I just need one for my bluetooth stick and the USB hub I have requires power. This makes everything so much cleaner.

Also – in case you missed it, please look at my earlier post just before the guide (bottom of page 6) on your wiki guide. I did run into a few snags during my second apple install that I pointed out which might help others. You probably have little time right now with Dharma about to release, maybe one day Smile

Again - Thanks Scott for all the effort – Really appreciate it

Regards,
Mike

You know that wiki entries can be edited by anyone with a forum login Smile
Reply
#69
davilla Wrote:You know that wiki entries can be edited by anyone with a forum login Smile

Nope - Didn't realize.

I'll make some alterations and maybe even add my guide into yours or a link (if you like the idea... USB HUB man :p lol)

Thanks
Reply
#70
Mike Pisano Wrote:Nope - Didn't realize.

I'll make some alterations and maybe even add my guide into yours or a link (if you like the idea... USB HUB man :p lol)

Thanks

Feel free to make corrections to the guide in the wiki, that's what it's there for Smile We experts sometimes are too close to how to do it and can make silly assumptions.
Reply
#71
Scott,

Have a question for the master

I have finished installing Ubuntu & XBMC on my 40GB iTV and have a weird problem - It seems to only play videos at 15fps (only tested AVI’s\Non crystal) when attached to the Samsung running 1080p. In debug it shows 60fps at menu, but after I start playing it drops to a solid 15fps - like it wants to play at that speed?

I have a 160gb that I loaded months ago with you and I am building the SVN on it as you recommended. It plays perfect on the Samsung except the internal fan is making noise so I just bought a second unit off craigslist that’s a 40gb. I cracked it initially on another tv via HDMI running 720p and all worked fine, now I swap it for the 160 and attach it to the Samsung still attached via HDMI and it plays at 15fps.

Initially I was going to leave the 40 as a “Production Build” machine and not compile so I loaded Dharma 3 – after it played at 15fps I pulled the SVN and built manually - still is the same Sad.

I have upgraded both the 160gb and the 40gb to the latest svn last night and I can move the Power\Nic\HDMI from unit to unit and the 160 play fine and the 40 doesn’t from the same sources

Been through all the config screens and I can’t see any difference between the two units - Same Kernel, Nvidia, SVN rev, CPU speeds, Close on avail memory….

Any issues with older 40gb iTV's? And why only attached to the Samsung or 1080p?

Any Thoughts?

Thanks,
Mike
Reply
#72
Does not make sense, there's no real difference between all AppleTVs (not the new one), they might have different wifi cards, disks and some might even have 128MBs of VRAM, but they all smell and act the same.

xorg.conf is the same too ?
Reply
#73
Sad 
Scott, correct me if I am wrong but my guess is that you are the only one who is making changes in the XBMC for Mac/ATV code regarding CrystalHD support. Based on this assumption (I may be totally wrong though) what could have changed in Dharma 3 that negatively affected CrystalHD performance?

I have a few movies mkv, h.264, 720p, DTS that I've been able to watch in Dharma 2 in near perfect quality and after upgrading to Dharma 3 I can not watch them at all. I start a movie and it's played with 24 fps for about 10-30 sec and after that the rate drops to 12-14 fps and never restores until I stop the movie. I start it again and it goes the same in circles as many times as I try. Any thoughts what could be wrong/different? CPU load is low it seems that CrystalHD support works differently.

I have never had a problem with previous XBMC version since March frozen release playing any 720p movies. Dharma 1 was good, #2 was better, #3 I can't use. In regards to that how can I reinstall back Dharma 2 on ATV (it's not in the Launcher downloads)?

Did anyone notice such a problem?
Reply
#74
konan Wrote:Scott, correct me if I am wrong but my guess is that you are the only one who is making changes in the XBMC for Mac/ATV code regarding CrystalHD support. Based on this assumption (I may be totally wrong though) what could have changed in Dharma 3 that negatively affected CrystalHD performance?

I have a few movies mkv, h.264, 720p, DTS that I've been able to watch in Dharma 2 in near perfect quality and after upgrading to Dharma 3 I can not watch them at all. I start a movie and it's played with 24 fps for about 10-30 sec and after that the rate drops to 12-14 fps and never restores until I stop the movie. I start it again and it goes the same in circles as many times as I try. Any thoughts what could be wrong/different? CPU load is low it seems that CrystalHD support works differently.

I have never had a problem with previous XBMC version since March frozen release playing any 720p movies. Dharma 1 was good, #2 was better, #3 I can't use. In regards to that how can I reinstall back Dharma 2 on ATV (it's not in the Launcher downloads)?

Did anyone notice such a problem?

XBMC has much more going on that just chrystalhd commits. There was a DTS issue with beta3 it seems. Totally unrelated to any chd commits.
Reply
#75
The only thing I have notied in regard to recent versions and chd is with 1080p m2ts and MKV's when you either resume from last saved position or pause\skip forward or back.

If I play from the begining and never stop it's 99.99%, if I pause or do anything it never can catch up. Audio and Video buffers are like 99% and CPU as 20-30% and the movie is dropping frames. Strange one is why resuming from a previous position isn't smooth.

I know there is a lot going on under the hood - assume it will all be better soon
Reply
  • 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7

Logout Mark Read Team Forum Stats Members Help
Apple TV Performance with CrystalHD0