In compton effect, the x-ray photon striking the electron imparts some of its energy to the electron and a photon of lesser frequency is scattered. Also, to conserve the angular momentum(i don't know too much about it), whole of the energy of photon can't be absorbed by the electron. However, in einstein's photoelectric equation, it is said that the whole energy 'hf' is used( some part in pulling it outside the metal surface and the remaining in increasing its kinetic energy). Then, the whole explanation must be wrong of photoelectric effect as whole energy of photon can't be absorbed by an electron. Please notify me wherever I m going wrong.