Laptop doesn't see all memory - Linux

This is a discussion on Laptop doesn't see all memory - Linux ; Hello, My Thinkpad is slowly going downhill, but I'd like to keep using it a bit more. The problem is that recently the BIOS only reports half of the memory in the machine, 256M of 512M, and when I boot ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Laptop doesn't see all memory

  1. Laptop doesn't see all memory

    Hello,

    My Thinkpad is slowly going downhill, but I'd like to keep using it a bit
    more. The problem is that recently the BIOS only reports half of the memory
    in the machine, 256M of 512M, and when I boot (kernel 2.6.15.7 on Slackware
    11) the kernel only uses 256M. Especially nasty when having suspended to
    disk :-)

    I then found out that removing and re-inserting the memory will temporarily
    make the BIOS recognise all 512M again. The strange thing is, that
    suspending the machine to RAM, moving it about up to a point where I'm sure
    the BIOS will only recognise 256M, doesn't affect operation at all, that
    is, upon resume the kernel will keep seeing and using all 512M. This leads
    me to believe that the problem only is in the BIOS seeing the memory; it
    seems that all 512M are fully functional, whether or not they are
    recognised in the first place. Now, on to my question.

    How can I use kernel commandline options to make the kernel disregard the
    BIOS memory map, and use all available memory? How should I define by hand
    the machine's memory map? My goal is to have the kernel use all 512M,
    regardless of whether the BIOS reports 256M or 512M. I've read the
    kernel-parameters document for some hints, which lead me to try the
    following.

    On boot there is this in dmesg:

    Linux version 2.6.15.7_1pj (pj@laptoppj) (gcc version 3.4.6) #1 PREEMPT Sun
    Dec 24 19:55:51 CET 2006
    BIOS-provided physical RAM map:
    BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
    BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
    BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
    BIOS-e820: 0000000000100000 - 000000001fff0000 (usable)
    BIOS-e820: 000000001fff0000 - 000000001fffec00 (ACPI data)
    BIOS-e820: 000000001fffec00 - 0000000020000000 (ACPI NVS)
    BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
    511MB LOWMEM available.

    Based on this memory map, I wrote the following kernel-commandline for GRUB:

    kernel /boot/vmlinuz-2.6.15.7_1pj root=/dev/hda1 ro vga=791 resume=/dev/hda2
    mem=512 memmap=exactmap mem=0x9f800@0 mem=0xa0000$0x9f800
    mem=0x10000$0xe0000 mem=0x1fff0000@0x100000 mem=0x1fffec00#0x1fff000
    mem=0x20000000#0x1fffec00 mem=0x100000000$0xfff80000

    This does not work. Do you have any suggestions on how to modify the kernel
    commandline and make it work?

    Regards,

    PJ


  2. Re: Laptop doesn't see all memory

    On Wed, 17 Jan 2007, in the Usenet newsgroup comp.os.linux, in article
    <45adf138$0$328$e4fe514c@news.xs4all.nl>, PJ Beers wrote:

    >My Thinkpad is slowly going downhill, but I'd like to keep using it a bit
    >more. The problem is that recently the BIOS only reports half of the memory
    >in the machine, 256M of 512M,


    >I then found out that removing and re-inserting the memory will temporarily
    >make the BIOS recognise all 512M again.


    THAT sounds like a memory socket problem. Have you tried running a longer
    term test using 'memtest86' which you can find at iniblio.org (in the
    /pub/Linux/system/hardware/ directory

    [compton ~]$ zgrep memtest /net/james_webb/dir.list/ibiblio.ls-lR.01.13.07.gz
    -rw-r--r-- 1 ftp ftp 540 Nov 12 2004 memtest86-3.2.lsm
    -rw-r--r-- 1 ftp ftp 131309 Nov 12 2004 memtest86-3.2.tar.gz
    [compton ~]$

    or from the authors page at http://www.memtest86.com/

    >The strange thing is, that suspending the machine to RAM, moving it about
    >up to a point where I'm sure the BIOS will only recognise 256M,


    What does this mean?

    >doesn't affect operation at all, that is, upon resume the kernel will
    >keep seeing and using all 512M. This leads me to believe that the
    >problem only is in the BIOS seeing the memory; it seems that all 512M
    >are fully functional, whether or not they are recognised in the first
    >place.


    Hey, it's your system

    >How can I use kernel commandline options to make the kernel disregard the
    >BIOS memory map, and use all available memory?


    -rw-rw-r-- 1 gferg ldp 80763 Mar 21 2003 BootPrompt-HOWTO

    3.3.2. The `mem=' Argument

    This argument has several purposes: The original purpose was to
    specify the amount of installed memory (or a value less than that if
    you wanted to limit the amount of memory available to linux).

    [...]

    ``The kernel will accept any `mem=xx' parameter you give it, and if it
    turns out that you lied to it, it will crash horribly sooner or later.
    The parameter indicates the highest addressable RAM address, so
    `mem=0x1000000' means you have 16MB of memory, for example. For a
    96MB machine this would be `mem=0x6000000'. If you tell Linux that it
    has more memory than it actually does have, bad things will happen:
    maybe not at once, but surely eventually.''

    >Based on this memory map, I wrote the following kernel-commandline for GRUB:


    I'm assuming that is all one line - which seems overly complex. What
    happens if you just tell it 'mem=0x20000000' ?

    >This does not work.


    What happens? Does the computer catch on fire?

    Old guy


  3. Re: Laptop doesn't see all memory

    Moe Trin wrote:
    > On Wed, 17 Jan 2007, in the Usenet newsgroup comp.os.linux, in article
    > <45adf138$0$328$e4fe514c@news.xs4all.nl>, PJ Beers wrote:
    >
    >>My Thinkpad is slowly going downhill, but I'd like to keep using it a bit
    >>more. The problem is that recently the BIOS only reports half of the
    >>memory in the machine, 256M of 512M,

    >
    >>I then found out that removing and re-inserting the memory will
    >>temporarily make the BIOS recognise all 512M again.

    >
    > THAT sounds like a memory socket problem. Have you tried running a

    longer
    > term test using 'memtest86' which you can find at iniblio.org (in the
    > /pub/Linux/system/hardware/ directory


    I've run memtest (I don't know which version, I ran it from the
    SystemRescueCD) for over eight hours, no errors were found.

    >>The strange thing is, that suspending the machine to RAM, moving it about
    >>up to a point where I'm sure the BIOS will only recognise 256M,

    >
    > What does this mean?


    Pick it up, put it in the bag, take a train, carry it around the house,
    etc.
    It's physical movement that triggers the problem. Although recently just
    taking it off the table and putting it back on will prevent the bios from
    recognising more tham 256M.

    >>doesn't affect operation at all, that is, upon resume the kernel will
    >>keep seeing and using all 512M. This leads me to believe that the
    >>problem only is in the BIOS seeing the memory; it seems that all 512M
    >>are fully functional, whether or not they are recognised in the first
    >>place.

    >
    > Hey, it's your system
    >
    >>How can I use kernel commandline options to make the kernel disregard the
    >>BIOS memory map, and use all available memory?

    >
    > -rw-rw-r-- 1 gferg ldp 80763 Mar 21 2003 BootPrompt-HOWTO
    >
    > 3.3.2. The `mem=' Argument




    >>Based on this memory map, I wrote the following kernel-commandline for
    >>GRUB:

    >
    > I'm assuming that is all one line - which seems overly complex. What
    > happens if you just tell it 'mem=0x20000000' ?


    I'll try that later. However, I already did try mem=512M, which I think
    should amount to the same thing, but it didn't work (don't remember whether
    it immediately hangs or reboots). I was looking for the right use of this
    option (from kernel-parameters.txt):

    memmap=exactmap [KNL,IA-32,X86_64] Enable setting of an exact
    E820 memory map, as specified by the user.
    Such memmap=exactmap lines can be constructed based on
    BIOS output or other requirements. See the memmap=nn@ss
    option description.

    to exactly reproduce the following memory map:

    BIOS-provided physical RAM map:
    BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
    BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
    BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
    BIOS-e820: 0000000000100000 - 000000001fff0000 (usable)
    BIOS-e820: 000000001fff0000 - 000000001fffec00 (ACPI data)
    BIOS-e820: 000000001fffec00 - 0000000020000000 (ACPI NVS)
    BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
    511MB LOWMEM available.

    >>This does not work.

    >
    > What happens? Does the computer catch on fire?


    Not yet :-)

    It sometimes immediately reboots, sometimes hangs, with no kernel messages
    appearing on screen.

    PJ
    --

  4. Re: Laptop doesn't see all memory

    On Fri, 19 Jan 2007, in the Usenet newsgroup comp.os.linux, in article
    <45b0ba84$0$334$e4fe514c@news.xs4all.nl>, PJ Beers wrote:

    > Moe Trin wrote:


    >> PJ Beers wrote:


    >>>I then found out that removing and re-inserting the memory will
    >>>temporarily make the BIOS recognise all 512M again.

    >>
    >> THAT sounds like a memory socket problem. Have you tried running a
    >> longer term test using 'memtest86' which you can find at iniblio.org
    >> (in the /pub/Linux/system/hardware/ directory

    >
    >I've run memtest (I don't know which version, I ran it from the
    >SystemRescueCD) for over eight hours, no errors were found.


    Did you also try moving the computer around?

    >> What does this mean?

    >
    >Pick it up, put it in the bag, take a train, carry it around the house,
    >etc.


    Try doing that while running memtest

    >It's physical movement that triggers the problem. Although recently just
    >taking it off the table and putting it back on will prevent the bios from
    >recognising more tham 256M.


    If it's mechanical, then it's got to be one of a very few things.

    1. Bad socket on the RAM
    2. Bad motherboard - crack or some other mechanical damage to the printed
    circuit wiring
    3. Bad socket OR bad CPU - preventing the A28 address bit from working
    4. Bad RAM (possibly cracked, or damaged pins)
    5. Bad BIOS chip - may or may not be socketed
    6. Bad 'North Bridge chip' (normally soldered to the motherboard)

    That's really about it. What physical form is the RAM?

    As regards the BIOS chip, this was often called the CMOS RAM, but a
    lot of the systems I see seem to use a Dallas Semiconductor combination
    RAM and 'CMOS Battery' chip. Memory size as far as the BIOS is concerned
    is just a 32 bit data word in NVRAM or CMOS RAM indicating how much is
    there. You might have a bit flip, but I find that highly unlikely,
    especially with a mechanical cause. Not impossible, but the odds are
    vanishingly small. I'd more expect some kind of mechanical break in a
    circuit trace - but if it related to the BIOS, there should be other
    things looking screwy, such as hard disk control data, and more likely
    the date/time function (which is also a 32 bit data word).

    You say that the BIOS doesn't see the memory - what is the exact indication
    of this? Depending on the physical form of the RAM, the BIOS is reading
    the size of each RAM chip/module - certain pins on the module are jumpered
    in a pattern that identifies the type and size.

    >> What happens if you just tell it 'mem=0x20000000' ?

    >
    >I'll try that later. However, I already did try mem=512M, which I think
    >should amount to the same thing, but it didn't work (don't remember whether
    >it immediately hangs or reboots). I was looking for the right use of this
    >option (from kernel-parameters.txt):


    From the BootPrompt-HOWTO

    Note that the argument does not have to be in hex, and the suffixes
    `k' and `M' (case insensitive) can be used to specify kilobytes and
    Megabytes, respectively. (A `k' will cause a 10 bit shift on your
    value, and a `M' will cause a 20 bit shift.) A typical example for a
    128MB machine would be "mem=128m".

    >>>This does not work.

    >>
    >> What happens? Does the computer catch on fire?

    >
    >Not yet :-)


    I ask that merely because "does not work" doesn't provide any information.

    >It sometimes immediately reboots, sometimes hangs, with no kernel messages
    >appearing on screen.


    If it makes it past the BIOS start (to the point where it tries to access
    the disk drive to load the boot loader), this _suggests_ it's not a CPU
    or CPU "wiring" problem (the CPU has to wave those bits to reach the BIOS
    and then to access some of the hardware).

    Old guy

+ Reply to Thread