package fglrx 2:8.723.1-0ubuntu2 failed to REMOVE: error exit status 2 - dpkg-divert: mismatch on package - while removing the package

Bug #566437 reported by Marco Lackovic
804
This bug affects 162 people
Affects Status Importance Assigned to Milestone
fglrx-installer (Ubuntu)
Fix Released
High
Alberto Milone
Lucid
Fix Released
High
Alberto Milone
Natty
Fix Released
High
Alberto Milone

Bug Description

I got this error when trying to remove the ATI/AMD proprietary FGLRX graphics driver. Despite the error the driver appears to be "not activated" after removal.

== Workaround ==

Open a terminal and run the following commands:
$ sudo dpkg-divert --remove /usr/lib/libGL.so.1.2

You can then remove the driver with:
$ sudo apt-get --purge remove fglrx-kernel-source fglrx-modaliases xorg-driver-fglrx fglrx-amdcccle libamdxvba1

ProblemType: Package
DistroRelease: Ubuntu 10.04
Package: fglrx 2:8.723.1-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic x86_64
NonfreeKernelModules: fglrx
AptOrdering:
 fglrx-amdcccle: Remove
 fglrx: Remove
Architecture: amd64
Date: Mon Apr 19 08:27:03 2010
DkmsStatus:

ErrorMessage: subprocess installed post-removal script returned error exit status 2
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
MachineType: ASUSTeK Computer Inc. F3Sa
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-21-generic root=UUID=1642ac51-cbdf-4627-86e7-e3715e326a66 ro quiet splash
SourcePackage: fglrx-installer
Title: package fglrx 2:8.723.1-0ubuntu2 failed to install/upgrade: subprocess installed post-removal script returned error exit status 2
dmi.bios.date: 02/12/2008
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 303
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: F3Sa
dmi.board.vendor: ASUSTeK Computer Inc.
dmi.board.version: 1.0
dmi.chassis.asset.tag: ATN12345678901234567
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK Computer Inc.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr303:bd02/12/2008:svnASUSTeKComputerInc.:pnF3Sa:pvr1.0:rvnASUSTeKComputerInc.:rnF3Sa:rvr1.0:cvnASUSTeKComputerInc.:ct10:cvr1.0:
dmi.product.name: F3Sa
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK Computer Inc.
glxinfo:
 Error: couldn't find RGB GLX visual or fbconfig
 name of display: :0.0
system:
 distro: Ubuntu
 codename: lucid
 architecture: x86_64
 kernel: 2.6.32-21-generic

Revision history for this message
Marco Lackovic (marco-lackovic) wrote :
Revision history for this message
Luca Ferretti (elle.uca) wrote :

I had the similar issue trying to remove the fglrx driver after the upgrate from 9.10 to 10.04 RC.

fglrx was installed in 9.10 (from ubuntu repo, of course), I've performed the upgrade, then I've tried to remove fglrx using jockey utility.

Trying to remove the package from command line, I've

Removing fglrx ...
dpkg-divert: mismatch on package
  when removing `diversion of /usr/lib/libGL.so.1.2 to /usr/lib/fglrx/libGL.so.1.2.xlibmesa by fglrx'
  found `diversion of /usr/lib/libGL.so.1.2 to /usr/lib/fglrx/libGL.so.1.2.xlibmesa by xorg-driver-fglrx'
dpkg: error processing fglrx (--remove):
 subprocess installed post-removal script returned error exit status 2
Processing triggers for ureadahead ...

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

thanks for your report.

it looks like bug 552782 but the later was failing in pre-installation script, now we are failing on post-removal script.

