Guys, I had this issue today . Kernel kept freezing and I had no option other than getting a new one.
I thought to share with you so that it saves one's time.
How to Install kernel of your choice from debian packages (Ubuntu).
1. Download the working kernel files from http://kernel.ubuntu.com/~kernel-ppa/mainline/
Eg.
wget http://kernel.ubuntu.com/~kern....._amd64.deb
wget http://kernel.ubuntu.com/~kern....._amd64.deb
wget http://kernel.ubuntu.com/~kern.....19_all.deb
Next, install the three downloaded DEB files with dpkg:
sudo dpkg -i linux-*
3. Reboot your computer to load new kernel.
4. Put your current kernel on hold (otherwise it would be upgraded once again during your next "aptitude update && aptitude safe-upgrade" routine):
sudo aptitude hold linux-image-2.6.39-4-generic linux-headers-2.6.39-4-generic linux-headers-2.6.39-4
