Downclocking MacBook RAM

I want to share my experience of upgrading my MacBook6.1 A1342 (increasing memory up to 8GB, installing SSD) and solving a number of problems associated with installing the system on a new disk and dealing with RAM incompatibility glitches.

At first it may seem that the upgrade of the old iron is a trivial task: the Internet should be full of articles on this topic, and on the market a lot of cheap parts for it. But not everything is so simple in practice. Problems began in the store during the selection of components

Prehistory


For a symbolic amount was purchased from the hands of the MacBook, this is my first laptop of this company, initially took to "get acquainted" with the products of the company. Immediately after the purchase, it was found that the computer is very brake for our days, I was not ready for such an acquaintance. On the advice of a friend decided to upgrade. I found out that inside the SATA disk is 2.5 "and 2 DDR3 204pin SO-DIMM 1066MHz strips, officially supports a maximum of up to 4Gb in one slot. A 250Gb SSD disk was selected in the store (there is no problem with choosing: any SATA 2.5" will do, the assortment is wide any taste).

But with RAM is not so simple. Officially, this model of the MacBook supports the 1066MHz operative, there was no such available, and under the order one bar cost about 4000 rubles. At the same time, 4Gb 1600MHz was available at a price of about 2,000 rubles. Took faster, based on backward compatibility. It did not start. The store managed to pick up one memory module with which the system started (AMD R334G1339S1S) and I went home happy, not forgetting to order the second one. And so that the second slot is not empty, temporarily included the native 1Gb bar.

I must say that, disappointed in the slow macOS, I installed Windows 7 on the entire partition and did not backup the system - do not repeat my mistake!

At this lyric ends and begin dancing with a tambourine.

Installing macOS on a blank disk


In my village, Mac has two people: the first is mine, and the second is that one-eyed gangster who keeps the whole village at bay. From improvised means: a flash drive 8Gb, a second laptop with Windows 7 on board, a dedicated Internet line.

There are many articles on the Internet on how to make a macOS bootable USB flash drive directly in macOS. How to make a bootable USB flash drive with macOS High Sierra from under Windows is not very much and they all fall far below in the output after the ways how to do it in macOS. I already began to look for images of flash drives in the format .img .iso .bin and others, but alas! Maybe somewhere on the blocked torrent trackers they are, but I did not find it. But I found the BDU utility ( Boot Disk Utility ), with which you can download the necessary files directly from the AppStore and write to the USB flash drive. The program is simple, on the official website there is a detailed instruction with pictures, so I will not stop at this stage. Let me just say that there is no need to break the flash drive into 2 sections and download Clover, it is enough to download the RecoveryHD image and write it to the flash drive section.

Then we boot from the flash drive (at the start, press Alt and hold until the menu appears). In the disk utility we format the disk (I chose the GUID, APFS). Connect to the Internet via WiFi or wire and run the installation. If everything is good, then the system will download itself from the Internet and be installed on the computer.

Iron compatibility issues


The second bar came pretty quickly, I did not have time to enjoy the new SSD drive and 4 + 1 Gb RAM. I put the RAM, the full 8Gb was displayed in About This Mac and I began to torment the system with heavy tasks. About 1-2 times a day the computer began to reboot. Errors like kernel_panic in all applications from Xcode to simple TextEdit. It got to the point that they stopped downloading applications from the AppStore. First thought - RAM is broken. Chasing Memtest - everything is in order. Reinstalling from a flash drive created in BDU ends in a crash (verified error, checksum error and other errors). I had to go far for offline installation flash drive created directly in macOS (from under Windows this is difficult to do). But even this did not save.

I noticed that the memory runs at 1333MHz. Since There is no BIOS in the Mac, then I had to lower the frequency by turning on the parallel 1Gb 1066 MHz parallel to the native bar. And it helped! The system does not crash, from the AppStore everything is swinging normally. But how then is the second bar?

Break the entire Internet, found 2 ways to solve the problem:

  1. EFI update from a similar MacBookPro, while not the fact that it will not die at all and as a result will be in About This Mac to write that this is a Pro;
  2. Change the maximum allowed memory frequency in the SPD block of the memory itself in one of the slats, then EFI will automatically select it.

Downclocking RAM 1333MHz-1066MHz MacBook


I chose the second option, because the risk of killing one bar of two is cheaper for me. Plus possible problems in the future due to incorrect identification of the board by the system. Let EFI update itself Apple. For de-blocking, you need a live disk with Linux (I used the Ubuntu installation disk 16.04.2)

Action plan:

1. Remove the dump from the SPD EEPROM memory;
2. Find and reduce the bus frequency from 1333MHz to 1066MHz;
3. Recalculate CRC;
4. Write the values ​​back to the EEPROM.

If you have an extra $ 16, you can simply buy Thaiphoon Burner and do all the operations in it. If not, then pump over the directness of the hands. Go!

Remove the dump

We are loading into Ubuntu, launching the terminal, then we will do everything under the root. Install i2c-tools, load drivers:

sudo -I #add-apt-repository universe #apt-get update #apt-get -y install i2c-tools #modprobe eeprom #modprobe i2c-smbus #modprobe i2c-dev #modprobe i2c-nforce2 

