LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Linux recognize only partial memory (https://www.linuxquestions.org/questions/linux-hardware-18/linux-recognize-only-partial-memory-4175454119/)

themind24 03-14-2013 06:58 PM

Linux recognize only partial memory
 
Hi Everyone,
I tried different 64bit linux distros (Ubuntu 12.10 Gnome Remix, Fedora 18, Bridge Linux) on my new laptop but all of them have a problem with memory. My laptop has 4 GB memory but Ubuntu recognize only 2,4 GB. Obviously both BIOS and Windows 8 recognize all 4GB.

My laptop configuration: Lenovo B590 CPU: Intel Core i5-3210M Ram: 4 GB DDR3-SDRAM Chipset motherboard: Intel HM77 Express Integrated graphics: HD Graphics 4000.

it may be possible that the lost memory is borrowed from Intel HD Graphics? if it's true, it always borrows fixed maximum memory?!

Some useful command outputs:
Code:

midecode --type memory

Array Handle: 0x000B
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: ChannelB-DIMM0
Bank Locator: BANK 2
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MHz
Manufacturer: Hynix/Hyundai
Serial Number: 1A21B5B9
Asset Tag: 9876543210
Part Number: HMT351S6EFR8C-PB 
Rank: Unknown
Configured Clock Speed: 1600 MHz


free -m

              total      used      free    shared    buffers    cached
Mem:          2483      1136      1346          0        56        515
-/+ buffers/cache:        563      1919
Swap:        4884          0      4884


cat /proc/meminfo | grep "Mem*"

MemTotal:        2542664 kB
MemFree:        1373552 kB


dmesg | grep -i memory

[    0.000000] initial memory mapped: [mem 0x00000000-0x1fffffff]
[    0.000000] Base memory trampoline at [ffff880000097000] 97000 size 24576
[    0.000000] init_memory_mapping: [mem 0x00000000-0x846f1fff]
[    0.000000] init_memory_mapping: [mem 0x100000000-0x11e5fffff]
[    0.000000] Early memory node ranges
[    0.000000] PM: Registered nosave memory: 000000000009d000 - 00000000000a0000
[    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000e0000
[    0.000000] PM: Registered nosave memory: 00000000000e0000 - 0000000000100000
[    0.000000] PM: Registered nosave memory: 0000000020000000 - 0000000020200000
[    0.000000] PM: Registered nosave memory: 0000000040004000 - 0000000040005000
[    0.000000] PM: Registered nosave memory: 00000000846f2000 - 00000000dae9f000
[    0.000000] PM: Registered nosave memory: 00000000dae9f000 - 00000000daf9f000
[    0.000000] PM: Registered nosave memory: 00000000daf9f000 - 00000000dafff000
[    0.000000] PM: Registered nosave memory: 00000000dafff000 - 00000000dfa00000
[    0.000000] PM: Registered nosave memory: 00000000dfa00000 - 00000000f8000000
[    0.000000] PM: Registered nosave memory: 00000000f8000000 - 00000000fc000000
[    0.000000] PM: Registered nosave memory: 00000000fc000000 - 00000000fe800000
[    0.000000] PM: Registered nosave memory: 00000000fe800000 - 00000000fe810000
[    0.000000] PM: Registered nosave memory: 00000000fe810000 - 00000000fec00000
[    0.000000] PM: Registered nosave memory: 00000000fec00000 - 00000000fec01000
[    0.000000] PM: Registered nosave memory: 00000000fec01000 - 00000000fed08000
[    0.000000] PM: Registered nosave memory: 00000000fed08000 - 00000000fed09000
[    0.000000] PM: Registered nosave memory: 00000000fed09000 - 00000000fed10000
[    0.000000] PM: Registered nosave memory: 00000000fed10000 - 00000000fed1a000
[    0.000000] PM: Registered nosave memory: 00000000fed1a000 - 00000000fed1c000
[    0.000000] PM: Registered nosave memory: 00000000fed1c000 - 00000000fed20000
[    0.000000] PM: Registered nosave memory: 00000000fed20000 - 00000000fee00000
[    0.000000] PM: Registered nosave memory: 00000000fee00000 - 00000000fee01000
[    0.000000] PM: Registered nosave memory: 00000000fee01000 - 00000000ffc20000
[    0.000000] PM: Registered nosave memory: 00000000ffc20000 - 0000000100000000
[    0.000000] Memory: 2515460k/4691968k available (6711k kernel code, 2027016k absent, 149492k reserved, 6459k data, 928k init)
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.001851] Initializing cgroup subsys memory
[    0.522565] Freeing initrd memory: 23680k freed
[    1.430344] Freeing unused kernel memory: 928k freed
[    1.433360] Freeing unused kernel memory: 1472k freed
[    1.435653] Freeing unused kernel memory: 1124k freed
[    1.471316] pci 0000:00:00.0: >detected 65536K stolen memory


uname -a

Linux antonio-Notebook 3.5.0-17-generic #28-Ubuntu SMP
Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Thanks

ronlau9 03-16-2013 03:38 AM

You have 4 GB Memory installed .
Some is allocated by the system and by the Graphic card .
So not all the 4 Memory is free .
The allocated amount is always the same
Although I find 1.6 GB high

rigor 03-16-2013 05:30 AM

themind24,

You might want to consider the second of these two lines from your log. It would seem that Linux is aware of all the physical memory your machine has, but there is some set aside for other purposes.

Code:

[    0.000000] PM: Registered nosave memory: 00000000ffc20000 - 0000000100000000
[    0.000000] Memory: 2515460k/4691968k available (6711k kernel code, 2027016k absent, 149492k reserved, 6459k data, 928k init)


cyberpatrol 03-16-2013 06:42 AM

Is it possible that free -m and cat /proc/meminfo don't show the correct values, at least not the way we would interpret them?

I was curious about this issue, and ran free -m and cat /proc/meminfo, too. I have 4 GB RAM, and those commands show this for me:
Code:

# free -m
            total      used      free    shared    buffers    cached
Mem:          3950      3653        296          0        86      2444
-/+ buffers/cache:      1122      2827
Swap:        1023        25        998


# cat /proc/meminfo | grep "Mem*"
MemTotal:        4044808 kB
MemFree:          243280 kB

So it "detects" the full memory, but says that only 238 resp. 296 MB are free, and I have just a very few daemons, X, Xfce, an e-mail client, a webbrowser, and a java based download manager running.

The xfce4-systemload-plugin on the other hand shows only a short bar and says something about 1125 MB used, which is a lot more likely. HardInfo also shows 1142 of 4044 MB used.

allend 03-16-2013 08:28 AM

Quote:

-/+ buffers/cache: 1122 2827
The figure in blue is the actual available amount of free memory, which accords with your xfce4-systemload-plugin (3950-2827=1123).
The other RAM is being used as cache buffer for previously accessed data, which would otherwise require being fetched from disk.

cyberpatrol 03-16-2013 09:39 AM

OK, then forget my comment. Then the original problem is somewhere else.

themind24 03-16-2013 11:09 AM

Thanks to everyone.
So I can conclude that there's always about 1,6gb allocated for the Graphics Card?
(the maximum shared memory for Intel HD Graphics 4000 is 1720MB, it is approximately equal to the amount of "memory lost").
However, if it's true, I think that is a bad behavior for Linux.

jpollard 03-16-2013 11:21 AM

Why? Windows is doing the same thing, but lying about the available memory as it isn't reporting the required reserve that isn't generally available.

As for "always", it depends on the graphics card...

themind24 05-02-2013 03:27 PM

The problem disappeared with new kernel 3.8.0-19-generic.
The system recognize 3,7GB of Memory now.
Thanks to everyone.


All times are GMT -5. The time now is 07:16 AM.