Adding memory to the appletv.

444 views
Skip to first unread message

dherman

unread,
Jul 4, 2008, 9:52:43 AM7/4/08
to atv-bootloader
Ok.. Now that I am fully running, I am hearing quite a bit of disk
activity. Has anyone looked into what it would take to add some ram to
the appletv??
--Dave

Scott D. Davilla

unread,
Jul 4, 2008, 12:18:32 PM7/4/08
to atv-bootloader
>Ok.. Now that I am fully running, I am hearing quite a bit of disk
>activity. Has anyone looked into what it would take to add some ram to
>the appletv??

Not possible for mortals. The ram is ball grid array and you will
need the proper SMT equipment to demount and mount replacements if
you can even find larger sized chips in the same footprint and
package. Even then, this assumes that the chip layout has the
required address lines to handle a larger capacify chip.

If there was some sort of USB ram disk that used ram instead of flash
but I've never seen that.

I am folllowing a lead out reducing the amount of ram that the nvidia
chipset takes. It has 64MB of vram and steals another 64MB from
system ram for their TurboCache usage.

I ran across a comment on the nvidia forms,
<quote>
In the Driver "nvidia" section of xorg.conf:

Option "RegistryDwords" "RMDisableRenderToSysmem=1"


With driver 173.14.09, this causes nvidia-settings to report the
memory size as the graphics card ram size only. Looks like it's
disabled turbocache.
<quote>

Not tried it yet. If it works, then the xorg log will reflect the
decreased ram usage.

chaogui

unread,
Jul 4, 2008, 2:46:35 PM7/4/08
to atv-bootloader
I just tried it and seems like it worked, although I am not sure how
big a difference it makes for the system performance. I put the option
mentioned above in xorg.conf and rebooted the atv and now Xorg log
reports

(II) NVIDIA(0): NVIDIA GPU GeForce Go 7300 (G72) at PCI:1:0:0 (GPU-0)
(--) NVIDIA(0): Memory: 65536 kBytes
(--) NVIDIA(0): VideoBIOS: 05.72.22.68.00

Question: if the nvidia chip does not take 64MB of system memory, does
that mean now the os has access to the full 256MB of memory as opposed
to just 194MB previously(when the video chip takes 64MB away)? How
come I do not see any difference in reported total memory after the
change?

I guess another way to ask the question is: how do I tell if this made
a real difference (instead of just seeing a change in reported vram
usage)?

Best

Scott D. Davilla

unread,
Jul 4, 2008, 3:00:08 PM7/4/08
to atv-boo...@googlegroups.com

Ooh, that's a good result.

Look at "free" before and after adding the option. Also "cat
/proc/meminfo". If you post the output of both for both before and
after adding the option (do a clean boot between having the option in
and out), then I can see what it's doing. My AppleTV is occupied
right now so I can try this myself.

To see if this degrades video any, play some content using Myth. I
would check 720p and 1080i as these are the big consumers of video
resources.


--
-----------------------------------------------------------------------
Scott D. Davilla Phone: 919 489-1757 ext 13 (tel)
4pi Analysis, Inc. Fax: 919 489-1487 (fax)
3500 Westgate Drive, Suite 403 email: dav...@4pi.com
Durham, North Carolina 27707-2534 web: http://www.4pi.com

dfishbur...@gmail.com

unread,
Jul 4, 2008, 3:58:16 PM7/4/08
to atv-bootloader

> Look at "free" before and after adding the option. Also "cat
> /proc/meminfo". If you post the output of both for both before and
> after adding the option (do a clean boot between having the option in
> and out), then I can see what it's doing. My AppleTV is occupied
> right now so I can try this myself.

For the record my Xorg.log shows this (without the above changes):
(II) NVIDIA(0): NVIDIA GPU GeForce Go 7300 (G72) at PCI:1:0:0 (GPU-0)
(--) NVIDIA(0): Memory: 131072 kBytes
(--) NVIDIA(0): VideoBIOS: 05.72.22.68.00
(II) NVIDIA(0): Detected PCI Express Link width: 2X

I would show meminfo, but I am not home and I haven't rebooted ATV
clean for a nice comparison.

Dave

otwin

unread,
Jul 4, 2008, 8:47:00 PM7/4/08
to atv-bootloader
>
> I guess another way to ask the question is: how do I tell if this made
> a real difference (instead of just seeing a change in reported vram
> usage)?
>

I've tried this and it seems that it swaps significantly less. I've
got munin running on my backend and it monitors also my atv frontend:

http://img378.imageshack.us/img378/1407/muninatv2hq3.png

