lspci | egrep 'VGA|3D'
lspci | egrep 'VGA|3D' 00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06) 01:00.0 3D controller: NVIDIA Corporation GK106M [GeForce GTX 765M] (rev ff)
aptitude -r install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-dkms
mkdir /etc/X11/xorg.conf.d
echo -e 'Section "Device"\n\tIdentifier "My GPU"\n\tDriver "nvidia"\nEndSection' > /etc/X11/xorg.conf.d/20-nvidia.conf
sudo apt-get install firmware-linux-nonfree libgl1-mesa-dri xserver-xorg-video-ati
sudo apt-get install xserver-xorg-video-intel