if [ $1 -eq 2 ]; then
echo "Running fix 2 (reinstall)."
sudo apt-get install --reinstall nvidia-331 nvidia-331-uvm
fi
if [ $1 -eq 3 ]; then
echo "Running fix 1 and 2 (reconfigure and reinstall)."
sudo dpkg-reconfigure nvidia-331 && sudo dpkg-reconfigure nvidia-331-uvm
sudo apt-get install --reinstall nvidia-331 nvidia-331-uvm
fi
else
if [ $# -eq 0 ]; then
echo "Please pick if you would like to run:"
echo " 1 : fix 1 (reconfigure)"
echo " 2 : fix 2 (reinstall)"
echo " 3 : fix 1 & 2 (reconfigure and reinstall)"
fi
fi
I created a script to run the common fixes for this problem. All you have to do is run by passing either 1, 2, or 3; e.g fix-nvidia.sh 1
#!/bin/bash /bugs.launchpad .net/ubuntu/ +source/ nvidia- graphics- drivers- 331/+bug/ 1268257
# Fix for bug #1268257.
# See: https:/
if [ $# -gt 0 ]; then
if [ $1 -eq 1 ]; then
echo "Running fix 1 (reconfigure)."
sudo dpkg-reconfigure nvidia-331 && sudo dpkg-reconfigure nvidia-331-uvm
fi
if [ $1 -eq 2 ]; then
echo "Running fix 2 (reinstall)."
sudo apt-get install --reinstall nvidia-331 nvidia-331-uvm
fi
if [ $1 -eq 3 ]; then
echo "Running fix 1 and 2 (reconfigure and reinstall)."
sudo dpkg-reconfigure nvidia-331 && sudo dpkg-reconfigure nvidia-331-uvm
sudo apt-get install --reinstall nvidia-331 nvidia-331-uvm
fi
else
if [ $# -eq 0 ]; then
echo "Please pick if you would like to run:"
echo " 1 : fix 1 (reconfigure)"
echo " 2 : fix 2 (reinstall)"
echo " 3 : fix 1 & 2 (reconfigure and reinstall)"
fi
fi