Upgrade to 17.10 kernel not able to be installed

Asked by dysonsphere on 2018-01-07

I upgraded from 17.04 to 17.10. Ubuntu with Gnome Shell, no Unity. Nvidia graphics, using proprietary driver.

I managed to boot using the old kernel: 4.10.0-42-generic

I tried removing the newer kernels but gpkg gives errors trying to uninstall.

It now boots with the 4.10.0-42-generic kernel automatically, but always required password, even though i set it to log in without password in the settings manager. This was working before the upgrade.

I tried:

sudo dpkg --configure -a

Setting up linux-image-4.13.0-21-generic (4.13.0-21.24) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.13.0-21-generic
vmlinuz(/boot/vmlinuz-4.13.0-21-generic
) points to /boot/vmlinuz-4.13.0-21-generic
 (/boot/vmlinuz-4.13.0-21-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.13.0-21-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.13.0-21-generic.postinst line 1052.
dpkg: error processing package linux-image-4.13.0-21-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 linux-image-4.13.0-21-generic

sudo apt-get install -f

 Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.10.0-40 linux-headers-4.10.0-40-generic
  linux-image-4.10.0-40-generic linux-image-extra-4.10.0-40-generic
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-extra-4.10.0-35-generic linux-image-extra-4.10.0-37-generic
  linux-image-extra-4.10.0-38-generic linux-image-extra-4.13.0-21-generic
0 upgraded, 0 newly installed, 4 to remove and 13 not upgraded.
5 not fully installed or removed.
After this operation, 629 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 265425 files and directories currently installed.)
Removing linux-image-extra-4.10.0-35-generic (4.10.0-35.39) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-35-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-35-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.10.0-37-generic (4.10.0-37.41) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-37-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-37-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.10.0-38-generic (4.10.0-38.42) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-38-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-38-generic /boot/vmlinuz-4.10.0-38-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-38-generic /boot/vmlinuz-4.10.0-38-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-38-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.13.0-21-generic (4.13.0-21.24) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.13.0-21-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-extra-4.10.0-35-generic
 linux-image-extra-4.10.0-37-generic
 linux-image-extra-4.10.0-38-generic
 linux-image-extra-4.13.0-21-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

ls -al /boot

total 289184
drwxr-xr-x 3 root root 4096 Jan 4 10:22 .
drwxr-xr-x 25 root root 4096 Jan 4 10:22 ..
-rw-r--r-- 1 root root 1443962 Nov 9 09:24 abi-4.10.0-40-generic
-rw-r--r-- 1 root root 1443962 Dec 4 09:04 abi-4.10.0-42-generic
-rw-r--r-- 1 root root 204962 Nov 9 09:24 config-4.10.0-40-generic
-rw-r--r-- 1 root root 204962 Dec 4 09:04 config-4.10.0-42-generic
drwxr-xr-x 5 root root 4096 Jan 4 10:22 grub
-rw-r--r-- 1 root root 42860302 Dec 30 10:04 initrd.img-4.10.0-40-generic
-rw-r--r-- 1 root root 51070561 Jan 3 18:56 initrd.img-4.10.0-42-generic
-rw-r--r-- 1 root root 10331442 Dec 30 10:06 initrd.img-4.4.0-59-generic
-rw-r--r-- 1 root root 10331451 Dec 30 10:06 initrd.img-4.4.0-62-generic
-rw-r--r-- 1 root root 10331444 Dec 30 10:06 initrd.img-4.4.0-64-generic
-rw-r--r-- 1 root root 10333637 Dec 30 10:05 initrd.img-4.4.0-66-generic
-rw-r--r-- 1 root root 10333568 Dec 30 10:05 initrd.img-4.4.0-70-generic
-rw-r--r-- 1 root root 10331426 Dec 30 10:05 initrd.img-4.4.0-71-generic
-rw-r--r-- 1 root root 10333539 Dec 30 10:05 initrd.img-4.4.0-72-generic
-rw-r--r-- 1 root root 10333541 Dec 30 10:05 initrd.img-4.4.0-75-generic
-rw-r--r-- 1 root root 10331414 Dec 30 10:05 initrd.img-4.4.0-77-generic
-rw-r--r-- 1 root root 10331448 Dec 30 10:05 initrd.img-4.4.0-78-generic
-rw-r--r-- 1 root root 10333583 Dec 30 10:05 initrd.img-4.4.0-79-generic
-rw-r--r-- 1 root root 10333546 Dec 30 10:05 initrd.img-4.4.0-81-generic
-rw-r--r-- 1 root root 10333589 Dec 30 10:05 initrd.img-4.4.0-83-generic
-rw-r--r-- 1 root root 10333559 Dec 30 10:05 initrd.img-4.4.0-87-generic
-rw-r--r-- 1 root root 10333515 Dec 30 10:05 initrd.img-4.4.0-89-generic
-rw-r--r-- 1 root root 10331408 Dec 30 10:05 initrd.img-4.4.0-91-generic
-rw-r--r-- 1 root root 10331445 Dec 30 10:05 initrd.img-4.4.0-92-generic
-rw-r--r-- 1 root root 182704 Jan 28 2016 memtest86+.bin
-rw-r--r-- 1 root root 184380 Jan 28 2016 memtest86+.elf
-rw-r--r-- 1 root root 184840 Jan 28 2016 memtest86+_multiboot.bin
-rw------- 1 root root 3722580 Nov 9 09:24 System.map-4.10.0-40-generic
-rw------- 1 root root 3722463 Dec 4 09:04 System.map-4.10.0-42-generic
-rw------- 1 root root 7587600 Nov 9 09:24 vmlinuz-4.10.0-40-generic
-rw------- 1 root root 7587600 Dec 4 09:04 vmlinuz-4.10.0-42-generic

apt-cache policy dkms

dkms:
  Installed: 2.3-3ubuntu3
  Candidate: 2.3-3ubuntu3
  Version table:
 *** 2.3-3ubuntu3 500
        500 http://ca.archive.ubuntu.com/ubuntu artful/main amd64 Packages
        500 http://ca.archive.ubuntu.com/ubuntu artful/main i386 Packages
        500 http://us.archive.ubuntu.com/ubuntu artful/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu artful/main i386 Packages
        100 /var/lib/dpkg/status

any thoughts?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
dysonsphere
Solved:
2018-01-16
Last query:
2018-01-16
Last reply:
2018-01-16

This question was reopened

Manfred Hampl (m-hampl) said : #1

I suggest that you try the following:
Open a terminal window and issue the command

uname -a
lsb_release -crid
sudo dpkg --audit
sudo apt-get install --reinstall dkms

and finally copy/paste all output into this question document that we can check.

dysonsphere (dysonsphere23) said : #2

 uname -a
Linux dyson-G751JY 4.10.0-42-generic #46-Ubuntu SMP Mon Dec 4 14:38:01 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful

sudo dpkg --audit
[sudo] password for dysonsphere:
The following packages are only half installed, due to problems during
installation. The installation can probably be completed by retrying it;
the packages can be removed using dselect or dpkg --remove:
 linux-image-extra-4.10.0-35-generic Linux kernel extra modules for version 4.1
 linux-image-extra-4.10.0-37-generic Linux kernel extra modules for version 4.1
 linux-image-extra-4.10.0-38-generic Linux kernel extra modules for version 4.1
 linux-image-extra-4.13.0-21-generic Linux kernel extra modules for version 4.1

sudo apt-get install --reinstall dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  linux-image-extra-4.10.0-35-generic linux-image-extra-4.10.0-37-generic
  linux-image-extra-4.10.0-38-generic linux-image-extra-4.13.0-21-generic
0 upgraded, 0 newly installed, 1 reinstalled, 4 to remove and 2 not upgraded.
4 not fully installed or removed.
Need to get 68.3 kB of archives.
After this operation, 629 MB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://ca.archive.ubuntu.com/ubuntu artful/main amd64 dkms all 2.3-3ubuntu3 [68.3 kB]
Fetched 68.3 kB in 0s (157 kB/s)
(Reading database ... 264116 files and directories currently installed.)
Removing linux-image-extra-4.10.0-35-generic (4.10.0-35.39) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-35-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-35-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.10.0-37-generic (4.10.0-37.41) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-37-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-37-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.10.0-38-generic (4.10.0-38.42) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-38-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-38-generic /boot/vmlinuz-4.10.0-38-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-38-generic /boot/vmlinuz-4.10.0-38-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-38-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.13.0-21-generic (4.13.0-21.24) ...
depmod: FATAL: could not load /boot/System.map-4.13.0-21-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.13.0-21-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-extra-4.10.0-35-generic
 linux-image-extra-4.10.0-37-generic
 linux-image-extra-4.10.0-38-generic
 linux-image-extra-4.13.0-21-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

dysonsphere (dysonsphere23) said : #3

sudo dpkg --remove linux-image-extra-4.10.0-35-generic Linux kernel extra modules for version 4.1
[sudo] password for dysonsphere:
(Reading database ... 264116 files and directories currently installed.)
Removing linux-image-extra-4.10.0-35-generic (4.10.0-35.39) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-35-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-35-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
dpkg: warning: ignoring request to remove linux which isn't installed
dpkg: warning: ignoring request to remove kernel which isn't installed
dpkg: warning: ignoring request to remove extra which isn't installed
dpkg: warning: ignoring request to remove modules which isn't installed
dpkg: warning: ignoring request to remove for which isn't installed
dpkg: warning: ignoring request to remove version which isn't installed
dpkg: warning: ignoring request to remove 4.1 which isn't installed

Manfred Hampl (m-hampl) said : #4

Try

sudo dpkg --install /var/cache/apt/archives/dkms_2.3-3ubuntu3_all.deb

and report the results.

dysonsphere (dysonsphere23) said : #5

sudo dpkg --install /var/cache/apt/archives/dkms_2.3-3ubuntu3_all.deb
(Reading database ... 264117 files and directories currently installed.)
Preparing to unpack .../dkms_2.3-3ubuntu3_all.deb ...
Unpacking dkms (2.3-3ubuntu3) over (2.3-3ubuntu3) ...
Setting up dkms (2.3-3ubuntu3) ...
Processing triggers for man-db (2.7.6.1-2) ...

sudo dpkg --configure -a

sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  linux-image-extra-4.10.0-35-generic linux-image-extra-4.10.0-37-generic
  linux-image-extra-4.10.0-38-generic linux-image-extra-4.13.0-21-generic
0 upgraded, 0 newly installed, 4 to remove and 2 not upgraded.
4 not fully installed or removed.
After this operation, 629 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 264116 files and directories currently installed.)
Removing linux-image-extra-4.10.0-35-generic (4.10.0-35.39) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-35-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-35-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.10.0-37-generic (4.10.0-37.41) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-37-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-37-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.10.0-38-generic (4.10.0-38.42) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-38-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-38-generic /boot/vmlinuz-4.10.0-38-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-38-generic /boot/vmlinuz-4.10.0-38-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-38-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.13.0-21-generic (4.13.0-21.24) ...
depmod: FATAL: could not load /boot/System.map-4.13.0-21-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.13.0-21-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-extra-4.10.0-35-generic
 linux-image-extra-4.10.0-37-generic
 linux-image-extra-4.10.0-38-generic
 linux-image-extra-4.13.0-21-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Manfred Hampl (m-hampl) said : #6

ok, my first guess (related to a missing dkms.conf file from the dkms package) apparently was wrong.
Let me re-start by requesting some diagnostic information about your system.

Please provide the output of the following commands:

uname -a
lsb_release -crid
df -h
dpkg -l | grep ' linux-i'
sudo updatedb
locate dkms.conf
ls -l /etc/dkms/
ls -l /usr/src/

Remark: The contents of your /boot directory are very strange.
The files initrd.img-4.4.0-*-generic, all with the same date, are totally unexpected, because there are no abi-, config-, System.map- and vmlinuz- files with the same version number.

dysonsphere (dysonsphere23) said : #7

thanks for taking the time and interest in helping me out.
here is the additional output:

dysonsphere@dyson-G751JY:~$ uname -a
Linux dyson-G751JY 4.10.0-42-generic #46-Ubuntu SMP Mon Dec 4 14:38:01 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

dysonsphere@dyson-G751JY:~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful

dysonsphere@dyson-G751JY:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 16G 0 16G 0% /dev
tmpfs 3.2G 11M 3.2G 1% /run
/dev/sdb2 462G 107G 333G 25% /
tmpfs 16G 44M 16G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/sda1 932G 418G 515G 45% /mnt/20C24398C24370D8
tmpfs 3.2G 20K 3.2G 1% /run/user/127
tmpfs 3.2G 68K 3.2G 1% /run/user/1000

