Tuesday, August 28, 2007

HOWTO Ubuntu Feisty + Sony Vaio VGN N350FE

With some patience, searching in forums, researching, and some luck, I managed to solve the energy problem of my laptop: a Sony Vaio VGN-N350FE using Ubuntu Feisty.

Warning: if you dare to follow this howto, be aware that the system may become unstable, unusable, or worse, like damaging the hardware. Only follow these steps at your own risk.

On a clean installation of Ubuntu Feisty, I update every package proposed by the update manager.

I install the kernel 2.6.22.9 (available in Gutsy), for which we need to include the corresponding repositories.

On the command line we execute:

sudo gedit /etc/apt/sources.list

In the editor, we add the following lines at the end of the file.

deb http://archive.ubuntu.com/ubuntu/ gutsy main restricted
deb http://archive.ubuntu.com/ubuntu/ gutsy universe

Save and close. Then execute this:

sudo apt-get update

After this, it's possible that the update manager offers us to update a bunch of packages (actually from Gutsy). We shouldn't do it. Only do what's stated here.

We execute:

sudo apt-get install linux-backports-modules-2.6.22-9-generic linux-headers-2.6.22-9 linux-headers-2.6.22-9-generic linux-image-2.6.22-9-generic linux-restricted-modules-2.6.22-9-generic linux-ubuntu-modules-2.6.22-9-generic

Since we just installed a new kernel, I believe it's a good idea to restart the notebook. After restarting, we open a new terminal window and we execute:

sudo apt-get install powertop cpufrequtils libncursesw5

Now we must remove Gutsy's repositories. We execute:

sudo gedit /etc/apt/sources.list

We comment the lines we inserted before, by inserting # at the beginning of the lines.

We update the package manager:

sudo apt-get update

Now we make sure that sony's energy management modules are installed. We execute:

sudo modprobe sony_acpi
sudo modprobe sonypi

We make these modules to load automatically on boot:

sudo gedit /etc/modules

We add the two following lines to the end of the file:

sony_acpi
sonypi

We execute this to be able to use brightness controls:

sudo locate -u && for i in $(locate lcd-???-brightness); do sudo cp $i $i.bak; sudo sed -i '1 s|#!/bin/sh|#!/bin/bash|g' $i; done

Now we can add the brightness control to Gnome's Panel. After this, reset the notebook, so the brightness control is active.

When we use our laptop on battery, we need to execute on a terminal:

sudo powertop

This opens a text application that tells us which elements are consuming power, and recommends us to carry on certain actions to improve battery's use.

Before this, the battery lasted less than half hour, after this, more than four hours.

For references, I used these posts:

http://www.ubuntugeek.com/howto-upgrade-kernel2622-9-generic-in-feisty-fawn.html
http://ubuntuforums.org/showthread.php?t=479034
http://tuxeando.wordpress.com/2007/05/27/probando-el-nuevo-kernel-2622/


Technorati tags: , ,


Cheers!

Versión en español

No comments: