Introduction
Ubuntu 10.10 64-bit and onward have issues with newer AMD FX processors and motherboard combinations (FX-4100, 6100, 8120, 8150) that prevent them from recognizing more than 4GB of RAM. This is due to a kernel issue that exists in versions beyond the 2.6.32 version that ships with 64-bit 10.04 LTS such as on 10.10 or 11.x.
This issue is reported in your boot logs when the dmesg command is run. Here is an example:
Code:
[ 0.000000] e820 update range: 00000000cfe00000 - 000000042f000000 (usable) ==> (reserved)
[ 0.000000] WARNING: BIOS bug: CPU MTRRs don't cover all of memory, losing 13040MB of RAM.
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] WARNING: at /home/kernel-ppa/mainline/build/arch/x86/kernel/cpu/mtrr/cleanup.c:1121 mtrr_trim_uncached_memory+0x343/0x350()
[ 0.000000] Hardware name: GA-970A-UD3
[ 0.000000] Modules linked in:
[ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.33-02063302-generic #02063302
[ 0.000000] Call Trace:
[ 0.000000] [<ffffffff81ad4423>] ? mtrr_trim_uncached_memory+0x343/0x350
[ 0.000000] [<ffffffff8106073c>] warn_slowpath_common+0x8c/0xc0
[ 0.000000] [<ffffffff81060784>] warn_slowpath_null+0x14/0x20
[ 0.000000] [<ffffffff81ad4423>] mtrr_trim_uncached_memory+0x343/0x350
[ 0.000000] [<ffffffff81ac7140>] ? early_idt_handler+0x0/0x71
[ 0.000000] [<ffffffff81ac7140>] ? early_idt_handler+0x0/0x71
[ 0.000000] [<ffffffff81acd9b5>] setup_arch+0x435/0x6e0
[ 0.000000] [<ffffffff81ac7cd9>] start_kernel+0xa9/0x390
[ 0.000000] [<ffffffff81ac7140>] ? early_idt_handler+0x0/0x71
[ 0.000000] [<ffffffff81ac7325>] x86_64_start_reservations+0x65/0x90
[ 0.000000] [<ffffffff81ac742d>] x86_64_start_kernel+0xbd/0xe0
[ 0.000000] ---[ end trace a7919e7f17c0a725 ]---
[ 0.000000] update e820 for mtrr
The WARNING: BIOS bug: CPU MTRRs don't cover all of memory, losing 13040MB of RAM line is the indicator your hardware has a problem with Ubuntu and will not work correctly on numerous releases.
Target Audience
This HOWTO is targeted at users looking to do AMD FX 64-bit installs where 10.10 and beyond exhibit this memory issue on their particular hardware combination and/or they want to use Solid State Drives (SSDs) as the primary boot/OS drive. SSD usage is not optimal on 10.04 LTS and below due to lack of TRIM support that extends the life of SSDs and 10.10 will exhibit the memory hole. This HOWTO allows these two worlds to come together.
The steps in this HOWTO will assist you if you have one or more the following circumstances:
- You want to install to an SSD as a primary OS/boot drive and want it optimized on 10.04 LTS
- You have more than 4GB RAM on 10.10 and your system is reporting only 3.2 GiB
- You have a newer generation nVidia graphics board that isn't supported fully in graphics mode (10.10 and beyond).
Hardware Configuration
This HOWTO was derived from my efforts to get Ubuntu 10.x up and running on the following hardware combination:
- AMD FX-8120 8-core processor
- Gigabyte GA-970A-UD3 motherboard
- 16GB DDR3-1333 RAM
- OCZ Agility 3 120GB SSD w/SATA 6GBs interface
- eVGA nVidia GTX550Ti 1GB graphics board
- LG 22x DVD Burner
Your mileage may vary but if you encounter memory issues and/or want to support SSDs on a 10.04 LTS installation, these steps should hopefully assist you.
This hardware build was targeted as a development, video processing and moderate gaming workstation for those who are interested.
Steps
0) Note
Many of the steps in this HOWTO use the sudo command. You will be prompted for your password. This HOWTO assumes for the sake of brevity you will enter your user password whenever prompted.
1) Install Ubuntu 10.x using your favorite medium.
For this HOWTO, a CD with the 10.04.4 LTS ISO image was used from http://www.ubuntu.com/download/ubuntu/download. Upon boot, you will see the proper amount of memory in your system via the System Monitor application (under System menu > System Monitor).
Advanced: If Installing to an SSD
If you are installing to an SSD, delete the swap partition the default installer creates or select the "Advanced" partitioning option. Click "Add' in the dialog and let the new partition take up the entire disk. Check "Format", make your mount point '/' and make sure the filesystem type is set to 'Ext4'. The 'Ext4' filesystem is the only one that is viable for SSDs in default Ubuntu installs.
Allow the installation to complete after the partitioning and reboot into your new system. It will be very fast and the graphics mode comes up normally on 10.04 LTS but although you will have your full amount of memory, the SSD is not going to be used and managed optimally and you lack hardware acceleration on the nVidia graphics card.
2) Upgrade the 2.6.32 kernel to the latest backport from Oneiric Ocelot (11.10)
Perform this step only if you have an SSD and have more than 4GB RAM.
The solution to getting more than 4GB to be visible is to upgrade the Linux kernel to a version that fixes the CPU MTRR error reported by on boot and one that supports TRIM for the SSD. This support begins with 2.6.35 of the Linux kernel.
The solution is to upgrade to the later 3.0.0 kernel from Ubuntu 11.10 and backport it to your version of Ubuntu. This particular version of the kernel does not exhibit the memory problem of the intermediate kernels that ship with 10.10 onward.
To upgrade your kernel, open a Terminal window from the Accessories under the Applications menu and issue the following command:
sudo apt-get install linux-image-generic-lts-backport-oneiric linux-headers-generic-lts-backport-oneiric
After some busy work, your new kernel will be installed. This will restore your full amount of memory. However, the newer kernel has issues with the (currently) default nouveau graphics driver. If you reboot now, you will wind up in text mode rather than your comfortable graphics mode.
To rectify this, you need to modify your boot configuration. In your Terminal window, perform the following steps:
- Type cd /etc/default and press Enter.
- Type sudo nano grub and press Enter.
- Find the line GRUB_HIDDEN_TIMEOUT=0 and put a # in front of it. This comments it out and will cause your boot menu to appear on startup. This is always a useful thing to do whenever you add multiple kernels to your OS. The line will now look like this: #GRUB_HIDDEN_TIMEOUT=0.
- Find the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" and change it to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset". The nomodeset parameter changes the behavior of the graphics driver and allows the graphics mode to come up properly on the new kernel.
- Press Ctrl+O to save your changes and Ctrl+X to exit.
- Type sudo update-grub to update the boot configuration.
- Close the terminal and restart your computer.
- Select the 'Linux 3.0.0 generic' entry from your boot menu.
If all goes well, your machine will start on the SSD with the graphics mode. Log in to your user account and open a Terminal window again. Type uname -a and your should now be able to verify your are on the 3.0.0 kernel similar to the following:
Linux artemis 3.0.0-15-generic #26~lucid1-Ubuntu SMP Wed Jan 25 15:37:10 UTC 2012 x86_64 GNU/Linux
Open the System Monitor and you should also see your full amount of memory installed.
Congratulations, you're over the first major hurdle! You've gotten around the AMD memory issue and installed a kernel that will properly support your SSD.
The next steps will allow you to optimize your SSD configuration and enable accelerated graphics.
3) Optimize configuration for your SSD
This step modifies your system configuration to work best with your SSD. Most importantly, it adds TRIM support the OS which will help dramatically increase the lifespan of the SSD.
Open a Terminal window from the Applications Accessories men and do the following:
Type cd /etc and press Enter.
Type sudo nano fstab to open the filesystem configuration file.
Find the entry that has the / ext4 in it. This will typically indicate your primary boot drive. You will add the discard,noatime,nodiratime options to your SSD partition. The disable option enables SSD TRIM support and the noatime,nodiratime options minimize writes to the drive.
You will add these entries before the errors=remount-ro 0 1 section. So your line will go from something like this:
# / was on /dev/sda1 during installation
UUID=c947ee9c-cef4-4ef1-985c-e981cf69fa97 / ext4 errors=remount-ro 0 1
to something like this:
# / was on /dev/sda1 during installation
UUID=c947ee9c-cef4-4ef1-985c-e981cf69fa97 / ext4 discard,noatime,nodiratime,errors=remount-ro 0 1
Another optimization you want to make at this time is add the following line to the bottom of the file:
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
This line will enable RAM cache support of temporary files and prevent them from being written to the SSD. This increases speed on your system and extends the life of the SSD. Only do this if you have more than 4GB of RAM.
Press Ctrl+O and Ctrl+X to save your changes and then reboot your computer. It will start up normally and now TRIM support will be properly enabled on your system.
Advanced: You can also perform the additional steps such as updating your scheduler and configuring Firefox for RAM caching found at http://www.ab9il.net/linux/solid-state-drives1.html. The basic steps presented above, however, should always be done on any Linux system using an SSD as a primary drive.
4) Enable proprietary accelerated graphics for nVidia card
With an updated kernel and optimizations completed for your SSD, the last step that you need to perform is to get the latest nVidia driver for your graphics card. 10.x Ubuntu systems with newer nVidia graphics cards such as the GTX550Ti aren't detected and will not offer you the option of installing the proprietary drivers.
This step is necessary to override the internal nouveau graphics driver and ensure you get 3D acceleration along with the ability to configure graphics settings via the NVIDIA X Server Settings application.
To install the latest nVidia binary drivers, open a Terminal windows from Application Accessories and perform the following commands in the order stated (courtesy of http://mygeekopinions.blogspot.com/2011/06/how-to-install-nvidia-2750907-driver-in.html):
Code:
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current
sudo nvidia-xconfig
The last command will write a new xorg.conf file to /etc/X11. Restart your computer and the nVidia binary drivers will now be in effect and you'll be able to run the nVidia X Server Settings from the System menu to change resolution, monitor the card and configure graphics settings.
Conclusion
Congratulations! You have successfully updated and modified your system to allow you to run the latest greatest AMD and nVidia hardware with the 10.04 LTS release of Ubuntu. For those that prefer the older Gnome interface over Unity or want to stay on their current version of Ubuntu with newer hardware, this will hopefully assist you.
References
The following links were used to help assemble these instructions that allows you to arrive at a complete system.
http://mygeekopinions.blogspot.com/2...driver-in.html
https://help.ubuntu.com/community/Re...ts/PlayingDVDs
http://handbrake.fr/
https://launchpad.net/~stebbins/+archive/handbrake-releases
http://www.ab9il.net/linux/solid-state-drives1.html
Bookmarks