July 11, 2008

Customize Your Settings with Ubuntu Tweak (Linux Friday)

Are there some settings in Ubuntu you aren’t sure how to change? Is something still not exactly the way you want it?  If so, you should give Ubuntu Tweak a try.

Ubuntu Tweak allows you to change hidden system and desktop settings.  Ubuntu Tweak is ONLY available for the GNOME Desktop Environment (not Kubuntu, or Xubuntu, etc).  However, the author states that Ubuntu Tweak will run on other distributions. If you have any experience with this please post in the comments!

To download Ubuntu Tweak, visit their download page.  There you can either download the source files, the .deb package (easiest method) or download the package via the command line.  The download page provides more information on the different ways to download Ubuntu Tweak.

Once you download Ubuntu Tweak, you can run the application by clicking Applications->System Tools->Ubuntu Tweak or by typing ‘ubuntu-tweak‘ in the terminal.

When the program starts you should see the following Welcome screen:

The main screen gives you a little information about Ubuntu Tweak.  As you can see, along the left side are several subpages.

The first one we will look at is the ‘Computer’ page.  If you click on ‘Computer’ you should see System and User information like this:

This is very useful for troubleshooting if you need to know which kernel version you have.  This page also displays some information about your computer such as the processor type and amount of memory.

The next subpage is ‘Applications.’ When I tested this I was unable to get software to install or uninstall.  However, this page does give you a nice little description of each application.  So, if you see an application you want to try but can’t get it to install, take a look at my previous post on How to Install/Uninstall Software in Ubuntu. If you had luck installing or uninstalling software from this page, please post in the comments.

Next is the ‘Startup’ page.  Here you can edit settings such as whether or not to show the logout prompt, whether or not to show a splash screen, and what applications run on startup.  Here is a look at the settings for the startup applications:

Each program that has a checkmark next to it will run on startup.  You can stop it from running by unchecking the mark.  You could also remove it by clicking on the application name and then clicking the remove button.

However, if you wish to add an application, click the add button and then enter the name and terminal command.  This is useful for such programs as window managers.  These same settings can be accessed by clicking System->Preferences->Sessions.

The next setting is one that I usually have to lookup since it either requires a terminal command or using the Configuration Editor.  However, Ubuntu Tweak makes adding icons to your desktop a breeze.

To do so, click the ‘Desktop’ tab on the left and you will see the following screen:

Next is the ‘Personal’ tab.  This allows you to change such settings as where your default folders are located, document templates, scripts, and keyboard shortcuts.

Here is a picture of the default user folder settings:

If you change these settings to where your data is stored it will save you time when importing music, pictures, video etc.  So now, when you go to save a document it will go to where your documents are, instead of simply to your home folder.

Lastly, the ‘System’ tab has some very cool settings for both GNOME and Nautilus.  However, the settings I would like to talk about are the Power Manager settings.

Some of these settings are hidden by default in Ubuntu. The only way I know to edit these settings is by using Ubuntu Tweak.  Here you can enable hibernation, suspend (aka standby), and CPU scaling:

The CPU frequency control is a great setting especially for laptops since you probably don’t want your system running at full speed when on battery power.  If you want to prolong your battery life in Ubuntu try reading these posts on battery saving: CPU Scaling and Save Battery Life with PowerTOP

Of course these are not the only settings you can change. I went over the settings I felt were most important.

If you have a setting I didn’t cover, please post in the comments!

Written by Eric

April 18, 2008

Linux Friday: Save Battery Life in Linux Using PowerTOP

Michael and I both have laptops which run Linux. His laptop gets terrible battery life in Ubuntu (around 45 minutes) where as I have a newer extended battery which allows me to get around 4 hours running Linux Mint (based on Ubuntu). However, for both of us this is much worse than Windows. In Windows he gets upwards of 2 hours while I get around 6. We both wanted to know why we get worse battery life in Linux than in Windows. I mean afterall, isn’t Linux better? I couldn’t allow MS to triumph so I did a little research and this is what I found.

Which operating system gives you the most battery life?

View Results

Loading ... Loading ...

