Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Every time I get a kernel update, my screen resolution is lowered. I can fix this by switching the NVIDIA driver to a different version and then restarting. I think what is happening is that the NVIDIA driver module is not getting recompiled. Is there any way I can fix this? I have this workaround, but it's very annoying.

share|improve this question
up vote 1 down vote accepted

well there is a HOWTO: Automatically update manually installed NVidia drivers after kernel updates for you. I assume you have a driver with source version as

Then now ,open your terminal and type as

sudo mv /usr/src
sudo ln -s /usr/src/ /usr/src/nvidia-driver

now type as

nano update-nvidia

then paste this code in it


# Set this to the exact path of the nvidia driver you plan to use
# It is recommended to use a symlink here so that this script doesn't
# have to be modified when you change driver versions.

# Build new driver if it doesn't exist
if [ -e /lib/modules/$1/kernel/drivers/video/nvidia.ko ] ; then
    echo "NVIDIA driver already exists for this kernel." >&2
    echo "Building NVIDIA driver for kernel $1" >&2
    sh $DRIVER -K -k $1 -s -n 2>1 > /dev/null

    if [ -e /lib/modules/$1/kernel/drivers/video/nvidia.ko ] ; then
        echo "   SUCCESS: Driver installed for kernel $1" >&2
        echo "   FAILURE: See /var/log/nvidia-installer.log" >&2

exit 0


sudo mkdir -p /etc/kernel/postinst.d
sudo install update-nvidia /etc/kernel/postinst.d

from now on wards at the time of new kernels your driver also get updates and compiles.

hope that helps.

For more information : Ubuntuforums-HOWTO

share|improve this answer
Awesome! Thank you so much! – Vivin Paliath Jun 14 '13 at 16:56
Jai, will do :) I know all about stackexchange etiquette; I'm a regular on StackOverflow. I will accept when the 5 minutes are up (it won't let me do it before that). – Vivin Paliath Jun 14 '13 at 16:58
@VivinPaliath OMG!! just now I have seen your profile, you are master :) . – Raja Jun 14 '13 at 16:58
Haha, thanks Jai! :) – Vivin Paliath Jun 14 '13 at 17:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.