intel_idle.max_cstate=3
I have turned to add the following option to the boot parameters to solve system freezing when the power is connected:
intel_idle.max_cstate=1
Just add it to the GRUB_CMDLINE_LINUX_DEFAULT string in /etc/default/grub.
$ $ $ sudo update-grub $ sudo reboot now $ $
c_state = 1 makes CPU running at full power and not falling asleep anymore. It's such a power hunger setting for battery life but it fixed the random freeze issue.
For more advanced option of C state which may suits different CPUs categories. Please check:
http://www.hardwaresecrets.com/everything-you-need-to-know-about-the-cpu-c-states-power-saving-modes/