28

I have an Asus G50vt-x5 laptop with 4GB of RAM installed. But Ubuntu 10.10 shows only 3GB of RAM. Why is it only showing 3GB of RAM instead of the full 4GB? output of free command is :

neal@ubuntu:~$ free
             total       used       free     shared    buffers     cached
Mem:       3095668    2972784     122884          0     747996    1590044
-/+ buffers/cache:     634744    2460924
Swap:            0          0          0
Jorge Castro
  • 71,754
nebula
  • 1,267

6 Answers6

40

You can install 64bit version, but if you don't want to do this, you can install PAE (Physical Address Extension) enabled kernel on the 32-bit version.

After 10.04, Ubuntu automatically installs the PAE enabled kernel if it detects more than 3 Gb of memory. But ubuntu wiki says:

In the case of the liveCD, a working network connection is required, since the PAE enabled kernel packages are not present on the CD.

So I guess you installed Ubuntu using CD without an internet connection.

Try this:

sudo apt-get install linux-generic-pae linux-headers-generic-pae


What is PAE?

Physical Address Extension is a technology which allows 32 bit operating systems to use up to 64 Gb of memory (RAM), something which is normally achieved by switching to a 64 bit system. PAE is supported on the majority of computers today and it is an easy procedure to enable it in Ubuntu, if it is not already. To check if your processor supports PAE, try

grep --color=always -i PAE /proc/cpuinfo

In general, a proper 64 bit system is recommended if you have 4 Gb or more memory and/or want to get the full benefit of the 64 bit architecture (see 32bit_and_64bit), but in some cases making a complete switch to 64 bit is not desirable, and using PAE can be a viable compromise.

It should be noted that there is no Virtual Address Extension. i.e. The applications still get the same amount of virtual memory since the Virtual addresses are still 32 bits while the Physical Addresses are of 36 bits. Therefore PAE is not at all equivalent to a 64 bit system.

Pedram
  • 5,711
30

If you installed the 32-bit version of Ubuntu, it won't recognize over 4GB of memory. You will need to install the 64-bit version of Ubuntu for the system to recognize more than 4GB of memory.

See also:


Note that the standard now is for the Ubuntu images to build and ship with the PAE enabled kernel which allows the use of more than 4GB RAM on 32-bit systems. However, this requires the use of a PAE-capable processor in your system. If your system is sufficiently old, the PAE kernels will not work, and the above restriction of a 4GB memory limit will still stand.

Thomas Ward
  • 74,764
  • 30
    Or the 32-bit PAE version of kernel. – arrange Mar 27 '11 at 16:31
  • yeah its true i have 32bit version. Ubuntu 11.04 is on the way ! can i upgrade to 64bit version of 11.04 so that the issue will be fiexed? – nebula Mar 27 '11 at 16:33
  • You assume their system can handle the PAE kernel. – Thomas Ward Mar 27 '11 at 16:33
  • @aneal: You can't upgrade from 32-bit to 64-bit. Only direct upgrades work (i.e. 32-bit to 32-bit, or 64-bit to 64-bit). You'd need to either use the PAE kernel, or install the 64-bit version (although you'll lose any current configurations or data you have in the process because it will reformat the drive). – Thomas Ward Mar 27 '11 at 16:34
  • @EvilPhoenix: Does this means my 1GB is wasted now?? No use at all?? – nebula Mar 27 '11 at 16:42
  • 2
    @aneal: In this situation Ubuntu won't use any amount of memory over 3GB.I added the reason to my answer.So you must install 64-bit version or PAE. – Pedram Mar 27 '11 at 16:45
  • @aneal: read the comment above this one. – Thomas Ward Mar 27 '11 at 18:44
  • 2
    @EvilPhoenix: That's not strictly true, if they boot a 64bit livecd and install ubuntu by hand (aka debootstrap/cdebootstrap) their settings/files will be intact except of course /etc. – OneOfOne Mar 27 '11 at 21:39
  • 2
    The limit of the non pae 32 bit kernel is 4gb, not 3. – psusi Mar 28 '11 at 01:07
  • but isn't 64-bit systems for AMD processors only? – Starx Jul 24 '11 at 14:45
  • Nope. Intel makes 64bit processors and it works on those. The "amd64" is just the name that is used for 64-bit processor architecture, but both Intel and AMD make 64bit processors, and "amd64" architectured systems work off of both processors. – Thomas Ward Jul 25 '11 at 12:37
  • @OneOfOne your method is horridly complicated. Most users want simple solutions, which is what I gathered from this user's post (horridly late comment :P) – Thomas Ward Nov 02 '11 at 02:40
  • 2
    @psusi the maximum is 3.6 GB of memory of non-PAE kernels, also Thomas, take into account that Ubuntu now builds pae kernels for everything, there isn't a non-pae kernel in recent releases. – Braiam Aug 25 '13 at 05:59
  • @Braiam, 32 bits addresses 4 GB. The BIOS reserves some of that space to address memory mapped IO devices, which results in less being usable for normal ram. How much depends on the BIOS, with 3.2 GB being typical, and 3.6 or more being possible. – psusi Aug 25 '13 at 18:43
  • @Braiam Late edits to fix, I know, but I revised this answer accordingly. Please also note that there ARE still systems out there that people run Ubuntu on that don't have PAE-compatible processors. – Thomas Ward Jan 01 '14 at 19:23
2

Open /var/log/dmesg/dmesg and look for the section near the beginning that looks like this:

[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009d800 (usable)
[    0.000000]  BIOS-e820: 000000000009d800 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)

Post that section for detailed analysis. Also look for another line a little further down like this:

[    0.000000] Memory: 4019820k/4972544k available (5694k kernel code, 798616k absent, 154108k reserved, 2514k data, 944k init)

Often times there are things like video memory taking up space in the 3-4 gb area. On some systems that memory is simply lost. On others, it can be remapped, often above the 4gb mark, which you need either the pae or 64bit kernel to access.

Jorge Castro
  • 71,754
psusi
  • 37,551
  • 2
    Just wanted to comment that I have an Asus board that lost 1GB of memory, even after installing 64bit. I had to enable remapping in the bios, as alluded to in this answer. – user1974 Apr 21 '11 at 23:33
1

You have three solutions, two of which have already been suggested:

  • install a 64-bit kernel on your i386 installation; on Debian it's only a matter of installing kernel-image-2.6-amd64-k8 and amd64-libs
  • install a 32-bit kernel with PAE activated
  • reinstall a complete 64-bit system
0

Rum memtest ("Test memory") from the boot menu (or the installation medium) if the first screen reports less than your 4Gb, upgrade (Flash *ROM) your BIOS.

Run sudo lshw to determine the model of your motherboard, then head up to vendor's site and DL tje latest BIOS.

yPhil
  • 1,557
  • 14
  • 25
0

I know this is a bit too localised, but the dedicated question was marked as duplicated and now redirects to this one.

For Dell XPS 13 L321X users, there is a BIOS update that introduced this issue/feature. So if you want to retrieve your 4G of RAM, you need to downgrade to A04 BIOS. There are two topics mentioning this issue on the Dell community:

  1. Dell XPS 13 3.3GB Available Memory out of 4GB
  2. XPS 13 Ultrabook - 690 MB Hardware Reserved RAM