summary: - package fglrx 2:8.723.1-0ubuntu2 failed to install/upgrade: subprocess
- installed post-removal script returned error exit status 2
+ package fglrx 2:8.723.1-0ubuntu2 failed to REMOVE: error exit status 2 -
+ dpkg-divert: mismatch on package - while removing the package
Changed in fglrx-installer (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Alberto Milone (albertomilone) wrote :

Can you still reproduce the problem?

Revision history for this message
niklas (skudwig) wrote : Re: [Bug 566437] Re: package fglrx 2:8.723.1-0ubuntu2 failed to REMOVE: error exit status 2 - dpkg-divert: mismatch on package - while removing the package

Yes, the same error occurs while trying to remove it by aptitude and
apt-get

the command line gives (sorry its German):

dpkg-divert: Keine Übereinstimmung mit Paket
  beim Entfernen von »diversion of /usr/lib/libGL.so.1.2
to /usr/lib/fglrx/libGL.so.1.2.xlibmesa by fglrx«
  »diversion of /usr/lib/libGL.so.1.2
to /usr/lib/fglrx/libGL.so.1.2.xlibmesa by xorg-driver-fglrx« gefunden
dpkg: Fehler beim Bearbeiten von fglrx (--remove):
 Unterprozess installiertes post-removal-Skript gab den Fehlerwert 2
zurück
Verarbeite Trigger für ureadahead ...
Fehler traten auf beim Bearbeiten von:
 fglrx
E: Sub-process /usr/bin/dpkg returned an error code (1)

description: updated
Revision history for this message
werbefaenger (werbefaenger) wrote :

I'm sorry for updating the description, I didn't mean to. I just accidentally double clicked on the exclamation mark on the upper right.
But since I need to comment anyway: I can confirm niklas, the bug still exists for me as well.

Revision history for this message
niklas (skudwig) wrote :

I solved my problem by this solution
http://forum.ubuntuusers.de/topic/nach-upgrade-fglrx-laesst-sich-nicht-deinstal/2/#post-2468538

Basically by deleting the entries from this file "/var/lib/dpkg/diversions" (can be there more than one time)
/usr/lib/libGL.so.1.2
/usr/lib/fglrx/libGL.so.1.2.xlibmesa
xorg-driver-fglrx

than the removal works:

sudo apt-get --purge remove fglrx-kernel-source fglrx-modaliases xorg-driver-fglrx fglrx-amdcccle libamdxvba1

Revision history for this message
werbefaenger (werbefaenger) wrote :

niklas' approach worked for me as well. fglrx now seems to be properly uninstalled and the free ati driver is working without any issues.
Compiz, 3D and KMS work, glxinfo |grep vendor gives
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: Advanced Micro Devices, Inc.

Though I think it's not neccessary to remove fglrx-modaliases since that package (as far as i understand it) exists to tell jockey on which cards the fglrx can be installed. I guess jockey won't work properly without it so it might be useful if you want to install fglrx via jockey sometime in the future. (Correct me if I'm wrong)

Revision history for this message
Donovan (donovan2014) wrote :

The workaround proposed by niklas in mex #7 *works* for me too: now i can uninstall fglrx.

Revision history for this message
Phil Richards (news-derived-software) wrote :

Slightly neater work-around:

dpkg-divert --remove /usr/lib/libGL.so.1.2

Revision history for this message
werbefaenger (werbefaenger) wrote :

I'm not quite sure if this will work for every setup. In my case the lines I had to remove have been in /usr/lib32/ so I guess the command would then be dpkg-divert --remove /usr/lib32/libgl.so.1.2 (I haven't tried it since I've edited var/lib/dpkg/diversions manually)
Platform: amd64

Revision history for this message
Jens Weise (j-weise) wrote :

For me performing step #10:

dpkg-divert --remove /usr/lib/libGL.so.1.2

then apt-get remove steps from #7:

sudo apt-get --purge remove fglrx-kernel-source fglrx-modaliases xorg-driver-fglrx fglrx-amdcccle libamdxvba1

 worked fine

description: updated
Changed in fglrx-installer (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
jrioublanc (jerome-rioublanc) wrote : Re: [Bug 566437] Re: package fglrx 2:8.723.1-0ubuntu2 failed to REMOVE: error exit status 2 - dpkg-divert: mismatch on package - while removing the package
Download full text (5.2 KiB)

Jean-Baptiste,

Thanks for explaining how to remove the driver. Nevertheless, I decided to
move from Radeon HD 4670 to GeForce 210, I gonna install that to my computer
once the fglrx is fully removed.

Best Regards,

Jérôme Rioublanc

2010/5/17 Jean-Baptiste Lallement <email address hidden>

> ** Description changed:
>
> I got this error when trying to remove the ATI/AMD proprietary FGLRX
> graphics driver. Despite the error the driver appears to be "not
> activated" after removal.
> +
> + == Workaround ==
> +
> + Open a terminal and run the following commands:
> + $ sudo dpkg-divert --remove /usr/lib/libGL.so.1.2
> +
> + You can then remove the driver with:
> + $ sudo apt-get --purge remove fglrx-kernel-source fglrx-modaliases
> xorg-driver-fglrx fglrx-amdcccle libamdxvba1
> +
>
> ProblemType: Package
> DistroRelease: Ubuntu 10.04
> Package: fglrx 2:8.723.1-0ubuntu2
> ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
> Uname: Linux 2.6.32-21-generic x86_64
> NonfreeKernelModules: fglrx
> AptOrdering:
> fglrx-amdcccle: Remove
> fglrx: Remove
> Architecture: amd64
> Date: Mon Apr 19 08:27:03 2010
> DkmsStatus:
>
> ErrorMessage: subprocess installed post-removal script returned error exit
> status 2
> InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
> MachineType: ASUSTeK Computer Inc. F3Sa
> ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-21-generic
> root=UUID=1642ac51-cbdf-4627-86e7-e3715e326a66 ro quiet splash
> SourcePackage: fglrx-installer
> Title: package fglrx 2:8.723.1-0ubuntu2 failed to install/upgrade:
> subprocess installed post-removal script returned error exit status 2
> dmi.bios.date: 02/12/2008
> dmi.bios.vendor: American Megatrends Inc.
> dmi.bios.version: 303
> dmi.board.asset.tag: ATN12345678901234567
> dmi.board.name: F3Sa
> dmi.board.vendor: ASUSTeK Computer Inc.
> dmi.board.version: 1.0
> dmi.chassis.asset.tag: ATN12345678901234567
> dmi.chassis.type: 10
> dmi.chassis.vendor: ASUSTeK Computer Inc.
> dmi.chassis.version: 1.0
> dmi.modalias:
> dmi:bvnAmericanMegatrendsInc.:bvr303:bd02/12/2008:svnASUSTeKComputerInc.:pnF3Sa:pvr1.0:rvnASUSTeKComputerInc.:rnF3Sa:rvr1.0:cvnASUSTeKComputerInc.:ct10:cvr1.0:
> dmi.product.name: F3Sa
> dmi.product.version: 1.0
> dmi.sys.vendor: ASUSTeK Computer Inc.
> glxinfo:
> Error: couldn't find RGB GLX visual or fbconfig
> name of display: :0.0
> system:
> distro: Ubuntu
> codename: lucid
> architecture: x86_64
> kernel: 2.6.32-21-generic
>
> ** Changed in: fglrx-installer (Ubuntu)
> Status: Confirmed => Triaged
>
> --
> package fglrx 2:8.723.1-0ubuntu2 failed to REMOVE: error exit status 2 -
> dpkg-divert: mismatch on package - while removing the package
> https://bugs.launchpad.net/bugs/566437
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in “fglrx-installer” package in Ubuntu: Triaged
>
> Bug description:
> I got this error when trying to remove the ATI/AMD proprietary FGLRX
> graphics driver. Despite the error the driver appears to be "not activated"
> after removal.
>
> == Workaround...

Read more...

Revision history for this message
Dennis Baudys (thecondordb) wrote :

Specs of my fully updated Lucid 64 Bit:

- Sony Vaio FW4
- ATI Mobility Radeon HD 4650
- Linux linuropa 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:28:05 UTC 2010 x86_64 GNU/Linux
... with Gnome and newest fglrx from ATI homepage.

This (slightly different) workaround solved my problem. Notice the different path in the first command (lib32 instead of lib):

$ sudo dpkg-divert --remove /usr/lib32/libGL.so.1.2
$ sudo apt-get --purge remove fglrx-kernel-source fglrx-modaliases xorg-driver-fglrx fglrx-amdcccle libamdxvba1

Because of the fact that I had already installed the new fglrx driver from ATI homepage and just wanted to remove the "old remnant" (because of a brightness acpi/dsdt bug that sadly affected me since Lucid again), I did the following after entering the two command above - just to be sure:

### Re-installation of newest fglrx driver downloaded from ATI homepage
$ sudo ./ati-driver-installer-10-5-x86.x86_64.run
$ sudo aticonfig --initial -f
$ sudo init 6

Maybe this is useful to some ppl.
Thx for the workaround.

Dennis

Revision history for this message
Elwoodchicago (elwoodchicago) wrote :

All,

Many thanks for the workaround.
Works for me on VAIO VGN-FW21E (for reference)

cheers,

Revision history for this message
JR (juergen-richtsfeld) wrote :

still happend just now when upgrading from 10.04 to 10.10 beta

Revision history for this message
Honerjetso (honerjetso) wrote :

On upgrade from 10.04 to 10.10 BETA I experienced the same, (I should have researched before jumping in to BETA)..

sudo dpkg-divert --remove /usr/lib32/libGL.so.1.2

Notice the /lib32 not /lib as I am running on a 64bit platform.

This seems to allow a purge to work but leaves some stale directories.

Revision history for this message
jedioetzi (jedioetzi) wrote :

on maverick by uninstalling fglrx:

warning, in file '/var/lib/dpkg/available' near line 59385 package 'virtualbox-3.0':
 error in Version string '3.0.12-54655_Ubuntu_karmic': invalid character in revision number
(Reading database ... 265711 files and directories currently installed.)
Removing fglrx ...
dpkg-divert: mismatch on package
  when removing `diversion of /usr/lib/libGL.so.1.2 to /usr/lib/fglrx/libGL.so.1.2.xlibmesa by fglrx'
  found `diversion of /usr/lib/libGL.so.1.2 to /usr/lib/fglrx/libGL.so.1.2.xlibmesa by xorg-driver-fglrx'
dpkg: error processing fglrx (--purge):
 subprocess installed post-removal script returned error exit status 2
No apport report written because MaxReports is reached already
                                                              Processing triggers for ureadahead ...
Errors were encountered while processing:
 fglrx
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
warning, in file '/var/lib/dpkg/available' near line 59385 package 'virtualbox-3.0':
 error in Version string '3.0.12-54655_Ubuntu_karmic': invalid character in revision number

Revision history for this message
Johan Walles (walles) wrote :

The problem in my case seemed to be that the /var/lib/dpkg/info/fglrx.postrm script refered to...
  /usr/lib/libGL.so.1.2

... but should have referred to...
  /usr/lib/mesa/libGL.so.1.2

... in two places.

Changing those two enabled me to remove fglrx.

Robert Hooker (sarvatt)
Changed in fglrx-installer (Ubuntu Natty):
assignee: nobody → Alberto Milone (albertomilone)
Changed in fglrx-installer (Ubuntu Natty):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package fglrx-installer - 2:8.801-0ubuntu1

---------------
fglrx-installer (2:8.801-0ubuntu1) natty; urgency=low

  * New upstream release 8.801 (10-12).
  * debian/control:
    - Add Vcs-Git and Vcs-Browser.
  * debian/fglrx.postrm:
    - Do not remove diversions. Those diversions were likely installed by older
      releases of the driver (since we don't use diversions any more). Any
      diversion should be removed in fglrx.preinst, as it's exactly where we
      remove all other diversions (LP: #566437).
  * debian/fglrx.prerm:
    - Call dpkg-trigger with --by-package=$PACKAGE_NAME.
  * Add support for blacklisting card ids from GRUB gfxpayload=keep:
    - In Natty gfxpayload=keep is set by default so as to provide a framebuffer
      early in the boot process. Some cards don't play nicely with it, therefore
      we need to blacklist them in a file. The format is a sequence of lines of
      the following form:
        vVENDORdDEVICEsvSUBVENDORsdSUBDEVICEbcBASECLASSscSUBCLASS
      Blacklist lines are regex-matched against a corresponding PCI ID string.
      In practice this means that you can replace any part of the ID string
      with .* to match anything.
 -- Alberto Milone <email address hidden> Mon, 03 Jan 2011 14:00:56 +0100

Changed in fglrx-installer (Ubuntu Natty):
status: In Progress → Fix Released
Revision history for this message
Jarl (jarl-dk) wrote :

Just happened to me as well when upgrading from 10.04 to 10.10:
I fixed it with
sudo dpkg-divert --remove /usr/lib/libGL.so.1.2
sudo dpkg-divert --remove /usr/lib32/libGL.so.1.2
sudo apt-get purge fglrx

Revision history for this message
Jarl (jarl-dk) wrote :

@Alberto and others: May I suggest a SRU (Stable Release Update) to 10.10 Maverick and/or 10.04 Lucid to save the (non-technical) users that have not yet upgraded from 10.04 to 10.10 from a bad user-experience.

Please...

Changed in fglrx-installer (Ubuntu Lucid):
milestone: none → ubuntu-10.04.2
Changed in fglrx-installer (Ubuntu Lucid):
milestone: ubuntu-10.04.2 → ubuntu-10.04.3
Colin Watson (cjwatson)
Changed in fglrx-installer (Ubuntu Lucid):
milestone: ubuntu-10.04.3 → ubuntu-10.04.4
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in fglrx-installer (Ubuntu Lucid):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Alberto, this is targetted for 10.04.4. Can this fix easily be backported to lucid? If not, we should just drop the milestone. Thanks!

Changed in fglrx-installer (Ubuntu Lucid):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
Revision history for this message
Alberto Milone (albertomilone) wrote :

I've just uploaded fglrx-installer 2:8.723.1-0ubuntu6 in lucid-proposed which contains both the fix for this bug and the other correction for dpkg-trigger from 2:8.801-0ubuntu1.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Marco, or anyone else affected,

Accepted fglrx-installer into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in fglrx-installer (Ubuntu Lucid):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Could anyone please try the packages in lucid-proposed and confirm that they still work as intended? Would be good to get them into 10.04.4.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Lucid:
I have reproduced the problem with fglrx 2:8.723.1-0ubuntu5 in lucid-updates and have verified that the version of fglrx 2:8.723.1-0ubuntu6 in -proposed fixes the issue.

Marking as verification-done

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package fglrx-installer - 2:8.723.1-0ubuntu6

---------------
fglrx-installer (2:8.723.1-0ubuntu6) lucid-proposed; urgency=low

  * debian/fglrx.postrm:
    - Do not remove diversions. Those diversions were likely installed by older
      releases of the driver (since we don't use diversions any more). Any
      diversion should be removed in fglrx.preinst, as it's exactly where we
      remove all other diversions (LP: #566437).
  * debian/fglrx.prerm:
    - Call dpkg-trigger with --by-package=$PACKAGE_NAME.
 -- Alberto Milone <email address hidden> Fri, 20 Jan 2012 12:01:17 +0100

Changed in fglrx-installer (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.