This forum has been archived. All content is frozen. Please use KDE Discuss instead.

can't upgrade graphics drivers (package management broken?)

Tags: None
(comma "," separated)
User avatar
dchmelik
Registered Member
Posts
54
Karma
0
OS
Recent months Ubuntu amdgpu rocm drivers (for OpenCL) crash login so I'm trying to upgrade but doesn't work. The below happens every time.

Code: Select all
root@Hilltop-Heaven:~# apt-get update && apt-get dist-upgrade
Get:1 file:/var/lib/preinstalled-pool focal InRelease
Ign:1 file:/var/lib/preinstalled-pool focal InRelease
Get:2 file:/var/lib/preinstalled-pool focal Release [3949 B]
Get:2 file:/var/lib/preinstalled-pool focal Release [3949 B]
Hit:4 https://repo.radeon.com/amdgpu/22.20/ubuntu focal InRelease
Hit:5 https://repo.radeon.com/amdgpu/22.20.1/ubuntu focal InRelease
Hit:6 https://repo.radeon.com/rocm/apt/5.2.1 ubuntu InRelease
Hit:8 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:9 http://archive.ubuntu.com/ubuntu focal InRelease
Get:10 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:11 http://archive.neon.kde.org/user focal InRelease [162 kB]
Hit:12 http://ppa.launchpad.net/gridcoin/gridcoin-stable/ubuntu focal InRelease
Hit:13 http://ppa.launchpad.net/luke-jr/db48/ubuntu focal InRelease
Hit:14 http://ppa.launchpad.net/saiarcot895/chromium-beta/ubuntu focal InRelease
Hit:7 http://versaweb.dl.sourceforge.net/project/ubuntuzilla/mozilla/apt all InRelease
Err:15 http://download.opensuse.org/repositories/home:/ungoogled_chromium/Ubuntu_Focal  InRelease
  Temporary failure resolving 'download.opensuse.org'
Get:16 http://download.opensuse.org/repositories/home:/hawkeye116477:/waterfox/xUbuntu_20.04  InRelease [1589 B]
Hit:17 https://packages.microsoft.com/repos/edge stable InRelease
Err:18 http://dl.google.com/linux/earth/deb stable InRelease
  Temporary failure resolving 'dl.google.com'
Fetched 278 kB in 30s (9154 B/s)
Reading package lists... Done
W: Failed to fetch http://dl.google.com/linux/earth/deb/dists/stable/InRelease  Temporary failure resolving 'dl.google.com'
W: Failed to fetch http://download.opensuse.org/repositories/home:/ungoogled_chromium/Ubuntu_Focal/InRelease  Temporary failure resolving 'download.opensuse.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libgl1-amdgpu-mesa-dri : PreDepends: mesa-amdgpu-va-drivers (= 1:22.1.0.50200-1438746~20.04) but 1:22.1.0.50201-1447096~20.04 is installed
                          Recommends: libtxc-dxtn-s2tc0 but it is not installable or libtxc-dxtn0 but it is not installable
 mesa-amdgpu-va-drivers : Depends: libllvm14.0.50201-amdgpu but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
root@Hilltop-Heaven:~# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies...Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following additional packages will be installed:
  libgl1-amdgpu-mesa-dri libllvm14.0.50201-amdgpu
Suggested packages:
  libglide3
Recommended packages:
  libtxc-dxtn-s2tc0 | libtxc-dxtn0
The following NEW packages will be installed:
  libllvm14.0.50201-amdgpu
The following packages will be upgraded:
  libgl1-amdgpu-mesa-dri
1 upgraded, 1 newly installed, 0 to remove and 23 not upgraded.
15 not fully installed or removed.
Need to get 0 B/24.9 MB of archives.
After this operation, 78.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 707670 files and directories currently installed.)
Preparing to unpack .../libllvm14.0.50201-amdgpu_1%3a14.0.50201-1447096~20.04_amd64.deb ...
Unpacking libllvm14.0.50201-amdgpu:amd64 (1:14.0.50201-1447096~20.04) ...
dpkg: error processing archive /var/cache/apt/archives/libllvm14.0.50201-amdgpu_1%3a14.0.50201-1447096~20.04_amd64.deb (--unpack):
 trying to overwrite '/opt/amdgpu/lib/x86_64-linux-gnu/llvm-14.0/lib/libLLVM-14.so', which is also in package libllvm14.0.50200-amdgpu:amd64 1:14.0.50200-1438746~20.04
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libllvm14.0.50201-amdgpu_1%3a14.0.50201-1447096~20.04_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


