Score:0

Is it possible to tell ubuntu to use only one memory chip, if the computer has two?

us flag

As per the title.

I have had curious problems on my computer since I bought a new RAM chip, and this left me wondering if the RAM chip is to blame.

To test it, I'd like to configure ubuntu to use only one chip, and then the other. I would not mind doing complex procedures (perhaps manually allocating all the memory on the to be unused chip so that all processes reside on the other?) but would mind trying dangerous ones

The simplest solution might be to open the computer and physically remove the chips, but I would like to avoid that if possible (out of fear of causing damage/difficulty with opening and closing the machine)

How do I tell ubuntu not to use certain memory addresses? offers a partial solution: given adressess to avoid, we can turn them off. But it is still necessary to know what adresses are in what chip

hu flag
Does this answer your question? [How do I tell ubuntu not to use certain memory addresses?](https://askubuntu.com/questions/908925/how-do-i-tell-ubuntu-not-to-use-certain-memory-addresses)
us flag
No, but it answers part of the question. I can now shutdown some adresses. The next step would be to learn how to obtain the list of all adresses corresponding to a specific RAM chip
crip659 avatar
pl flag
It seems that to tell which ram stick is bad, you have to test each one separately by removing one. Just take your time and be careful. Google the make and model of computer and will find lots of tips and how tos to make sure you are doing it right.
Andrew Lowther avatar
jp flag
For testing the memory, you might want to try `memtest86+` or `memtester`.
Luuk avatar
cn flag
Hopefully your question gets answered here: https://askubuntu.com/questions/1383622/diagnosing-memory-problems
hu flag
No what? Haven't you said "I would not mind doing complex procedures"?
us flag
Sorry if it seemed I did not find it useful. I meant to say "this is part of a solution, but (to my knowledge) not a full solution (yet)". Thank you for the post you found, it is helpful
heynnema avatar
ru flag
@josinalvo Status please...
heynnema avatar
ru flag
@josinalvo Status please...
Score:1
ru flag

memtest

FIRST, go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take a few hours to complete.

I suspect that memtest will fail. Remove your new SODIMM/DIMM and re-run memtest. If it passes, remove the passed SODIMM/DIMM, reinsert the other SODIMM/DIMM by itself, and re-run memtest.

badram

See How to install Ubuntu on a laptop with soldered RAM module that has damaged cells

If you look in /etc/default/grub, you'll find a GRUB_BADRAM= parameter where you can identify what bad memory locations there are.

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

Source: https://help.ubuntu.com/community/BadRAM#BADRAM_setting_in_Grub2

BADRAM setting in Grub2

The GRUB2 config file in Natty has a line for configuring kernel bad ram exclusions. So, I will assume that is the preferred way of mapping out a section of memory that is showing errors. The line I set was

GRUB_BADRAM="0x7DDF0000,0xffffc000" 

The suggested way on every web site I could find was to set this was to run memtest86 and let it show you the BadRAM settings. memtest86 gave me a page of stuff I would have had to enter. I could see that all the addresses were in one 16K block, so I just wanted to map that 16K block out of action. Here is how I generated the correct entry.

The first parameter is easy. That is the base address of the bad memory. In my case, I could see that all the bad addresses were greater than 0x7DDF0000 and less than 0x7DDF4000. So, I took the beginning of the 16K block as my starting address.

The second parameter is a mask. You put 1s where the address range you want shares the same values and 0s where it will vary. This means you need to pick your address range such that only the low order bits vary. Looking at my address, the first part of the mask is easy. You want to start with 0xffff. For the next nibble, I will explain with bit maps. I want to range from 0000 to 0011. So, the mask for badram would be 1100 or a hex c. The last 3 nibbles need to be all 0s in the mask, since we want the entire range mapped out. So, we get a total result of 0xffffc000.

After setting this line in /etc/default/grub, I ran sudo update-grub and rebooted and my bad memory was no longer being used. No kernel patches are needed to map out bad memory using this method.

Update #1:

If memory errors don't show up in lower memory, you can add the "mem=##MB" kernel option to temporarily disable memory above that point. Ex: According to memtest86, my stick of memory has errors between 315MB and 325MB. By adding "mem=314MB" I tell the kernel to pretend I only have 314MB. My system will be stable enough to build the patch, at which point I can pass a parameter to ONLY skip the section between 315MB and 325MB (this providing me 502MB of usable memory).

ie: Boot Ubuntu Live, at GRUB menu, hit e to enter edit mode, use the arrow keys to find "quiet splash", change to "quiet splash mem=2048MB", CTRL+x or F10 to continue booting.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.