I'm far from really understanding all of the graphs munin gives me,
but one can clearly see on the memory usage graph, that since I
changed my xorg.conf at friday 21h00, swap memory has dropped. Until
now I couldn't notice any difference in mythfrontend behaviour, but
didn't have time to really compare with/without that option. Also, if
you look at the weekly graph, it may be a bit early to draw any final
conclusions.

This is with mythbuntu/nvidia 169.12 and there is probably some room
left for improvement with an atv/mythfrontend optimized distro. I
always wanted to try a local boot minimyth someday, but my atv works
really great for me (SD only), so priority to do this isn't very
high...

otwin

unread,
Jul 4, 2008, 9:16:47 PM7/4/08
to atv-bootloader
On Jul 4, 9:00 pm, "Scott D. Davilla" <davi...@4pi.com> wrote:

>
> Look at "free" before and after adding the option. Also "cat
> /proc/meminfo". If you post the output of both for both before and
> after adding the option (do a clean boot between having the option in
> and out), then I can see what it's doing. My AppleTV is occupied
> right now so I can try this myself.
>
   
I wanted to post these and tried this, but free told me it almost
didn't use swap at all (option commented out), which according to
munin, it always did before. I guess I would have to really *use* the
frontend to for some time to see how it changes over time, as I see
swap slowly increase. As it's 3am here, I'll have another look
sometime over the weekend ;)

Scott D. Davilla

unread,
Jul 4, 2008, 10:28:59 PM7/4/08
to atv-bootloader
> >
>> I guess another way to ask the question is: how do I tell if this made
>> a real difference (instead of just seeing a change in reported vram
>> usage)?
>>
>
>I've tried this and it seems that it swaps significantly less. I've
>got munin running on my backend and it monitors also my atv frontend:
>
>http://img378.imageshack.us/img378/1407/muninatv2hq3.png

Nice. I'm have to look into munin.

>I'm far from really understanding all of the graphs munin gives me,
>but one can clearly see on the memory usage graph, that since I
>changed my xorg.conf at friday 21h00, swap memory has dropped. Until
>now I couldn't notice any difference in mythfrontend behaviour, but
>didn't have time to really compare with/without that option. Also, if
>you look at the weekly graph, it may be a bit early to draw any final
>conclusions.
>
>This is with mythbuntu/nvidia 169.12 and there is probably some room
>left for improvement with an atv/mythfrontend optimized distro. I
>always wanted to try a local boot minimyth someday, but my atv works
>really great for me (SD only), so priority to do this isn't very
>high...

Interesting that this also worked under 169.12. I wonder my nvidia
has always replied that you can't turn off TurboCache when this seems
to turn it off.

I looked into minimyth a few months back but could not find any good
guides for setting it up on intel/nvidia.

Scott D. Davilla

unread,
Jul 4, 2008, 10:38:24 PM7/4/08
to atv-boo...@googlegroups.com

mythfrontend does leak memory. The devs say it doesn't but it does.
There's a big leak when changing themes.

Yes, track this as 64MB more for system usage is a large chunk of the
256MB total. It should have a significant effect. I've been looking
for a method to disable turbocache and just happen to stumble upon
the post on the nvidia forums. The fact that it works for 169 version
nvidia drivers is very interesting.

Just a heads up, the 177 series was to have a working HDMI over audio
but there's nothing in the beta release notes.

dherman

unread,
Jul 7, 2008, 8:58:27 AM7/7/08
to atv-bootloader
It works real well. Much less swapping.

Thanks for the idea!
Dave

trag

unread,
Jul 8, 2008, 5:03:22 PM7/8/08
to atv-bootloader


On Jul 4, 11:18 am, "Scott D. Davilla" <davi...@4pi.com> wrote:
> >Ok.. Now that I am fully running, I am hearing quite a bit of disk
> >activity. Has anyone looked into what it would take to add some ram to
> >the appletv??
>
> Not possible for mortals. The ram is ball grid array and you will
> need the proper SMT equipment to demount and mount replacements if
> you can even find larger sized chips in the same footprint and
> package. Even then, this assumes that the chip layout has the
> required address lines to handle a larger capacify chip.

Hmmm. I do a bit of this kind of soldering at work, although the
actual techs are better at it.

If we assume that the data bus is 64 bits wide and that Apple used the
minimum number of memory chips, then they would be 16 bits wide each
and there would be four of them. Each chip would have 64 MB capacity
or 512 Mb capacity. There are 1 Gb and (IIRC) 2 Gb chips in the same
form factor. At that point the issue would reduce to whether Apple
installed the needed address or Bank lines and the actual soldering
job.

Hmmm. <wanders off to search for high res photo of an Apple TV
motherboard.>
Jeff

Scott D. Davilla

unread,
Jul 8, 2008, 5:27:54 PM7/8/08
to atv-bootloader

