Kodi Community Forum
[LINUX] Apple TV Crystalbuntu (Ubuntu Linux and Crystal HD) Disk Image for Apple TV - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: [LINUX] Apple TV Crystalbuntu (Ubuntu Linux and Crystal HD) Disk Image for Apple TV (/showthread.php?tid=74992)



- frumpy_uk - 2010-06-16

Sam.Nazarko Wrote:Running this thru SSH aren't you. Don't - because it won't open on the external display

Yes I was. I just tried this from the command line directly on the aTV (i.e. not through ssh). I got exactly the same result, i.e. critsec errors, xbmc didn't start and no core dump to be found. Any thoughts please?

I'll be happy to pursue this on the Linux sub-forum by the way, if that is thought to be more appropriate.


- frumpy_uk - 2010-06-16

davilla Wrote:multi-image backgrounds works fine from a local source ?

the crash log would be nice to see.

I lied. Actually xbmc is crashing in exactly the same way with local multi-image backgrounds.

It seems like it might be more reliable/less flaky than when the multi-backgrounds are on my NAS but you know how these things are, it's rather difficult to say. In both cases, xbmc doesn't always crash immediately. It's kinda intermittent.


- Sam.Nazarko - 2010-06-17

Not sure about those popping noises, I too get them in XBMC when I pause/play video on both a Revo and Apple TV. Might be a Linux issue because as you say no issue on OS X.

@frumpy_uk: Sorry can't help you there, but when I said don't do it through SSH I was saying this because of the Can't open display error.


- dietcokefiend - 2010-06-17

Maybe there is a bit of a buffer on the old setup or maybe my stereo just sucks Wink

Any ideas on how to disable the CPU throttling. I tried modifying the cpufreq init.d script with 1000 as the min and max speed and it still seems to stay at 600MHz at all times. Normally this wouldnt be a problem but I have found some movies play catchup when first started and drop some frames, which might be alleviated if the processor was running at full speed.


- xeonicxpression - 2010-06-17

Here are the mediainfo of just a few movies I have a hard time playing. I don't see anything too fishy, but I'm no expert. I can't provide an xbmc.log right now for them, but I can later if it would help. Alot of my stuff plays way better vs Native OSX, these are just ones that still don't work.

http://pastebin.com/7rRVcbu8 - Bad pixelation/blocky

http://pastebin.com/vbn6XjgR - studdering playback

http://pastebin.com/h34UJZGt - audio plays fine video plays slow

Any input would be helpful.


- joecas - 2010-06-17

Sam.Nazarko Wrote:@joecas: Your using my image which has desktop included. Just exit XBMC, attach mouse and keyboard and use Change Session in corner. Change it to GNOME for desktop. You will be prompted if you want it to be like this everytime it starts up, if thats what you want to do, go for it.

Thanks for your answer...
2 more questions:
1) how can i add another program as autostart at boot with xbmc ?

2) i installed your image into the internal hd (not the original of course)
if i do a "sudo reboot" from shell, atv reboot but does not find the hd
if i switch power off and then power on, everything works....


- frumpy_uk - 2010-06-17

Sam.Nazarko Wrote:@frumpy_uk: Sorry can't help you there, but when I said don't do it through SSH I was saying this because of the Can't open display error.

FYI I also got the Can't open display error when trying to start xbmc directly on the aTV.

Here's the contents of /etc/X11/xorg.conf if relevant (I hope they're legible, I just copied and pasted from my ssh session).

Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 1.0  (buildmeister@builder3)  Wed Sep 12 14:29:35 PDT 2007


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    RgbPath         "/usr/X11R6/lib/X11/rgb"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       30.0 - 110.0
    VertRefresh     50.0 - 150.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option "RegistryDwords" "RMDisableRenderToSysmem=1"
    Option "DynamicTwinView" "false"
    Option "HWCursor" "false"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "NoLogo" "True"
    SubSection     "Display"
        Depth       24
        Modes      "1280x720"
    EndSubSection
EndSection

Section "Extensions"
    Option         "Composite" "Disable"
EndSection



- Sam.Nazarko - 2010-06-17

dietcokefiend Wrote:Maybe there is a bit of a buffer on the old setup or maybe my stereo just sucks Wink

Any ideas on how to disable the CPU throttling. I tried modifying the cpufreq init.d script with 1000 as the min and max speed and it still seems to stay at 600MHz at all times. Normally this wouldnt be a problem but I have found some movies play catchup when first started and drop some frames, which might be alleviated if the processor was running at full speed.

Raising processor speed will actually heighten your problem, as it will cause the CPU and the BCM70012 to fight each other. I have seen improved performance from CPU throttling. The "startup trainwreck" is a known problem. If you want to get rid of stuttering just press pause and then play (you might have to do this a couple of times)


- live4ever - 2010-06-17

Thanks for this - seems to work perfect on my end, all my 1080p Blu-ray and 720p iTunes files work fine. At first I dd'd the image on my MacBook Pro it took forever to copy and got stuck during boot, then I used USBTool on a Win7 desktop and it was so much faster and the (slow, cheap, 8GB) booted fine. I plan on installing it to an internal drive when I get some free time.

Has anyone installed to the internal drive and setup a MCE USB receiver/remote? Will I just have to reconfigure LIRC to use the MCE IR instead of the built-in IR?


- Sam.Nazarko - 2010-06-17

Many people have installed it on the internal drive, see previous posts for more info.

The MCE remote should work without LIRC configuration. It should also work in XBMC OOB (out of box) because there is already a keymap for that.


- dietcokefiend - 2010-06-19