Unclear to me whether it's http://repo.radeon.com/rocm/apt/5.2.1/pool/main/r/rocm-llvm/rocm-llvm_14.0.0.22204.50201-79_amd64.deb.


programmer since 1993, UNIX user since 1997, X/KDE user since '0s, forum member since 2008-11
User avatar
claydoh
Registered Member
Posts
1170
Karma
9
OS
dchmelik wrote:
Code: Select all
...
dpkg: error processing archive /var/cache/apt/archives/libllvm14.0.50201-amdgpu_1%3a14.0.50201-1447096~20.04_amd64.deb (--unpack):
 trying to overwrite '/opt/amdgpu/lib/x86_64-linux-gnu/llvm-14.0/lib/libLLVM-14.so', which is also in package libllvm14.0.50200-amdgpu:amd64 1:14.0.50200-1438746~20.04
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libllvm14.0.50201-amdgpu_1%3a14.0.50201-1447096~20.04_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


From that error, and the others, it looks like there are problems in AMD's packaging. You could force it to overwrite (probably safe, for this specific error), but the much safer route would probably be to uninstall the AMDPGPU-PRO packages (using amdgpu-install --uninstall ) and then try installing them fresh, so there won't be any existing AMD package versions on your system to conflict with the ones being installed

If you want to try forcing:
Code: Select all
sudo dpkg -i --force-overwrite  /var/cache/apt/archives/libllvm14.0.50201-amdgpu_1%3a14.0.50201-1447096~20.04_amd64.deb

Then
Code: Select all
sudo apt -f install
sudo dpkg --configure -i


running apt update and apt full-upgrade after won't hurt.

Not 100% sure if this will fix all the packaging dependency errors in the end though. Uninstalling the existing packages, and then reinstalling the new ones seems easier in the long run.


claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
User avatar
dchmelik
Registered Member
Posts
54
Karma
0
OS
I don't know why you're saying sudo when I'm a decades root UNIX/GNU/Linux user. Your commands didn't work. AMD doesn't make clear where new packages are; installer gets ROCm 4.5.1 but 5.2.1 is out.

Code: Select all
root@Hilltop-Heaven:~# dpkg -i --force-overwrite  /var/cache/apt/archives/libllvm14.0.50201-amdgpu_1%3a14.0.50201-1447096~20.04_amd64.deb
(Reading database ... 707673 files and directories currently installed.)
Preparing to unpack .../libllvm14.0.50201-amdgpu_1%3a14.0.50201-1447096~20.04_amd64.deb ...
Unpacking libllvm14.0.50201-amdgpu:amd64 (1:14.0.50201-1447096~20.04) over (1:14.0.50201-1447096~20.04) ...
dpkg: dependency problems prevent configuration of libllvm14.0.50201-amdgpu:amd64:
 libllvm14.0.50201-amdgpu:amd64 depends on amdgpu-core; however:
  Package amdgpu-core is not configured yet.

dpkg: error processing package libllvm14.0.50201-amdgpu:amd64 (--install):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Errors were encountered while processing:
 libllvm14.0.50201-amdgpu:amd64