dysonsphere@dyson-G751JY:~$ dpkg -l |grep 'linux-i'
rc linux-image-4.10.0-33-generic 4.10.0-33.37 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc linux-image-4.10.0-35-generic 4.10.0-35.39 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc linux-image-4.10.0-37-generic 4.10.0-37.41 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc linux-image-4.10.0-38-generic 4.10.0-38.42 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
ii linux-image-4.10.0-40-generic 4.10.0-40.44 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
ii linux-image-4.10.0-42-generic 4.10.0-42.46 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
ic linux-image-4.13.0-21-generic 4.13.0-21.24 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
rc linux-image-4.4.0-21-generic 4.4.0-21.37 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-38-generic 4.4.0-38.57 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-42-generic 4.4.0-42.62 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-43-generic 4.4.0-43.63 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-45-generic 4.4.0-45.66 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-47-generic 4.4.0-47.68 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-51-generic 4.4.0-51.72 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-53-generic 4.4.0-53.74 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-57-generic 4.4.0-57.78 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-59-generic 4.4.0-59.80 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-62-generic 4.4.0-62.83 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-64-generic 4.4.0-64.85 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-66-generic 4.4.0-66.87 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-70-generic 4.4.0-70.91 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-71-generic 4.4.0-71.92 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-72-generic 4.4.0-72.93 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-75-generic 4.4.0-75.96 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-77-generic 4.4.0-77.98 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-78-generic 4.4.0-78.99 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-79-generic 4.4.0-79.100 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-81-generic 4.4.0-81.104 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-83-generic 4.4.0-83.106 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-87-generic 4.4.0-87.110 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-89-generic 4.4.0-89.112 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-91-generic 4.4.0-91.114 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-92-generic 4.4.0-92.115 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-93-generic 4.4.0-93.116 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.10.0-33-generic 4.10.0-33.37 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
rH linux-image-extra-4.10.0-35-generic 4.10.0-35.39 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
iH linux-image-extra-4.10.0-37-generic 4.10.0-37.41 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
iH linux-image-extra-4.10.0-38-generic 4.10.0-38.42 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
ii linux-image-extra-4.10.0-40-generic 4.10.0-40.44 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
ii linux-image-extra-4.10.0-42-generic 4.10.0-42.46 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
iH linux-image-extra-4.13.0-21-generic 4.13.0-21.24 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-21-generic 4.4.0-21.37 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-38-generic 4.4.0-38.57 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-42-generic 4.4.0-42.62 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-43-generic 4.4.0-43.63 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-45-generic 4.4.0-45.66 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-47-generic 4.4.0-47.68 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-51-generic 4.4.0-51.72 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-53-generic 4.4.0-53.74 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-57-generic 4.4.0-57.78 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-59-generic 4.4.0-59.80 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-62-generic 4.4.0-62.83 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-64-generic 4.4.0-64.85 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-66-generic 4.4.0-66.87 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-70-generic 4.4.0-70.91 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-71-generic 4.4.0-71.92 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-72-generic 4.4.0-72.93 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-75-generic 4.4.0-75.96 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-77-generic 4.4.0-77.98 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-78-generic 4.4.0-78.99 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-79-generic 4.4.0-79.100 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-81-generic 4.4.0-81.104 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-83-generic 4.4.0-83.106 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-87-generic 4.4.0-87.110 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-89-generic 4.4.0-89.112 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-91-generic 4.4.0-91.114 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-92-generic 4.4.0-92.115 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc linux-image-extra-4.4.0-93-generic 4.4.0-93.116 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP

dysonsphere@dyson-G751JY:~$ sudo updatedb
[sudo] password for dysonsphere:

dysonsphere@dyson-G751JY:~$ locate dkms.conf
/etc/modprobe.d/dkms.conf
/usr/src/nvidia-384-384.90/dkms.conf
/var/lib/dpkg/info/dkms.conffiles

dysonsphere@dyson-G751JY:~$ ls -l /etc/dkms/
total 12
-rw-r--r-- 1 root root 906 Aug 31 2016 framework.conf
drwxr-xr-x 3 root root 4096 Jan 8 07:11 template-dkms-mkbmdeb
drwxr-xr-x 3 root root 4096 Jan 8 07:11 template-dkms-mkdeb
lrwxrwxrwx 1 root root 19 Apr 13 2017 template-dkms-mkdsc -> template-dkms-mkdeb

dysonsphere@dyson-G751JY:~$ ls -l /usr/src/
total 20
drwxr-xr-x 27 root root 4096 Nov 21 16:30 linux-headers-4.10.0-40
drwxr-xr-x 7 root root 4096 Nov 21 16:30 linux-headers-4.10.0-40-generic
drwxr-xr-x 27 root root 4096 Dec 9 06:55 linux-headers-4.10.0-42
drwxr-xr-x 7 root root 4096 Dec 9 06:55 linux-headers-4.10.0-42-generic
drwxr-xr-x 8 root root 4096 Dec 30 10:02 nvidia-384-384.90

Manfred Hampl (m-hampl) said : #8

Please provide also the output of

ls -l /var/lib/dkms/

Manfred Hampl (m-hampl) said : #9

And the output of another command

dkms status

please.

dysonsphere (dysonsphere23) said : #10

dysonsphere@dyson-G751JY:~$ ls -l /var/lib/dkms/
total 12
drwxr-xr-x 3 root root 4096 Dec 12 06:59 bbswitch
-rw-r--r-- 1 root root 6 Aug 31 2016 dkms_dbversion
drwxr-xr-x 3 root root 4096 Jan 3 18:56 nvidia-384
dysonsphere@dyson-G751JY:~$ dkms status
bbswitch, 0.8: added
nvidia-384, 384.90, 4.10.0-42-generic, x86_64: installed

Manfred Hampl (m-hampl) said : #11

I am not really sure why and where the dkms scripts fail. Maybe trying to execute them directly helps finding out the cause.

What output do you get for:

bash -x /etc/kernel/postinst.d/dkms 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic

dysonsphere (dysonsphere23) said : #12

dysonsphere@dyson-G751JY:~$ sudo bash -x /etc/kernel/postinst.d/dkms 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
[sudo] password for dysonsphere:
+ inst_kern=4.10.0-35-generic
++ uname -s
+ uname_s=Linux
+ case "${uname_s}" in
+ header_pkg=linux-headers-4.10.0-35-generic
+ kernel=Linux
+ '[' -x /usr/lib/dkms/dkms_autoinstaller ']'
+ exec /usr/lib/dkms/dkms_autoinstaller start 4.10.0-35-generic
Error! Could not locate dkms.conf file.
File: does not exist.

Manfred Hampl (m-hampl) said : #13

ok, and now please tell us what you receive for:

sudo bash -x /usr/lib/dkms/dkms_autoinstaller start 4.10.0-35-generic

sudo bash -x dkms autoinstall --kernelver 4.10.0-35-generic

Remark:
There seems to be something wrong with your dkms installation. The fact that dkms steps are executed whenever kernel packages are installed or uninstalled, the failures with dkms currently prevent package management.
A different option for repair could be the following:
Completely uninstall dkms, then try to get the package management back into a consistent status, end then re-install dkms and all packages that use it (nvidia, bbswitch, kernels).

dysonsphere (dysonsphere23) said : #14

dysonsphere@dyson-G751JY:~$ sudo bash -x /usr/lib/dkms/dkms_autoinstaller start 4.10.0-35-generic
[sudo] password for dysonsphere:
+ '[' -f /lib/lsb/init-functions ']'
+ . /lib/lsb/init-functions
+++ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)
++ '[' -r /lib/lsb/init-functions.d/01-upstart-lsb ']'
++ . /lib/lsb/init-functions.d/01-upstart-lsb
+++ unset UPSTART_SESSION
+++ _RC_SCRIPT=/usr/lib/dkms/dkms_autoinstaller
+++ '[' -r /etc/init//usr/lib/dkms/dkms_autoinstaller.conf ']'
+++ _UPSTART_JOB=/usr/lib/dkms/dkms_autoinstaller
+++ '[' -r /etc/init//usr/lib/dkms/dkms_autoinstaller.conf ']'
++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)
++ '[' -r /lib/lsb/init-functions.d/20-left-info-blocks ']'
++ . /lib/lsb/init-functions.d/20-left-info-blocks
++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)
++ '[' -r /lib/lsb/init-functions.d/40-systemd ']'
++ . /lib/lsb/init-functions.d/40-systemd
+++ _use_systemctl=0
+++ '[' -d /run/systemd/system ']'
+++ prog=dkms_autoinstaller
+++ service=dkms_autoinstaller.service
++++ systemctl -p LoadState --value show dkms_autoinstaller.service
+++ state=not-found
+++ '[' not-found = masked ']'
+++ '[' 3747 -ne 1 ']'
+++ '[' -z '' ']'
+++ case $(readlink -f "$0") in
++++ readlink -f /usr/lib/dkms/dkms_autoinstaller
+++ '[' 0 = 1 ']'
++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)
++ '[' -r /lib/lsb/init-functions.d/50-ubuntu-logging ']'
++ . /lib/lsb/init-functions.d/50-ubuntu-logging
+++ LOG_DAEMON_MSG=
++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)
++ '[' -r /lib/lsb/init-functions.d/99-plymouth ']'
++ . /lib/lsb/init-functions.d/99-plymouth
+++ plymouth --ping
+++ return
++ FANCYTTY=
++ '[' -e /etc/lsb-base-logging.sh ']'
++ true
+ '[' '!' -f /etc/debian_version ']'
+ exec=/usr/sbin/dkms
+ prog=dkms
+ test -f /usr/sbin/dkms
+ '[' -e /etc/sysconfig/dkms ']'
+ case "$1" in
+ '[' -n 4.10.0-35-generic ']'
+ kernel=4.10.0-35-generic
+ log_daemon_msg 'dkms: running auto installation service for kernel 4.10.0-35-generic'
+ '[' -z 'dkms: running auto installation service for kernel 4.10.0-35-generic' ']'
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ '[' -t 1 ']'
+ '[' xxterm-256color '!=' x ']'
+ '[' xxterm-256color '!=' xdumb ']'
+ '[' -x /usr/bin/tput ']'
+ '[' -x /usr/bin/expr ']'
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ '[' -z ']'
+ FANCYTTY=1
+ case "$FANCYTTY" in
+ true
+ /usr/bin/tput xenl
++ /usr/bin/tput cols
+ COLS=80
+ '[' 80 ']'
+ '[' 80 -gt 6 ']'
++ /usr/bin/expr 80 - 7
+ COL=73
+ log_use_plymouth
+ '[' n = y ']'
+ plymouth --ping
+ printf ' * dkms: running auto installation service for kernel 4.10.0-35-generic '
 * dkms: running auto installation service for kernel 4.10.0-35-generic ++ /usr/bin/expr 80 - 1
+ /usr/bin/tput hpa 79
                                                                               + printf ' '
 + dkms autoinstall --kernelver 4.10.0-35-generic
Error! Could not locate dkms.conf file.
File: does not exist.
+ log_end_msg 4
+ '[' -z 4 ']'
+ '[' 73 ']'
+ '[' -x /usr/bin/tput ']'
+ log_use_plymouth
+ '[' n = y ']'
+ plymouth --ping
+ printf '\r'
+ /usr/bin/tput hpa 73
                                                                         + '[' 4 -eq 0 ']'
+ printf '['
[+ /usr/bin/tput setaf 1
+ printf fail
fail+ /usr/bin/tput op
+ echo ']'
]
+ return 4

dysonsphere (dysonsphere23) said : #15

