Category: Hardware


If you are working with a RHEL 5.5 or above on a Dell server (PowerEdge R 710) with a SAS Controller integrated RAID, you may have some error messages in the kernel log file. Running dmesg command, here is what you have :

fool@localhost:~$ dmesg

megasas_register_aen[0]: already registered
megasas_register_aen[0]: already registered
megasas_register_aen[0]: already registered

fool@localhost:~$ uname -r

2.6.18-308.11.1.el5

These messages appeared after a recent kernel update. Within this update, the megaraid_sas module has been upgraded and a new function was added to the source code providing complementary information about the module once loaded and interacting with the kernel.

A case issue was filled in RHEL Knowledge Database :

RHEL KB id 43634

These messages are just informational messages. No errors to be expected.

It may be very critical to make the most out of the maximum memory capacity (up to 1TB) in the Proliant servers. To deal with, as a reminder, please find below some useful links you should add in your bookmarks :

http://partsurfer.hp.com

HP Servers memtool

http://h18004.www1.hp.com/products/servers/options/memory-description.html

http://h20000.www2.hp.com/bc/docs/support/SupportManual/c01702744/c01702744.pdf

ftp://ftp.hp.com/pub/c-products/servers/options/Memory_Why_Buy_4AA0-4216ENW.pdf

ftp://ftp.hp.com/pub/c-products/servers/options/c00256943.pdf

http://h20000.www2.hp.com/bc/docs/support/SupportManual/c01702744/c01702744.pdf

ftp://ftp.hp.com/pub/c-products/servers/options/Memory-Config-Recommendations-for-Intel-Xeon-5500-Series-Servers-Rev1.pdf

Working with a notebook, by default, it might be difficult to work with it on the battery more than two hours. It is not very helpful when you can not plug in to AC power nearby.

There are several ways to optimize your notebook’s battery life. All the tips provided have been tested on a HP Pavilion dm4 Notebook PC running Debian Squeeze 6.0.3. In this part, I will show you three utilities : gnome-power-preferences, xbacklight and xrandr.

gnome-power-preferences is part of the GNOME desktop. It helps you configuring basic actions whether your notebook runs on battery or on AC power. Below are screenshots showing my own settings :


xbacklight may be used as well to control backlight brightness using RandR extension.

To get the actual value :

fool@localhost~:$ xbacklight -get

100.000000

to dim this value by 50 percent for instance :

fool@localhost:~$xbacklight -dec 50.00

More information : xbacklight -help

Last but not least, here is the well-known xrandr. With this program, we can collect all the information concerning the video outputs of the notebook. Some graphics card may activate all its video outputs by default. For sure, you do not use of all them in the same time. Desactivating the non-used ones may help your battery feel better :-)

fool@localhost:~$xrandr -q

Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
VGA1 disconnected (normal left inverted right x axis y axis)
LVDS1 connected 1366×768+0+0 (normal left inverted right x axis y axis) 309mm x 173mm
   1366×768       60.1*+   40.1  
   1360×768       59.8     60.0  
   1024×768       60.0  
   800×600        60.3     56.2  
   640×480        59.9 

LVDS output stands for your LCD panel. Do not desactivate it. If no cable is connected from your VGA output, desactivate it with the following command :

fool@localhost:~$ xrandr –output VGA –off

These are basic tools to make a better use of your notebook’s battery. In the next parts, a few other tools will be presented with a much better tuning capability.

pcimodules command, part of pciutils package, lists all the loaded modules corresponding to the PCI devices found and detected by the kernel. pcimodules needs the modules.pcimap file to run successfully. If missing, then you have to recreate it manually :

fool@localhost:~$ pcimodules
/lib/modules/3.0.0-1-686-pae/modules.pcimap: No such file or directory

root@localhost:~#depmod -m

root@localhost:~# ls -l /lib/modules/3.0.0-1-686-pae/modules.pcimap

-rw-r–r– 1 root root 441540 Sep 26 21:19 /lib/modules/3.0.0-1-686-pae/modules.pcimap

The output of lspci does not always provide enough information about graphics card and integrated graphics chipsets :

fool@localhost:~$ lspci -nn |egrep “VGA|Display”
00:02.0 VGA compatible controller [0300]: Intel Corporation 4 Series Chipset Integrated Graphics Controller [8086:2e32] (rev 03)
00:02.1 Display controller [0380]: Intel Corporation 4 Series Chipset Integrated Graphics Controller [8086:2e33] (rev 03)

In this case, this information “Intel Corporation 4 Series Chipset Integrated Graphics Controller”  is not sufficient to find the right name of this Intel graphics chipset.  There are two solutions to solve it :

fool@localhost:~$grep -i chipset /var/log/Xorg.0.log

