Saturday, June 27, 2009

CPU Speed and performance on a Notebook with Linux.

After installed Fedora on my notebook, CPU Frequency was always on 50% of the nominated CPU frequency in my case 1.87 GHz but my CPU can go up to 3.2 GHz, that changed on demand as controlled by the kernel, and it did work fine for me how ever sometime launching programs like Eclipse it took to long to load even when the CPU speed when up to 100%, and notebooks are set this way to save energy when using the battery, but what if we want to have the CPU running at 100% when corrected to the electrical outlet and not using battery can we set it up, well this is Linux so there must be a way of doing this, and of course it can be done here goes how.

First we need to install this packages:

cpufrequtils
cpuspeed

also recomend to install

lm_sensors

To install those packages you can simple do:

yum install cpufrequtils cpuspeed lm_sensors

after installing those packages you will have some information about your CPU by typing cpufreq-info


Report errors and bugs to cpufreq@vger.kernel.org, please.

analyzing CPU 0:

driver: acpi-cpufreq

CPUs which need to switch frequency at the same time: 0

hardware limits: 1.87 GHz - 3.20 GHz

available frequency steps: 3.20 GHz, 2.93 GHz, 2.67 GHz, 2.40 GHz, 2.13 GHz, 1.87 GHz

available cpufreq governors: userspace, performance
,ondemand
current policy: frequency should be within 1.87 GHz and 3.20 GHz.

The governor "ondemand" may decide which speed to use

within this range.

current CPU frequency is 1.87 GHz.



This will show you what driver control your CPU frequency and the policy is set and the frequency it is working at the moment you run the command.

cpufreq-set -c 0 -f 3.20 GHz -g performance

where C is the CPU number
f is the frequency you want
g is the governor you are setting
Let check the change

cpufreq-info

Report errors and bugs to cpufreq@vger.kernel.org, please.

analyzing CPU 0:

driver: acpi-cpufreq

CPUs which need to switch frequency at the same time: 0

hardware limits: 1.87 GHz - 3.20 GHz

available frequency steps: 3.20 GHz, 2.93 GHz, 2.67 GHz, 2.40 GHz, 2.13 GHz, 1.87 GHz

available cpufreq governors: userspace, performance

current policy: frequency should be within 1.87 GHz and 3.20 GHz.

The governor "performance" may decide which speed to use

within this range.

current CPU frequency is 3.20 GHz.



Remember you need to do this set for each CPU if you have more that one CPU.

Of course this will set your CPU frequency for this session but what if you want to set your CPU to a 100% frequency every time you boot your notebook, then you need to use the cpuspeed service.

First we need to edit the cpuspeed configuration file that is at /etc/sysconfig/ , you can edit this file with vi or your favorite editor, you will need to change this line


GOVERNOR=

to

GOVERNOR=performance

this will set you CPU to full speed all the time, to change the way it behave when it is working with the battery look at the en of the file and uncommend the line


OPTS="$OPTS -a /proc/acpi/ac_adapter/*/state "

you can also uncomment this

# uncomment and modify this to check the state of the AC adapter

OPTS="$OPTS -a /proc/acpi/ac_adapter/*/state "



you may need to change this line to the location of your temperature file normally at acpi but it may vary depending on you system
# uncomment and modify this to check the system temperature

OPTS="$OPTS -t /proc/acpi/thermal_zone/temperature 65"


if you restart you system you will see your CPU frequency changes. Also if you added the CPU performance applet on you desktop you can see your changes.

You may need to read more on the way cpuspeed there are more settings there. Please use this information with care your and at your risk.

Tuesday, June 23, 2009

CPU temperature indicator on your desktop

If you want to have your CPU temperature on your desktop without having to load some system monitoring tool like Gkrellm or other programs you can use the Gnome sensor-applet from http://sensors-applet.sourceforge.net/ you can download it and install.

To download you can use this depending on your distribution:

Debian
apt-get install sensors-applet

Fedora
yum install gnome-applet-sensors


The advantage of using the yum or apt-get format is that it will install all dependencies, you can also download the source and compile your self.

After you install it you can add the applet to your panel and have it show on your desktop. They will look like this:











It not only will give you the ability to see the temperature values but also set alarms and trigger some programs or scripts.

On of the key features for me it was that it support reading the temperature of my old Toshiba A75 notebook, where the sensor library does not work. It does that by supporting the old omnibook standard, but as always to add that support to my Fedora 10 have to figured out what version of omnibook will work and since it is and old standard most of the omnibook libraries are old and supporting old kernels, so here is what work for me:

There are two projects on SourceForge.net for this http://sourceforge.net/projects/omke/ and http://sourceforge.net/projects/omnibook/ the omke project has a kernel module that did not compile with my kernel (2.6.27.24-170.2.68.fc10.i686) but the omnibook project did work only if downloaded sources from the trunk version, the release version did not work. So here are steps to download the SVN version:
You will need svn if you don't have it use yum install svn.

svn co https://omnibook.svn.sourceforge.net/svnroot/omnibook omnibook

after that you will need to execute as root or a sudo user

./configure

Then

make

make install

Now your sensor-applet will be able to read your cpu temp

You can also install this two scripts komnibook and omke scripts they will be used to generate a configuration and manage you omnibook notebook. They are here http://sourceforge.net/project/showfiles.php?group_id=48623

Good look and enjoy!

Monday, June 15, 2009

Setting your Hotmail , live email accounts on Evolution (Linux).

After a change on protocols Hotmail and Live email service can receive and send email using Evolution. This is not something new some smart people manage a way to set them up on Evolution before, must of them using some smtp servers and other programs like gotmail, hotsmtp, hotway. But now it got very simpler:

Create Hotmail/Live account on evolution:



add your information then go to the next tab Receiving Email and set it to pop type account and the server as pop3.live.com you need to also set the ecryption type to SSL.



That will allow you to get you email from your hotmail account to your Evolution Inbox, now to send email, on the Send Email tab set to smtp the smtp server is smtp.live.com you need to select the authentication method to TLS and you server require authentication also set your account user name.


Now your are set you can send and receive emails using you Hotmail account from evolution. Enjoy.