Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running on UPS power and would like to prevent the laptop's battery from charging, to increase the amount of power available to other devices. Is there a way to do this?

update

The machine is a Dell Latitude D400. If people want more details, just ask.

Also, I'm gathering that I need to explain my desired setup a little better. I've gotten a bunch of suggestions about taking the battery out. I'm not sure if people are suggesting to take the battery out while the machine is running — this, as I understand, is not a good idea with most laptops — or to just remove the battery altogether.

The latter option is not optimal, because ideally I'd like to use the 30-60 minutes of power in the laptop battery and then switch over to UPS power. The details of the switch-over may constitute a separate question, but if I can't find a way to keep the laptop battery from charging, then removing the battery from the machine altogether may be the best way to do this. I'm not sure yet if this machine will run without a battery, but I'll check that out.

Other than the laptop, the UPS is just supporting a cable modem and router and a USB hub.

Again in the idealized version of this setup, all the power management changes would be automated, i.e. not require replugging anything or pressing Fn-keys. I'd like the machine to start using laptop battery power when apcupsd indicates that the UPS A/C is out, and then start using UPS power, but not charging the battery, when the battery is almost depleted.

share|improve this question
1  
cross-posted on Unix and Linux –  intuited Jan 12 '11 at 23:08
3  
Unplug the battery. –  badp Jan 12 '11 at 23:11
1  
@badp: Is there any way to know whether the machine can run without a battery attached, and if so, whether it is safe to remove the battery while it's running? In any case I'd like to be able to do this from within the system itself so that it can be automated. –  intuited Jan 12 '11 at 23:43
1  
As the other answer mentioned you need really fancy hardware and BIOS to do that :) Unplugging the battery is a sure way to know, however. –  badp Jan 12 '11 at 23:48
1  
just take the battery out. –  Rinzwind Aug 17 '11 at 18:07
show 2 more comments

2 Answers

At least some Dell laptops have a key that you can hit to disable battery charging. I think it was Fn-F2 or so. The key has a little blue battery icon on it.

share|improve this answer
    
Hmmm... yes, I do have one of those. Guess I'll read the fricking manual. Though this is still not really what I'm looking for, unless there's a way to fake a Fn-key keypress from a script. I was really hoping for something simple like echo no > /sys/blah/blahblah/powerfoo/use_battery, but I guess no shinies on that one. –  intuited Jan 13 '11 at 8:12
    
Nope. Theoretically it is possible but vendors don't implement the hardware and ACPI bios support properly. –  psusi Jan 13 '11 at 18:14
1  
in any case, the battery button —Fn-F3 in my case— is just meant to display the Dell™ QuickSet Battery Meter. –  intuited Jan 14 '11 at 5:58
    
@intuited I thought it was probably for something like that in Windows, which is why I was surprised to find that when I hit it in Ubuntu, the battery refused to charge. I thought something was wrong at first until I tried hitting that key on a whim and it started charging again. –  psusi Jan 14 '11 at 14:32
    
What model do you have? I was getting a HUD via gnome-power-manager displaying various informations. I've since killed gnome-power-manager because of its memory leak issues, and now nothing seems to happen. Admittedly I haven't actually tried using it to enable/disable battery charging. My last comment was based on the info in the Users Guide. –  intuited Jan 14 '11 at 16:52
add comment

Given that manual intervention on your part would be required, I'd suggest a low tech workable solution. Plug the laptop into a switchable power strip and plug the power strip into the UPS. Switching off the power strip will stop your laptop from charging and the laptop battery takes over powering the laptop without missing a beat. The UPS will now have more available power for your network components.

share|improve this answer
    
This isn't what I want, though. I want the laptop to use the UPS battery power after its own battery supply has been depleted. –  intuited Sep 26 '11 at 0:19
    
What you want to do makes sense but to my understanding laptops are designed to favor and use AC power if present but the control of the AC power is a user manual process. Effectively your laptops battery is a backup for when AC power isn't present. –  fragos Sep 26 '11 at 23:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.