I struggled too with cuda in ubuntu 12.04, so, this is a very simple tip to help you:
DO NOT install blender from ubuntu repositories, just download the archive from blender.org ..
Untar and, voilà , cuda is working perfectly without having to mess with cuda developer toolkit - sdk etc
I have installed only the updated nvidia driver using the additional (restricted) drivers graphical tool...
Hope it helps...!