root@Hilltop-Heaven:~# amdgpu-install --uninstall
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 amdgpu-lib : Depends: amdgpu-core but it is not going to be installed
 comgr : Depends: rocm-core but it is not going to be installed
 gst-omx-amdgpu : Depends: amdgpu-core but it is not going to be installed
 hip-runtime-amd : Depends: rocm-core but it is not going to be installed
 hsa-rocr : Depends: rocm-core but it is not going to be installed
 hsa-rocr-dev : Depends: rocm-core but it is not going to be installed
 hsakmt-roct-dev : Depends: rocm-core but it is not going to be installed
 libdrm-amdgpu-common : Depends: amdgpu-core but it is not going to be installed
 libdrm2-amdgpu : Depends: amdgpu-core but it is not going to be installed
 libegl1-amdgpu-mesa : Depends: amdgpu-core but it is not going to be installed
 libgbm1-amdgpu : Depends: amdgpu-core but it is not going to be installed
 libgl1-amdgpu-mesa-dri : PreDepends: mesa-amdgpu-va-drivers (= 1:22.1.0.50200-1438746~20.04) but 1:22.1.0.50201-1447096~20.04 is to be installed
                          Depends: amdgpu-core but it is not going to be installed
                          Recommends: libtxc-dxtn-s2tc0 but it is not installable or
                                      libtxc-dxtn0 but it is not installable
 libglapi-amdgpu-mesa : Depends: amdgpu-core but it is not going to be installed
 libllvm14.0.50200-amdgpu : Depends: amdgpu-core but it is not going to be installed
 libllvm14.0.50201-amdgpu : Depends: amdgpu-core but it is not going to be installed
 libva2-amdgpu : Depends: amdgpu-core but it is not going to be installed
 libwayland-amdgpu-client0 : Depends: amdgpu-core but it is not going to be installed
 libwayland-amdgpu-egl1 : Depends: amdgpu-core but it is not going to be installed
 libwayland-amdgpu-server0 : Depends: amdgpu-core but it is not going to be installed
 mesa-amdgpu-va-drivers : Depends: amdgpu-core but it is not going to be installed
 mesa-amdgpu-vdpau-drivers : Depends: amdgpu-core but it is not going to be installed
 rocm-hip-runtime : Depends: rocm-core (= 5.2.0.50200-65) but it is not going to be installed
 rocm-language-runtime : Depends: rocm-core (= 5.2.0.50200-65) but it is not going to be installed
 rocm-llvm : Depends: rocm-core but it is not going to be installed
 rocm-ocl-icd : Depends: rocm-core but it is not going to be installed
 rocm-opencl : Depends: rocm-core but it is not going to be installed
 rocm-opencl-runtime : Depends: rocm-core (= 5.2.0.50200-65) but it is not going to be installed
 rocminfo : Depends: rocm-core but it is not going to be installed
 xserver-xorg-amdgpu-video-amdgpu : Depends: amdgpu-core but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).


Actually 'apt -f install' after that may have done something but then...
Code: Select all
root@Hilltop-Heaven:~# dpkg --configure -i
dpkg: error: conflicting actions -i (--install) and  (--configure)

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !


programmer since 1993, UNIX user since 1997, X/KDE user since '0s, forum member since 2008-11
User avatar
claydoh
Registered Member
Posts
1170
Karma
9
OS
-
I don't know why you're saying sudo
because this is what 99.5% of us use, even after 2+ decades on Linux. it is what the OS is set up and designed for, like most of them. One can leave it off, of course, knowing quite well that it is not necessary for you.

And I did have a typo, many apologies.
Code: Select all
dpkg --configure -a
, not -i Again, sorry for that one.
This will attempt to finish installing/configuring any packages that might have failed to do so.
Surprised that you didn't catch it, being an experienced Linux user and all.

You have bunged up package dependencies all based on the AMD-provides ones, which is why I suggested the sane, safer route of uninstalling the old AMD packages, and reinstalling , which would not have the conflicts, as there wouldn't be any pre-existing, old AMD-sourced packages on the system to create this dependency hell to begin with.


I don't know why it isn't working for you, particularly the amdgpu-install command. For me, it runs an apt update, then nothing as I had already removed it. But it still does something, and the other day it did uninstall all the AMD-souirced packages.

I know the amdgpu-pro install process is a bit different from what it used to be until fairly recently. All the how-tos and such I looked at were outdated. I wonder if this is a potential cause for some of the trouble, if your driver installation was done some time ago? I dunno.

Also, in your output, it does mention running 'apt --fix-broken install', which is the same as running 'apt -f install', have you tried that?

In any case, I am out of ideas. I am able to install, remove, and reinstall all the drivers, or just the OpenCL stuff at will on my system.


claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
User avatar
dchmelik
Registered Member
Posts
54
Karma
0
OS
claydoh wrote:
Code: Select all
dpkg --configure -a

Thanks: fixed! However like more their versions in recent months, OpenCL doesn't work but this time even with relatively new cards... but we'll see if it at least boots to login.

I suggested the sane, safer route of uninstalling the old AMD packages, and reinstalling

I did.

I don't know why it isn't working for you, particularly the amdgpu-install command [...]

Because outdated: installs ROCm 4 but I set to install latest stable ROCm 5 so some steps are manual (documented).


programmer since 1993, UNIX user since 1997, X/KDE user since '0s, forum member since 2008-11


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, mickae, Sogou [Bot]