GIDNetwork > Linux on Dell Precision M90 - Part III: Kernel Update
« Linux on Dell Precision M90 - Part II: X-Windows Install Linux on Dell Precision M90 - Part IV: Networking »

Linux on Dell Precision M90 - Part III: Kernel Update

by: dsmith - May 13, 2006

This section covers recompiling the kernel on a Slackware system specifically for the Dell Precision M90. There are some generic features in here that could apply to any system, including SMP support, SATA configuration and cpufreq (timestep).

I always like to run the latest kernels on my laptop/desktop Linux configurations. I am a little more cautious on my servers, but for a workstation, I want cutting edge.

For those that are intimidated by kernel configuring and compilation, it is not nearly as complex as it sounds. Additionally, in order to get an optimally running Linux system, it is imperative that you build a kernel for your machine. If it helps, I have written a basic kernel installation guide that can be found here.

I generally download the latest full kernel from here.

As of the writing of this how-to, the current kernel is 2.6.16.

I cover some more specifics further on in other sections related to drivers, but here are some performance related items that you may want to check in the new kernel configuration:

Dual Processor support

If you have a dual core processor make sure to check:

Generic Code Example:

Processor type and Features --> 
	Symmetric multi-processing support

To check to see if both of your processors are recognized, type in cat /proc/cpuinfo. If you have SMP enabled (and more than one processor) you should see all of them listed. Please note that you will have to build and reboot your kernel before this change takes place.

Generic Code Example:

High Memory Support

If you have more than 1 GB of RAM, make sure to check:

Generic Code Example:

Processor type and Features --> 
	High Memory  (4GB)

To check to see if all of your memory is recognized, type in free. This will give you the total amount of memory plus current usage statistics.

cpufreq (speed step)

If you want to use speed step for your processor, you will need to configure it at the kernel level as well

Generic Code Example:

Power management options -->
	CPU frequency scaling -->
		CPU frequency tranlation statistics
		Default CPUFreq governor -->
		'userspace' governor
		'ondemand' governor
		'conservative' cpufreq governor
		Intel enhanced speedstep -->
			Use ACPI tables to decode valid frequencies

The governor that you most likely want to use is the 'ondemand' governor. For whatever reason, there is not an option for this to be the default governor. It is quite easy to set this as the default governor however with the following commands:

Generic Code Example:

echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreg/scaling_governor

Notice that you need to set it for each core. Here is a little bash script that can be ran to set the cpu frequencies to whatever is specified. It checks for the cpufreq directories as well as whether or not the specified governor exists. The default is ondemand if no parameters are passed:

Generic Code Example:

if [ -d /sys/devices/system/cpu/cpu0/cpufreq ]
	if [ -z $1 ]

	if grep -q $governor /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors 
		echo "Setting CPU frequency of all CPUS to: $governor"
		num_cpus=`cat /proc/cpuinfo | grep "^processor" | wc -l`
		echo "It seems that there is $num_cpus cpus to set"
		while [ $i -lt $num_cpus ]
			echo "Setting governor for cpu$i to $governor"
    		echo $governor > /sys/devices/system/cpu/cpu${i}/cpufreq/scaling_governor
    		let "i += 1"
		echo "$governor is not a valid cpu frequency option."
		echo "You may need to recompile your kernel to add support for this type of governor"
	echo "The sys file structure does not seem to exist for cpu frequency setting."
	echo "You may need to recompile your kernel to add support for frequency setting."

A link to this script could easily be placed in a the rc.local startup script to always have the processors in ondemand mode. In addition, if you are doing some heavy compiler usage and don't want the overhead of polling and switching, you could pass performance as the parameter to this script file and it will set your core speeds to the top speed for you.

To see the speed of your processors you can list the file in the same cpufreq directory called cpu_info_cur_freq. Or easier yet, in KDE use the KDE system guard and add an entry to monitor your clock speed. You can watch your clock speed jump up when you compile, etc.

This is just a quick overview of cpufreq. You can look in the cpufreq directory and find quite a bit of useful information.

SATA setup


Hard drive performance is abysmal using the IDE interface. The system is actually sluggish due to the hard drive performance. Since this is a SATA bus, using hdparm is not going to be able to fix anything. At first boot up, a hdparm test (hdparm -t /dev/hda) returns the following:

  • Timing buffered disk reads: 1.92 MB/sec

