I have a Dell Inspiron 1545 and I have Ubuntu 11.10, and in my dell laptop it allow me to discharge the battery when I am using the power cable and that helps in the life of the battery, and I used to do that in Windows.

The shortcut to activate it is (FN) + (F3) but when I use it in Ubuntu it shows:

If you really want to extend the life of your battery you should take it out when you're plugged into the wall. Heat is what really kills battery life.

It's also worth noting that leaving your battery in while connected to the wall doesn't over-charge and harm your battery. Your computer/battery has built-in safeties that prevent that from happening, so when you're on wall power the batter is only being charged when it's below its maximum charge. But like I said above, if you really want to increase battery life you should take the battery out while on wall power as heat is a big toll on batteries.

I think you were misunderstanding what what happening with the Fn+F3 combination. I've never heard of a battery discharging while the power was plugged in - unless the power cable was broken of course. The cable provides enough juice to both power the laptop and charge the battery at the same time. If you're plugged into the wall, you're only using wall power, not battery power to use your machine - so when it's plugged in no battery power is being used, how could it discharge?

If I'm not mistaken (and I very well may be - I haven't used Windows since 2007) Fn+F3 does different power modes in Windows. There's Performance mode, Power Save, and Balanced. I believe Fn+F3 cycles between these profiles in Windows, but when you're plugged in they don't make a difference. The only thing close to this in Ubuntu is CPU frequency scaling which is set to a governor of ON_DEMAND be default, meaning your computer runs at the lowest frequency (My Inspiron 1525 w/ 2.4Ghz Core2 Duo is 800Mhz lowest freqency) until more power is needed for a task. This helps with head and overall wall power usage when plugged in. It is possible, however to override it to use the POWERSAVE or PERFORMACE governors using the cpufreq-set command like so: cpufreq-set -c 0 -g performance (replacing -c 0 with -c 1, -c 2, etc for all your cores). That will set your computer to use its max frequency all the time.

I don't know if this is the answer you are looking for but I was using the Dell feature to prevent my battery from charging, even if my computer is plugged in.

I am on a XPS 17 running on windows 7 and ubuntu 12.04.

To prevent my battery from charging when my computer is plugged in I first start my computer with windows 7, select the plugged in, not charging option, restart my computer and choose ubuntu. It's a bit of an hassle but the only solution I found so far!

Try to install software for Your battery. It is called smart battery or something. But Dell just turned it's back on Linux users, because You won't find such drivers on Dells website. Try to see who is the producer of Your battery and search its website for linux drivers.