Monday, August 25, 2008

VTune: glibc-32bit version 9 or higher

When installing a trail version of VTune 9.0 U11-1888 (vtune90_011_lin.tar.gz) on Suse 11.0 64bit architecture the installer complains by printing the following message "glibc-32bit version 9 or higher" and quits. I have double checked that I have all the required libraries including glibc-32bit installed and their proper versions. But the problem continued to exist.

My work around was to take replace the file data/preinstall_vtune_check.sh with one from an earlier build version (VTune 9.0 U1-969 or VTune U7-1448). Then the version check passed and I got an installed VTune.

Compiling the linux kernel

To compile a fresh linux kernel.

1. Download the kernel source from www.kernel.org let's say linux-x.y.z.tar.gz
2. Expand the archive in /usr/src directory "$tar -xzvf linux-x.y.x.tar.gz"
3. Create a linux link to the source directory
$ln -s linux-x.y.x linux

4. $cd linux
go into the source directory

5. If you want to delete the previously compiled kernel object files, configuration files run
$make mrproper

6. Configure the kernel (one of below)
6.1. $make config (you will be promted for each configuration parameter one by one)
6.2. $make menuconfig (you will be have text based menu in the terminal, easier for navigation, requires library ncurses installed)
6.3. $make xconfig (you will be have a graphical window to configure the kernel, you will need to have many packages installed).

7. Build the kernel
$ make

8. Build the modules
$make modules

9. Install the modules
$make modules_install

10. Install the kernel
$make install

This will create four files in directory /boot
  • vmlinuz-x.y.z (the kernel)
  • System.Map-x.y.z
  • config-x.y.y
  • initrd-x.y.z
To use the new kernel you will have to add an entry into me grub menu list, this is file /boot/grub/menu.lst You can look at the existing entries when preparing the entry for the new kernel. When you are done reboot the machine.

Saturday, August 23, 2008

Slow sleep (suspend) in Windows Vista

Why in Vista it takes so long to go in sleep mode?

In Windows Vista it takes significant time to get the system in low-power mode when you select Sleep (or close the Lid of your laptop). The reason for this is that in Vista sleep is not exactly the sleep in XP and is called hybrid sleep.

Hybrid sleep is a combination between the normal sleep (suspend) and hibernate. When Hybrid sleep is enabled, the data in the main memory is stored into the hard drive and then the system goes into low-power mode. The reason for saving the data from the main memory to the hard drive is that an electricity cut will cause the computer to turn off if it does not have battery and all the changes in unsaved files lost. Because of saving the memory into the hard drive the overall sleep process in vista takes quite long time - 30-180 seconds.

Hybrid sleep is more suitable for desktop computers since they don't have batteries. Laptops have batteries and when the power level of the battery reaches the critical level the system automatically hibernates if it is in low-power mode avoiding the risk of losing unsaved data.

To turn off hybrid sleep (bypass saving the data in memory to the hard drive) follow the steps:

1. Open "Power Options"
- Click the Start button and on the search type "Power Options"
2. For any power plan click "Change plan settings"

3. Click "Change advanced power settings"

4. Expand the "Sleep Node" and "Allow hybrid sleep"
- If "Allow hybrid sleep" does not exists then
4.1. Open "Command prompt" as administrator
- In the search box Start menu type "Command prompt" then right click on the icon and select "Run as administrator"
4.2. type "powercfg /hybenrate on"
if necessary start from step 1.
5. Ensure that under "Allow hybrid sleep" both "On battery" and "Plugged in" are selected off.

6. Press OK and if required restart the computer.

7. To make the Sleep processes be faster you have to disable
7.1. Superfetch; and
7.2. ReadyBoost for your devices.

Disable Superfetch.
1. Open up Services from Control Panel (services.msc)
2. Find the service Superfetch in the list, stop it and disable it for future use.

Disabling ReadyBoost
  1. Plug your USB storage device
  2. Right click on the drive letter of the USB storage device and select properties.
  3. Go to ReadyBoostTab
  4. Select "Do not use this device" option
  5. Click OK.

After doing the described procedures your computer should go into Sleep mode for about 5-8 seconds.