The reason our laptops get worse battery life in Linux than in Windows is because Linux uses more power. You maybe saying, “Well no duh, but why does it use more power?” The short answer is because we have more programs running when using Linux. The use of workspaces allows for having more programs open since we can spread them out. Even with multiple monitors, there just isn’t enough screen real estate in Windows, and therefore we have only the essential programs open.

There is a program for Linux called PowerTOP which helps you identify which programs are causing your computer to “wake up” from idle. The idea is that the less “wake ups,” the longer your computer stays in power save mode. PowerTOP will not only identify such programs, but will give the option to fix the problems. Sound good? The only catch is it only works for computers with Intel processors.

How do I install PowerTOP?
If you are running Ubuntu Gutsy 7.10 then you should be able to install it using the package manager and searching for ‘powertop’ or simply typing the following command into the terminal.

sudo apt-get install powertop

If you are running Ubuntu Feisty 7.04 or older you will need to visit a debian package site and download and install the .deb file from there. For you pre-Gutsy users, you can still install PowerTOP but wont be able to use it to the fullest. The reason is because tickless timers were not implemented until kernel version 2.6.21. Unless you have manually updated your Feisty kernel, you will have an older kernel. Basically, you should still install and use PowerTOP but you would save even more power if you used an updated kernel.

Lastly, if none of these work, or you are using a different distribution, you can always download the source from the PowerTOP website. Once you download the source, extract the archive, type ‘make’ and then ‘make install’. For more information on downloading and installing, visit the download page.

How do I start PowerTOP?
Once PowerTOP is successfully installed it should be run by typing the following code into the terminal:

sudo powertop

PowerTOP should be run as root so that it can collect the information needed for the detailed power statistics.

How do I use PowerTOP?
When you type the above command you should see something similar to the following:

On the top left side you will see C-states which are operating modes of the CPU when it is idle. The higher the C-state the less power your computer is using. To get better battery life, your CPU needs to stay in C3 or C4 for more the 75% of the time. As you can see in the above screenshot, my laptop is spending most of its time in C3 (and there is no C4).

The “Wakeups per second” line is a counter that is used to let you know how many times your computer “wakes up” from idle. The lower the number the more power you save. With lowest numbers around 10, I would say my laptop wasn’t doing so great.

When your laptop is running off the battery , PowerTOP uses ACPI to collect information on how much power you are currently using. Then it uses this information to calculate an estimated time remaining.

PowerTOP will display the top 10 processes that are causing the computer to “wake up” from idle. In the screenshot, the top few items are hardware interrupts from devices. For example, my usb controller, ipw3945 wireless card and nvidia graphics card were waking the CPU up very frequently.

At the very bottom of the screen, PowerTOP will display suggestions on how to impove your battery life. Simply press the indicated button to perform the action. These actions will range from increasing hard drive write back time to decreasing wireless card activity.

How else can I save battery power?
The most important thing you can do to save battery power is to only use what you need. If you are not on the internet turn off your wireless card or plug in an Ethernet cable instead. If you don’t need the screen brightness turned up all the way, don’t.

Lastly, close all programs that you aren’t using. Don’t forget about programs such as beryl, compiz, and emerald. These programs use more battery power than you think.

If you want more information on how to use PowerTOP, be sure to visit their Tips & Tricks page.

How much will my battery life increase?
The extra battery life you get will depend on what steps you take to increase it.  For example, with only running PowerTOP and following its suggestions, you could see anywhere from 15 minutes to an hour extra battery life.  Of course this will depend on the laptop and the number of “wake ups” from idle. For me, if I follow PowerTOP’s suggestions, turn down the screen brightness, close unnecessary programs, turn off wireless (and use Ethernet cable), and set my CPU to powersave mode (lowest speed), I can get another hour to hour and a half running Linux Mint.

How long does your battery last in Windows or Linux??? Let us know in the comments…

Written by Eric

 

Looking for something?

Still can't find what you're looking for? Let us know by dropping a comment on a post or email us at admin[at]wlmtips.com!

Archives

All entries, chronologically...

 

 

Check us out!

Some of our other links...

Visit our friends!

A few highly recommended friends...