How to recover from a display driver problem

Karl Auer kauer at biplane.com.au
Sat Apr 9 23:53:37 UTC 2016


On Sat, 2016-04-09 at 16:47 -0500, Jim wrote:
> when nothing else worked I decided to try  a different driver.
> [...]
> Anyone have any ideas of how to correct this without a complete
> reinstall?

Important note: I have never done this, this is a GUESS, and if it
breaks, you own all the pieces.

I believe that installing a new driver is nothing more complicated
under the hood than a common "apt-get install ...". Recovering should
be as easy as:

  a) identify what packages you had before
  b) re-install them.

To do any of this however, you need a usable system you can execute
commands on.

If you can get out of your broken X to a text console (Alt-Ctl-F1), do
so. If you can't get to a text console the easy way, you will need to
go to single-user mode thusly:

Boot into recovery mode and exit to a root shell. That will avoid
starting X and will leave you in a text console as root. However, your
filesystem will be read-only. Remount it writable like this:

   mount rw -o remount,rw /dev/sda1

Obviously adjust that for your particular drives and partitions.

Now to locate the old package name.

It may be possible to see what the old package was by doing "apt-get -s
autoremove". If the old package is hanging around, it will be a
candidate for autoremoval and will show up in the autoremove list. Havi
ng thus identified it, you can just reinstall it.

If the old package isn't in the autoremove list, you should be able to
find it via the apt-get logs in /var/log/apts. The apt-get logs should
go all the way back to your original install, though earlier ones may
be gzipped.

Look in the earliest logfile you have. I'm assuming it will have been
archived, so you'll need to unzip it as below. If it isn't archived,
substitute "cat" for "gunzip -c":

   gunzip -c name_of_log_file.gz | less

or this to pull out NVidia stuff:

   gunzip -c history.log.2.gz | \
        tr "," "\n"| \
        grep -i nvidia | \
        tr -d "(" \
        cut -d\, -f2

When I do this for Radeon (I have Radeon graphics hardware) I find:

   libdrm-radeon1:amd64 2.4.64-1
   xserver-xorg-video-radeon:amd64 7.5.0+git20150819-0ubuntu1

The first part on each line is the package; the second part is the
specific version of that package.

Then install the old one(s) again using "apt-get install". You can
leave the architecture marker (":amd64") out - apt-get should choose
the right architecture automatically.

If the new and old versions have the same package name, you will need
to use the specific package version number when installing. Using my
packages as examples:

   apt-get install libdrm-radeon1:amd64=2.4.64-1
   apt-get install
xserver-xorg-video-radeon:amd64=7.5.0+git20150819-0ubuntu1

...note the equals sign.

Reboot to check that X works again.

Once you have it working, do "apt-get autoremove" to wipe unneeded
packages, and "apt-get upgrade" to get the driver up to date.

Regards, K.

PS: Just to repeat: I have not done this myself, it is a GUESS as to
how you might proceed. If anyone with actual experience pops up, listen
to them, not me.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B
Old fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4







More information about the ubuntu-users mailing list