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)



- _saint_ - 2010-12-14

kkillebrew Wrote:Other than on sound over HDMI I can't think of a reason not to upgrade. Besides being more stable with 1080 sources, especially at the beginning of play, the upgraded driver reads EDID's correctly and now all my TV's display 1080p without problem.

Previously my LG 42" LCD would not display 1080 with the ATV but worked with other devices. The general consensus was a faulty tv EDID. Bur after hours of messing with modelines I gave up and typed "nvidia-installer --update" and all my problems disappeared. Even my new Sony Bravia HX800 now reports back that despite it's initial 58 - 62 hz refresh rate stated in EDID, that it will display 24hz and 1080/24p is now a validated mode.

I was never able to use HDMI sound reliably anyway as it is buggy when downmixing on certain sources. So unless you must have sound over HDMI, I would recommend upgrading.

Upgrade to a later release of Ubuntu - if so which instructions did you follow?

I managed to completely break my ATV Linux by upgrading to v10 - at first I thought this was because the mach_kernel was out of date (older kernel) however I compiled a custom mach_kernel and it still doesn't boot.

I would really welcome someone producing a v10 minimal image with updated XBMC, CrystalHD, ALSA, etc.


A couple of questions on lirc and xbmc on crystalbuntu - jm_maclaren - 2010-12-14

I have successfully installed crystalbunbtu onto the apple tv internal drive. My goal is to run a mythtv frontend rather than XBMC. I should point out that xbmc works just fine. I have been able to compile mythtv 0.24 just fine on the box and now and trying to finish up my installation.

The two questions I have are

1. I have read lirc will work with the apple tv remote, however I do not see the device /dev/usb/hiddev0
I see that /etc/modprobe.d/options has the appropriate line
options usbhid quirks=0x05ac:0x8241:0x10

and I have tried passing those arguments directlty. When I do I see in dmesg
[ 356.459033] usbcore: registered new interface driver hiddev
[ 356.459530] usbcore: registered new interface driver usbhid
[ 356.459863] /build/buildd/linux-2.6.24/drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver

What I am doing wrong?

2. Where is xbmc being started, I would like to comment that out and start the mythtv frontend instead.


Any help would be appreciated
Thanks for all of your hard work on this.
James


- jm_maclaren - 2010-12-14

I answered q1 myself, killing atvclient the reloading usbhid caused /dev/usb/hiddev0 to be created. I still need to find where this and xmbc are started during boot.


- Jimmer - 2010-12-14

jm_maclaren Wrote:I answered q1 myself, killing atvclient the reloading usbhid caused /dev/usb/hiddev0 to be created. I still need to find where this and XBMC are started during boot.

Sorry I was going to answer this for you after I got back in, but you've got it nailed now! Your other problem is the script:

/etc/init.d/atvclient

which the system runs at startup.

You can either move the script out of the init.d directory to somewhere safe (for later use?) this will always stop it running at system start...

...or you can just manually stop the instance by running:

sudo /etc/init.d/atvclient stop

This will only be good until the next reboot though...

This is for Hardy. For Karmic, you can use:

sudo service atvclient stop

Jim


- jm_maclaren - 2010-12-14

Thanks. I just renamed S20atvclient to K20atvclient in /etc/rc2.d and that took care of starting it up. I still have been unable to figure out when xbmc is launched. I would have thought it would have been somewhere under xbmc's files but I have not been able to find it. Any help would be appreciated.
Thanks
James


- kkillebrew - 2010-12-14

I was referring to the Nvidia drivers v260.19.21 along with XBMC RC2 and CrystalHD r174. I'm still running pin's original patchstick version of Ubuntu Hardy. Other than the HDMI sound issue, playback in all modes seems smoother and very stable this way. No lock-ups on refresh rate changes, no stuttering when syncing display to audio, etc. The EDID handshake works better too.


_saint_ Wrote:Upgrade to a later release of Ubuntu - if so which instructions did you follow?

