A method of an electronic device that includes a power source is disclosed. The method determines a health of the power source, a temperature of the power source, and a state of charge of the power source. The method then sets a performance state cap for the electronic device based on at least the health of the power source.