Sometimes, graphics/video drivers can run into problems unless you stop all display manager services and/or kill Xorg before installing the new drivers. If you also switch between versions of drivers, sometimes configuration files are not completely removed and can conflict with different versions that you try to install later. ("completely removed" = "purged")
Stop your display manager
This step may not always be necessary, but it's sometimes cleaner or safer to stop all display managers before installing graphics card drivers.
First, close all your work that's open in windowed programs because stopping the display manager will kill them all without saving any open work. Then, switch to a TTY by pressing Ctrl+Alt+F1 (or any of F1 through F6). The display server uses F7 by default for its GUI interface. Log in on the TTY, and type this to see which display managers are running:
pgrep dm -l
You should see one or more of the following: lightdm
, gdm
, kdm
, xdm
. If pgrep
doesn't work, try:
ps -eo pid,comm | grep dm
Or search for those names with the htop
or top
commands. To stop the active display managers, type:
sudo service <name_of_display_manager> stop
For example: sudo service lightdm stop
Older versions of Ubuntu may not have the service
command and instead use init.d scripts:
sudo /etc/init.d/<name_of_display_manager> stop
Or require you to kill each of the processes by typing:
sudo kill <PID_of_display_manager>
The PID is the "process identification" number. It is returned in the output from pgrep
or is listed in a column in htop
or top
. If kill
fails, try forcing it with the -9
flag: sudo kill -9 <PID>
Stop
or kill
each of the display managers until none are running. Older versions of Ubuntu may also require you to kill all Xorg processes:
xkill -a
Completely remove your graphics driver packages
Basically, purge
the driver packages rather than simply remove
them. I had an error like yours that was resolved by purging the old driver packages. In the TTY, type the following:
sudo apt-get purge <name_of_package> [name_of_package]...
For example:
sudo apt-get purge fglrx fglrx-core fglrx-amdcccle fglrx-updates fglrx-amdcccle-updates
I, personally, have only the first three of those installed as I suspect most people would because those are officially listed on AMD's Drivers and Support site.
Purging will remove all of the packages' configuration files outside of /home
along with the packages, themselves. (Typing remove
instead of purge
will only remove the packages and not their configuration files. See also: What is the Difference Between `apt-get purge` and `apt-get remove`?
Older versions of apt-get
do not have the purge
command and instead use a --purge
flag with remove
like so:
sudo apt-get remove --purge <name_of_package> [name_of_package]...
After purging, install the replacement versions of the packages that were just purged:
sudo apt-get install <name_of_package> [name_of_package]...
Or if you have DEB files, install those:
sudo dpkg -i <deb_filename> [deb_filename]...
Restart your display manager
If there are no errors, either restart your display manager or reboot:
sudo service <name_of_display_manager> start
On older versions of Ubuntu:
sudo /etc/init.d/<name_of_display_manager> start
Or to start Xorg:
sudo xinit start
Or reboot:
sudo shutdown -r 0
Any of those ways should take you to the GUI interface again running on the drivers you just installed.