Remove any Drivers that may be causing the issue:
sudo apt-get --purge remove nvidia-* if you have nvidia graphics,
sudo apt-get remove fglrx if you have amd/ati graphics
to get any of them back:
If your system architecture is 64bit (x86_64), you need the ia32-libs package as well.
sudo apt-get install ia32-libs
then for both 32 and 64bit:
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current nvidia-settings
and for ATI
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-4-x86.x86_64.run
Once dowloaded right-click the .run file and set it to run as executable.
sudo apt-get remove --purge xserver-xorg-video-radeon
that will remove the opensource radeonHD driver.
Now this is only if it's a 64bit system:
cd/path_of_the_file
sh ati-driver-installer-11-3-x86.x86_64.run --buildpkg Ubuntu/natty
sudo dpkg -i fglrx*.deb
sudo aticonfig --initial -f
For the 32bit system just run the ati installer.