I managed to completely break my ATV Linux by upgrading to v10 - at first I thought this was because the mach_kernel was out of date (older kernel) however I compiled a custom mach_kernel and it still doesn't boot.

I would really welcome someone producing a v10 minimal image with updated XBMC, CrystalHD, ALSA, etc.



- _saint_ - 2010-12-14

kkillebrew Wrote:I was referring to the Nvidia drivers v260.19.21 along with XBMC RC2 and CrystalHD r174. I'm still running pin's original patchstick version of Ubuntu Hardy. Other than the HDMI sound issue, playback in all modes seems smoother and very stable this way. No lock-ups on refresh rate changes, no stuttering when syncing display to audio, etc. The EDID handshake works better too.

Okay, I've done the same thing however I'm still experiencing problems with audio stuttering / video sync issues when playing 1080p files. This mostly sorts itself out after 40 or so seconds. Looking at my log file it looks audio related to me.

http://forum.xbmc.org/showthread.php?tid=67526&page=18

I hope these issues are fixed in the final release!


- kkillebrew - 2010-12-14

Mine does that too if I sync the audio to the display. So I uncheck that box and add a .200 second delay to the audio saving that as default. Since most all my content is 24p this works well for me.

_saint_ Wrote:Okay, I've done the same thing however I'm still experiencing problems with audio stuttering / video sync issues when playing 1080p files. This mostly sorts itself out after 40 or so seconds. Looking at my log file it looks audio related to me.

http://forum.xbmc.org/showthread.php?tid=67526&page=18

I hope these issues are fixed in the final release!



- Jimmer - 2010-12-14

jm_maclaren Wrote:Thanks. I just renamed S20atvclient to K20atvclient in /etc/rc2.d and that took care of starting it up. I still have been unable to figure out when xbmc is launched. I would have thought it would have been somewhere under xbmc's files but I have not been able to find it. Any help would be appreciated.
Thanks
James

Would depend upon your install, but again it's probably an init script. Does crystalbuntu have xbmc-live to handle X? If so, you'll find xbmc-live in init.d as well. You can easily test if this is the case by running

sudo /etc/init.d/xbmc-live stop

And seeing if it takes down xbmc+x. If so you can probably either re-jig the init script to run myth or get rid of it altogether and substitute in your own.

If the above is not the case, then check out the howto on the wiki for installing a minimal Hardy on ATV. Likely this is the method they used for autostarting XBMC instead.

Jim


Sony Bravia 24p playback solved - kkillebrew - 2010-12-14

I've been working on this since I got my new Bravia KDL-46HX800 TV. As it turns out the fix was simple after upgrading the nvidia drivers. The updated nvidia driver does a correct EDID handshake and recognizes that the Sony EDID is self contradictory in stating a 58 - 62hz vert refresh rate and at the same time specifying a valid 24p mode. X now just ignores the 58 - 62Hz limitation and adds 1920x1080_24 to the implicit X mode pool.

With Pin's image and using the default xorg.conf as created by X and running the following code:
Code:
sudo /etc/init.d/xbmc-live stop
X -verbose 6 > ~/xlog.txt 2>&1

The xlog.txt revealed:
Code:
(II) Dec 12 15:07:48 NVIDIA(0):   Validating Mode "1920x1080":
(II) Dec 12 15:07:48 NVIDIA(0):     1920 x 1080 @ 24 Hz
(II) Dec 12 15:07:48 NVIDIA(0):     For use as DFP backend.
(II) Dec 12 15:07:48 NVIDIA(0):     Mode Source: EDID
(II) Dec 12 15:07:48 NVIDIA(0):       Pixel Clock      : 74.16 MHz
(II) Dec 12 15:07:48 NVIDIA(0):       HRes, HSyncStart : 1920, 2558
(II) Dec 12 15:07:48 NVIDIA(0):       HSyncEnd, HTotal : 2602, 2750
(II) Dec 12 15:07:48 NVIDIA(0):       VRes, VSyncStart : 1080, 1084
(II) Dec 12 15:07:48 NVIDIA(0):       VSyncEnd, VTotal : 1089, 1125
(II) Dec 12 15:07:48 NVIDIA(0):       H/V Polarity     : +/+
(WW) Dec 12 15:07:48 NVIDIA(0): The EDID for SONY TV (DFP-0) contradicts itself: mode
(WW) Dec 12 15:07:48 NVIDIA(0):     "1920x1080" is specified in the EDID; however, the EDID's
(WW) Dec 12 15:07:48 NVIDIA(0):     valid VertRefresh range (58.000-62.000 Hz) would exclude
(WW) Dec 12 15:07:48 NVIDIA(0):     this mode's VertRefresh (24.0 Hz); ignoring VertRefresh
(WW) Dec 12 15:07:48 NVIDIA(0):     check for mode "1920x1080".
(II) Dec 12 15:07:48 NVIDIA(0):     Mode is valid.

