Looping dkms dlm evdi DisplayLink service failure in syslog


The following looped with just a few seconds pause in /var/log/syslog:

sh[20536]: make -j4 KERNELRELEASE=x.x.x-x all INCLUDEDIR=/lib/modules/x.x.x-x/build/include KVERSION=4.19.0-6-amd64 DKMS_BUILD=1...(bad exit status: 2)
sh[20536]: Error! Bad return status for module build on kernel: 4.19.0-6-amd64 (x86_64)
sh[20536]: Consult /var/lib/dkms/evdi/1.3.52/build/make.log for more information.
systemd[1]: dlm.service: Control process exited, code=exited, status=10/n/a
systemd[1]: dlm.service: Failed with result 'exit-code'.
systemd[1]: Failed to start DisplayLink Manager Service.
systemd[1]: dlm.service: Service RestartSec=5s expired, scheduling restart.
systemd[1]: dlm.service: Scheduled restart job, restart counter is at 1869.
systemd[1]: Stopped DisplayLink Manager Service.
systemd[1]: Starting DisplayLink Manager Service...
sh[21186]: modprobe: FATAL: Module evdi not found in directory /lib/modules/4.19.0-6-amd64
sh[21186]: Kernel preparation unnecessary for this kernel.  Skipping...
sh[21186]: Building module:
sh[21186]: cleaning build area...(bad exit status: 2)

ps ax also displayed the following repeatedly:
/bin/sh -c 'modprobe evdi || (dkms install evdi/1.3.52 && modprobe evdi)'

I checked Synaptic, but no sign of evdi or dlm there.

I checked the log at the suggested location without much clue how to get rid of this problem.

I tried adding a file to /etc/modprobe.d/evdi.conf containing the line blacklist evdi.

I tried the old classic to move the directory out of the way. Moving /var/lib/dkms/evdi did not help, it created a new one.

What did do something though was to move /usr/src/evdi-1.3.52 out of the src directory, then it started complaining that it did not find the files to build - better than nothing.

I found that there was a service file, located at /etc/systemd/system/multi-user.target.wants/dlm.service.

This is the content of that file:
Description=DisplayLink Manager Service

ExecStartPre=/bin/sh -c 'modprobe evdi || (dkms install evdi/1.3.52 && modprobe evdi)'

This file is not good. I interpret it as the following:

1. Try to probe for the evdi module.
2. If that fails, run DKMS to install evdi/version number and then probe again for the evdi module
3. If still has not started after 5 seconds - start over again.

There is no protection whatsoever built in for if the build or the probing fails repeatedly.

To check status for this service I did this:

systemctl status dlm.service

To get rid of the problem I removed it all:

# stop it
systemctl stop dlm.service

# remove the file
systemctl disable dlm.service
rm /lib/systemd/system/dlm.service

# reload and reset
systemctl daemon-reload
systemctl reset-failed

rm -rf /usr/src/evdi-1.3.52


Had to do rm -rf /var/lib/dkms/evdi to get rid of error during build.

This is a personal note. Last updated: 2020-02-18 13:26:48.








Don't forget to pay my friend a visit too. Joakim