Zypper Remove Fails

Tinkered with amdgpu and ran into the follwing problem:

Reading installed packages...
Resolving package dependencies...

The following package is going to be REMOVED:
  amdgpu-dkms

1 package to remove.
After the operation, 224.1 MiB will be freed.
Continue? [y/n/v/...? shows all options] (y): (1/1) Removing amdgpu-dkms-1:5.9.10.69-1234663.noarch ....error]
Removal of (115)amdgpu-dkms-1:5.9.10.69-1234663.noarch(@System) failed:
Error: Subprocess failed. Error: RPM failed: Error! There are no instances of module: amdgpu
5.9.10.69-1234663 located in the DKMS tree.
error: %preun(amdgpu-dkms-1:5.9.10.69-1234663.noarch) scriptlet failed, exit status 3
error: amdgpu-dkms-1:5.9.10.69-1234663.noarch: erase failed

Abort, retry, ignore? [a/r/i] (a): Problem occurred during or after installation or removal of packages:
Installation has been aborted as directed.
Please see the above error message for a hint.

Any idea?

See https://en.opensuse.org/SDB:Zypper_troubleshooting, can you run:

ZYPP_LOGFILE=zypper-refresh-updates.log zypper remove amdgpu-dkms

And try to find the rpm command, if that does not work, add “ZYPP_FULLLOG=1”

When you have the rpm command, add -v to the command and run it stand-alone.

What exactly is not clear in

error: %preun(amdgpu-dkms-1:5.9.10.69-1234663.noarch) scriptlet failed, exit status 3

? Read what this script does and find out why this script fails.

The following action fails:

**3400G:~ #** dkms remove -m amdgpu -v 5.9.10.69-1234663 --all --rpm_safe_upgrade                 
Error! There are no instances of module: amdgpu 
5.9.10.69-1234663 located in the DKMS tree. 
**3400G:~ #**

I am unfamiliar with dkms. Thus I am unsure which changes to make by hand. Will manual removal of the files of the package and running ‘dracut -f’ afterwards fix the problem?

Hi
It’s the rpm macro and script not working…


rpm -e --noscripts amdgpu-dkms

Great. There were 2 instances of the package. Actually I needed to run rpm -e --noscripts --allmatches amdgpu-dkms-1:5.9.10.69-1234663.

Alas running ./amdgpu-install --uninstall does not restore the previous configuration. Rollback failed too.The display-manager now aborts with:

**3400G:~ #** journalctl -b -1 -u display-manager.service  
-- Logs begin at Sat 2021-04-10 07:06:35 CEST, end at Sat 2021-04-10 15:46:45 CEST. -- 
Apr 10 15:42:16 3400G systemd[1]: Starting X Display Manager... 
Apr 10 15:42:16 3400G display-manager[819]: /etc/vconsole.conf available 
Apr 10 15:42:16 3400G display-manager[819]: KEYMAP: de-latin1-nodeadkeys 
Apr 10 15:42:16 3400G display-manager[819]: Command: localectl set-keymap de-latin1-nodeadkeys 
Apr 10 15:42:16 3400G display-manager[819]: I: Using systemd /usr/share/systemd/kbd-model-map mapping 
Apr 10 15:42:16 3400G sddm[884]: Initializing...
Apr 10 15:42:16 3400G sddm[884]: Starting...
Apr 10 15:42:16 3400G sddm[884]: Logind interface found
Apr 10 15:42:16 3400G sddm[884]: Adding new display on vt 7 ...
Apr 10 15:42:16 3400G sddm[884]: Loading theme configuration from ""
Apr 10 15:42:16 3400G sddm[884]: Display server starting...
Apr 10 15:42:16 3400G sddm[884]: Running: /usr/bin/X -nolisten tcp -auth /run/sddm/{4d13b518-d066-4558-ab1e-a5dc20cf9699} -background none -noreset -displayfd 17 -seat seat0 vt7
Apr 10 15:42:17 3400G sddm[884]: **Failed to read display number from pipe**
Apr 10 15:42:17 3400G sddm[884]: **Could not start Display server on vt 7**
Apr 10 15:42:17 3400G systemd[1]: Started X Display Manager. 
Apr 10 15:43:54 3400G systemd[1]: Stopping X Display Manager... 
Apr 10 15:43:54 3400G sddm[884]: **Signal received: SIGTERM**
Apr 10 15:43:54 3400G display-manager[804]: Starting service sddm 
Apr 10 15:43:54 3400G systemd[1]: display-manager.service: Succeeded. 
Apr 10 15:43:54 3400G systemd[1]: Stopped X Display Manager. 
**3400G:~ #**

