Thursday, January 8, 2009

Linux: Getting past the "BIOS doesn't leave a aperture memory hole" error or "How to enable the IOMMU option in the BIOS setup" . Part 2


After yesterdays post regarding the BIOS doesn't leave a aperture memory hole issue, I got a very logical question that I forgot to ask myself as I was too happy to see the error message go away.



Quirinius said:



But did that boot option actually give you more memory? Did you check with "free -m"?


So I did a little bit of testing. Here is the output of the free command before the using boot-options on the CentOS machine.





total used free shared buffers cached
Mem: 4048440 804072 3244368 0 34324 428640
-/+ buffers/cache: 341108 3707332
Swap: 4200988 0 4200988

total used free shared buffers cached
Mem: 3953 785 3168 0 33 418
-/+ buffers/cache: 333 3620
Swap: 4102 0 4102




and here is after :





total used free shared buffers cached
Mem: 4048024 553232 3494792 0 30792 336400
-/+ buffers/cache: 186040 3861984
Swap: 4200988 0 4200988

total used free shared buffers cached
Mem: 3953 536 3416 0 30 328
-/+ buffers/cache: 177 3775
Swap: 4102 0 4102




I have also checked what is happening on my notebook which also has 4GB of RAM memory but unlike the rest of my machines does not have an AMD processor or an Asus Motherboard with Phoenix BIOS and here is what free had to say.





total used free shared buffers cached
Mem: 4059392 652816 3406576 0 13048 206600
-/+ buffers/cache: 433168 3626224
Swap: 2096472 0 2096472

total used free shared buffers cached
Mem: 3964 637 3326 0 12 201
-/+ buffers/cache: 423 3541
Swap: 2047 0 2047




Doing a little bit of math shows that ...



[thanassis@lxbakalidis ~]$ expr 4048024 - 4048440
-416


After the boot option is set our memory decreases by 416 bytes and the memory reported by Fedora on a system that does not display the IOMMU error message at all is



[thanassis@lxbakalidis ~]$ expr 4059392 - 4048440
10952


... bytes bigger. Now I understand that I am comparing results from two different kernel versions, so I performed the same test at home on my AMD/Asus based Fedora box and here are my results..





[thanassis@plouton ~]$ cat fedora-home-before.txt
total used free shared buffers cached
Mem: 4062232 490440 3571792 0 13816 177132
-/+ buffers/cache: 299492 3762740
Swap: 0 0 0
total used free shared buffers cached
Mem: 3967 479 3488 0 13 172
-/+ buffers/cache: 292 3674
Swap: 0 0 0
[thanassis@plouton ~]$ cat fedora-home-after.txt
total used free shared buffers cached
Mem: 4061820 1083232 2978588 0 34960 393808
-/+ buffers/cache: 654464 3407356
Swap: 0 0 0
total used free shared buffers cached
Mem: 3966 1055 2910 0 34 384
-/+ buffers/cache: 636 3329
Swap: 0 0 0
[thanassis@plouton ~]$ expr 4061820 - 4062232
-412
[thanassis@plouton ~]$




Addendum



This is only a closing statement to admit that I managed nothing. I tried
changing my graphics adapter with a new NVIDIA using the new kernel updates and my CentOS machine just froze again.



So I switched everything back, got my 416 bytes back and try to keep an eye on the net and the forums in case I somehow find something to help me this.... :-(

Tuesday, January 6, 2009

Linux: Getting past the "BIOS doesn't leave a aperture memory hole" error or "How to enable the IOMMU option in the BIOS setup" .


This had been a major "To Do" item for me during the last year and I have tried many times to fix it, but today it seems I got lucky.



I had been seeing this on my CentOS workstation dmesg output, since the first day I installed it, approximately one year ago.





Checking aperture...
CPU 0: aperture @ 14000000 size 32 MB
Aperture too small (32 MB)
No AGP bridge found
Your BIOS doesn't leave a aperture memory hole
Please enable the IOMMU option in the BIOS setup
This costs you 64 MB of RAM




At first I thought it was nothing serious, and I tried to fix my graphics card that would not work with the NVidia provided drivers freezing the entire graphics system each time I would install them and tried to start X. I failed that too and replaced the graphics card with one from ATI. The new card appeared to work more satisfactory, but it would also hung if I tried to load the custom drivers provided by the vendor.



When I installed Feodra 9 at home, I saw the exact same error message but my GeForce 9600 NVidia appeared to work correctly so I dropped it. Then came Fedora 10 and there we were again. At the same time I began to get tired by the sluggish performance of my CentOS graphics and decided to try once again.



But his time I was lucky : jbkt23 provided the solution at the Fedora Forums. I am only copying it here just to help others who google for it come up with one much match.



Put it simply, the solution is to add the
iommu=noaperture
kernel boot parameter on your grub.conf file.




In more words, you need to edit the grub configuration file located in /boot/grub/grub.conf and locate the line that boots the current kernel. On my Fedora system the line looks like this :




title Fedora (2.6.27.9-159.fc10.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.27.9-159.fc10.x86_64 ro root=UUID=8a9d59ee-c401-41bf-a4e6-8fdd97
067215 rhgb quiet iommu=noaperture
initrd /boot/initrd-2.6.27.9-159.fc10.x86_64.img




All I needed was to add the bolded text at the end of the kernel line. Then a reboot and as MSK61 from the Fedora forum put it: Thanks, jbkt23. Worked like a charm.



The same solution worked for the CentOS 5.2 machine at work. There is more to it however. After getting rid of the IOMMU error, I tried to enable the 3D driver for my ATI Radeon X1300. At some point it worked. After the first reboot however, things went back to their normal not working state so I had to switch back to the standard driver.



Tomorrow I will try an NVidia card that was also not working and see how it goes.