Further:
Code:
(II) Dec 12 15:07:48 NVIDIA(0): Implicitly adding the following modes to X Screen 0 (these
(II) Dec 12 15:07:48 NVIDIA(0):     will be available via XRandR and XF86VidMode):
(II) Dec 12 15:07:48 NVIDIA(0):
(II) Dec 12 15:07:48 NVIDIA(0): "1920x1080_60_0" : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 16)
(II) Dec 12 15:07:48 NVIDIA(0): "1920x1080_24"   : 1920 x 1080 @ 23.97/24 Hz (CEA-861B Format 32)
(II) Dec 12 15:07:48 NVIDIA(0): "1920x1080_60i"  : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 5)
(II) Dec 12 15:07:48 NVIDIA(0): "1680x1050"      : 1680 x 1050 @  60.0 Hz
(II) Dec 12 15:07:48 NVIDIA(0): "1600x1024"      : 1600 x 1024 @  60.0 Hz
(II) Dec 12 15:07:48 NVIDIA(0): "1440x900"       : 1440 x  900 @  60.2 Hz
(II) Dec 12 15:07:48 NVIDIA(0): "1440x480"       : 1440 x  480 @  60.1 Hz Interlace
(II) Dec 12 15:07:48 NVIDIA(0): "1400x1050"      : 1400 x 1050 @  60.0 Hz
(II) Dec 12 15:07:48 NVIDIA(0): "1280x1024"      : 1280 x 1024 @  60.0 Hz
(II) Dec 12 15:07:48 NVIDIA(0): "1280x960"       : 1280 x  960 @  60.0 Hz
(II) Dec 12 15:07:48 NVIDIA(0): "1280x800"       : 1280 x  800 @  60.0 Hz
(II) Dec 12 15:07:48 NVIDIA(0): "1280x768"       : 1280 x  768 @  60.0 Hz
(II) Dec 12 15:07:48 NVIDIA(0): "1280x720_60_0"  : 1280 x  720 @ 59.94/60 Hz (CEA-861B Format 4)
(II) Dec 12 15:07:48 NVIDIA(0): "1024x768"       : 1024 x  768 @  60.0 Hz
(II) Dec 12 15:07:48 NVIDIA(0): "840x525"        :  840 x  525 @  60.1 Hz DoubleScan
(II) Dec 12 15:07:48 NVIDIA(0): "800x600"        :  800 x  600 @  60.3 Hz
(II) Dec 12 15:07:48 NVIDIA(0): "800x512"        :  800 x  512 @  60.1 Hz DoubleScan
(II) Dec 12 15:07:48 NVIDIA(0): "720x480_60i"    : (1440)x 480 @ 59.94/60 Hz Interlace (CEA-861B Format 7)
(II) Dec 12 15:07:48 NVIDIA(0): "720x450"        :  720 x  450 @  60.2 Hz DoubleScan
(II) Dec 12 15:07:48 NVIDIA(0): "640x512"        :  640 x  512 @  60.0 Hz DoubleScan
(II) Dec 12 15:07:48 NVIDIA(0): "640x480"        :  640 x  480 @  60.0 Hz DoubleScan
(II) Dec 12 15:07:48 NVIDIA(0): "640x480_60"     :  640 x  480 @  59.9 Hz
(II) Dec 12 15:07:48 NVIDIA(0): "640x480_60_0"   :  640 x  480 @ 59.94/60 Hz Interlace (CEA-861B Format 1)
(II) Dec 12 15:07:48 NVIDIA(0): "640x400"        :  640 x  400 @  60.0 Hz DoubleScan
(II) Dec 12 15:07:48 NVIDIA(0): "640x384"        :  640 x  384 @  60.1 Hz DoubleScan
(II) Dec 12 15:07:48 NVIDIA(0): "512x384"        :  512 x  384 @  60.0 Hz DoubleScan
(II) Dec 12 15:07:48 NVIDIA(0): "400x300"        :  400 x  300 @  60.3 Hz DoubleScan
(II) Dec 12 15:07:48 NVIDIA(0): "320x240"        :  320 x  240 @  60.1 Hz DoubleScan