Hahahaha what a lesson in pain.

Spent the past 3 hours trying to figure out how to take the supplied crystalubuntu image and expand it onto my hard drive without resulting in usable space limited to ~4gb.

Hard work paid off, still a huge pain in the butt though. MUCH faster boot and interface response which makes it all worth it.


- matbor - 2010-06-19

dietcokefiend Wrote:Hahahaha what a lesson in pain.

Spent the past 3 hours trying to figure out how to take the supplied crystalubuntu image and expand it onto my hard drive without resulting in usable space limited to ~4gb.

Hard work paid off, still a huge pain in the butt though. MUCH faster boot and interface response which makes it all worth it.



Does it play 1080p .m2ts bluray rips ok, just about to order my crystal and need to play my rips of bluray!?


- dietcokefiend - 2010-06-19

Dont have any rips available, almost all of my stuff is h264 rips. Know of any sample videos to play that are just as demanding?

Also what the heck happened to the prices of the CrystalHD decoders? I got mine like 5-6 months ago for 21 shipped, now that are all like 60 bucks.


- ekb20b - 2010-06-19

dietcokefiend Wrote:Hahahaha what a lesson in pain.

Spent the past 3 hours trying to figure out how to take the supplied crystalubuntu image and expand it onto my hard drive without resulting in usable space limited to ~4gb.

Hard work paid off, still a huge pain in the butt though. MUCH faster boot and interface response which makes it all worth it.


Did you use this step by step guide ?

Since it was requested I put together a quick tutorial on how to copy the image (should work for full and minimal) to the internal drive without removing the ATV OS. (usb drive plugged in boots to Linux, drive removed boots to OS X).

Pretty much everything in this tutorial comes from here or here so credit goes to the original authors.

Requirements:
Another usb drive (separate from the one you have the image restored on to)
Since you are making changes to the internal hard drive it is highly recommended that you make a backup of the recovery partition first so you can undo the changes if necessary. Instructions available here:
http://code.google.com/p/atv-bootloader/wiki/ATVBackup

For some reason the version of Parted included in Ubuntu 8.0.4 generates partitions that stop the ATV OS from booting properly. I couldn't figure out why so I switched to running Parted from the atv-bootloader package since it works perfectly.

Download atv-usb-creator and create a atv-bootloader drive (select atv-bootloader from the options). Then plug the drive into the ATV and reboot.

Once the atv bootloader has loaded telnet into it (user root / pass root)

Delete current Media partition and create new one
This tutorial assumes a 40GB atv drive. If you have a 160 you can make the atv media partition and the linux partition (sda5) larger.

I use vim for editing files throughout this tutorial. Feel free to use emacs, nano, or any other editor if you wish.
(warning - will delete data - be sure you back up if necessary)
Code:

parted -s /dev/sda rm 4
parted -s /dev/sda mkpart primary HFS 2732072s 54525951s

Create Linux Partitions
Code:

parted -s /dev/sda mkpart primary ext3 54525952s 77091549s
parted -s /dev/sda mkpart primary linux-swap 77091550s 78140126s

Format New Partitions
Code:

partprobe /dev/sda
mkfs.hfsplus -J -v Media /dev/sda4
mkfs.ext3 -b 4096 -L Linux /dev/sda5

Remove usb drive and reboot
Run factory restore in ATV OS

If all is well in the ATV OS connect the linux usb drive and reboot
Once linux is loaded ssh into the atv (user xbmc pass xbmc)

Copy Data
Code:

sudo mkdir /media/atvdrive
sudo mount /dev/sda5 /media/atvdrive/
sudo rsync -av --exclude "/proc/" --exclude "/dev/" --exclude "/sys/" --exclude "/mnt/" --exclude "/media/" / /media/atvdrive
cd /media/atvdrive
sudo mkdir -p proc dev sys mnt media
cd

Fix fstab on new install:
First you need to get the uuid information for the linux partitions
The uuid should look something like '72270e11-6b2e-4eb1-807d-4ca29f077626'

Run the following commands and copy the output somewhere so you can use it later.

sda5
Code:

sudo vol_id /dev/sda5 | grep ID_FS_UUID

sda6
Code:

sudo vol_id /dev/sda6 | grep ID_FS_UUID

Edit fstab on new install
Code:

sudo vim /media/atvdrive/etc/fstab

replace the root partition (/) UUID with the uuid you saved for sda5
replace the swap partition UUID with uuid you saved for sda6

unmount partition
Code:

sudo umount /media/atvdrive/
sudo rm -fdr /media/atvdrive/

Point atv-bootloader (on usb drive) to new internal drive install
Code:

sudo fsck.hfsplus /dev/sdb2
sudo mkdir /media/atvboot
sudo mount /dev/sdb2 /media/atvboot
sudo vim /media/atvboot/com.apple.Boot.plist

Change root to /dev/sda5
Code:

sudo umount /media/atvboot
sudo rm -fdr /media/atvboot/

Reboot into the linux install on the hard drive
Code:

sudo reboot

If all is well you can delete the linux partitions on the usb drive
ssh into atv
Code:

sudo umount /dev/sdb3
sudo parted -s /dev/sdb rm 3
sudo parted -s /dev/sdb rm 4

Once complete you can switch between linux and os x by inserting or removing the usb drive and rebooting.
Drive inserted = Linux.
Drive removed = OS X


- matbor - 2010-06-19

dietcokefiend Wrote:Dont have any rips available, almost all of my stuff is h264 rips. Know of any sample videos to play that are just as demanding?

have PM'ed u, let me know how you go. Thx.