How to setup macbook disable battery and only turn on when plugged power adapter My MacBook Air 2011 model's battery is broken, often can't be charged, and remains at 1%. Can I disable the use of battery, and only turn it on when it's plugged in with a power adapter? 

Sometimes when it's plugged in it's still showing "not charging" and displaying 1%, and operates very slowly. So I guess if I can always only use the power adapter, it can be faster than 1% "low battery mode".

I can't find any related setting in Preferences. Please help, thanks.
First of all, your MacBook Air should not run slower, even with a dead battery, if it's connected to AC power.

Secondly, you really should replace the battery, but if you don't want to physically remove the battery, the nearest option to what you want to achieve is to adjust your Energy Saver settings.

More specifically:


Go to System Preferences
Choose Energy Saver
Ensure you have the Battery tab selected
Now adjust your settings under the Battery tab to suit your needs (perhaps ensure they match as far as possible the settings under the Power Adapter tab).


You may also want to uncheck the option to show the battery status in the menu bar (as that will only be a constant reminder that annoys you under the present circumstances).

NOTES:


My steps above are fairly generic as you didn't specify your OS, however they should get you to where you need.
If you're certain your computer is running 'slowly' then it's quite possible you have something else going on.
Finally, you may want to reset your SMC for good measure. See steps below.


Resetting the SMC on MacBook Airs


Shut down your computer
Keep the MagSafe adapter (power cable) plugged in.
Press at the same time shiftoptioncontrol (on the left side of the keyboard) and the power button
Let go
Turn your computer back on with the power button.