So, all that was needed was to add the X implicit "Modes" labels to Xorg.conf:

Code:
Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "NoLogo" "True"
    SubSection     "Display"
        Depth       24
        Modes      "1920x1080_60_0" "1920x1080_24"
    EndSubSection
EndSection

Note that the actual refresh rates are 59.94 and 23.97 respectively so no custom Modelines are needed! The Bravia is now running beautiful 1920x1080/24p (evidenced by pressing the "Display" button on the remote) or 1920x1080_60 and switching between modes according to content.


- jm_maclaren - 2010-12-14

Jimmer Wrote:Would depend upon your install, but again it's probably an init script. Does crystalbuntu have xbmc-live to handle X? If so, you'll find xbmc-live in init.d as well. You can easily test if this is the case by running

sudo /etc/init.d/xbmc-live stop

And seeing if it takes down xbmc+x. If so you can probably either re-jig the init script to run myth or get rid of it altogether and substitute in your own.

If the above is not the case, then check out the howto on the wiki for installing a minimal Hardy on ATV. Likely this is the method they used for autostarting XBMC instead.

Jim

Finally uncovered it in /usr/share/xsessions. Pheww it was well hidden!Big Grin


- rmnelson - 2010-12-14

jm_maclaren Wrote:I have successfully installed crystalbunbtu onto the apple tv internal drive. My goal is to run a mythtv frontend rather than XBMC. I should point out that xbmc works just fine. I have been able to compile mythtv 0.24 just fine on the box and now and trying to finish up my installation.

This is exactly what I would like to do. XBMC is wonderful, but the WAF is already high after 5 years with mythtv with little interest in learning a new system. I had my atv setup working fine with mythbuntu per the atv-bootloader googlecode pages, but a backend upgrade to .24 after a hard drive crash means the .21 frontend on the atv no longer works. My effort to upgrade the entire atv ended with a suboptimal result (read non-working). Now I'm back to a stock atv and a crystalbuntu stick.

So I would appreciate any hints you have for a noob about how to compile mythfrontend .24 on a Crystalbuntu stick.


- jm_maclaren - 2010-12-15

I'll let you know when I've got mythtv running...


- tcroak - 2010-12-16

Ok, so I got the sound working, but two questions from the noob:

1) How do I update XBMC to a newer version? If I use terminal to login to the ATV, will wget download and install to the HDD?

2) I have three HDD's attached (besides the one that carries Sam's image; so four all together) and I don't see the other one. I've looked in 'add source' and end up with no dice.

I must say thanks for all of your help to the new guy and for your hard work! I really appreciate it!

Thanks,
T


- frankiepankie - 2010-12-16

I am using my AppleTV without the internal HDD, only USB.

In this post: http://forum.xbmc.org/showpost.php?p=554556&postcount=431 i read that i have to edit the com.apple.boot.plist file if you removed the internal HDD, but how can i do that file?

I tried booting my PC off a Ubuntu 10.04 and editing it, but Ubuntu doesn't mounts the USB stick because it doesn't supports GPT partitions or something :S

I also have the AppleTV HDD available, so i can do it using SSH, but HOW Huh