6

as mentioned in the title all DKMS modules installed on my system won't be automatically rebuilt after a kernel upgrade.

# ls -la /var/lib/dkms/
total 32K
drwxr-xr-x  7 root root 4.0K May 26 11:55 .
drwxr-xr-x 86 root root 4.0K May 25 19:33 ..
drwxr-xr-x  4 root root 4.0K May 25 18:56 anbox-modules-ashmem
drwxr-xr-x  4 root root 4.0K May 25 18:57 anbox-modules-binder
drwxr-xr-x  3 root root 4.0K May  2 18:34 bbswitch
-rw-r--r--  1 root root    6 Jul  8  2008 dkms_dbversion
drwxr-xr-x  3 root root 4.0K May 26 11:55 nvidia-381
drwxr-xr-x  3 root root 4.0K May 26 11:55 virtualbox

I always have to rebuild it manually after a kernel upgrade. If there are any logs or configs needed to diagnose this problem I will supply them as soon as possible.

System information:

# lsb_release -a
LSB Version:    core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:printing-9.20160110ubuntu0.2-amd64:printing-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: neon
Description:    KDE neon User Edition 5.9
Release:        16.04
Codename:       xenial

# apt list dkms -a
Listing... Done
dkms/xenial-updates,xenial-updates,now 2.2.0.3-2ubuntu11.3 all [installed]
dkms/xenial,xenial 2.2.0.3-2ubuntu11 all 

EDIT 1:

Removal of linux-image-4.8.0-52 log: https://pastebin.com/a0L6fbFj

Installation of linux-image-4.8.0-52 log: (N/A)

EDIT 2:

dkms status:

# dkms status
Error! Could not locate dkms.conf file.
File:  does not exist.

# cd /var/lib/dkms/nvidia-381/381.22/build

# ls -la dkms.conf 
-rw-r--r-- 1 root root 1,2K Mai 26 11:54 dkms.conf

# dkms status
Error! Could not locate dkms.conf file.
File:  does not exist.

ls -la /usr/src:

# ls -la /usr/src/
total 44K
drwxr-xr-x 11 root root 4,0K Mai 26 16:28 .
drwxr-xr-x 12 root root 4,0K Apr 25 19:40 ..
drwxr-xr-x  2 root root 4,0K Apr 22 14:20 bbswitch-0.8
drwxr-xr-x  3 root root 4,0K Apr 29 18:50 gmock
drwxr-xr-x  4 root root 4,0K Apr 29 18:50 gtest
drwxr-xr-x 27 root root 4,0K Mai 16 18:39 linux-headers-4.4.0-78
drwxr-xr-x  7 root root 4,0K Mai 16 18:39 linux-headers-4.4.0-78-generic
drwxr-xr-x 27 root root 4,0K Mai 25 19:42 linux-headers-4.8.0-53
drwxr-xr-x  7 root root 4,0K Mai 25 19:42 linux-headers-4.8.0-53-generic
drwxr-xr-x  8 root root 4,0K Mai 20 16:43 nvidia-381-381.22
drwxr-xr-x 12 root root 4,0K Mai 11 16:31 virtualbox-5.0.40

ls /usr/src/*/dkms.conf:

# ls /usr/src/*/dkms.conf
/usr/src/bbswitch-0.8/dkms.conf  /usr/src/nvidia-381-381.22/dkms.conf /usr/src/virtualbox-5.0.40/dkms.conf
Scrumplex
  • 240
  • Could you add a full log of a kernel install or remove? – user.dz May 26 '17 at 10:35
  • @user.dz I added a log for removal and installation – Scrumplex May 26 '17 at 14:38
  • Anwar those are "detected" filetypes by hastebin. – Scrumplex May 26 '17 at 14:41
  • Some of your packages does not have a dkms.conf file. What are the "anbox" modules? – Pilot6 May 26 '17 at 14:44
  • https://anbox.io from here – Scrumplex May 26 '17 at 14:50
  • 1
    Please show me the terminal output of dkms status and ls -al /usr/src. – heynnema May 26 '17 at 14:58
  • @heynnema added to post – Scrumplex May 26 '17 at 15:02
  • 1
    Thanks! Now please show me ls /usr/src/*/dkms.conf. How did you add these directories to /var/lib/dkms? Did you do a dkms add, dkms build, and dkms install? – heynnema May 26 '17 at 15:14
  • @heynnema added! I did not touch anything in /var/lib/dkms. I guess it was automatic – Scrumplex May 26 '17 at 15:18
  • Thanks! How did you add the files to /usr/src? At any point did you do a dkms add or dkms build or dkms install? gmock and gtest are not dkms modules. Assuming that you have the original source files for those, delete those two directories from /usr/src , then show me the result of dkms status again. – heynnema May 26 '17 at 15:23
  • Also need to see ls -alR /var/lib/dkms/anbox* – heynnema May 26 '17 at 15:26
  • @heynnema I moved gtest and gmock out of the directories (into /root) but I still get the error, that a dkms.conf could not be found. I never added anything manually. I installed the packages and they installed themselves to /usr/src (and probably to /var/lib/dkms). ls -alR /var/lib/dkms/anbox* https://hastebin.com/raw/iyucejajal – Scrumplex May 26 '17 at 15:28
  • Now move/delete the /var/lib/dkms/anbox* directories out of /var/lib/dkms as there's no accompanying source directories in /usr/src, and then show me dkms status again. There should be no errors now for that command. – heynnema May 26 '17 at 15:33
  • After moving the anbox modules out of the folder (btw. I uninstalled anbox some days ago) dkms status shows, that all modules are installed (where virtualbox and nvidia module have been installed by me) https://hastebin.com/raw/edirogotul – Scrumplex May 26 '17 at 15:36
  • Good! Progress! Lastly show me the output of dpkg -l *virtualbox*. After seeing that, I'll put together an answer that you can review and then vote/accept if it was helpful. – heynnema May 26 '17 at 15:38
  • https://hastebin.com/raw/amovofoxat Sorry for the German language, could not change it with LANG/LANGUAGE/LC_ALL – Scrumplex May 26 '17 at 15:44
  • Looks good. Give me a few minutes and I'll put together an answer for you. What is/was the gtest/gmock software? – heynnema May 26 '17 at 15:45
  • @heynnema I don't really know :D. If you search for it it says, that it is a testing framework for c++ applications called Google Mock / Google Test – Scrumplex May 26 '17 at 15:47
  • @Scrumplex have the bbswitch, nividia, and virtualbox dkms software modules been behaving themselves since we fixed dkms up? – heynnema Jul 27 '17 at 19:37

1 Answers1

10

From the comments...

There were multiple problems to solve.

  • we removed the /usr/src/gmock and /usr/src/gtest as they weren't dkms software modules. If you need this software for some reason, either reinstall it, or create ~/src and put the gmock/gtest software there, and do the appropriate make commands (or whatever) to build that software.

  • we removed the /var/lib/dkms/anbox* directories as they were missing their associated /usr/src/anbox* source code due to an incomplete uninstall, and caused the dkms status command to fail, looking for a dkms.conf file that didn't exist.

  • the dkms status now correctly shows the installed status of bbswitch, nividia, and virtualbox dkms softwares.

  • future kernel upgrades should properly build/rebuild the remaining bbsswitch, nividia, and virtualbox dkms software modules.

  • we also checked that the virtualbox-dkms was the correct version for the installed virtualbox.

heynnema
  • 70,711