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.
1 Answer
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 NVIDIA-Linux-x86-173.14.05-pkg1.run
Then now ,open your terminal and type as
sudo mv NVIDIA-Linux-x86-173.14.05-pkg1.run /usr/src
sudo ln -s /usr/src/NVIDIA-Linux-x86-173.14.05-pkg1.run /usr/src/nvidia-driver
now type as
nano update-nvidia
then paste this code in it
#!/bin/bash
#
# 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.
DRIVER=/usr/src/nvidia-driver
# 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
else
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
else
echo " FAILURE: See /var/log/nvidia-installer.log" >&2
fi
fi
exit 0
Then
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
-
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). Jun 14, 2013 at 16:58
-
1@VivinPaliath OMG!! just now I have seen your profile, you are master :) .– Raja GJun 14, 2013 at 16:58