June 22, 2010
Workaround for the Battery Issue

Since I upgraded the firmware of my Acer Aspire One 110, I’ve noticed some little problems with the 6 cells battery: the laptop switches off when about one hour of battery time is left.

Well, it’s not really switch off but like it hangs: the power light it’s on, and the side cooler is working, and I have to press the power button for some seconds to stop it.

I did some research and tests, and these are the results:

$ cat /proc/acpi/battery/BAT1/info 
present:                 yes
design capacity:         7200 mAh
last full capacity:      6610 mAh
battery technology:      rechargeable
design voltage:          11100 mV
design capacity warning: 300 mAh
design capacity low:     264 mAh
capacity granularity 1:  32 mAh
capacity granularity 2:  32 mAh
model number:            UM08A73
serial number:           096D
battery type:            LION
OEM info:                SIMPLO

$ cat /proc/acpi/battery/BAT1/state 
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            824 mA
remaining capacity:      6569 mAh
present voltage:         12232 mV

The remaining capacity (green) it’s the actual battery charge, and the design capacity warning (yellow) and the design capacity low (red) are the values I assume ACPI and the battery applet are checking to calculate the remaining battery charge:

$ acpi
Battery 0: Discharging, 97%, 08:41:40 remaining

I don’t know if I’m getting it wrong, but it makes sense to me (and that 08:41:40 remaining is obviously wrong). The netbook freezes when the charge reaches 19% (aprox).

I guess the battery is advertising wrong values, and because the applet uses time as factor, I can’t adjust it properly.

So I programmed a Perl script to run by cron every minute, to check the battery charge value instead of the time:

#!/usr/bin/perl

use strict;
use warnings;

# empirical fix
my $fix = 1200;

sub getData
{
        my $file = shift;

        open(FD, '<', $file) or
                die('failed to open: ' .$file);
        my @lines = <FD>;
        close(FD);

        my %data;
        foreach(@lines)
        {
                chomp;
                s/\s+//g;
                s/mAh//g;

                my ($key, $value) = split(':');
                $data{$key} = $value;
        }

        return %data;
}

my %state = getData('/proc/acpi/battery/BAT1/state');

exit 0 unless $state{'chargingstate'} eq 'discharging';

my %info = getData('/proc/acpi/battery/BAT1/info');

if($state{'remainingcapacity'} <= $info{'designcapacitywarning'} + $fix)
{
        system('aplay alarm.wav');
}

if($state{'remainingcapacity'} <= $info{'designcapacitywarning'} + $fix - 100)
{
        system('sudo /sbin/halt -p');
}

exit 0;
# EOF

Please, keep into account that this is a hack. After some tests, I’ve found that adding 1200 to design capacity warning it’s a good fix.

When the limit is reached, I play an alarm sound, until I call halt to switch off the netbook as cleanly as possible (notice that I’ve configured sudo to let my user run halt without password).

With this little workaround, everything in my LXDE based Fedora 13 fit my needs!

June 6, 2010
Recover your Crappy Hardware

I haven’t had the time yet to upgrade my main system to the shiny new Fedora 13, but yesterday I tried the LXDE spin in my Acer Aspire One 110 netbook, and I must say I’m very impressed.

This model of Aspire One has a couple of problems: the SSD, that it’s very slow, and the 512MB of RAM, that is certainly too short for a modern desktop.

I’ve tried a couple of distributions that implement Ubuntu Netbook Remix, because the interface it’s quite adequate for a small screen (I like the ‘maximized window’ idea), and although it’s almost usable, when the system uses the disk… it’s really annoying.

Finally I was committed to even move to just a window manager. I’ve used IceWM and WindowMaker in the past, and although I’m getting old and lazy (yes, the desktops make our lives easier), it’s OK for a device that I use mostly when I travel.

But… first I wanted to give a last chance to the desktop. I’ve used XFCE in old hardware with good results, but… what about LXDE?

After a couple of hours working with it, it has almost everything I need in that crappy hardware: good responsiveness and almost no need to use the annoying SSD.

The only downside so far is that the battery applet doesn’t seem to work properly, I have a 6 cells battery, but… 7 hours of battery life sounds too much. Indeed, I went out of battery and the applet didn’t say a thing (needless to say).

I’ll try to workaround the problem, because I really love the look and feel of LXDE. If anyone has any tips on this, please share! Thanks.

by jjm on 10:18pm  |   URL: http://tumblr.com/ZPorZyd_wd4
(View comments  
Filed under: Fedora LXDE spin Acer Aspire One 110 
December 14, 2008
Foresight Linux Mobile and Acer Aspire One 110L

I’m using Foresight Linux Mobile in my Acer Aspire One 110L and I’m very satisfied with it.

It has supports out of the box around the 90% of the hardware (the memory card reader is the weak point), and comes with Ubuntu Netbook Remix as default desktop.

It needs some tweaking to have it confortable (DPI, spanish keyboard, wireless led), but there’s one point that it’s making me think about moving to another distribution: its package manager can’t do a ‘updateall’ with just 512MB of RAM.

Finally I decided to install from the ground the shiny new 1.1 release, but this isn’t a option for the future (man, I want to upgrade… I hate reinstalling).

After being upset for a while I started to think: this sucks, but there’s a better distro offering the same stuff out of the box?