1

I have a problem on 14.04. after switching back and forth between the open and closed source video drivers, when I try switch back to AMD/ATI proprietary driver I get an error saying:

The package system is broken use apt-get install -f (The following packages have unmet dependencies:
fglrx-amdcccle-updates: Depends: fglrx-updates but it is not installed).

apt-get install -f results in the further error:

(Reading database ... 295376 files and directories currently installed.)
Preparing to unpack .../fglrx-updates_2%3a15.200-0ubuntu0.5_amd64.deb ...
Moving ati dir to /etc for the fglrx-core transition
dpkg: error processing archive /var/cache/apt/archives/fglrx-updates_2%3a15.200-0ubuntu0.5_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am a new to ubuntu and loving it but this is really frustrating, any help would be really appreciated (will need guidance for terminal commands).

Thanks in advance.

A.B.
  • 90,397

1 Answers1

2

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.

Byte Commander
  • 107,489