Fixing Ubuntu’s nVidia Driver Update Glitch

So there’s been a conflict between Ubuntu’s kernel update procedure (which has trouble with non-GPL kernel modules) and the nVidia proprietary drivers (which you must use in order to Make Things Work). Ever since 14.04LTS came out, some-but-not-all kernel updates have produced anything from no problem at all to a totally broken system requiring esoteric manual tweakage that shouldn’t be expected of mere mortals.

You know it’s a problem when one of the many bug reports starts out thusly:

This bug affects 2593 people

Bug Description

**WARNING:** This bug has been widely reported and has *many* automatic subscribers. Please be considerate.

The most recent update to my desktop box clobbered it hard enough that the landscape display didn’t start up properly and the portrait display wasn’t rotated. The same update to other boxes seems to have worked, but that may be a set of unwarranted assumptions; the boxes simply haven’t displayed any obvious symptoms.

After having to fix this mess every now and again over the last year, this worked:

sudo apt-get install --reinstall nvidia-331-uvm

As nearly as I can tell, reinstalling any nVidia package that’s already installed simply retriggers the failing step, resulting in a clean and workable installation. There’s apparently something wrong with the Dynamic Kernel Module Support structure that works the second time around, but I have no idea (and little interest) about the details.

However, that “fix” required this sequence:

  • Boot the rescue session from the Grub menu
  • Activate networking
  • Clean out any broken packages
  • Drop to a root shell prompt
  • Do the apt-get dance
  • Power off
  • Unplug the portrait montitor’s Displayport cable
  • Boot to the BIOS settings to force-start the landscape monitor
  • Power off
  • Reconnect the portrait monitor
  • Reboot into Xubuntu as usual
  • Reset the monitor positions
  • Reload the desktop backgrounds

Now, at least, all that’s written down where I can refer to it the next time this happens… on a separate laptop, of course.

This has been happening for nigh onto a year in what Ubuntu charmingly calls a “long term support” release.