Hi
What about rpms installed from the amdgpu repo? I use it here, but not dkms and not for display, just offload;


zypper se -sir amdgpu-pro-local

If you run the install routine rather than uninstall, for me that’s all I did, the uninstall, the rpm command and then install.

I want to get rid of amdgpu-pro and use again amdgpu. I made sure all packages from amdgpu-pro-local are removed, ran dracut -f and rebooted. But display-manager is still broken.

Hi
I don’t use the driver, just the libraries with;


./amdgpu-install --opencl=legacy,rocr --headless --no-dkms

I have installed;


 zypper se -sir amdgpu-pro-local

S  | Name                       | Type    | Version             | Arch   | Repository
---+----------------------------+---------+---------------------+--------+--------------------------------
i  | amdgpu-core                | package | 20.50-1234663       | noarch | AMD amdgpu Pro local repository
i  | amdgpu-dkms                | package | 1:5.9.10.69-1234663 | noarch | AMD amdgpu Pro local repository
i  | amdgpu-dkms-firmware       | package | 1:5.9.10.69-1234663 | noarch | AMD amdgpu Pro local repository
i  | amdgpu-pro-core            | package | 20.50-1234663       | noarch | AMD amdgpu Pro local repository
i+ | amdgpu-pro-rocr-opencl     | package | 20.50-1234663       | x86_64 | AMD amdgpu Pro local repository
i+ | amdgpu-versionlist         | package | 20.50-1234663       | noarch | AMD amdgpu Pro local repository
i+ | clinfo-amdgpu-pro          | package | 20.50-1234663       | x86_64 | AMD amdgpu Pro local repository
i  | comgr-amdgpu-pro           | package | 1.9.0-1234663       | x86_64 | AMD amdgpu Pro local repository
i  | hip-rocr-amdgpu-pro        | package | 20.50-1234663       | x86_64 | AMD amdgpu Pro local repository
i  | hsa-runtime-rocr-amdgpu    | package | 1.2.0-1234663       | x86_64 | AMD amdgpu Pro local repository
i  | hsakmt-roct-amdgpu         | package | 1.0.9-1234663       | x86_64 | AMD amdgpu Pro local repository
i  | libdrm-amdgpu              | package | 1:2.4.100-1234663   | x86_64 | AMD amdgpu Pro local repository
i  | libdrm-amdgpu-common       | package | 1.0.0-1234663       | noarch | AMD amdgpu Pro local repository
i  | ocl-icd-amdgpu-pro         | package | 20.50-1234663       | x86_64 | AMD amdgpu Pro local repository
i+ | opencl-orca-amdgpu-pro-icd | package | 20.50-1234663       | x86_64 | AMD amdgpu Pro local repository
i  | opencl-rocr-amdgpu-pro     | package | 20.50-1234663       | x86_64 | AMD amdgpu Pro local repository

Tried that, but no success. Removed Mesa. Reinstalled package Mesa and patterns removed. This undid the changes made by ./amdgpu-install:

**3400G:~ #** zypper rm --dry-run Mesa 
Reading installed packages... 
Resolving package dependencies... 

The following 28 packages are going to be REMOVED:
  Mesa Mesa-dri Mesa-gallium Mesa-libGL1 kcm_tablet kcm_tablet-lang patterns-base-x11 patterns-base-x11_enhanced patterns-games-games patterns-kde-kde patterns-kde-kde_plasma plasma5-session-wayland xf86-input-evdev xf86-input-joystick xf86-input-keyboard xf86-input-libinput xf86-input-vmmouse xf86-input-wacom xf86-video-amdgpu xf86-video-ati xf86-video-fbdev xf86-video-mach64 xf86-video-r128 xf86-video-vesa xorg-x11-driver-video xorg-x11-server xorg-x11-server-Xvfb xorg-x11-server-extra 

The following 5 patterns are going to be REMOVED:
  games kde kde_plasma x11 x11_enhanced 

28 packages to remove. 
After the operation, 83.5 MiB will be freed. 
**Continue? [y/n/v/...? shows all options] (y): **
**3400G:~ #**