echo 'blacklist nouveau'|sudo tee /etc/modprobe.d/blacklist-nvidia-nouveau.conf
echo 'options nouveau modeset=0'|sudo tee -a /etc/modprobe.d/blacklist-nvidia-nouveau.conf
echo 'blacklist i915'|sudo tee -a /etc/modprobe.d/blacklist-nvidia-nouveau.conf
sudo update-initramfs -u -k all