• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

depmod hangs while trying to install nVidia's drivers

Joined
Feb 18, 2010
Messages
1,850 (0.33/day)
System Name Eldritch
Processor AMD Ryzen 5 5800X3D
Motherboard ASUS TUF X570 Pro Wifi
Cooling Satan's butthole after going to Taco Bell
Memory 64 GB G.Skill TridentZ
Video Card(s) Vega 56
Storage 6*8TB Western Digital Blues in RAID 6, 2*512 GB Samsung 960 Pros
Display(s) Acer CB281HK
Case Phanteks Enthoo Pro PH-ES614P_BK
Audio Device(s) ASUS Xonar DX
Power Supply EVGA Supernova 750 G2
Mouse Razer Viper 8K
Software Debian Bullseye
Code:
hellrazor@eldritch:~$ sudo apt install nvidia-driver
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  nvidia-kernel-dkms
The following NEW packages will be installed:
  nvidia-driver nvidia-kernel-dkms
0 upgraded, 2 newly installed, 0 to remove and 11 not upgraded.
Need to get 0 B/9,323 kB of archives.
After this operation, 27.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Selecting previously unselected package nvidia-kernel-dkms.
(Reading database ... 313020 files and directories currently installed.)
Preparing to unpack .../nvidia-kernel-dkms_390.77-1_amd64.deb ...
Unpacking nvidia-kernel-dkms (390.77-1) ...
Selecting previously unselected package nvidia-driver.
Preparing to unpack .../nvidia-driver_390.77-1_amd64.deb ...
Unpacking nvidia-driver (390.77-1) ...
Setting up nvidia-kernel-dkms (390.77-1) ...
Loading new nvidia-current-390.77 DKMS files...
Building for 4.17.0-3-amd64
Building initial module for 4.17.0-3-amd64
Done.

nvidia-current.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.17.0-3-amd64/updates/dkms/

nvidia-current-modeset.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.17.0-3-amd64/updates/dkms/

nvidia-current-drm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.17.0-3-amd64/updates/dkms/

nvidia-current-uvm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.17.0-3-amd64/updates/dkms/

depmod...

'bout the gist of it.
 
Which distribution are you using? Also, are the specifications for this build the ones listed on your profile?
 
Debian Buster, and yeah.
 
I personally don't use and haven't used Linux with NVIDIA for a while, so I do not know how much help I can be. I had a quick Google search using the kernel version and driver version but couldn't see anything related.

The output doesn't seem to give much indication to what the problem could be. However, perhaps you could grep from dmesg after it hangs? Something like:
Code:
dmesg | grep depmod
 
Nope, doesn't come up with anything.
 
It's not an isolated issue; mine hangs at the exact same stage:


Code:
root@Carly:~# apt install -y ocl-icd-libopencl1 nvidia-driver nvidia-cuda-toolkit
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
root@Carly:~# dpkg --configure -a
Processing triggers for glx-alternative-nvidia (0.8.7) ...
update-alternatives: using /usr/lib/nvidia to provide /usr/lib/glx (glx) in auto mode
Setting up nvidia-kernel-dkms (390.77-1) ...
Removing old nvidia-current-390.77 DKMS files...

-------- Uninstall Beginning --------
Module:  nvidia-current
Version: 390.77
Kernel:  4.17.0-kali3-amd64 (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

nvidia-current.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.17.0-kali3-amd64/updates/dkms/
rmdir: failed to remove 'updates/dkms': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


nvidia-current-modeset.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.17.0-kali3-amd64/updates/dkms/
rmdir: failed to remove 'updates/dkms': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


nvidia-current-drm.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.17.0-kali3-amd64/updates/dkms/
rmdir: failed to remove 'updates/dkms': Directory not empty
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


nvidia-current-uvm.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.17.0-kali3-amd64/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod...

DKMS: uninstall completed.

------------------------------
Deleting module version: 390.77
completely from the DKMS tree.
------------------------------
Done.
Loading new nvidia-current-390.77 DKMS files...
Building for 4.17.0-kali3-amd64
Building initial module for 4.17.0-kali3-amd64
Done.

nvidia-current.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.17.0-kali3-amd64/updates/dkms/

nvidia-current-modeset.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.17.0-kali3-amd64/updates/dkms/

nvidia-current-drm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.17.0-kali3-amd64/updates/dkms/

nvidia-current-uvm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.17.0-kali3-amd64/updates/dkms/

depmod...

It seems to create the file okay, but can't seem to finalize installation:
Screenshot from 2018-08-28 11-00-42.png


Permissions all look good as well. I will keep digging after work and will post back if I find a solution.
 
Okay. Well, I "solved" the issue by purging the drivers and installing the ones from nVidia's website. I had to tell it to not make a DKMS module or it would also freeze - so maybe it's a DKMS thing, I don't know.
 
Edit: fixed sentence structure

That [the solution] coincides with something I read up on before I had to go to work - that the ABIs in the new kernel aren't compatible. It was all a bit out of my area of expertise, but seems to make sense being solved by installing straight from nVidia:


Installation
Kernel

As mentioned above, the NVIDIA kernel driver installs and runs against the current kernel. It builds as a module, so the kernel must support the loading of kernel modules (see below).
The kernel module (nvidia.ko) consists of a proprietary part (commonly known as the "binary blob") which drives the graphics chip(s), and an open source part (the "glue") which at runtime acts as intermediary between the proprietary part and the kernel. These all need to work nicely together as otherwise the user might be faced with data loss (through kernel panics, X servers crashing with unsaved data in X applications) and even hardware failure (overheating and other power management related issues should spring to mind).
Kernel compatibility

From time to time, a new kernel release changes the internal ABI for drivers, which means all drivers that use those ABIs must be changed accordingly. For open source drivers, especially those distributed with the kernel, these changes are nearly trivial to fix since the entire chain of calls between drivers and other parts of the kernel can be reviewed quite easily. For proprietary drivers like nvidia.ko, it doesn't work quite the same. When the internal ABIs change, then it is not possible to merely fix the "glue", because nobody knows how the glue is used by the proprietary part. Even after managing to patch things up to have things seem to work nicely, the user still risks that running nvidia.ko in the new, unsupported kernel will lead to data loss and hardware failure.
https://wiki.gentoo.org/wiki/NVidia/nvidia-drivers
 
I have the same issue.

Apparently it may be because you have some older linux-headers or linux-source installed, but I have purged both and reinstalled the latest (same as linux-image) and still not installing.
 
It is really weird. I never had issue with depmod.

Do you see depmod in process list when it is hanging? Is it consuming CPU or idle? Maybe depmod crashed and dkms do not handle that error case correctly. There should dkms logs somewhere in /var
 
Back
Top