The AppleTV has 256 MB DDR2-667 5-5-5(CL-tRCD-tRP), soldered onboard
(4x NANYA NT5TU32M16BG-3C)

http://techrepublic.com.com/2346-10877_11-60899.html for internal photos.


Also just found was a method to recovery 64MB of system ram that the
nvidia binary driver was stealing for "Turbocache". See the blog for
details.

trag

unread,
Jul 8, 2008, 5:33:33 PM7/8/08
to atv-bootloader


On Jul 8, 4:03 pm, trag <t...@io.com> wrote:
> On Jul 4, 11:18 am, "Scott D. Davilla" <davi...@4pi.com> wrote:
>
> > >Has anyone looked into what it would take to add some ram to
> > >the appletv??
>
> > Not possible for mortals. The ram is ball grid array and you will
> > need the proper SMT equipment to demount and mount replacements

> Hmmm. <wanders off to search for high res photo of an Apple TV
> motherboard.>

Okay. I found this image:
<http://s22.photobucket.com/albums/b343/briantr/Apple%20TV/?
action=view&current=Apple_TV_4.jpg>
which after downloading and zooming revealed that the memory chips are
Nanya and there are four of them, as surmised. Nanya's page here:
<http://www.nanya.com/PageEdition3.aspx?Menu_ID=61&def=210&lan=en-us>
shows that at that density (512 Mb) and width (16 bits) the only
package option is the 84 ball BGA.

Nanya has 1 Gb chips in the same standard 84 BGA. Micron offers 1 Gb
and 2 Gb chips in the same package and ball arrangement. However,
the issue remains as to whether Apple installed the bank and address
lines and gave the firmware the will to use them.

The increase to 1 Gb density chips (512 MB total memory) does not add
any address lines but adds one bank address line. The increase to 2
Gb density chips adds both a bank line and address line.


Jeff

Scott D. Davilla

unread,
Jul 8, 2008, 5:53:29 PM7/8/08
to atv-bootloader

So to really check this, one would need to pull off one of the ram
chips and look. I don't think an x-ray inspection would show the
trace but might depending on the quality of x-ray inspection
equipment.

Need to find a dead AppleTV to sacrifice to the gods of hardware hacking ;)

trag

unread,
Jul 8, 2008, 6:10:03 PM7/8/08
to atv-bootloader


On Jul 8, 4:27 pm, "Scott D. Davilla" <davi...@4pi.com> wrote:

> >Hmmm. I do a bit of this kind of soldering at work, although the
> >actual techs are better at it.

> >Hmmm. <wanders off to search for high res photo of an Apple TV
> >motherboard.>
>
> The AppleTV has 256 MB DDR2-667 5-5-5(CL-tRCD-tRP), soldered onboard
> (4x NANYA NT5TU32M16BG-3C)
>
> http://techrepublic.com.com/2346-10877_11-60899.htmlfor internal photos.

I looked at the photos in the link above. In that photo set the
Micron MT47H32M16BN-37E is used which is what D9GKW translates to in
Micron speak. Other than the brand (and the speed rating), they're
essentially identical to the Nanya chips. We use those Micron chips
in the lab where I work. And we use the MT47H64M16 in the same
application. The brainy guys here tell me we could go to the
MT47H128M16 if we ever needed to.

So the larger capacity chips are definitely available in the proper
form factor. The issue would be whether it's worth risking a $200 ATV
for the fun of the experiment. I think I'd like to get one actually
up and running Myth TV before I start dissecting it. :-) Once that
works, I may buy another one to experiment on.

Ouch. It's a $90 upgrade if one buys the parts from Digi-Key (there
are usually less expensive places).
<http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?
name=557-1341-1-ND>

On older technology, I'd say salvage the parts off of an affordable
DIMM, but that doesn't work with BGAs unless one has the wherewithal
to reball them.

Jeff

Scott D. Davilla

unread,
Jul 8, 2008, 6:26:39 PM7/8/08
to atv-bootloader
>I looked at the photos in the link above. In that photo set the
>Micron MT47H32M16BN-37E is used which is what D9GKW translates to in
>Micron speak. Other than the brand (and the speed rating), they're
>essentially identical to the Nanya chips. We use those Micron chips
>in the lab where I work. And we use the MT47H64M16 in the same
>application. The brainy guys here tell me we could go to the
>MT47H128M16 if we ever needed to.
>
>So the larger capacity chips are definitely available in the proper
>form factor. The issue would be whether it's worth risking a $200 ATV
>for the fun of the experiment. I think I'd like to get one actually
>up and running Myth TV before I start dissecting it. :-) Once that
>works, I may buy another one to experiment on.
>
>Ouch. It's a $90 upgrade if one buys the parts from Digi-Key (there
>are usually less expensive places).
><http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?
>name=557-1341-1-ND>
>
>On older technology, I'd say salvage the parts off of an affordable
>DIMM, but that doesn't work with BGAs unless one has the wherewithal
>to reball them.
>

