updates - circular dependencies

When installing update, response comes back:

Check if you are using third party repositories. If so disable them, since they are a common source of problems. Furthermore run the following command in a Terminal: apt-get install -f Transaction failed: The package system is broken The following packages have unmet dependencies:

libglx-mesa0:
Depends: libglapi-mesa (= 18.0.5-0ubuntu0~18.04.1) but 18.2.2-0ubuntu1~18.04.1 is installed
Depends: libx11-6 (>= 2:1.4.99.1) but 2:1.6.4-3ubuntu0.1 is installed
Depends: libxdamage1 (>= 1:1.1) but 1:1.1.4-3 is installed
Depends: zlib1g (>= 1:1.1.4) but 1:1.2.11.dfsg-0ubuntu2 is installed

nothing else is running (no, no X11 either)—

lsmod | grep nvidia.drm returns
nvidia_drm 40960 2
nvidia_modeset 1089536 2
nvidia_drm
drm_kms_helper 172032 2
nvidia_drm,i915 drm 401408 16
drm_kms_helper,
nvidia_drm,i915

sudo modprobe -rf nvidia_drm seems to work as does sudo modprobe -rf nvidia_modeset

However, lsmod | grep nvidia.drm shows them to still be there

sudo modprobe -rf drm_kms_helper yields
modprobe: FATAL: Module drm is in use.

same with sudo modprobe -rf drm

an attempt to upgrade the Nvidia driver to the latest (download and run) gives:

ERROR: An NVIDIA kernel module ‘nvidia-drm’ appears to already be loaded in your kernel. This may be because it is in use (for example, by an X server, a CUDA program, or the NVIDIA Persistence Daemon), but this may also happen if your kernel was configured without support for module unloading. Please be sure to exit any programs that may be using the GPU(s) before attempting to upgrade your driver. If no GPU-based programs are running, you know that your kernel supports module
unloading, and you still receive this message, then an error may have occured that has corrupted an NVIDIA kernel module’s usage count, for which the simplest remedy is to reboot your computer

switching to su, I ran systemctl isolate multi-user.target which killed the computer, and upon reload, same problem

I’m at an impass… ANYONE???

Still no response… does this mean that no one else has experienced this problem?? Am I on my own??

Your post is just confusing, it makes my head spin. It contains a lot of info but nothing useful. From the package names, I can see that you’re using

Ubuntu 18.04

How did you initially install the nvidia driver, from Ubuntu repo, graphics ppa, nvidia downloadable .deb, .run installer?
Please post the output of

sudo dpkg -l nvidia*

Did you also install cuda?

Trust me, it is making my head spin as well. Hence the title “Circular dependencies”…
Sudo dpkg -l nvidia* gives me:

pi nvidia-396 396.44-0ubuntu1 amd64 NVIDIA binary driver - version 396.44
ii nvidia-396-dev 396.44-0ubuntu1 amd64 NVIDIA binary Xorg driver development files
un nvidia-common (no description available)
rc nvidia-compute-utils-396 396.54-0ubuntu0~gp amd64 NVIDIA compute utilities
un nvidia-current (no description available)
rc nvidia-dkms-396 396.54-0ubuntu0~gp amd64 NVIDIA DKMS package
un nvidia-dkms-kernel (no description available)
un nvidia-driver-binary (no description available)
un nvidia-kernel-common (no description available)
rc nvidia-kernel-common-396 396.54-0ubuntu0~gp amd64 Shared files used with the kernel module
un nvidia-kernel-source-396 (no description available)
un nvidia-legacy-340xx-vdpau-d (no description available)
un nvidia-libopencl1-396 (no description available)
un nvidia-libopencl1-dev (no description available)
ii nvidia-modprobe 396.44-0ubuntu1 amd64 Load the NVIDIA kernel driver and create device files
un nvidia-opencl-icd (no description available)
pi nvidia-opencl-icd-396 396.44-0ubuntu1 amd64 NVIDIA OpenCL ICD
un nvidia-persistenced (no description available)
ii nvidia-prime 0.8.8.2 all Tools to enable NVIDIA’s Prime
ii nvidia-settings 415.27-0ubuntu0~gp amd64 Tool for configuring the NVIDIA graphics driver
un nvidia-settings-binary (no description available)
un nvidia-smi (no description available)
un nvidia-vdpau-driver (no description available)

You have parts from different nvidia drivers installed. Run

sudo apt-get remove --purge nvidia-*

to remove them all. If you used the .run installer meanwhile, run it again with the --uninstall option.
Then upgrade your HWE stack:
sudo ap-get remove --purge nvidia-*
and update your system.
If everythings works, you can reinstall the driver from ppa:
https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa

I suffer from the same issue. I cannot install nvidia .run driver because of this nvidia-drm crap. And seems no one has any real solution. I just convinced that linux is nothing but crap and nvidia’s driver should be threw in the nearest dumpster.

Ok try doing this and let me know:
“blacklist nvidia” line to
/etc/modprobe.d/blacklist.conf
and rebooted the machine.

sudo apt-get remove --uninstall nvidia-*
sudo apt-get remove --purge nvidia-*
sudo apt-get autoremove

install the driver now?!

I have no idea what you’re trying to do and why and on what kind of hardware. Please open a new thread and give more details.

I’m trying to help that dude to overcome the problem of installing nvdiai-linux-64-XXXX.XX.run driver. For desktop has nvida graphic card installed.

Ok this one worked pretty well for me. I’m running ubuntu 18.04 LTS and have nvidia rtx 2060. This would solve the problem just follow these steps:

REMOVE INSTALLED NVIDIA DRIVER FIRST

sudo apt-get remove --purge nvidia-* sudo apt-get autoremove
sudo apt update sudo reboot now

Now try to install the driver using

$ sudo sh NVIDIA-Linux-x86_64-XXX.XX.run

If have some conflict process such as residual unused kernel such as “nvidia-drm” do the following

logoff

in the login screen click ctrl+alt+F2 to get to tty2 screen

login usinf su account and do the following:

$ sudo -i

And close all the processes use GPU, and disable nvidia driver:

systemctl isolate multi-user.target

This might prompt you to relogin and then

$ sudo modprobe -r nvidia-drm

And then we can reinstall the GPU driver.

And the conclusion of this is
Don’t use the .run installer unless you know exactly what you’re doing.