CONFIG_HIMEM4G does not allow 4gb of ram in kernel

Bug #189269 reported by Andrew Barbaccia
22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linux
Invalid
Unknown
grub
New
Undecided
Unassigned
linux (Ubuntu)
Triaged
Medium
Unassigned
linux-meta (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

This problem occurs in all gutsy -generic kernels and feisty -generic kernels.

I have a system with 4GB ram installed. The BIOS correctly identifies all 4GB.

When booting into the -generic kernel only 2GB shows up in /proc/meminfo. Looking at the kernel configuration CONFIG_HIMEM4G=y is set so all 4GB should be identified.

After recompiling the -generic kernel with CONFIG_HIMEM64G=y and removing CONFIG_HIMEM4G=y, /proc/meminfo appropriately displays all 4GB.

This should be fixed as many systems are now shipping with 4GB of ram or allowing upgrades to 4gb.

Tags: cft-2.6.27
Revision history for this message
Andrew Barbaccia (andrew-barbaccia) wrote :

As a temporary workaround as the problem is fixed upstream, generic kernels could be compiled with 64G ram support.

Changed in linux:
status: Unknown → Confirmed
Revision history for this message
Hendy Irawan (ceefour) wrote : Only 3.1 GB RAM is detected out of 4 GB RAM in Ubuntu Hardy Heron 8.04

My computer has 4 GB of RAM. It got detected as 4 GB flawlessly in Ubuntu Gutsy Gibbons 7.10 but after I fresh-installed Hardy Heron 8.04 it detects 3.1 GB...

Something isn't right :(

root@pawn:/etc/bind# free
total used free shared buffers cached
Mem: 3236844 1706384 1530460 0 488492 678120
-/+ buffers/cache: 539772 2697072
Swap: 5108628 0 5108628

root@pawn:/etc/bind# dmesg | grep MEM
[ 0.000000] Use a HIGHMEM64G enabled kernel.
[ 0.000000] 3200MB HIGHMEM available.
[ 0.000000] 896MB LOWMEM available.
[ 16.945601] MEM window: efb00000-efbfffff
[ 16.945613] MEM window: ef900000-ef9fffff
[ 16.945624] MEM window: ef700000-ef7fffff
[ 16.945634] MEM window: efd00000-efdfffff

root@pawn:/etc/bind# lspci
00:00.0 Host bridge: nVidia Corporation Unknown device 07c3 (rev a2)
00:00.1 RAM memory: nVidia Corporation nForce 630i memory controller (rev a2)
00:01.0 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)
00:01.1 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)
00:01.2 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)
00:01.3 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)
00:01.4 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)
00:01.5 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)
00:01.6 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)
00:02.0 RAM memory: nVidia Corporation nForce 630i memory controller (rev a1)
00:03.0 ISA bridge: nVidia Corporation Unknown device 07d7 (rev a2)
00:03.1 SMBus: nVidia Corporation Unknown device 07d8 (rev a1)
00:03.2 RAM memory: nVidia Corporation Unknown device 07d9 (rev a1)
00:03.3 Co-processor: nVidia Corporation Unknown device 07da (rev a2)
00:03.4 RAM memory: nVidia Corporation Unknown device 07c8 (rev a1)
00:04.0 USB Controller: nVidia Corporation GeForce 7100/nForce 630i (rev a1)
00:04.1 USB Controller: nVidia Corporation GeForce 7100/nForce 630i (rev a1)
00:08.0 IDE interface: nVidia Corporation Unknown device 056c (rev a1)
00:09.0 Audio device: nVidia Corporation MCP73 High Definition Audio (rev a1)
00:0a.0 PCI bridge: nVidia Corporation Unknown device 056d (rev a1)
00:0b.0 PCI bridge: nVidia Corporation Unknown device 056e (rev a1)
00:0c.0 PCI bridge: nVidia Corporation Unknown device 056f (rev a1)
00:0d.0 PCI bridge: nVidia Corporation Unknown device 056f (rev a1)
00:0e.0 IDE interface: nVidia Corporation Unknown device 07f0 (rev a2)
00:0f.0 Ethernet controller: nVidia Corporation MCP73 Ethernet (rev a2)
00:10.0 VGA compatible controller: nVidia Corporation GeForce 7050/nForce 610i (rev a2)

See http://ubuntuforums.org/showthread.php?p=4792462#post4792462

Revision history for this message
Hendy Irawan (ceefour) wrote :

I'm confused:

"Looking at the kernel configuration CONFIG_HIMEM4G=y is set so all 4GB should be identified."

which implied that the 4GB options is good for identifying the 4GB RAM.

But the next sentence conflicts this:

"After recompiling the -generic kernel with CONFIG_HIMEM64G=y and removing CONFIG_HIMEM4G=y, /proc/meminfo appropriately displays all 4GB."

I think the point is that

CONFIG_HIMEM4G=y

does NOT work, while

CONFIG_HIMEM64G=y

works.

Revision history for this message
Hendy Irawan (ceefour) wrote :

Solution is here:

http://samiux.wordpress.com/2008/01/10/how-to-use-4-gb-ram-on-a-32-bit-ubuntu/

SUMMARY: use the -server kernel, not -generic one.

Please somebody check out this bug... It's not like nobody has 4 GB of RAM in 2008. (not only servers)