++ unset modules_conf_obsoletes
++ for var in $dkms_conf_variables
++ unset MODULES_CONF_ALIAS_TYPE
++ for var in $dkms_conf_variables
++ unset modules_conf_alias_type
++ for var in $dkms_conf_variables
++ unset STRIP
++ for var in $dkms_conf_variables
++ unset strip
++ for var in $dkms_conf_variables
++ unset MODULES_CONF_OBSOLETE_ONLY
++ for var in $dkms_conf_variables
++ unset modules_conf_obsolete_only
++ for var in $dkms_conf_variables
++ unset AUTOINSTALL
++ for var in $dkms_conf_variables
++ unset NO_WEAK_MODULES
++ local _conf_file
++ for _conf_file in "$read_conf_file" "/etc/dkms/$module.conf" "/etc/dkms/$module-$module_version.conf" "/etc/dkms/$module-$module_version-$1.conf" "/etc/dkms/$module-$module_version-$1-$2.conf"
++ '[' -e /var/lib/dkms/nvidia-384/384.90/source/dkms.conf ']'
++ safe_source /var/lib/dkms/nvidia-384/384.90/source/dkms.conf CLEAN REMAKE_INITRD remake_initrd PACKAGE_NAME PACKAGE_VERSION POST_ADD POST_BUILD POST_INSTALL POST_REMOVE PRE_BUILD PRE_INSTALL BUILD_DEPENDS BUILD_EXCLUSIVE_KERNEL BUILD_EXCLUSIVE_ARCH build_exclude OBSOLETE_BY MAKE MAKE_MATCH MODULES_CONF modules_conf_array PATCH PATCH_MATCH patch_array BUILT_MODULE_NAME built_module_name BUILT_MODULE_LOCATION built_module_location DEST_MODULE_NAME dest_module_name MODULES_CONF_OBSOLETES DEST_MODULE_LOCATION dest_module_location modules_conf_obsoletes MODULES_CONF_ALIAS_TYPE modules_conf_alias_type STRIP strip MODULES_CONF_OBSOLETE_ONLY modules_conf_obsolete_only AUTOINSTALL NO_WEAK_MODULES
++ local to_source_file=/var/lib/dkms/nvidia-384/384.90/source/dkms.conf
++ shift
++ export_envs=("$@")
++ declare -a -r export_envs
dysonsphere@dyson-G751JY:~$ +++ mktemp_or_die
+++ local t
++++ mktemp
+++ t=/tmp/tmp.IpArSPi1na
+++ echo /tmp/tmp.IpArSPi1na
+++ return
++ local tmpfile=/tmp/tmp.IpArSPi1na
++ exec
++ . /var/lib/dkms/nvidia-384/384.90/source/dkms.conf
+++ PACKAGE_NAME=nvidia-384
+++ PACKAGE_VERSION=384.90
+++ CLEAN='make clean'
+++ BUILT_MODULE_NAME[0]=nvidia
+++ DEST_MODULE_NAME[0]=nvidia_384
+++ DEST_MODULE_LOCATION[0]=/kernel/drivers/char/drm
++++ nproc
+++ PROCS_NUM=8
+++ '[' 8 -gt 16 ']'
+++ MAKE[0]=''\''make'\'' -j8 NV_EXCLUDE_BUILD_MODULES='\'''\'' KERNEL_UNAME=4.10.0-42-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/4.10.0-42-generic/build LD=/usr/bin/ld.bfd modules'
+++ BUILT_MODULE_NAME[1]=nvidia-modeset
+++ DEST_MODULE_NAME[1]=nvidia_384_modeset
+++ DEST_MODULE_LOCATION[1]=/kernel/drivers/char/drm
+++ BUILT_MODULE_NAME[2]=nvidia-drm
+++ DEST_MODULE_NAME[2]=nvidia_384_drm
+++ DEST_MODULE_LOCATION[2]=/kernel/drivers/char/drm
+++ AUTOINSTALL=yes
+++ PATCH[0]=buildfix_kernel_4.14.patch
+++ BUILT_MODULE_NAME[3]=nvidia-uvm
+++ DEST_MODULE_LOCATION[3]=/kernel/drivers/char/drm
+++ DEST_MODULE_NAME[3]=nvidia_384_uvm
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!CLEAN[@]}'
++++ echo 0
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${CLEAN[$_i]}\"'
+++ echo 'CLEAN[0]="make' 'clean"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!REMAKE_INITRD[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!remake_initrd[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!PACKAGE_NAME[@]}'
++++ echo 0
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${PACKAGE_NAME[$_i]}\"'
+++ echo 'PACKAGE_NAME[0]="nvidia-384"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!PACKAGE_VERSION[@]}'
++++ echo 0
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${PACKAGE_VERSION[$_i]}\"'
+++ echo 'PACKAGE_VERSION[0]="384.90"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!POST_ADD[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!POST_BUILD[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!POST_INSTALL[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!POST_REMOVE[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!PRE_BUILD[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!PRE_INSTALL[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!BUILD_DEPENDS[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!BUILD_EXCLUSIVE_KERNEL[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!BUILD_EXCLUSIVE_ARCH[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!build_exclude[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!OBSOLETE_BY[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!MAKE[@]}'
++++ echo 0
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${MAKE[$_i]}\"'
+++ echo 'MAKE[0]="'\''make'\''' -j8 'NV_EXCLUDE_BUILD_MODULES='\'''\''' KERNEL_UNAME=4.10.0-42-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/4.10.0-42-generic/build LD=/usr/bin/ld.bfd 'modules"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!MAKE_MATCH[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!MODULES_CONF[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!modules_conf_array[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!PATCH[@]}'
++++ echo 0
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${PATCH[$_i]}\"'
+++ echo 'PATCH[0]="buildfix_kernel_4.14.patch"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!PATCH_MATCH[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!patch_array[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!BUILT_MODULE_NAME[@]}'
++++ echo 0 1 2 3
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${BUILT_MODULE_NAME[$_i]}\"'
+++ echo 'BUILT_MODULE_NAME[0]="nvidia"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${BUILT_MODULE_NAME[$_i]}\"'
+++ echo 'BUILT_MODULE_NAME[1]="nvidia-modeset"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${BUILT_MODULE_NAME[$_i]}\"'
+++ echo 'BUILT_MODULE_NAME[2]="nvidia-drm"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${BUILT_MODULE_NAME[$_i]}\"'
+++ echo 'BUILT_MODULE_NAME[3]="nvidia-uvm"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!built_module_name[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!BUILT_MODULE_LOCATION[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!built_module_location[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!DEST_MODULE_NAME[@]}'
++++ echo 0 1 2 3
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_NAME[$_i]}\"'
+++ echo 'DEST_MODULE_NAME[0]="nvidia_384"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_NAME[$_i]}\"'
+++ echo 'DEST_MODULE_NAME[1]="nvidia_384_modeset"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_NAME[$_i]}\"'
+++ echo 'DEST_MODULE_NAME[2]="nvidia_384_drm"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_NAME[$_i]}\"'
+++ echo 'DEST_MODULE_NAME[3]="nvidia_384_uvm"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!dest_module_name[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!MODULES_CONF_OBSOLETES[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!DEST_MODULE_LOCATION[@]}'
++++ echo 0 1 2 3
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_LOCATION[$_i]}\"'
+++ echo 'DEST_MODULE_LOCATION[0]="/kernel/drivers/char/drm"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_LOCATION[$_i]}\"'
+++ echo 'DEST_MODULE_LOCATION[1]="/kernel/drivers/char/drm"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_LOCATION[$_i]}\"'
+++ echo 'DEST_MODULE_LOCATION[2]="/kernel/drivers/char/drm"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_LOCATION[$_i]}\"'
+++ echo 'DEST_MODULE_LOCATION[3]="/kernel/drivers/char/drm"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!dest_module_location[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!modules_conf_obsoletes[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!MODULES_CONF_ALIAS_TYPE[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!modules_conf_alias_type[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!STRIP[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!strip[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!MODULES_CONF_OBSOLETE_ONLY[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!modules_conf_obsolete_only[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!AUTOINSTALL[@]}'
++++ echo 0
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${AUTOINSTALL[$_i]}\"'
+++ echo 'AUTOINSTALL[0]="yes"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!NO_WEAK_MODULES[@]}'
++++ echo
+++ set
+++ grep '^DKMS_DIRECTIVE'
+++ cut -d = -f 2-3
++ . /tmp/tmp.IpArSPi1na
+++ CLEAN[0]='make clean'
+++ PACKAGE_NAME[0]=nvidia-384
+++ PACKAGE_VERSION[0]=384.90
+++ MAKE[0]=''\''make'\'' -j8 NV_EXCLUDE_BUILD_MODULES='\'''\'' KERNEL_UNAME=4.10.0-42-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/4.10.0-42-generic/build LD=/usr/bin/ld.bfd modules'
+++ PATCH[0]=buildfix_kernel_4.14.patch
+++ BUILT_MODULE_NAME[0]=nvidia
+++ BUILT_MODULE_NAME[1]=nvidia-modeset
+++ BUILT_MODULE_NAME[2]=nvidia-drm
+++ BUILT_MODULE_NAME[3]=nvidia-uvm
+++ DEST_MODULE_NAME[0]=nvidia_384
+++ DEST_MODULE_NAME[1]=nvidia_384_modeset
+++ DEST_MODULE_NAME[2]=nvidia_384_drm
+++ DEST_MODULE_NAME[3]=nvidia_384_uvm
+++ DEST_MODULE_LOCATION[0]=/kernel/drivers/char/drm
+++ DEST_MODULE_LOCATION[1]=/kernel/drivers/char/drm
+++ DEST_MODULE_LOCATION[2]=/kernel/drivers/char/drm
+++ DEST_MODULE_LOCATION[3]=/kernel/drivers/char/drm
+++ AUTOINSTALL[0]=yes
++ rm /tmp/tmp.IpArSPi1na
++ for _conf_file in "$read_conf_file" "/etc/dkms/$module.conf" "/etc/dkms/$module-$module_version.conf" "/etc/dkms/$module-$module_version-$1.conf" "/etc/dkms/$module-$module_version-$1-$2.conf"
++ '[' -e /etc/dkms/.conf ']'
++ for _conf_file in "$read_conf_file" "/etc/dkms/$module.conf" "/etc/dkms/$module-$module_version.conf" "/etc/dkms/$module-$module_version-$1.conf" "/etc/dkms/$module-$module_version-$1-$2.conf"
++ '[' -e /etc/dkms/-.conf ']'
++ for _conf_file in "$read_conf_file" "/etc/dkms/$module.conf" "/etc/dkms/$module-$module_version.conf" "/etc/dkms/$module-$module_version-$1.conf" "/etc/dkms/$module-$module_version-$1-$2.conf"
++ '[' -e /etc/dkms/--4.10.0-42-generic.conf ']'
++ for _conf_file in "$read_conf_file" "/etc/dkms/$module.conf" "/etc/dkms/$module-$module_version.conf" "/etc/dkms/$module-$module_version-$1.conf" "/etc/dkms/$module-$module_version-$1-$2.conf"
++ '[' -e /etc/dkms/--4.10.0-42-generic-x86_64.conf ']'
++ clean='make clean'
++ package_name=nvidia-384
++ package_version=384.90
++ post_add=
++ post_build=
++ post_install=
++ post_remove=
++ pre_build=
++ pre_install=
++ obsolete_by=
++ local index array_size=0 s
++ for s in ${#BUILT_MODULE_NAME[@]} ${#BUILT_MODULE_LOCATION[@]} ${#DEST_MODULE_NAME[@]} ${#DEST_MODULE_LOCATION[@]}
++ (( s > array_size ))
++ array_size=4
++ for s in ${#BUILT_MODULE_NAME[@]} ${#BUILT_MODULE_LOCATION[@]} ${#DEST_MODULE_NAME[@]} ${#DEST_MODULE_LOCATION[@]}
++ (( s > array_size ))
++ for s in ${#BUILT_MODULE_NAME[@]} ${#BUILT_MODULE_LOCATION[@]} ${#DEST_MODULE_NAME[@]} ${#DEST_MODULE_LOCATION[@]}
++ (( s > array_size ))
++ for s in ${#BUILT_MODULE_NAME[@]} ${#BUILT_MODULE_LOCATION[@]} ${#DEST_MODULE_NAME[@]} ${#DEST_MODULE_LOCATION[@]}
++ (( s > array_size ))
++ (( index=0 ))
++ (( index < array_size ))
++ built_module_name[$index]=nvidia
++ built_module_location[$index]=
++ dest_module_name[$index]=nvidia_384
++ dest_module_location[$index]=/kernel/drivers/char/drm
++ modules_conf_obsoletes[$index]=
++ modules_conf_alias_type[$index]=
++ case ${MODULES_CONF_OBSOLETE_ONLY[$index]} in
++ case ${STRIP[$index]} in
++ strip[$index]=yes
++ [[ ! -n nvidia ]]
++ [[ ! -n nvidia_384 ]]
++ [[ -n '' ]]
++ [[ ! -n nvidia ]]
++ case ${built_module_name[$index]} in
++ case ${dest_module_name[$index]} in
+++ override_dest_module_location /kernel/drivers/char/drm
+++ local orig_location=/kernel/drivers/char/drm
+++ [[ -n '' ]]
+++ '[' Linux = GNU/kFreeBSD ']'
+++ case "$running_distribution" in
+++ echo /updates/dkms
+++ return
++ dest_module_location[$index]=/updates/dkms
++ [[ ! -n /kernel/drivers/char/drm ]]
++ case ${DEST_MODULE_LOCATION[$index]} in
++ (( index++ ))
++ (( index < array_size ))
++ built_module_name[$index]=nvidia-modeset
++ built_module_location[$index]=
++ dest_module_name[$index]=nvidia_384_modeset
++ dest_module_location[$index]=/kernel/drivers/char/drm
++ modules_conf_obsoletes[$index]=
++ modules_conf_alias_type[$index]=
++ case ${MODULES_CONF_OBSOLETE_ONLY[$index]} in
++ case ${STRIP[$index]} in
++ strip[$index]=yes
++ [[ ! -n nvidia-modeset ]]
++ [[ ! -n nvidia_384_modeset ]]
++ [[ -n '' ]]
++ [[ ! -n nvidia-modeset ]]
++ case ${built_module_name[$index]} in
++ case ${dest_module_name[$index]} in
+++ override_dest_module_location /kernel/drivers/char/drm
+++ local orig_location=/kernel/drivers/char/drm
+++ [[ -n '' ]]
+++ '[' Linux = GNU/kFreeBSD ']'
+++ case "$running_distribution" in
+++ echo /updates/dkms
+++ return
++ dest_module_location[$index]=/updates/dkms
++ [[ ! -n /kernel/drivers/char/drm ]]
++ case ${DEST_MODULE_LOCATION[$index]} in
++ (( index++ ))
++ (( index < array_size ))
++ built_module_name[$index]=nvidia-drm
++ built_module_location[$index]=
++ dest_module_name[$index]=nvidia_384_drm
++ dest_module_location[$index]=/kernel/drivers/char/drm
++ modules_conf_obsoletes[$index]=
++ modules_conf_alias_type[$index]=
++ case ${MODULES_CONF_OBSOLETE_ONLY[$index]} in
++ case ${STRIP[$index]} in
++ strip[$index]=yes
++ [[ ! -n nvidia-drm ]]
++ [[ ! -n nvidia_384_drm ]]
++ [[ -n '' ]]
++ [[ ! -n nvidia-drm ]]
++ case ${built_module_name[$index]} in
++ case ${dest_module_name[$index]} in
+++ override_dest_module_location /kernel/drivers/char/drm
+++ local orig_location=/kernel/drivers/char/drm
+++ [[ -n '' ]]
+++ '[' Linux = GNU/kFreeBSD ']'
+++ case "$running_distribution" in
+++ echo /updates/dkms
+++ return
++ dest_module_location[$index]=/updates/dkms
++ [[ ! -n /kernel/drivers/char/drm ]]
++ case ${DEST_MODULE_LOCATION[$index]} in
++ (( index++ ))
++ (( index < array_size ))
++ built_module_name[$index]=nvidia-uvm
++ built_module_location[$index]=
++ dest_module_name[$index]=nvidia_384_uvm
++ dest_module_location[$index]=/kernel/drivers/char/drm
++ modules_conf_obsoletes[$index]=
++ modules_conf_alias_type[$index]=
++ case ${MODULES_CONF_OBSOLETE_ONLY[$index]} in
++ case ${STRIP[$index]} in
++ strip[$index]=yes
++ [[ ! -n nvidia-uvm ]]
++ [[ ! -n nvidia_384_uvm ]]
++ [[ -n '' ]]
++ [[ ! -n nvidia-uvm ]]
++ case ${built_module_name[$index]} in
++ case ${dest_module_name[$index]} in
+++ override_dest_module_location /kernel/drivers/char/drm
+++ local orig_location=/kernel/drivers/char/drm
+++ [[ -n '' ]]
+++ '[' Linux = GNU/kFreeBSD ']'
+++ case "$running_distribution" in
+++ echo /updates/dkms
+++ return
++ dest_module_location[$index]=/updates/dkms
++ [[ ! -n /kernel/drivers/char/drm ]]
++ case ${DEST_MODULE_LOCATION[$index]} in
++ (( index++ ))
++ (( index < array_size ))
++ [[ -n '' ]]
++ make_command=''\''make'\'' -j8 NV_EXCLUDE_BUILD_MODULES='\'''\'' KERNEL_UNAME=4.10.0-42-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/4.10.0-42-generic/build LD=/usr/bin/ld.bfd modules'
++ (( index=0 ))
++ (( index < 1 ))
++ [[ -n 'make' -j8 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=4.10.0-42-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/4.10.0-42-generic/build LD=/usr/bin/ld.bfd modules ]]
++ [[ -n '' ]]
++ (( index++ ))
++ (( index < 1 ))
+++ VER 4.10.0-42-generic
+++ echo 4.10.0-42-generic
+++ sed -e 's:\([^0-9]\)\([0-9]\):\1 \2:g' -e 's:\([0-9]\)\([^0-9]\):\1 \2:g' -e 's:\(.*\): \1 :' -e 's: \([0-9]\) : 00\1 :g' -e 's: \([0-9][0-9]\) : 0\1 :g' -e 's: ::g'
+++ VER 2.6.6
+++ echo 2.6.6
+++ sed -e 's:\([^0-9]\)\([0-9]\):\1 \2:g' -e 's:\([0-9]\)\([^0-9]\):\1 \2:g' -e 's:\(.*\): \1 :' -e 's: \([0-9]\) : 00\1 :g' -e 's: \([0-9][0-9]\) : 0\1 :g' -e 's: ::g'
++ [[ 004.010.000-042-generic < 002.006.006 ]]
++ [[ ! -n 'make' -j8 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=4.10.0-42-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/4.10.0-42-generic/build LD=/usr/bin/ld.bfd modules ]]
++ [[ ! -n make clean ]]
++ (( index=0 ))
++ (( index < 0 ))
++ count=0
++ (( index=0 ))
++ (( index < 1 ))
++ [[ -n buildfix_kernel_4.14.patch ]]
++ [[ ! -n '' ]]
++ patch_array[$count]=buildfix_kernel_4.14.patch
++ count=1
++ (( index++ ))
++ (( index < 1 ))
++ [[ '' =~ ^(Y|y) ]]
++ [[ -n '' ]]
++ [[ -n '' ]]
++ (( 4 == 0 ))
++ [[ ! -n nvidia-384 ]]
++ [[ ! -n 384.90 ]]
++ [[ -n make clean ]]
++ (( return_value == 0 ))
++ last_mvka=//4.10.0-42-generic/x86_64
+++ readlink -f /var/lib/dkms/nvidia-384/384.90/source/dkms.conf
++ last_mvka_conf=/usr/src/nvidia-384-384.90/dkms.conf
++ return 0
++ return
++ for m in "${dest_module_name[@]}"
++ [[ -f /var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64/module/nvidia_384.ko ]]
++ for m in "${dest_module_name[@]}"
++ [[ -f /var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64/module/nvidia_384_modeset.ko ]]
++ for m in "${dest_module_name[@]}"
++ [[ -f /var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64/module/nvidia_384_drm.ko ]]
++ for m in "${dest_module_name[@]}"
++ [[ -f /var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64/module/nvidia_384_uvm.ko ]]
++ ret=0
++ state=built
++ _is_module_installed nvidia-384 384.90 4.10.0-42-generic x86_64
++ [[ -n nvidia-384 ]]
++ [[ -n 384.90 ]]
++ [[ -n 4.10.0-42-generic ]]
++ [[ -n x86_64 ]]
++ local d=/var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64
++ local k=/var/lib/dkms/nvidia-384/kernel-4.10.0-42-generic-x86_64
++ [[ -L /var/lib/dkms/nvidia-384/kernel-4.10.0-42-generic-x86_64 ]]
+++ readlink -f /var/lib/dkms/nvidia-384/kernel-4.10.0-42-generic-x86_64
++ [[ /var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64 = /var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64 ]]
++ state=installed
++ echo 'installed nvidia-384/384.90/4.10.0-42-generic/x86_64'

dysonsphere (dysonsphere23) said : #16

sudo bash -x dkms autoinstall --kernelver 4.10.0-35-generic
[sudo] password for dysonsphere:
+ shopt -s extglob
+ readonly 'dkms_conf_variables=CLEAN REMAKE_INITRD remake_initrd PACKAGE_NAME
   PACKAGE_VERSION POST_ADD POST_BUILD POST_INSTALL POST_REMOVE PRE_BUILD
   PRE_INSTALL BUILD_DEPENDS BUILD_EXCLUSIVE_KERNEL BUILD_EXCLUSIVE_ARCH
   build_exclude OBSOLETE_BY MAKE MAKE_MATCH MODULES_CONF
   modules_conf_array PATCH PATCH_MATCH patch_array BUILT_MODULE_NAME
   built_module_name BUILT_MODULE_LOCATION built_module_location
   DEST_MODULE_NAME dest_module_name MODULES_CONF_OBSOLETES
   DEST_MODULE_LOCATION dest_module_location
   modules_conf_obsoletes MODULES_CONF_ALIAS_TYPE
   modules_conf_alias_type STRIP strip MODULES_CONF_OBSOLETE_ONLY
   modules_conf_obsolete_only AUTOINSTALL NO_WEAK_MODULES'
+ dkms_conf_variables='CLEAN REMAKE_INITRD remake_initrd PACKAGE_NAME
   PACKAGE_VERSION POST_ADD POST_BUILD POST_INSTALL POST_REMOVE PRE_BUILD
   PRE_INSTALL BUILD_DEPENDS BUILD_EXCLUSIVE_KERNEL BUILD_EXCLUSIVE_ARCH
   build_exclude OBSOLETE_BY MAKE MAKE_MATCH MODULES_CONF
   modules_conf_array PATCH PATCH_MATCH patch_array BUILT_MODULE_NAME
   built_module_name BUILT_MODULE_LOCATION built_module_location
   DEST_MODULE_NAME dest_module_name MODULES_CONF_OBSOLETES
   DEST_MODULE_LOCATION dest_module_location
   modules_conf_obsoletes MODULES_CONF_ALIAS_TYPE
   modules_conf_alias_type STRIP strip MODULES_CONF_OBSOLETE_ONLY
   modules_conf_obsolete_only AUTOINSTALL NO_WEAK_MODULES'
+ readonly 'y_re=^(Y|y)'
+ y_re='^(Y|y)'
+ readonly 'mv_re=^([^/]*)/(.*)$'
+ mv_re='^([^/]*)/(.*)$'
+ readonly 'rh_kernels=(debug|summit|smp|enterprise|bigmem|hugemem|BOOT|vmnix)'
+ rh_kernels='(debug|summit|smp|enterprise|bigmem|hugemem|BOOT|vmnix)'
+ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/lib/dkms
+ umask 022
+ unset CC CXX CFLAGS CXXFLAGS LDFLAGS
++ uname -r
+ current_kernel=4.10.0-42-generic
++ uname -s
+ current_os=Linux
+ dkms_tree=/var/lib/dkms
+ source_tree=/usr/src
+ install_tree=/lib/modules
+ tmp_location=/tmp
+ verbose=
+ symlink_modules=
+ dkms_frameworkconf=/etc/dkms/framework.conf
+ [[ ! -n '' ]]
+ [[ -e /etc/sysconfig/module-init-tools ]]
+ addon_modules_dir=
+ [[ ! -n '' ]]
++ distro_version
++ local LSB_DESCRIPTION DISTRIB_ID DISTRIB_RELEASE ver
++ '[' -r /etc/lsb-release ']'
++ . /etc/lsb-release
+++ DISTRIB_ID=Ubuntu
+++ DISTRIB_RELEASE=17.10
+++ DISTRIB_CODENAME=artful
+++ DISTRIB_DESCRIPTION='Ubuntu 17.10'
++ case ${DISTRIB_ID} in
++ [[ -n Ubuntu ]]
++ [[ -n 17.10 ]]
++ echo Ubuntu17.10
+ running_distribution=Ubuntu17.10
+ weak_modules=
+ '[' -e /etc/dkms/framework.conf ']'
+ . /etc/dkms/framework.conf
+ module=
+ module_version=
+ template_kernel=
+ distro=
+ media=
+ release=
+ conf=
+ kernel_config=
+ archive_location=
+ kernel_source_dir=
+ ksourcedir_fromcli=
+ action=
+ force=
+ no_prepare_kernel=
+ no_clean_kernel=
+ binaries_only=
+ source_only=
+ all=
+ module_suffix=
+ rpm_safe_upgrade=
+ size=1440
+ specfile=
+ legacy_postinst=1
+ directive_array=()
+ kernelver=()
+ arch=()
+ declare -a directive_array kernelver arch
+ weak_modules=
+ last_mvka=
+ last_mvka_conf=
+ try_source_tree=
+ die_is_fatal=yes
+ '[' -x /sbin/weak-modules ']'
+ '[' -x /usr/lib/module-init-tools/weak-modules ']'
+ no_depmod=
+ action_re='^(remove|(auto|un)?install|match|mk(driverdisk|tarball|rpm|deb|bmdeb|dsc|kmp)|build|add|status|ldtarball)$'
+ (( 3 > 0 ))
+ case $1 in
+ [[ autoinstall =~ ^(remove|(auto|un)?install|match|mk(driverdisk|tarball|rpm|deb|bmdeb|dsc|kmp)|build|add|status|ldtarball)$ ]]
+ action=' autoinstall'
+ shift
+ (( 2 > 0 ))
+ case $1 in
+ read_arg _ka --kernelver 4.10.0-35-generic
+ local 'rematch=^[^=]*=(.*)$'
+ [[ --kernelver =~ ^[^=]*=(.*)$ ]]
+ read _ka
+ return 1
+ shift
+ parse_kernelarch 4.10.0-35-generic
+ [[ 4.10.0-35-generic =~ ^([^/]*)/(.*)$ ]]
+ kernelver[${#kernelver[@]}]=4.10.0-35-generic
+ shift
+ (( 0 > 0 ))
+ [[ -n '' ]]
+ (( 1 != 0 && 0 > 1 ))
+ [[ -n 4.10.0-35-generic ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
++ get_num_cpus
++ '[' -x /usr/bin/nproc ']'
++ nproc
+ parallel_jobs=8
+ [[ 8 = 0 ]]
+ '[' -z ' autoinstall' ']'
+ for action_to_run in $action
+ setup_kernels_arches autoinstall
+ [[ -n '' ]]
+ [[ autoinstall != status ]]
+ [[ ! -n 4.10.0-35-generic ]]
+ [[ ! -n '' ]]
++ rpm -qf /lib/modules/4.10.0-35-generic
++ grep -v 'not owned by any package'
++ grep kernel
++ head -n 1
+ kernelver_rpm=
++ rpm -q --queryformat '%{ARCH}' ''
+ arch[0]=
++ uname -m
+ arch[0]=x86_64
+ [[ x86_64 = x86_64 ]]
+ grep -q Intel /proc/cpuinfo
+ ls /lib/modules/4.10.0-35-generic/build/configs
+ grep -q ia32e
+ (( 1 == 1 && 1 > 1 ))
+ multi_arch=
+ local i=0
+ (( i=0 ))
+ (( 0 < 1 ))
+ [[ x86_64 != x86_64 ]]
+ (( i++ ))
+ (( 1 < 1 ))
+ case "$action_to_run" in
+ check_root
+ (( UID == 0 ))
+ return
+ autoinstall
+ local status mv mvka m v k a last_v last_m tenative
+ local install_count next_depends
+ to_install=()
+ local -a to_install
+ next_install=()
+ local -a next_install
+ installed_modules=()
+ local -a installed_modules
+ build_depends=()
+ local -A build_depends
+ read status mvka
++ module_status
++ local 'oifs=
' IFS= mv m v directory ret=1
++ for directory in "$dkms_tree/"${1:-*}/${2:-*}
++ IFS='
'
++ mv=bbswitch/0.8
++ m=bbswitch
++ v=0.8
++ is_module_added bbswitch 0.8
++ [[ -n bbswitch ]]
++ [[ -n 0.8 ]]
++ [[ -d /var/lib/dkms/bbswitch/0.8 ]]
++ [[ -L /var/lib/dkms/bbswitch/0.8/source ]]
++ ret=0
++ module_status_built bbswitch 0.8 '' ''
++ local ret=1 directory ka k a state 'oifs=
' IFS=
++ for directory in "$dkms_tree/$1/$2/"${3:-+([0-9]).*}/${4:-*}
++ IFS='
'
++ ka=4.4.0-79-generic/x86_64
++ k=4.4.0-79-generic
++ a=x86_64
++ is_module_built bbswitch 0.8 4.4.0-79-generic x86_64
++ [[ -n bbswitch ]]
++ [[ -n 0.8 ]]
++ [[ -n 4.4.0-79-generic ]]
++ [[ -n x86_64 ]]
++ local d=/var/lib/dkms/bbswitch/0.8/4.4.0-79-generic/x86_64 m=
++ [[ -d /var/lib/dkms/bbswitch/0.8/4.4.0-79-generic/x86_64/module ]]
++ return 1
++ continue
++ IFS='
'
++ return 1
++ echo 'added bbswitch/0.8'
++ IFS=
++ for directory in "$dkms_tree/"${1:-*}/${2:-*}
++ IFS='
'
++ mv=nvidia-384/384.90
+ IFS=/
+ read m v k a
++ m=nvidia-384
++ v=384.90
++ is_module_added nvidia-384 384.90
++ [[ -n nvidia-384 ]]
++ [[ -n 384.90 ]]
++ [[ -d /var/lib/dkms/nvidia-384/384.90 ]]
++ [[ -L /var/lib/dkms/nvidia-384/384.90/source ]]
++ ret=0
++ module_status_built nvidia-384 384.90 '' ''
++ local ret=1 directory ka k a state 'oifs=
+ [[ ! -n '' ]]
' IFS=
+ last_m=bbswitch
+ [[ bbswitch != bbswitch ]]
+ _is_module_installed bbswitch 0.8 4.10.0-35-generic x86_64
+ [[ -n bbswitch ]]
+ [[ -n 0.8 ]]
+ [[ -n 4.10.0-35-generic ]]
+ [[ -n x86_64 ]]
+ local d=/var/lib/dkms/bbswitch/0.8/4.10.0-35-generic/x86_64
+ local k=/var/lib/dkms/bbswitch/kernel-4.10.0-35-generic-x86_64
+ [[ -L /var/lib/dkms/bbswitch/kernel-4.10.0-35-generic-x86_64 ]]
+ module_status_weak bbswitch 0.8 4.10.0-35-generic x86_64
++ for directory in "$dkms_tree/$1/$2/"${3:-+([0-9]).*}/${4:-*}
++ IFS='
'
+ '[' -z '' ']'
++ ka=4.10.0-42-generic/x86_64
+ [[ -n '' ]]
+ return 1
++ k=4.10.0-42-generic
++ a=x86_64
+ read_conf_or_die '' '' /var/lib/dkms/bbswitch/0.8/source/dkms.conf
++ is_module_built nvidia-384 384.90 4.10.0-42-generic x86_64
+ read_conf '' '' /var/lib/dkms/bbswitch/0.8/source/dkms.conf
++ [[ -n nvidia-384 ]]
++ [[ -n 384.90 ]]
++ [[ -n 4.10.0-42-generic ]]
++ [[ -n x86_64 ]]
++ local d=/var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64 m=
++ [[ -d /var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64/module ]]
++ read_conf_or_die 4.10.0-42-generic x86_64 /var/lib/dkms/nvidia-384/384.90/source/dkms.conf
+ local return_value=0
+ local read_conf_file=/var/lib/dkms///source/dkms.conf
++ read_conf 4.10.0-42-generic x86_64 /var/lib/dkms/nvidia-384/384.90/source/dkms.conf
+ local kernelver=
+ local arch=
+ set_kernel_source_dir ''
++ local return_value=0
++ local read_conf_file=/var/lib/dkms///source/dkms.conf
++ local kernelver=4.10.0-42-generic
++ local arch=x86_64
++ set_kernel_source_dir 4.10.0-42-generic
++ _get_kernel_dir ''
++ KVER=
++ case ${current_os} in
++ DIR=/lib/modules//build
++ '[' '!' -z '' ']'
++ echo /lib/modules//build
+++ _get_kernel_dir 4.10.0-42-generic
+++ KVER=4.10.0-42-generic
+++ case ${current_os} in
+++ DIR=/lib/modules/4.10.0-42-generic/build
+++ '[' '!' -z '' ']'
+++ echo /lib/modules/4.10.0-42-generic/build
+ kernel_source_dir=/lib/modules//build
+ [[ -n '' ]]
+ [[ -n /var/lib/dkms/bbswitch/0.8/source/dkms.conf ]]
+ read_conf_file=/var/lib/dkms/bbswitch/0.8/source/dkms.conf
+ [[ -r /var/lib/dkms/bbswitch/0.8/source/dkms.conf ]]
+ die 4 'Could not locate dkms.conf file.' 'File: does not exist.'
+ ret=4
+ shift
++ kernel_source_dir=/lib/modules/4.10.0-42-generic/build
+ error 'Could not locate dkms.conf file.' 'File: does not exist.'
++ [[ -n '' ]]
++ [[ -n /var/lib/dkms/nvidia-384/384.90/source/dkms.conf ]]
++ read_conf_file=/var/lib/dkms/nvidia-384/384.90/source/dkms.conf
++ [[ -r /var/lib/dkms/nvidia-384/384.90/source/dkms.conf ]]
++ [[ '' = //4.10.0-42-generic/x86_64 ]]
++ for var in $dkms_conf_variables
++ unset CLEAN
+ exec
++ for var in $dkms_conf_variables
++ unset REMAKE_INITRD
++ for var in $dkms_conf_variables
+ echo -n 'Error! '
++ unset remake_initrd
++ for var in $dkms_conf_variables
Error! ++ unset PACKAGE_NAME
+ for s in "$@"
++ for var in $dkms_conf_variables
+ echo 'Could not locate dkms.conf file.'
Could not locate dkms.conf file.
++ unset PACKAGE_VERSION
+ for s in "$@"
+ echo 'File: does not exist.'
File: does not exist.
++ for var in $dkms_conf_variables
++ unset POST_ADD
++ for var in $dkms_conf_variables
++ unset POST_BUILD
++ for var in $dkms_conf_variables
++ unset POST_INSTALL
++ for var in $dkms_conf_variables
++ unset POST_REMOVE
++ for var in $dkms_conf_variables
++ unset PRE_BUILD
++ for var in $dkms_conf_variables
++ unset PRE_INSTALL
++ for var in $dkms_conf_variables
++ unset BUILD_DEPENDS
++ for var in $dkms_conf_variables
++ unset BUILD_EXCLUSIVE_KERNEL
+ [[ yes = yes ]]
++ for var in $dkms_conf_variables
+ exit 4
++ unset BUILD_EXCLUSIVE_ARCH
++ for var in $dkms_conf_variables
++ unset build_exclude
++ for var in $dkms_conf_variables
++ unset OBSOLETE_BY
++ for var in $dkms_conf_variables
++ unset MAKE
++ for var in $dkms_conf_variables
++ unset MAKE_MATCH
++ for var in $dkms_conf_variables
++ unset MODULES_CONF
++ for var in $dkms_conf_variables
++ unset modules_conf_array
++ for var in $dkms_conf_variables
++ unset PATCH
++ for var in $dkms_conf_variables
++ unset PATCH_MATCH
++ for var in $dkms_conf_variables
++ unset patch_array
++ for var in $dkms_conf_variables
++ unset BUILT_MODULE_NAME
++ for var in $dkms_conf_variables
++ unset built_module_name
++ for var in $dkms_conf_variables
++ unset BUILT_MODULE_LOCATION
++ for var in $dkms_conf_variables
++ unset built_module_location
++ for var in $dkms_conf_variables
++ unset DEST_MODULE_NAME
++ for var in $dkms_conf_variables
++ unset dest_module_name
++ for var in $dkms_conf_variables
++ unset MODULES_CONF_OBSOLETES
++ for var in $dkms_conf_variables
++ unset DEST_MODULE_LOCATION
++ for var in $dkms_conf_variables
++ unset dest_module_location
++ for var in $dkms_conf_variables
++ unset modules_conf_obsoletes
++ for var in $dkms_conf_variables
++ unset MODULES_CONF_ALIAS_TYPE
++ for var in $dkms_conf_variables
++ unset modules_conf_alias_type
++ for var in $dkms_conf_variables
++ unset STRIP
++ for var in $dkms_conf_variables
++ unset strip
++ for var in $dkms_conf_variables
++ unset MODULES_CONF_OBSOLETE_ONLY
++ for var in $dkms_conf_variables
++ unset modules_conf_obsolete_only
++ for var in $dkms_conf_variables
++ unset AUTOINSTALL
++ for var in $dkms_conf_variables
++ unset NO_WEAK_MODULES
++ local _conf_file
++ for _conf_file in "$read_conf_file" "/etc/dkms/$module.conf" "/etc/dkms/$module-$module_version.conf" "/etc/dkms/$module-$module_version-$1.conf" "/etc/dkms/$module-$module_version-$1-$2.conf"
++ '[' -e /var/lib/dkms/nvidia-384/384.90/source/dkms.conf ']'
++ safe_source /var/lib/dkms/nvidia-384/384.90/source/dkms.conf CLEAN REMAKE_INITRD remake_initrd PACKAGE_NAME PACKAGE_VERSION POST_ADD POST_BUILD POST_INSTALL POST_REMOVE PRE_BUILD PRE_INSTALL BUILD_DEPENDS BUILD_EXCLUSIVE_KERNEL BUILD_EXCLUSIVE_ARCH build_exclude OBSOLETE_BY MAKE MAKE_MATCH MODULES_CONF modules_conf_array PATCH PATCH_MATCH patch_array BUILT_MODULE_NAME built_module_name BUILT_MODULE_LOCATION built_module_location DEST_MODULE_NAME dest_module_name MODULES_CONF_OBSOLETES DEST_MODULE_LOCATION dest_module_location modules_conf_obsoletes MODULES_CONF_ALIAS_TYPE modules_conf_alias_type STRIP strip MODULES_CONF_OBSOLETE_ONLY modules_conf_obsolete_only AUTOINSTALL NO_WEAK_MODULES
++ local to_source_file=/var/lib/dkms/nvidia-384/384.90/source/dkms.conf
++ shift
++ export_envs=("$@")
dysonsphere@dyson-G751JY:~$ ++ declare -a -r export_envs
+++ mktemp_or_die
+++ local t
++++ mktemp
+++ t=/tmp/tmp.iprjzrMDEM
+++ echo /tmp/tmp.iprjzrMDEM
+++ return
++ local tmpfile=/tmp/tmp.iprjzrMDEM
++ exec
++ . /var/lib/dkms/nvidia-384/384.90/source/dkms.conf
+++ PACKAGE_NAME=nvidia-384
+++ PACKAGE_VERSION=384.90
+++ CLEAN='make clean'
+++ BUILT_MODULE_NAME[0]=nvidia
+++ DEST_MODULE_NAME[0]=nvidia_384
+++ DEST_MODULE_LOCATION[0]=/kernel/drivers/char/drm
++++ nproc
+++ PROCS_NUM=8
+++ '[' 8 -gt 16 ']'
+++ MAKE[0]=''\''make'\'' -j8 NV_EXCLUDE_BUILD_MODULES='\'''\'' KERNEL_UNAME=4.10.0-42-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/4.10.0-42-generic/build LD=/usr/bin/ld.bfd modules'
+++ BUILT_MODULE_NAME[1]=nvidia-modeset
+++ DEST_MODULE_NAME[1]=nvidia_384_modeset
+++ DEST_MODULE_LOCATION[1]=/kernel/drivers/char/drm
+++ BUILT_MODULE_NAME[2]=nvidia-drm
+++ DEST_MODULE_NAME[2]=nvidia_384_drm
+++ DEST_MODULE_LOCATION[2]=/kernel/drivers/char/drm
+++ AUTOINSTALL=yes
+++ PATCH[0]=buildfix_kernel_4.14.patch
+++ BUILT_MODULE_NAME[3]=nvidia-uvm
+++ DEST_MODULE_LOCATION[3]=/kernel/drivers/char/drm
+++ DEST_MODULE_NAME[3]=nvidia_384_uvm
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!CLEAN[@]}'
++++ echo 0
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${CLEAN[$_i]}\"'
+++ echo 'CLEAN[0]="make' 'clean"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!REMAKE_INITRD[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!remake_initrd[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!PACKAGE_NAME[@]}'
++++ echo 0
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${PACKAGE_NAME[$_i]}\"'
+++ echo 'PACKAGE_NAME[0]="nvidia-384"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!PACKAGE_VERSION[@]}'
++++ echo 0
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${PACKAGE_VERSION[$_i]}\"'
+++ echo 'PACKAGE_VERSION[0]="384.90"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!POST_ADD[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!POST_BUILD[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!POST_INSTALL[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!POST_REMOVE[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!PRE_BUILD[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!PRE_INSTALL[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!BUILD_DEPENDS[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!BUILD_EXCLUSIVE_KERNEL[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!BUILD_EXCLUSIVE_ARCH[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!build_exclude[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!OBSOLETE_BY[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!MAKE[@]}'
++++ echo 0
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${MAKE[$_i]}\"'
+++ echo 'MAKE[0]="'\''make'\''' -j8 'NV_EXCLUDE_BUILD_MODULES='\'''\''' KERNEL_UNAME=4.10.0-42-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/4.10.0-42-generic/build LD=/usr/bin/ld.bfd 'modules"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!MAKE_MATCH[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!MODULES_CONF[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!modules_conf_array[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!PATCH[@]}'
++++ echo 0
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${PATCH[$_i]}\"'
+++ echo 'PATCH[0]="buildfix_kernel_4.14.patch"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!PATCH_MATCH[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!patch_array[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!BUILT_MODULE_NAME[@]}'
++++ echo 0 1 2 3
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${BUILT_MODULE_NAME[$_i]}\"'
+++ echo 'BUILT_MODULE_NAME[0]="nvidia"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${BUILT_MODULE_NAME[$_i]}\"'
+++ echo 'BUILT_MODULE_NAME[1]="nvidia-modeset"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${BUILT_MODULE_NAME[$_i]}\"'
+++ echo 'BUILT_MODULE_NAME[2]="nvidia-drm"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${BUILT_MODULE_NAME[$_i]}\"'
+++ echo 'BUILT_MODULE_NAME[3]="nvidia-uvm"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!built_module_name[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!BUILT_MODULE_LOCATION[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!built_module_location[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!DEST_MODULE_NAME[@]}'
++++ echo 0 1 2 3
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_NAME[$_i]}\"'
+++ echo 'DEST_MODULE_NAME[0]="nvidia_384"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_NAME[$_i]}\"'
+++ echo 'DEST_MODULE_NAME[1]="nvidia_384_modeset"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_NAME[$_i]}\"'
+++ echo 'DEST_MODULE_NAME[2]="nvidia_384_drm"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_NAME[$_i]}\"'
+++ echo 'DEST_MODULE_NAME[3]="nvidia_384_uvm"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!dest_module_name[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!MODULES_CONF_OBSOLETES[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!DEST_MODULE_LOCATION[@]}'
++++ echo 0 1 2 3
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_LOCATION[$_i]}\"'
+++ echo 'DEST_MODULE_LOCATION[0]="/kernel/drivers/char/drm"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_LOCATION[$_i]}\"'
+++ echo 'DEST_MODULE_LOCATION[1]="/kernel/drivers/char/drm"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_LOCATION[$_i]}\"'
+++ echo 'DEST_MODULE_LOCATION[2]="/kernel/drivers/char/drm"'
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${DEST_MODULE_LOCATION[$_i]}\"'
+++ echo 'DEST_MODULE_LOCATION[3]="/kernel/drivers/char/drm"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!dest_module_location[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!modules_conf_obsoletes[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!MODULES_CONF_ALIAS_TYPE[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!modules_conf_alias_type[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!STRIP[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!strip[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!MODULES_CONF_OBSOLETE_ONLY[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!modules_conf_obsolete_only[@]}'
++++ echo
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!AUTOINSTALL[@]}'
++++ echo 0
++ for _i in $(eval echo \${!$_export_env[@]})
++ eval echo '$_export_env[$_i]=\"${AUTOINSTALL[$_i]}\"'
+++ echo 'AUTOINSTALL[0]="yes"'
++ for _export_env in "${export_envs[@]}"
+++ eval echo '${!NO_WEAK_MODULES[@]}'
++++ echo
+++ set
+++ grep '^DKMS_DIRECTIVE'
+++ cut -d = -f 2-3
++ . /tmp/tmp.iprjzrMDEM
+++ CLEAN[0]='make clean'
+++ PACKAGE_NAME[0]=nvidia-384
+++ PACKAGE_VERSION[0]=384.90
+++ MAKE[0]=''\''make'\'' -j8 NV_EXCLUDE_BUILD_MODULES='\'''\'' KERNEL_UNAME=4.10.0-42-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/4.10.0-42-generic/build LD=/usr/bin/ld.bfd modules'
+++ PATCH[0]=buildfix_kernel_4.14.patch
+++ BUILT_MODULE_NAME[0]=nvidia
+++ BUILT_MODULE_NAME[1]=nvidia-modeset
+++ BUILT_MODULE_NAME[2]=nvidia-drm
+++ BUILT_MODULE_NAME[3]=nvidia-uvm
+++ DEST_MODULE_NAME[0]=nvidia_384
+++ DEST_MODULE_NAME[1]=nvidia_384_modeset
+++ DEST_MODULE_NAME[2]=nvidia_384_drm
+++ DEST_MODULE_NAME[3]=nvidia_384_uvm
+++ DEST_MODULE_LOCATION[0]=/kernel/drivers/char/drm
+++ DEST_MODULE_LOCATION[1]=/kernel/drivers/char/drm
+++ DEST_MODULE_LOCATION[2]=/kernel/drivers/char/drm
+++ DEST_MODULE_LOCATION[3]=/kernel/drivers/char/drm
+++ AUTOINSTALL[0]=yes
++ rm /tmp/tmp.iprjzrMDEM
++ for _conf_file in "$read_conf_file" "/etc/dkms/$module.conf" "/etc/dkms/$module-$module_version.conf" "/etc/dkms/$module-$module_version-$1.conf" "/etc/dkms/$module-$module_version-$1-$2.conf"
++ '[' -e /etc/dkms/.conf ']'
++ for _conf_file in "$read_conf_file" "/etc/dkms/$module.conf" "/etc/dkms/$module-$module_version.conf" "/etc/dkms/$module-$module_version-$1.conf" "/etc/dkms/$module-$module_version-$1-$2.conf"
++ '[' -e /etc/dkms/-.conf ']'
++ for _conf_file in "$read_conf_file" "/etc/dkms/$module.conf" "/etc/dkms/$module-$module_version.conf" "/etc/dkms/$module-$module_version-$1.conf" "/etc/dkms/$module-$module_version-$1-$2.conf"
++ '[' -e /etc/dkms/--4.10.0-42-generic.conf ']'
++ for _conf_file in "$read_conf_file" "/etc/dkms/$module.conf" "/etc/dkms/$module-$module_version.conf" "/etc/dkms/$module-$module_version-$1.conf" "/etc/dkms/$module-$module_version-$1-$2.conf"
++ '[' -e /etc/dkms/--4.10.0-42-generic-x86_64.conf ']'
++ clean='make clean'
++ package_name=nvidia-384
++ package_version=384.90
++ post_add=
++ post_build=
++ post_install=
++ post_remove=
++ pre_build=
++ pre_install=
++ obsolete_by=
++ local index array_size=0 s
++ for s in ${#BUILT_MODULE_NAME[@]} ${#BUILT_MODULE_LOCATION[@]} ${#DEST_MODULE_NAME[@]} ${#DEST_MODULE_LOCATION[@]}
++ (( s > array_size ))
++ array_size=4
++ for s in ${#BUILT_MODULE_NAME[@]} ${#BUILT_MODULE_LOCATION[@]} ${#DEST_MODULE_NAME[@]} ${#DEST_MODULE_LOCATION[@]}
++ (( s > array_size ))
++ for s in ${#BUILT_MODULE_NAME[@]} ${#BUILT_MODULE_LOCATION[@]} ${#DEST_MODULE_NAME[@]} ${#DEST_MODULE_LOCATION[@]}
++ (( s > array_size ))
++ for s in ${#BUILT_MODULE_NAME[@]} ${#BUILT_MODULE_LOCATION[@]} ${#DEST_MODULE_NAME[@]} ${#DEST_MODULE_LOCATION[@]}
++ (( s > array_size ))
++ (( index=0 ))
++ (( index < array_size ))
++ built_module_name[$index]=nvidia
++ built_module_location[$index]=
++ dest_module_name[$index]=nvidia_384
++ dest_module_location[$index]=/kernel/drivers/char/drm
++ modules_conf_obsoletes[$index]=
++ modules_conf_alias_type[$index]=
++ case ${MODULES_CONF_OBSOLETE_ONLY[$index]} in
++ case ${STRIP[$index]} in
++ strip[$index]=yes
++ [[ ! -n nvidia ]]
++ [[ ! -n nvidia_384 ]]
++ [[ -n '' ]]
++ [[ ! -n nvidia ]]
++ case ${built_module_name[$index]} in
++ case ${dest_module_name[$index]} in
+++ override_dest_module_location /kernel/drivers/char/drm
+++ local orig_location=/kernel/drivers/char/drm
+++ [[ -n '' ]]
+++ '[' Linux = GNU/kFreeBSD ']'
+++ case "$running_distribution" in
+++ echo /updates/dkms
+++ return
++ dest_module_location[$index]=/updates/dkms
++ [[ ! -n /kernel/drivers/char/drm ]]
++ case ${DEST_MODULE_LOCATION[$index]} in
++ (( index++ ))
++ (( index < array_size ))
++ built_module_name[$index]=nvidia-modeset
++ built_module_location[$index]=
++ dest_module_name[$index]=nvidia_384_modeset
++ dest_module_location[$index]=/kernel/drivers/char/drm
++ modules_conf_obsoletes[$index]=
++ modules_conf_alias_type[$index]=
++ case ${MODULES_CONF_OBSOLETE_ONLY[$index]} in
++ case ${STRIP[$index]} in
++ strip[$index]=yes
++ [[ ! -n nvidia-modeset ]]
++ [[ ! -n nvidia_384_modeset ]]
++ [[ -n '' ]]
++ [[ ! -n nvidia-modeset ]]
++ case ${built_module_name[$index]} in
++ case ${dest_module_name[$index]} in
+++ override_dest_module_location /kernel/drivers/char/drm
+++ local orig_location=/kernel/drivers/char/drm
+++ [[ -n '' ]]
+++ '[' Linux = GNU/kFreeBSD ']'
+++ case "$running_distribution" in
+++ echo /updates/dkms
+++ return
++ dest_module_location[$index]=/updates/dkms
++ [[ ! -n /kernel/drivers/char/drm ]]
++ case ${DEST_MODULE_LOCATION[$index]} in
++ (( index++ ))
++ (( index < array_size ))
++ built_module_name[$index]=nvidia-drm
++ built_module_location[$index]=
++ dest_module_name[$index]=nvidia_384_drm
++ dest_module_location[$index]=/kernel/drivers/char/drm
++ modules_conf_obsoletes[$index]=
++ modules_conf_alias_type[$index]=
++ case ${MODULES_CONF_OBSOLETE_ONLY[$index]} in
++ case ${STRIP[$index]} in
++ strip[$index]=yes
++ [[ ! -n nvidia-drm ]]
++ [[ ! -n nvidia_384_drm ]]
++ [[ -n '' ]]
++ [[ ! -n nvidia-drm ]]
++ case ${built_module_name[$index]} in
++ case ${dest_module_name[$index]} in
+++ override_dest_module_location /kernel/drivers/char/drm
+++ local orig_location=/kernel/drivers/char/drm
+++ [[ -n '' ]]
+++ '[' Linux = GNU/kFreeBSD ']'
+++ case "$running_distribution" in
+++ echo /updates/dkms
+++ return
++ dest_module_location[$index]=/updates/dkms
++ [[ ! -n /kernel/drivers/char/drm ]]
++ case ${DEST_MODULE_LOCATION[$index]} in
++ (( index++ ))
++ (( index < array_size ))
++ built_module_name[$index]=nvidia-uvm
++ built_module_location[$index]=
++ dest_module_name[$index]=nvidia_384_uvm
++ dest_module_location[$index]=/kernel/drivers/char/drm
++ modules_conf_obsoletes[$index]=
++ modules_conf_alias_type[$index]=
++ case ${MODULES_CONF_OBSOLETE_ONLY[$index]} in
++ case ${STRIP[$index]} in
++ strip[$index]=yes
++ [[ ! -n nvidia-uvm ]]
++ [[ ! -n nvidia_384_uvm ]]
++ [[ -n '' ]]
++ [[ ! -n nvidia-uvm ]]
++ case ${built_module_name[$index]} in
++ case ${dest_module_name[$index]} in
+++ override_dest_module_location /kernel/drivers/char/drm
+++ local orig_location=/kernel/drivers/char/drm
+++ [[ -n '' ]]
+++ '[' Linux = GNU/kFreeBSD ']'
+++ case "$running_distribution" in
+++ echo /updates/dkms
+++ return
++ dest_module_location[$index]=/updates/dkms
++ [[ ! -n /kernel/drivers/char/drm ]]
++ case ${DEST_MODULE_LOCATION[$index]} in
++ (( index++ ))
++ (( index < array_size ))
++ [[ -n '' ]]
++ make_command=''\''make'\'' -j8 NV_EXCLUDE_BUILD_MODULES='\'''\'' KERNEL_UNAME=4.10.0-42-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/4.10.0-42-generic/build LD=/usr/bin/ld.bfd modules'
++ (( index=0 ))
++ (( index < 1 ))
++ [[ -n 'make' -j8 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=4.10.0-42-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/4.10.0-42-generic/build LD=/usr/bin/ld.bfd modules ]]
++ [[ -n '' ]]
++ (( index++ ))
++ (( index < 1 ))
+++ VER 4.10.0-42-generic
+++ echo 4.10.0-42-generic
+++ sed -e 's:\([^0-9]\)\([0-9]\):\1 \2:g' -e 's:\([0-9]\)\([^0-9]\):\1 \2:g' -e 's:\(.*\): \1 :' -e 's: \([0-9]\) : 00\1 :g' -e 's: \([0-9][0-9]\) : 0\1 :g' -e 's: ::g'
+++ VER 2.6.6
+++ echo 2.6.6
+++ sed -e 's:\([^0-9]\)\([0-9]\):\1 \2:g' -e 's:\([0-9]\)\([^0-9]\):\1 \2:g' -e 's:\(.*\): \1 :' -e 's: \([0-9]\) : 00\1 :g' -e 's: \([0-9][0-9]\) : 0\1 :g' -e 's: ::g'
++ [[ 004.010.000-042-generic < 002.006.006 ]]
++ [[ ! -n 'make' -j8 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=4.10.0-42-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/4.10.0-42-generic/build LD=/usr/bin/ld.bfd modules ]]
++ [[ ! -n make clean ]]
++ (( index=0 ))
++ (( index < 0 ))
++ count=0
++ (( index=0 ))
++ (( index < 1 ))
++ [[ -n buildfix_kernel_4.14.patch ]]
++ [[ ! -n '' ]]
++ patch_array[$count]=buildfix_kernel_4.14.patch
++ count=1
++ (( index++ ))
++ (( index < 1 ))
++ [[ '' =~ ^(Y|y) ]]
++ [[ -n '' ]]
++ [[ -n '' ]]
++ (( 4 == 0 ))
++ [[ ! -n nvidia-384 ]]
++ [[ ! -n 384.90 ]]
++ [[ -n make clean ]]
++ (( return_value == 0 ))
++ last_mvka=//4.10.0-42-generic/x86_64
+++ readlink -f /var/lib/dkms/nvidia-384/384.90/source/dkms.conf
++ last_mvka_conf=/usr/src/nvidia-384-384.90/dkms.conf
++ return 0
++ return
++ for m in "${dest_module_name[@]}"
++ [[ -f /var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64/module/nvidia_384.ko ]]
++ for m in "${dest_module_name[@]}"
++ [[ -f /var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64/module/nvidia_384_modeset.ko ]]
++ for m in "${dest_module_name[@]}"
++ [[ -f /var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64/module/nvidia_384_drm.ko ]]
++ for m in "${dest_module_name[@]}"
++ [[ -f /var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64/module/nvidia_384_uvm.ko ]]
++ ret=0
++ state=built
++ _is_module_installed nvidia-384 384.90 4.10.0-42-generic x86_64
++ [[ -n nvidia-384 ]]
++ [[ -n 384.90 ]]
++ [[ -n 4.10.0-42-generic ]]
++ [[ -n x86_64 ]]
++ local d=/var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64
++ local k=/var/lib/dkms/nvidia-384/kernel-4.10.0-42-generic-x86_64
++ [[ -L /var/lib/dkms/nvidia-384/kernel-4.10.0-42-generic-x86_64 ]]
+++ readlink -f /var/lib/dkms/nvidia-384/kernel-4.10.0-42-generic-x86_64
++ [[ /var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64 = /var/lib/dkms/nvidia-384/384.90/4.10.0-42-generic/x86_64 ]]
++ state=installed
++ echo 'installed nvidia-384/384.90/4.10.0-42-generic/x86_64'

Manfred Hampl (m-hampl) said : #17

if I read your output correctly, then the culprit with the missing dkms.conf file is bbswitch.

What is the output of

ls -l /var/lib/dkms/bbswitch

dysonsphere (dysonsphere23) said : #18

looks like this is in fact the culprit.
thanks.
any way to fix?

dysonsphere@dyson-G751JY:~$ ls -l /var/lib/dkms/bbswitch
total 4
drwxr-xr-x 3 root root 4096 Dec 12 06:59 0.8
dysonsphere@dyson-G751JY:~$ ls -l /var/lib/dkms/bbswitch/0.8
total 4
drwxr-xr-x 3 root root 4096 Jun 10 2017 4.4.0-79-generic
lrwxrwxrwx 1 root root 21 Oct 5 2016 source -> /usr/src/bbswitch-0.8
dysonsphere@dyson-G751JY:~$ ls -l /var/lib/dkms/bbswitch/0.8/4.4.0-79-generic
total 4
drwxr-xr-x 2 root root 4096 Jun 10 2017 x86_64
dysonsphere@dyson-G751JY:~$ ls -l /var/lib/dkms/bbswitch/0.8/4.4.0-79-generic/x86_64
total 0
dysonsphere@dyson-G751JY:~$ ls -l /usr/src/bbswitch-0.8
ls: cannot access '/usr/src/bbswitch-0.8': No such file or directory

Manfred Hampl (m-hampl) said : #19

Try

sudo apt-get install --reinstall bbswitch-dkms

and if that fails, as a next step try

sudo dpkg --install /var/cache/apt/archives/bbswitch-dkms_0.8-4ubuntu1_amd64.deb

and report the results.

dysonsphere (dysonsphere23) said : #20

dysonsphere@dyson-G751JY:~$ sudo apt-get install --reinstall bbswitch-dkms
[sudo] password for dysonsphere:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  bumblebee
The following packages will be REMOVED:
  linux-image-extra-4.10.0-35-generic linux-image-extra-4.10.0-37-generic
  linux-image-extra-4.10.0-38-generic linux-image-extra-4.13.0-21-generic
The following NEW packages will be installed:
  bbswitch-dkms
0 upgraded, 1 newly installed, 4 to remove and 17 not upgraded.
4 not fully installed or removed.
Need to get 11.6 kB of archives.
After this operation, 629 MB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://ca.archive.ubuntu.com/ubuntu artful/main amd64 bbswitch-dkms amd64 0.8-4ubuntu1 [11.6 kB]
Fetched 11.6 kB in 0s (49.2 kB/s)
(Reading database ... 264116 files and directories currently installed.)
Removing linux-image-extra-4.10.0-35-generic (4.10.0-35.39) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-35-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-35-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.10.0-37-generic (4.10.0-37.41) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-37-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-37-generic /boot/vmlinuz-4.10.0-37-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-37-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.10.0-38-generic (4.10.0-38.42) ...
depmod: FATAL: could not load /boot/System.map-4.10.0-38-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-38-generic /boot/vmlinuz-4.10.0-38-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-38-generic /boot/vmlinuz-4.10.0-38-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.10.0-38-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.13.0-21-generic (4.13.0-21.24) ...
depmod: FATAL: could not load /boot/System.map-4.13.0-21-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-21-generic /boot/vmlinuz-4.13.0-21-generic
Error! Could not locate dkms.conf file.
File: does not exist.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-extra-4.13.0-21-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-extra-4.10.0-35-generic
 linux-image-extra-4.10.0-37-generic
 linux-image-extra-4.10.0-38-generic
 linux-image-extra-4.13.0-21-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
dysonsphere@dyson-G751JY:~$ sudo dpkg --install /var/cache/apt/archives/bbswitch-dkms_0.8-4ubuntu1_amd64.deb
Selecting previously unselected package bbswitch-dkms.
(Reading database ... 264117 files and directories currently installed.)
Preparing to unpack .../bbswitch-dkms_0.8-4ubuntu1_amd64.deb ...
Unpacking bbswitch-dkms (0.8-4ubuntu1) ...
Setting up bbswitch-dkms (0.8-4ubuntu1) ...
Removing old bbswitch-0.8 DKMS files...
Loading new bbswitch-0.8 DKMS files...
Error! DKMS tree already contains: bbswitch-0.8
You cannot add the same module/version combo more than once.
dpkg: error processing package bbswitch-dkms (--install):
 subprocess installed post-installation script returned error exit status 3
Errors were encountered while processing:
 bbswitch-dkms

Manfred Hampl (m-hampl) said : #21

Try

sudo dpkg --purge bbswitch-dkms
sudo dpkg --install /var/cache/apt/archives/bbswitch-dkms_0.8-4ubuntu1_amd64.deb

dysonsphere (dysonsphere23) said : #22

thanks for your continued help. still not quite there though.

dysonsphere@dyson-G751JY:~$ sudo dpkg --purge bbswitch-dkms
[sudo] password for dysonsphere:
(Reading database ... 264124 files and directories currently installed.)
Removing bbswitch-dkms (0.8-4ubuntu1) ...
dysonsphere@dyson-G751JY:~$ sudo dpkg --install /var/cache/apt/archives/bbswitch-dkms_0.8-4ubuntu1_amd64.deb
Selecting previously unselected package bbswitch-dkms.
(Reading database ... 264117 files and directories currently installed.)
Preparing to unpack .../bbswitch-dkms_0.8-4ubuntu1_amd64.deb ...
Unpacking bbswitch-dkms (0.8-4ubuntu1) ...
Setting up bbswitch-dkms (0.8-4ubuntu1) ...
Removing old bbswitch-0.8 DKMS files...
Loading new bbswitch-0.8 DKMS files...
Error! DKMS tree already contains: bbswitch-0.8
You cannot add the same module/version combo more than once.
dpkg: error processing package bbswitch-dkms (--install):
 subprocess installed post-installation script returned error exit status 3
Errors were encountered while processing:
 bbswitch-dkms

Manfred Hampl (m-hampl) said : #23

ok, not yet...

sudo dpkg --purge bbswitch-dkms
dkms status

If this shows ... bbswitch ... then issue

sudo dkms remove bbswitch/0.8

an re-try

sudo dpkg --install /var/cache/apt/archives/bbswitch-dkms_0.8-4ubuntu1_amd64.deb

dysonsphere (dysonsphere23) said : #24

shoot...i get an ...bbswitch... after the first command
then get an error when issuing the remove command.

dysonsphere@dyson-G751JY:~$ sudo dpkg --purge bbswitch-dkms
[sudo] password for dysonsphere:
(Reading database ... 264124 files and directories currently installed.)
Removing bbswitch-dkms (0.8-4ubuntu1) ...
dysonsphere@dyson-G751JY:~$ dkms status
bbswitch, 0.8: added
nvidia-384, 384.90, 4.10.0-42-generic, x86_64: installed
dysonsphere@dyson-G751JY:~$ sudo dkms remove bbswitch/0.8
Error! Invalid number of parameters passed.
Usage: remove <module>/<module-version> --all
   or: remove <module>/<module-version> -k <kernel-version>

Manfred Hampl (m-hampl) said : #25

Try

sudo dkms remove bbswitch/0.8 -all

dysonsphere (dysonsphere23) said : #26

dysonsphere@dyson-G751JY:~$ sudo dkms remove bbswitch/0.8 -all
[sudo] password for dysonsphere:
Error! Unknown option: -all
Usage: /usr/sbin/dkms [action] [options]
  [action] = { add | remove | build | install | uninstall | match | autoinstall
               | mkdriverdisk | mktarball | ldtarball | mkrpm | mkkmp | mkdeb | mkbmdeb | status }
  [options] = [-m module] [-v module-version] [-k kernel-version] [-a arch]
              [-d distro] [-c dkms.conf-location] [-q] [--force] [--all]
              [--templatekernel=kernel] [--directive='cli-directive=cli-value']
              [--config=kernel-.config-location] [--archive=tarball-location]
              [--kernelsourcedir=source-location] [--no-prepare-kernel] [--no-initrd]
              [--binaries-only] [--source-only] [-r release (SuSE)] [--verbose]
              [--size] [--spec=specfile] [--media=floppy|iso|tar] [--legacy-postinst=0|1]
              [--no-depmod]
              [-j number]
dysonsphere@dyson-G751JY:~$ sudo dkms remove bbswitch/0.8 --all
dysonsphere@dyson-G751JY:~$ sudo dpkg --install /var/cache/apt/archives/bbswitch-dkms_0.8-4ubuntu1_amd64.deb
(Reading database ... 264134 files and directories currently installed.)
Preparing to unpack .../bbswitch-dkms_0.8-4ubuntu1_amd64.deb ...
Unpacking bbswitch-dkms (0.8-4ubuntu1) over (0.8-4ubuntu1) ...
Setting up bbswitch-dkms (0.8-4ubuntu1) ...
Removing old bbswitch-0.8 DKMS files...
Loading new bbswitch-0.8 DKMS files...
Error! DKMS tree already contains: bbswitch-0.8
You cannot add the same module/version combo more than once.
dpkg: error processing package bbswitch-dkms (--install):
 subprocess installed post-installation script returned error exit status 3
Errors were encountered while processing:
 bbswitch-dkms

Manfred Hampl (m-hampl) said : #27

What do you get for

sudo dkms remove bbswitch/0.8 -all
sudo dkms status
ls -l /var/lib/dkms/

Manfred Hampl (m-hampl) said : #28

oops, again the typo error with the missing double dash character

sudo dkms remove bbswitch/0.8 --all
sudo dkms status
ls -l /var/lib/dkms/

dysonsphere (dysonsphere23) said : #29

dysonsphere@dyson-G751JY:~$ sudo dkms remove bbswitch/0.8 --all
[sudo] password for dysonsphere:
dysonsphere@dyson-G751JY:~$ dkms status
bbswitch, 0.8: added
nvidia-384, 384.90, 4.10.0-42-generic, x86_64: installed
dysonsphere@dyson-G751JY:~$ ls -l /var/lib/dkms/
total 12
drwxr-xr-x 3 root root 4096 Dec 12 06:59 bbswitch
-rw-r--r-- 1 root root 6 Aug 31 2016 dkms_dbversion
drwxr-xr-x 3 root root 4096 Jan 3 18:56 nvidia-384

Manfred Hampl (m-hampl) said : #30

It seems that this needs a manual clean-up

sudo rm -r /var/lib/dkms/bbswitch
dkms status

If this does not show bbswitch any more, then a new installation of that package should finally work

sudo dpkg --install /var/cache/apt/archives/bbswitch-dkms_0.8-4ubuntu1_amd64.deb

dysonsphere (dysonsphere23) said : #31

ok that seems to have done the trick!
here is the output from those commands and then apt-get update.
should i just run the software updater now to get all packages up to date, or is there a better way to do that give the circumstances?

dysonsphere@dyson-G751JY:~$ sudo rm -r /var/lib/dkms/bbswitch
[sudo] password for dysonsphere:
dysonsphere@dyson-G751JY:~$ dkms status
nvidia-384, 384.90, 4.10.0-42-generic, x86_64: installed
dysonsphere@dyson-G751JY:~$ sudo dpkg --install /var/cache/apt/archives/bbswitch-dkms_0.8-4ubuntu1_amd64.deb
(Reading database ... 264138 files and directories currently installed.)
Preparing to unpack .../bbswitch-dkms_0.8-4ubuntu1_amd64.deb ...
Unpacking bbswitch-dkms (0.8-4ubuntu1) over (0.8-4ubuntu1) ...
Setting up bbswitch-dkms (0.8-4ubuntu1) ...
Loading new bbswitch-0.8 DKMS files...
Building for 4.10.0-42-generic
Building initial module for 4.10.0-42-generic
Done.

bbswitch:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.10.0-42-generic/updates/dkms/

depmod...

DKMS: install completed.
dysonsphere@dyson-G751JY:~$ sudo apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu artful InRelease
Get:2 http://security.ubuntu.com/ubuntu artful-security InRelease [78.6 kB]
Hit:3 http://ca.archive.ubuntu.com/ubuntu artful InRelease
Hit:4 http://ppa.launchpad.net/team-xbmc/ppa/ubuntu artful InRelease
Get:5 http://ca.archive.ubuntu.com/ubuntu artful-updates InRelease [78.6 kB]
Hit:6 http://ppa.launchpad.net/teejee2008/ppa/ubuntu artful InRelease
Get:8 http://ca.archive.ubuntu.com/ubuntu artful-backports InRelease [72.2 kB]
Get:9 http://security.ubuntu.com/ubuntu artful-security/main amd64 DEP-11 Metadata [204 B]
Get:10 http://security.ubuntu.com/ubuntu artful-security/universe amd64 DEP-11 Metadata [10.2 kB]
Get:11 http://ca.archive.ubuntu.com/ubuntu artful-updates/main amd64 DEP-11 Metadata [56.6 kB]
Get:12 http://ca.archive.ubuntu.com/ubuntu artful-updates/main DEP-11 64x64 Icons [35.2 kB]
Get:13 http://ca.archive.ubuntu.com/ubuntu artful-updates/universe amd64 DEP-11 Metadata [48.2 kB]
Get:14 http://ca.archive.ubuntu.com/ubuntu artful-updates/universe DEP-11 64x64 Icons [48.4 kB]
Get:15 http://ca.archive.ubuntu.com/ubuntu artful-backports/universe amd64 DEP-11 Metadata [4,716 B]
Hit:7 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Fetched 433 kB in 1s (388 kB/s)
Reading package lists... Done

dysonsphere (dysonsphere23) said : #32

running the updater shows a number of updates ready, so looks good.
Just weary of clicking update lest I break something again.
thanks so much for all your patience.

Manfred Hampl (m-hampl) said : #33

I am happy to read that the problem that has blocked updating seems solved.
This has also taught me some tricks how to cope with a broken dkms system.

Sooner or later you will have to accept the challenge and install the available updates (also with respect to spectre and meltdown vulnerabilities).
Before you do that you can execute some checks with the commands

sudo dpkg --audit
sudo dpkg --configure -a
apt list --upgradeable

dysonsphere (dysonsphere23) said : #34

FIXED!!!!!
Thank you so much for sticking with me on this.

dysonsphere (dysonsphere23) said : #35

Thanks Manfred Hampl, that solved my question.

dysonsphere (dysonsphere23) said : #36

ugh. i spoke too soon.
the update ran, and gave the message that the computer was now up to date.
i tried to open the settings app to set the login to automatic, but the app would not open.
i restarted the computer, and now it will not reboot.
i get greeted with a black screen with scrolling text that blacks out almost instantaneously, then flashes text again, blacks out, and this just cycles for ever.
it looks like the screen that appears just before booting, with the green "OK"s at the start of each line.

i am seriously considering starting up with a live disk, backing up my data, if i can reach the secondary drive in the live disk session, and doing a fresh install of the last LTS.

but if you have any idea how to save this installation I will try your suggestions first.

thanks again for all your patience.

Manfred Hampl (m-hampl) said : #37

Try selecting on older kernel from the grub menu ("advanced" option).

dysonsphere (dysonsphere23) said : #38

OK. I will try that when I get home tonight.
All the best.

dysonsphere (dysonsphere23) said : #39

I cannot get into grub to select the kernel.
Holding shift at startup does nothing, goes right back to that flashing text on black screen.

⁣Sent from Blue ​

On Jan 15, 2018, 07:13, at 07:13, Manfred Hampl <email address hidden> wrote:
>Your question #662683 on Ubuntu changed:
>https://answers.launchpad.net/ubuntu/+question/662683
>
> Status: Open => Answered
>
>Manfred Hampl proposed the following answer:
>Try selecting on older kernel from the grub menu ("advanced" option).
>
>--
>If this answers your question, please go to the following page to let
>us
>know that it is solved:
>https://answers.launchpad.net/ubuntu/+question/662683/+confirm?answer_id=36
>
>If you still need help, you can reply to this email or go to the
>following page to enter your feedback:
>https://answers.launchpad.net/ubuntu/+question/662683
>
>You received this question notification because you asked the question.

dysonsphere (dysonsphere23) said : #40

Ok
So it loads to grub screen if I repeatedly mash the shift key.
There I am given the choice of:
4.10.0-42
4.10.0-40
Both generic and both with a corresponding recovery mode.

Starting with 4.10.0-40 results in the same issue as starting normally.

I did 4.10.0-42 recovery mode.
Ran dpkg.
Reported that there are 6 packages to upgrade.
Failed to fetch. Could not resolve ca.archive.ubuntu.com
Aborting
Restoring original system state

Enable networking doesn't seem to do anything

Failsafe graphics mode gives a blinking cursor.

I can get to the root shell.

⁣Sent from Blue ​

On Jan 15, 2018, 07:13, at 07:13, Manfred Hampl <email address hidden> wrote:
>Your question #662683 on Ubuntu changed:
>https://answers.launchpad.net/ubuntu/+question/662683
>
> Status: Open => Answered
>
>Manfred Hampl proposed the following answer:
>Try selecting on older kernel from the grub menu ("advanced" option).
>
>--
>If this answers your question, please go to the following page to let
>us
>know that it is solved:
>https://answers.launchpad.net/ubuntu/+question/662683/+confirm?answer_id=36
>
>If you still need help, you can reply to this email or go to the
>following page to enter your feedback:
>https://answers.launchpad.net/ubuntu/+question/662683
>
>You received this question notification because you asked the question.

Manfred Hampl (m-hampl) said : #41

This is weird. I do not have any explanation for this.
As long as there is no indication which program fails, it is almost impossible to correct the problem.

Do you have a possibility to connect the system to a wired network? This might enable internet access also in recovery mode.

dysonsphere (dysonsphere23) said : #42

Very weird indeed.

I have a suspicion that it has to do with the Nvidia driver, but cannot
confirm.

I was connected to a wired network, and still could not get access to
the internet.

I checked ifconfig in root recovery mode and only had the loopback
connection.

I think I will resign to try to backup my data in a live session and do
a fresh install of the os.

Would you recommend I roll back to the 16.04 LTS. My understanding is
that it might play better with my Nvidia graphics card.  I do like the
gnome desktop better than unity, though. Is it better to go with the
regular Ubuntu 16.04 and install gnome shell in that, go with Ubuntu
Gnome 16.04, or just jump back into trying Ubuntu 17.10?  I understand
these questions are unrelated to the original issue, so I can look
elsewhere to figure that out if you are not comfortable answering this.

Again thanks for all your patience in helping me with this.

On 2018-01-16 2:28 AM, Manfred Hampl wrote:
> Your question #662683 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/662683
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> This is weird. I do not have any explanation for this.
> As long as there is no indication which program fails, it is almost impossible to correct the problem.
>
> Do you have a possibility to connect the system to a wired network? This
> might enable internet access also in recovery mode.
>

Manfred Hampl (m-hampl) said : #43

Doing a new installation might really be the best solution. In any case it is strongly recommended to create backup copies of your files to another medium, and a live system should enable you doing that (the release of the live system does not really matter).

There are pros and cons for 16.04 vs. 17.10; 16.04 is more stable, 17.10 has some newer additions, etc.
It is more a matter of personal preference, and the same is true for the desktop environment to be installed.

There is one thing that you could try before starting any new installation attempt: uninstall the bbswitch-dkms package.

dysonsphere (dysonsphere23) said : #44

Thanks again.

I will try to uninstall bbswitch-dkms when i get home tonight.

I will update and close the question, one way or another, after trying that.

All the best,

Ken

On 2018-01-16 7:37 AM, Manfred Hampl wrote:
> Your question #662683 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/662683
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> Doing a new installation might really be the best solution. In any case
> it is strongly recommended to create backup copies of your files to
> another medium, and a live system should enable you doing that (the
> release of the live system does not really matter).
>
> There are pros and cons for 16.04 vs. 17.10; 16.04 is more stable, 17.10 has some newer additions, etc.
> It is more a matter of personal preference, and the same is true for the desktop environment to be installed.
>
> There is one thing that you could try before starting any new
> installation attempt: uninstall the bbswitch-dkms package.
>

dysonsphere (dysonsphere23) said : #45

FIXED!!!!!!

in the root recovery mode terminal i had to remount the file system as r/w with:

$ mount -o remount,rw /

then purged bbswitch

this didn't fix it, so...

again in root recovery:

i checked my nvidia packages with:

$ dpkg -l | grep -i nvidia

and uninstalled the nvidia driver that was listed with:

$ apt-get remove nvidia-384

i then restarted the machine and was finally greeted with the login!

once in ubuntu i opened the software-and-updates app and selected the nvidia driver in additional drivers.
rebooted and now about shows that i am using my GeForce GTX 980M

thanks so much for not giving up on this!

all the best,
Ken