Let's see what tires we have:

 #i2cdetect -l i2c-3 i2c nvkm-0000:02:00.0-aux-0008 I2C adapter i2c-1 i2c nvkm-0000:02:00.0-bus-0002 I2C adapter i2c-8 smbus SMBus nForce2 adapter at 2140 SMBus adapter i2c-6 i2c nvkm-0000:02:00.0-aux-000b I2C adapter i2c-4 i2c nvkm-0000:02:00.0-aux-0009 I2C adapter i2c-2 i2c nvkm-0000:02:00.0-bus-0003 I2C adapter i2c-0 i2c nvkm-0000:02:00.0-bus-0000 I2C adapter i2c-9 smbus SMBus nForce2 adapter at 2100 SMBus adapter i2c-7 i2c 0000:02:00.0 I2C adapter i2c-5 i2c nvkm-0000:02:00.0-aux-000a I2C adapter 

Tell me in the comments how to uniquely find in this list where RAM is hanging? I previously used the free version of Thaiphoon Burner, so I know where I'm going.

So, on the 8th bus hangs SMBus nForce2 adapter at 2140. Let's see what's inside:

 #i2cdetect -y 8 0 1 2 3 4 5 6 7 8 9 abcdef 00: -- -- -- -- -- 08 -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: UU UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- 

Here, UU UU is my two strips: one of them on 1Gb, the other on 4Gb. Addresses 0x50 and 0x51. Which of them where, can be determined by the dump of each, based on the serial number, for example, or year of manufacture. I already looked at this information in advance in Thaiphoon Burner, so we immediately look at the device at 0x51. Let's dump the first 256 bytes of memory - this is the SPD EEPROM:

 #i2cdump -f -r 0x00-0xff -y 8 0x51 b 0 1 2 3 4 5 6 7 8 9 abcdef 0123456789abcdef 00: 92 11 0b 03 03 19 00 09 03 52 01 08 0c 00 3c 00 ??????.??R???.<. 10: 69 78 69 30 69 11 20 89 00 05 3c 3c 00 f0 83 01 ixi0i? ?.?<<.??? 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 30: 00 00 00 00 00 00 00 00 00 00 00 00 0f 11 05 00 ............???. 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 70: 00 00 00 00 00 80 01 44 00 00 00 00 00 00 4f 5d .....??D......O] 80: 52 33 33 34 47 31 33 33 39 53 31 53 00 00 00 00 R334G1339S1S.... 90: 00 00 00 00 80 01 00 00 00 00 00 00 00 00 00 00 ....??.......... a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 

Bus frequency

Then we do everything in the mind \ notepad, but in no case do we write in the EEPROM!
I neatly transferred the resulting dump to a text document. After reading JEDEC Standard No. 21-C, we learn that the desired parameter is in the 12th byte (i.e. with offset 0x0C), and the frequency 1066MHz (in fact, the documentation writes twice the lower frequency 533MHz) corresponds to 15 (i.e. 0x0F). correct in a notebook and go on.

CRC checksum

It is a bit more complicated, CRC is considered either for the first 126 bytes, or for 117 bytes. This is determined by the high bit of the first byte. I have this value 0x92, high bit = 1, which corresponds to CRC Coverege 0-116. The CRC value itself is calculated using the standard CRC-CCIT 16bit polynomial 0x1021 formula. I used the online CRC calculator, where everything is perfectly inserted and counted with plain text. It is important to note that the CRC bytes after counting are written in reverse order to the EEPROM in the 126th and 127th bytes. In my case, the online calculator counted CRC 0x5047, in the EEPROM I will write down 0x47, then 0x50.

EEPROM Entry

Before continuing, you should double-check everything again: read JEDEC, evaluate the risks, try to calculate the CRC of the working modules to hone the skill. In case of an error, the memory will die! You can of course get stuck, connect to the programmer and restore the SPD from the backup (did you make it?). Then we continue.

In my case, you need to write (address = value):

0x0C = 0x0F (12th byte frequency)
0x7E = 0x47 (126y byte CRC.2)
0x7F = 0x50 (127y byte CRC.1)

 #i2cset -f -y 8 0x51 0x0C 0x0F #i2cset -f -y 8 0x51 0x7E 0x47 #i2cset -f -y 8 0x51 0x7F 0x50 

Check if the values ​​are recorded:

 #i2cdump -f -r 0x00-0xff -y 8 0x51 b 0 1 2 3 4 5 6 7 8 9 abcdef 0123456789abcdef 00: 92 11 0b 03 03 19 00 09 03 52 01 08 0f 00 3c 00 ??????.??R???.<. 10: 69 78 69 30 69 11 20 89 00 05 3c 3c 00 f0 83 01 ixi0i? ?.?<<.??? 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 30: 00 00 00 00 00 00 00 00 00 00 00 00 0f 11 05 00 ............???. 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 70: 00 00 00 00 00 80 01 44 00 00 00 00 00 00 47 50 .....??D......GP 80: 52 33 33 34 47 31 33 33 39 53 31 53 00 00 00 00 R334G1339S1S.... 90: 00 00 00 00 80 01 00 00 00 00 00 00 00 00 00 00 ....??.......... a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 

As you can see, everything is recorded correctly. Just in case, we recheck and reboot. If the computer is turned on and all the memory is available - congratulations! We remove the 1Gb native bar, put the second one (not stitched) and check the memory frequency - 1066MHz.

If the memory is not flashed, then Write Protect is worth it. You can try to unlock with the Thaiphoon Burner utility, or by soldering a resistor to one of the memory legs (topic of a separate article), or by trying to flash another bar.

I hope this article will be useful to anyone. He wrote mostly for himself, so as not to look again for all the information in different places.

When writing materials were used

Source: https://habr.com/ru/post/413099/


All Articles