warning icon not appropriate when using battery charge control features

View: New views
2 Messages — Rating Filter:   Alert me  

warning icon not appropriate when using battery charge control features

by Darren Hoo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I've got a thinkpad T60 and have battery charge control features enabled:
    # echo 40 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
    # echo 100 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
upon this setup,when the battery  capacity is about say 80% and AC power
is on, the battery is in a state of   not charging nor fully charged.thus
g-p-m applet shows an warning icon.This is not as g-p-m 2.24 has worked.

line 131 of  src/gpm-devicekit.c says:
                } else if (state == DKP_DEVICE_STATE_UNKNOWN && percentage > 95.0f) {
                        egg_warning ("fixing up unknown %f", percentage);
                        filename = g_strdup_printf ("gpm-%s-charged", prefix);

I think here the percentage > 95.0f  here is too strict and unnecessary.

what do you think?
_______________________________________________
gnome-power-manager-list mailing list
gnome-power-manager-list@...
http://mail.gnome.org/mailman/listinfo/gnome-power-manager-list

Re: warning icon not appropriate when using battery charge control features

by Richard Hughes-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/7/6 Darren Hoo <darren.hoo@...>:

> I've got a thinkpad T60 and have battery charge control features enabled:
>    # echo 40 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
>    # echo 100 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
> upon this setup,when the battery  capacity is about say 80% and AC power
> is on, the battery is in a state of   not charging nor fully charged.thus
> g-p-m applet shows an warning icon.This is not as g-p-m 2.24 has worked.
>
> line 131 of  src/gpm-devicekit.c says:
>                } else if (state == DKP_DEVICE_STATE_UNKNOWN && percentage > 95.0f) {
>                        egg_warning ("fixing up unknown %f", percentage);
>                        filename = g_strdup_printf ("gpm-%s-charged", prefix);
>
> I think here the percentage > 95.0f  here is too strict and unnecessary.

Well, the battery state is unknown, so g-p-m can't really do anything
sensible here. I think part of the problem is that ACPI exposes two
values, is_charging and is_discharging, and so it's tricky to map them
to a sane number of states.

What's the value of state in the correct device in
/sys/class/power_supply? If this is fixed in the kernel, it'll just
work in g-p-m. Just lowering the threshold is not a good idea at all,
and I'll probably remove that hack from g-p-m altogether.

Richard.
_______________________________________________
gnome-power-manager-list mailing list
gnome-power-manager-list@...
http://mail.gnome.org/mailman/listinfo/gnome-power-manager-list