Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
5111808k (BIOS misreports this) - 1257020k (missing because BIOS reports it wrong) = 3854788k of real available RAM (which is 3.67 GB) - 151908k (148 MB reserved by video card) = 3702880k (available to OS = 3.53 GB)
Are you sure there is nothing in the BIOS about how much RAM is detected ?
Not misreported. That is the amount of physical address space used to contain all the ram. Hex 138000000 is exactly 511808K.
The rest of the numbers don't seen to work out exactly to anything in the physical map.
Quote:
1257020k (missing because BIOS reports it wrong) = 3854788k of real available RAM (which is 3.67 GB) - 151908k (148 MB reserved by video card) = 3702880k (available to OS = 3.53 GB)
I can't tell where you are getting any of that from.
Right, but 5111808k = 4.875 GB ... how is that possible ? That's not the amount of RAM available, because it's 4 GB. I think the BIOS reports it wrong, that's the only thing that can explain this.
This is very weird. I double checked Windows 7 and it reports 4.00 GB (3.68 GB usable) for installed memory. If I can trust my eyes I had not seen that in the parenthesis part before. I ran windows memory diagnostic tool with a standard test but it didn't report any problem.
Now I have 3 numbers for the amount of memory 4.00GB, 3.68GB from Windows, and 3.5GB from Linux.
No, in Linux it is 3854788k of real available RAM (which is 3.67 GB), minus the video card, maybe Window$ doesn't report the part used by the video card.
EDIT:
Oh, and I forgot to ask, what brand video card ? Intel integrated ones usually have shared memory from RAM, so they will take some of it. Maybe in Window$ it takes the RAM dynamically, while in Linux it is pre-allocated.
Last edited by H_TeXMeX_H; 01-27-2011 at 09:09 AM.
No, in Linux it is 3854788k of real available RAM (which is 3.67 GB), minus the video card, maybe Window$ doesn't report the part used by the video card.
EDIT:
Oh, and I forgot to ask, what brand video card ? Intel integrated ones usually have shared memory from RAM, so they will take some of it. Maybe in Window$ it takes the RAM dynamically, while in Linux it is pre-allocated.
Graphics Card: Intel HD Graphics
Video Memory: 128MB
128M is roughly (not exactly) equal to the difference between linux number for memory and windows usable memory. But still there is gap between 4G and 3.68.
5111808k = 4.875 GB ... how is that possible ? That's not the amount of RAM available, because it's 4 GB. I think the BIOS reports it wrong, that's the only thing that can explain this.
Ram and physical address space are two very different things. That is the reason a system that can only support 4GB of physical address space supports significantly less than 4GB of ram.
This system can support more than 4GB of physical address space.
The 5111808k is a measure of physical address space, not a measure of ram.
The BIOS has mapped most of the first 3GB of ram into the first 3GB of physical address space. The part of that 3GB that is missing is confusing.
The BIOS has mapped most of the fourth 1GB of ram into the fifth 1GB of physical address space. Exactly 128MB is missing from that mapping, which might be the shared video ram, except that the shared video ram is typically missing from the earlier section and that earlier section is missing enough it would be very hard to explain if it isn't shared video ram.
The main chunks of usable ram are
0000000000100000 - 00000000b327c000 = 2934256 KB
0000000100000000 - 0000000138000000 = 917504 KB
There are also two fragmented areas: 0-100000 and b327c000-b3800000 that contain 2516 KB of usable memory scattered through 23824 KB of physical address space. That fragmentation means 21308 KB of ram is unusable (should be missing after we account for all ram use).
So we have 2934256+917504+2516 = 3854276 KB that the BIOS lets Linux or Windows use. What is the 3702880 KB reported by dmesg | grep Memory, specifically what is included in the 151396 KB difference between those two numbers?
From the other side: We have 4194304 KB total ram, subtract 21308 KB lost mainly to address fragmentation (but including some ram kept by the BIOS for its own use), and subtract 131072 KB for the shared video memory. That leaves 4041924 KB that should be usable. Subtract the 3854276 KB that is usable and we get 187648 KB that the BIOS seems to have misplaced.
@johnsfine Thanks for your helpful comments. That is, they helped me solve a similar problem on my own PC, but the cause of the problem is not really in the hardware. The memory limitation of 3.5GB is caused by the 32bit Linux OS, be it possibly because the motherboard does not (fully) support 64bit. So: first check what the motherboard supports, then make sure Linux installs in 64bit mode, and finally enjoy all your memory GBs.
they helped me solve a similar problem on my own PC, but the cause of the problem is not really in the hardware. The memory limitation of 3.5GB is caused by the 32bit Linux OS
I'm happy to hear my comments helped, But it is hard to see how my comments (about a complicated 64 bit Linux situation) might have helped you with 32bit Linux, while leaving you apparently still misinformed.
32 bit Linux does not cause the 3.5GB limit.
The limit of how much ram can be used within 4GB of physical address space is determined by the BIOS and motherboard. 3.5GB is a fairly typical amount for ram within 4GB physical addressing.
Whether you can use any ram outside 4GB physical addressing also depends on the BIOS and motherboard.
On a motherboard where a 64-bit OS can use ram outside 4GB physical addressing, a 32bit Linux can also use ram outside 4GB physical (you need to select the PAE kernel).
Quote:
be it possibly because the motherboard does not (fully) support 64bit. So: first check what the motherboard supports, then make sure Linux installs in 64bit mode, and finally enjoy all your memory GBs.
32 bit PAE works on many older x86 systems that don't support 64 bit. 32 bit PAE also works on all x86 systems that support 64 bit.
Maybe a 64bit Linux is a better choice for other reasons. But for supporting more ram than fits in 4GB physical, a 32bit PAE Linux kernel will do the job.
Your comments did not give me a straight answer, but they pushed me out of the circle my searching was trapped in. So I searched better and indeed, as you say, I ended with the PAE solution. I do think the problem is the OS which cannot cope with the CPU/memory capability of 64-bit. But Linux has a solution, as opposed to Windows XP: the PAE kernel. So I slept well tonight. See Wikipedia on the 3GB barrier, and on 64-bit.
In my case the BIOS was correct in detecting my memory size, and also 'lshw' got that information right. But then 'cat /proc/meminfo' revealed the problem: the famous 3GB barrier.
Therefore: thanks for not giving we an answer, but helping me to find it. Well, my son-in-law also kept me right.
Your comments did not give me a straight answer, but they pushed me out of the circle my searching was trapped in. So I searched better and indeed, as you say, I ended with the PAE solution. I do think the problem is the OS which cannot cope with the CPU/memory capability of 64-bit. But Linux has a solution, as opposed to Windows XP: the PAE kernel. So I slept well tonight. See Wikipedia on the 3GB barrier, and on 64-bit.
In computing, the 3 GB barrier is a limitation of some 32-bit operating systems running on x86microprocessors. It prevents the operating systems from using more than about 3 GB (3 × 10243 bytes) of main memory (RAM).
Has nothing to do with 64-bit when using a X86_32 based OS. When ever using a X86_32 system, one must insure that PAE capable kernel is in place to break the 3GB barrier on that x86_32 OS.
Quote:
Originally Posted by martje
In my case the BIOS was correct in detecting my memory size, and also 'lshw' got that information right. But then 'cat /proc/meminfo' revealed the problem: the famous 3GB barrier.
Therefore: thanks for not giving we an answer, but helping me to find it. Well, my son-in-law also kept me right.
'johnsfine' is correct in his definition. You just do not understand the system nor the reasoning behind physical address extension (PAE) mode on x86 systems.
In computing, Physical Address Extension (PAE) is a feature to allow (32-bit) x86 processors to access a physical address space (including random access memory and memory mapped devices) larger than 4 gigabytes.
First implemented in the Intel Pentium Pro in 1995, it was extended by AMD to add a level to the page table hierarchy, to allow it to handle up to 52-bit physical addresses, add NX bit functionality, and make it the mandatory memory paging model in long mode.[1] PAE is provided by IntelPentium Pro and above CPUs, including all later Pentium-series processors (except the 400 MHz-bus versions of the Pentium M). It is also available on other processors with similar or more advanced versions of the same architecture, such as the AMDAthlon[dubious – discuss] and later AMD processor models.
x86 processor hardware-architecture is augmented with additional address lines used to select the additional memory, so physical address size increases from 32 bits to 36 bits. This, theoretically, increases maximum physical memory size from 4 GB to 64 GB. The 32-bit size of the virtual address is not changed, so regular application software continues to use instructions with 32-bit addresses and (in a flat memory model) is limited to 4 gigabytes of virtual address space. The operating system uses page tables to map this 4-GB address space into the 64 GB of physical memory. The mapping is typically applied differently for each process. In this way, the extra memory is useful even though no single regular application can access it all simultaneously.
To use PAE, operating system support is required. Intel versions of Mac OS X support PAE. The Linux kernel supports PAE as a build option and most major distributions provide a PAE kernel either as the default or as an option (Red Hat Enterprise Linux 6+ kernels expect PAE). FreeBSD and NetBSD also support PAE as a kernel build option.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.