The key to getting the hard drive speed acceptable is to use the SATA SCSI bus. This is a bit tricky as you could render your Linux system unbootable (not Windows). In the event of something going wrong, I highly recommend getting a Knoppix CD. This will allow you to boot into your system and edit the configuration files as necessary if you mess up.

Note: I am talking from experience on messing up. Luckily, I had my Knoppix CD readily available, booted up Knoppix, quickly fixed a file and I was back in action.

Follow these steps to reconfigure your IDE bus to use the SATA driver:

Configure your kernel to remove the IDE driver and add the SATA driver.

Remove support for for the IDE bus. Deselect the following option:

Generic Code Example:

Device Drivers -->
	ATA/ATAPI/MFM/RLL Support -->

This will remove all ide interfaces from the kernel and your DVD drive will not be recognized at rebooting. This is what you want to do. In section VI, I will explain how to get your DVD to use the SATA driver. Without doing this, DVD playback is inadequate.

Add SATA support and the Intel SATA driver

Generic Code Example:

SCSI Device Support --> 
	SCSI Low Level Drivers --> 
		Serial ATA support -->
			Intel PIIX/ICH SATA support

After compiling/installing your new kernel, edit the lilo file to use the SDA designation instead of the HDA designation. This change should only be applied to the new kernel portion. The other parts need to be changed after the first successful boot. The root entry should read something similar to:

Generic Code Example:

image = /boot/vml2616
	root = /dev/sda5   #as opposed to /dev/hda5
	label = Linux

The fstab needs to be updated to look on the SATA (SCSI) bus instead of the IDE bus. Basically, anything that read hda should be changed to sda. This will include your boot device (most important), but also your swap partition and any data partitions that you may have in there as well. For example:

Generic Code Example:

/dev/sda6	swap			swap        defaults         0   0  #as opposed to /dev/hda6
/dev/sda5	/				ext3        defaults         1   1  #as opposed to /dev/hda5
/dev/sda3	/mnt/data		vfat        defaults         1   0  #as opposed to /dev/hda3
/dev/cdrom	/mnt/cdrom		auto        noauto,owner,ro  0   0
/dev/fd0	/mnt/floppy		auto        noauto,owner     0   0
devpts		/dev/pts		devpts      gid=5,mode=620   0   0
proc		/proc			proc        defaults         0   0

You may want to save a copy of this file before modifying it, as this will need to be changed back in order to boot with the old kernel if something goes wrong.

Now, you should be ready to reboot and try out the new kernel. If something goes wrong, boot with your Knoppix disk and change the fstab file back to the saved original.

Is is worth it? Absolutely. If you can't tell by the now much speedier feel of your machine, trying running hdparm on it again (hdparm -t /dev/sda):

  • Timing buffered disk reads: 50.23 MB/sec

This is an improvement of about 25 Times! You will notice the speed of your system now being more of what you expected from your monster machine. Also, further below I discuss DVD playback. Without doing this, DVD playback will be unacceptable.

Now, in order for the lilo file to work under this new kernel, you will need to change all references of hda to sda. This includes at least the boot line as well as your Windows entry, but there may be more depending upon how many boot choice you have.


Kernel configuration and building a custom kernel specifically tailored to your machine is one of the big advantages to using Linux. All of these changes are crucial to getting your machine running properly. If you are not comfortable with kernel recompiling, do it until you are comfortable! :) The Linux Kernel Compiling Guide that I have written, allows you to play with the kernel, while keeping an old copy around just in case.

Also, I like to remove any unnecessary items from the kernel when I am configuring it as well. For example, floppy support is included in the kernel by default. The Precision M90 does not ship with a floppy, so there is no need to have support for it in the kernel. It does not adversely affect anything if it is there, but the kernel will be a bit smaller, more compact and more applicable to my very own machine.

Would you like to comment? This story has been viewed 13,819 times.
« Linux on Dell Precision M90 - Part II: X-Windows Install Linux on Dell Precision M90 - Part IV: Networking »


Copyright © GIDNetwork™ 2001 - 2017

Another website by J de Silva

Page generated in : 0.01141 sec.