Monday, April 26, 2010

Chromium drains battery

I love google's chrome browser and since I found a corresponding extension to all my firefox addons I really switched to chrome. So I'm using it on my netbook, too. But recently I found out that chrome causes way too much CPU wake ups. I used powertop for the analysis rather than the battery applet's Processor information.

Idling, with chromium running, one page open (my blog):

And now compare with firefox. Also idling with only my blog opened:

As you can see firefox doesn't even appear in the list of processes waking up the CPU when idling. The CPU stays in the C4 state for 97.2% of the time, which is quite decent. But chromium wakes up the CPU 217 times per second and makes more CPU load balancing necessary, too. All in all it makes the CPU staying in C4 state 77.3 % of the time, only, which is very bad.

Well, that means that I'll be using firefox again. I guess I'll file a bug about that.

Well, as I said I filed a bug but soon I learned that I didn't think of the possibility that one of my extensions could be the reason. And so it was. My beloved google mail checker 'Google Mail Checker Plus" was the trouble. Since I uninstalled it chrome is running fine.

Latest compat-wireless works again

As reader Cliff Wells mentioned in his comment to the article Fixing wireless my solution works again with the current compat-wireless bleeding edge sources compat-wireless-2010-04-12 and the lucid kernel 2.6.32-21.

Friday, April 2, 2010

Panning screen at 1024x768

Sometimes I encountered the problem that I had a dialog on the screen which was too large for the display's native 1024x600 resolution. In windows the EeePC tools offer a panning mode that switches to a virtual 1024x768 resolution where the visible section of the screen follows the mouse pointer. So I thought it must be possible to do the same with xrandr. Some playing around with xrandr was a success. Searching for solutions of others led me to a convenience script:


function pan-mode {
echo `xrandr --prop | grep "current"`

function pan-enable {
echo Enabling VGA output
xrandr --output LVDS1 --panning 1024x768
function pan-disable {
echo Disabling VGA output
xrandr --output LVDS1 --panning 1024x600

### MAIN ###
case $1 in 
on)  pan-enable ;;
off) pan-disable ;;
status)  pan-mode ;;
*)   echo "*usage: $0 on|off|status"    ;;
Create an executable shell script in the bin dir:
  1. gedit ~/bin/panning (then paste the script into the file and save)
  2. chmod a+x ~/bin/panning
Now you can switch with panning on or panning off in the console.

If you want to make the panning default create or edit the file ~/.xprofile and add the following line to it:
xrandr --output LVDS1 --panning 1024x768
Next time you reboot or restart X the screen will be in panning mode.

Window Buttons to the right side

After install of lucid I thought c'mon give it a try with the left hand window buttons but now I have enough. I just can't get used to it. Some search led me to a nice page with screenshots of all needed steps. But it's so easy that for somebody who hasn't just started with ubuntu doesn't need such instructions. It boils down to some metacity settings:

  1. Fire up gconf-editor via ALT-F2
  2. Navigate to apps->metacity->general
  3. Change the value of button_layout to :maximize,minimize,close

In other words: just move the colon from the right side of the button names to left side.

Thursday, April 1, 2010

Basic ubuntu improvements

In all my linux installations I usually do some 'hacks'

Standard dir for user scripts

Usually I create a bin directory in my home dir and I add this dir to the PATH.

  1. create the bin dir:
    mkdir ~/bin
  2. Edit the environment:
    sudo gedit /etc/environment  
  3. find the line export PATH... and add ':$HOME/bin' to the end of that line
  4. reboot
Now the shell will look for executable in the user's bin dir. So that is the place where you can move executable scripts and the like.