ebay?

trag

unread,
Jul 8, 2008, 6:33:30 PM7/8/08
to atv-bootloader


On Jul 8, 4:53 pm, "Scott D. Davilla" <davi...@4pi.com> wrote:

> So to really check this, one would need to pull off one of the ram
> chips and look. I don't think an x-ray inspection would show the
> trace but might depending on the quality of x-ray inspection
> equipment.
>
> Need to find a dead AppleTV to sacrifice to the gods of hardware hacking ;)

If you examine the upper left hand corner of this photo:

<http://techrepublic.com.com/2347-10877_11-60899-60961.html?seq=73>

and look at the left hand edge of the board, you can see the vias
(through-holes) for the memory BGA pads. They are in columns of three
running left to right with some balls omitted.

It might be enough to scrape a bit of the solder mask (green coating)
off of the appropriate vias for two adjacent chips and see if those
two vias are common electrically. All the memory chips should be
sharing their address and bank-address lines. So A13 from one memory
chip, e.g., should be connected to A13 of another memory chip and
similarly for BA2 of the Bank Addresses. So if the BA2s from two
chips are tied together, there is a pretty good chance that they also
connect back to the DDR2 controller.

Of course it is possible that Apple tied them together and didn't
bother to connect them to the DDR2 controller. But why would they do
that? The reasonable choices are that the balls in question are not
connected at all, or are connected back to the controller and to each
other. I guess they might have tied them together and lightly tied
them to ground but that seems farfetched.

Anyway, scraping a bit of solder mask and checking continuity could
not give us a perfect positive, but it could give us a reasonable
negative as to whether the pads are connected.

Either way it still wouldn't answer whether Apple included firmware
code to detect and support larger memory modules.

Hmmph. Looking at the photo again, some of the traces connecting
adjacent memory chips are actually visible.

The datasheet for the 1Gb micron part is here:
<http://download.micron.com/pdf/datasheets/dram/ddr2/1GbDDR2.pdf>

There is a diagram in there under "Ball Assignments and
Descriptions". Use Figure 7: 84-ball FBGA-x16 ball Assignments. The
ball in question in labeled BA2 at L1. It'll take a bit of
visualization to figure out which via should correspond to L1--back of
board, front of board, chip right-side up/upside-down, etc.

But if you can figure that out, then it may be possible to just
eyeball whether there's a trace visible on that ball on a real
motherboard. The detail in that photo is good, but not good enough.

Of course, it there's no trace visible, that could just mean that it
is on an interior layer. But that may be a non-destructively
available piece of information.

Jeff

robbi...@gmail.com

unread,
Jul 8, 2008, 6:48:16 PM7/8/08
to atv-boo...@googlegroups.com
I have an old xbox360 that has those identical looking chips on the mobo X4 and I think it has 1 gig so 256x4. ???

Broken 360'4 are cheap too!

Scott D. Davilla

unread,
Jul 8, 2008, 7:13:09 PM7/8/08
to atv-bootloader

Possible, what about checking the inline resistor count. Some designs
have a low value resistor inline on row/col lines. From that photo
there are a large number of what looks like multi-resistor packages
in that area.

As for firmware setting up the dram controller. One could read the
existing config from the Intel controller, that would give all the
timing info, then re-program it for more memory. Hey, might just get
lucky and find that the controller is already setup.

Scott D. Davilla

unread,
Jul 8, 2008, 7:21:27 PM7/8/08
to atv-boo...@googlegroups.com

my bad, I meant ebay for an inexpensive AppleTV to hardware hack.

trag

unread,
Jul 9, 2008, 4:33:40 PM7/9/08
to atv-bootloader


On Jul 8, 5:10 pm, trag <t...@io.com> wrote:

> Ouch. It's a $90 upgrade if one buys the parts from Digi-Key (there
> are usually less expensive places).
> <http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?
> name=557-1341-1-ND>

I checked with Arrow, which is a usually reasonable distributor, at
least they were three years ago. They are about $22 per (1 Gb) chip.
So that $20 price at Digi-Key seems to be pretty close to market.

I also priced the 2 Gb chips (yields 1 GB total memory in ATV) at Edge
and Avnet. They want approximately $220 each for the 2 Gb chips.
Double ouch, with amputation thrown in.

So, for the immediate future, if doable at all, the 512 MB
configuration would need to be the goal.

Jeff Walther
Reply all
Reply to author
Forward
0 new messages