Revision history for this message
Hendy Irawan (ceefour) wrote :
Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Note that enabling CONFIG_HIGHMEM64G also enables CONFIG_X86_PAE by default. This will most likely not be enabled by default until the known implications of having CONFIG_X86_PAE enabled can be determined. As a workaround, can you try using the following kernel parameter to see if it helps:

ramdisk_size=[RAM] Sizes of RAM disks in kilobytes See Documentation/ramdisk.txt.

It was also mentioned that this was fixed upstream. I'm curious if anyone would be willing to test with the the Intrepid Ibex 8.10 kernel? It was most recently rebased with the upstream 2.6.25 kernel (which contains the patch you've referenced) and is currently available in the following PPA:

https://edge.launchpad.net/~kernel-ppa/+archive

If you are not familiar with how to install packages from a PPA basically do the following . . .

Create the file /etc/apt/sources.list.d/kernel-ppa.list to include the following two lines:

deb http://ppa.launchpad.net/kernel-ppa/ubuntu hardy main
deb-src http://ppa.launchpad.net/kernel-ppa/ubuntu hardy main

Then run the command:\n\nsudo apt-get update\n\nYou should then be able to install the linux-image-2.6.25 kernel package. After you've finished testing you can remove the kernel-ppa.list file and run 'sudo apt-get update' once more. Please let us know your results. Thanks.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

bah, the last bit of those instructions was poorly formatted, it should be:

Then run the command:

sudo apt-get update

You should then be able to install the linux-image-2.6.25 kernel package.

Revision history for this message
Martin Smith (martinb3) wrote :

It sure would be great to have the default linux-generic kernel for Hardy have PAE enabled. I'm missing half my RAM.

Revision history for this message
Andrew Steele (fozzy) wrote :

Some further info:

I have an ASUS P5B-E Plus. I've just installed/upgraded to Hardy 64bit server version, also running Xen.

I was experiencing the same proiblem: memory remapping enabled and BIOS reporting 4Gb. But when Hardy was running it was only reporting 2.5Gb.

The fix had nothing to do with the various kernel flags discussed. It's a problem with grub. Follow the instructions described here:

http://www.howtoforge.com/make-your-xen-pae-kernel-work-with-more-than-4gb-ram-debian-etch-grub

(Even though it's for debian etch instead of hardy, the instructions are identical).

I've just followed these instructions and rebooted and now all my memory is visible.

The key to the fix is to modify around line 143 of stage2/common.c thus (just one cavaet-I've created this diff after getting it working and I think the build process may have added lines, I think the link above has the correct line numbers - follow it's directions not mine ;-) ):

--- common.c 2008-06-19 22:52:14.000000000 +1000
+++ common.c.orig 2008-06-19 22:51:42.000000000 +1000
@@ -159,7 +159,8 @@
 init_bios_info (void)
 {
 #ifndef STAGE1_5
- unsigned long cont, memtmp, addr;
+ unsigned long memtmp, addr;
+ volatile unsigned long cont;
   int drive;
 #endif

After making this change, rebuild grub, the debian packages, install the debian package, thne do a grub-install.

Hope this helps others.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
mhjort (markus-hjort) wrote :

I installed Intrepid Ibex Alpha 5 on Thinkpad X300 with 4GB memory. It still shows only 3 GB. So the bug seems to be open still...

Revision history for this message
ivosbul (glory-dir) wrote :

W: Неуспех при изтеглянето на cdrom:[Ubuntu 8.04.1 _Hardy Heron_ - Release i386 (20080702.1)]/dists/hardy/main/binary-i386/Packages.gz Използвайте „apt-cdrom“, за да може този CD-ROM да се разпознава от APT. „apt-get update“ не може да се използва за добавяне на нови дискове

W: Неуспех при изтеглянето на cdrom:[Ubuntu 8.04.1 _Hardy Heron_ - Release i386 (20080702.1)]/dists/hardy/restricted/binary-i386/Packages.gz Използвайте „apt-cdrom“, за да може този CD-ROM да се разпознава от APT. „apt-get update“ не може да се използва за добавяне на нови дискове

E: Някои индексни файлове не можаха да бъдат изтеглени, те са пренебрегнати или са използвани по-стари.

Changed in linux:
status: Confirmed → Invalid
Revision history for this message
Andrew Steele (fozzy) wrote :

Based on my earlier comment and the recent update that this is not a kernel issue, I have updated this bug to also relate to grub - as I believe that is the real source of the problem not the kernel.

Daniel T Chen (crimsun)
Changed in linux-meta:
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote : Kernel team bugs

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

I'm marking this as a duplicate to bug 74179 which is being investigated by one of the Ubuntu kernel devs. Please continue to track this issue at that report. Thanks.

Revision history for this message
Rich Wales (richw) wrote :

I'm commenting here in case what I say might have an impact on whether this bug is a duplicate of bug 74179 or not.

I'm running the Jaunty RC (2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux) on a desktop with 4 GB. The BIOS reports 4GB on startup, but /proc/meminfo says it sees only 2838352 kB (2.75 GB).

I tried the Grub patch suggested by Andrew, but it didn't change anything for me -- Ubuntu still sees only 2.75 GB.

Since the Grub patch was proposed in the context of the "Xen-PAE kernel", I'm going to guess that the kernel in this case was already PAE-enabled. So perhaps the reason the Grub patch did nothing for me is because I'm running a vanilla "desktop" system (and many people have said that the desktop kernel doesn't have PAE enabled). But I just wanted to put it on record that, in my case at least, the Grub patch did *NOT* give me access to any extra memory, and the problem still remains as best I can tell.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.