[    17.764] (II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
[    17.770] (II) intel(0): Integrated Graphics Chipset: Intel(R) G41
[    17.770] (–) intel(0): Chipset: “G41″

fool@localhost:~$dmesg |grep -i agp

[    1.008912] Linux agpgart interface v0.103
[    1.009057] agpgart-intel 0000:00:00.0: Intel G41 Chipset
[    1.009142] agpgart-intel 0000:00:00.0: detected gtt size: 2097152K total, 262144K mappable
[    1.010058] agpgart-intel 0000:00:00.0: detected 32768K stolen memory
[    1.010181] agpgart-intel 0000:00:00.0: AGP aperture is 256M @ 0xe0000000

With this information, it will be much more easier to use the right driver and tune the Xorg configuration file. (if necessary)

Hope this helps !

Such as lspci, lshw, discover is a hardware identification system based on the libdiscover2 library.
The available version for Debian lenny is the following one : 2.1.2-3

To install it :

root@localhost:~# apt-get install discover

It will install the following extra packages : discover-data libdiscover2

To use it, run the command /sbin/discover as root or with an user having sufficient privileges.
To get a summary of the devices found on the different buses :

root@localhost:~# discover -b

To make a search by device type :

root@localhost:~# discover -t network
Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet

More information : man discover
http://packages.debian.org/lenny/discover

 

All the modules available for the running kernel are located in the following directory : /lib/modules/$(uname -r)/

In this directory, there are several important files such as modules.pcimap and modules.usbmap. These files are created by depmod. They list all the modules available for the current kernel with the corresponding vendor id/model id of every hardware component which can be plugged to a PCI or USB bus.

Let’s have an example. I want to know which module to load for my fibre channel card (HBA) :

fool@localhost:~$ lspci |grep -i fibre

08:01.0 Fibre Channel: QLogic Corp. ISP2422-based 4Gb Fibre Channel to PCI-X HBA (rev 02)
08:01.1 Fibre Channel: QLogic Corp. ISP2422-based 4Gb Fibre Channel to PCI-X HBA (rev 02)

To get their respective vendor id/model id for each of them :

fool@localhost:~$ lspci -n |grep 08:01.0

08:01.0 0c04: 1077:2422 (rev 02)

Using the model id value, I can find the requested module’s name :

fool@localhost:~$ grep 2422 modules.pcimap
qla2xxx              0×00001077 0×00002422 0xffffffff 0xffffffff 0×00000000 0×00000000 0×0

The approach can be reused for usb devices using the modules.usbmap file.

Here is a message which was appearing in my syslog file until I solved the problem :

[drm] Initialized drm 1.1.0 20060810
mtrr: type mismatch for e0000000,10000000 old: write-back new: write-combining

MTRR stands for Memory Type range registers. Its a new feature available in the latest Intel processors.It is a new way of partitioning and managing memory resources in your system.There are two solutions for using the right values for mtrr.
The first one is to add this option to your grub command line :  enable_mtrr_cleanup mtrr_spare_reg_nr=1
The second one is to recompile your current kernel and choose the value 1 instead of 0 for MTRR cleanup enable value (0-1) while issuing the command make menuconfig.

I chose the first solution and I do not get any error messages no more :

dmesg |grep mtrr
[    0.000000] MTRR default type: uncachable
[    0.000000] MTRR fixed ranges enabled:
[    0.000000] MTRR variable ranges enabled:
[    0.000000] original variable MTRRs
[    0.000000] Found optimal setting for mtrr clean up
[    0.000000] New variable MTRRs
[    0.000000] Kernel command line: root=/dev/sda2 ro quiet enable_mtrr_cleanup mtrr_spare_reg_nr=1

cat /proc/mtrr
reg00: base=0×000000000 (    0MB), size= 2048MB, count=1: write-back
reg01: base=0×080000000 ( 2048MB), size= 1024MB, count=1: write-back
reg02: base=0x0bdd00000 ( 3037MB), size=    1MB, count=1: uncachable
reg03: base=0x0bde00000 ( 3038MB), size=    2MB, count=1: uncachable
reg04: base=0x0be000000 ( 3040MB), size=   32MB, count=1: uncachable
reg05: base=0x0e0000000 ( 3584MB), size=  256MB, count=2: write-combining

For more information :
http://en.gentoo-wiki.com/wiki/MTRR
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/314928
https://help.ubuntu.com/community/AspireOneDiscussion
http://www.phoronix.com/forums/showpost.php?p=74238&postcount=5
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/en-US/Reference_Guide/s2-proc-mtrr.html

To know if your CPU is 64 bit one, type the following command :

fool@localhost:~$ grep -w lm  /proc/cpuinfo

If you have an output like that containing the word lm, then you have 64 bit processor.

lm stands for Long mode which is only enabled for 64 bit CPU.

flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm tpr_shadow vnmi flexpriority
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm tpr_shadow vnmi flexpriority

The command uname -i can provide the kind of hardware-platform on which your OS is running. However, you may have unkown as an output of uname -i.

To change the time and the date, make sure you have root privileges :

To modify the time :

#date -s HH:MM:SS

To modify the date :

#date -s MM/DD/YYYY

If you want to know your BIOS time  and date :

#hwclock

To synchronize BIOS date and time with your system’s date and time :

#hwclock –systohc

Follow

Get every new post delivered to your Inbox.