Nvidia Driver for Ubuntu 16

08 February 2018

My company laptop comes like a present to me. It has 16GB of RAM and couple of SSDs on it. It's running Windows 10 Home Edition but I don't have issue with that since I'm going to use Linux. I'm originally CentOS but we will use Ubuntu going forward to make it a smooth Linux transition for non-seasoned Linux users.

The only issue I encountered with this laptop while installing Ubuntu is the graphics driver. The laptop has multiple graphics card (Intel and Nvidia) and the Nvidia driver is not supported on Ubuntu being proprietary.

Ubuntu About

Run this script

I got this one from the internet but forgot to document the website. Credit belongs to the original author.

#!/bin/sh

if lspci | grep VGA | grep -q NVIDIA; then
    echo 'Installing NVIDIA driver'
    echo $sudoPW | sudo -S sudo add-apt-repository -ys ppa:graphics-drivers/ppa > /dev/null 2>&1
    echo $sudoPW | sudo -S sudo apt update > /dev/null 2>&1
    echo $sudoPW | sudo -S sudo apt-fast install -y nvidia-378 > /dev/null 2>&1

    cat <<EOT >> /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
EOT

    echo $sudoPW | sudo -S sh -c "echo 'options nouveau modeset=0' >> /etc/modprobe.d/nouveau-kms.conf"
    echo 'Updating initramfs'
    sudo update-initramfs -u
fi

Reboot your machine making sure safe boot is off

Safe boot is a BIOS feature and it comes on different flavours. Just look for Safe boot and make sure it's disabled.