On 15/02/2017 04:42, Rick Stevens wrote:
On 02/13/2017 04:38 PM, Rick Stevens wrote:
On 02/13/2017 03:39 PM, Rick Stevens wrote:
On 02/13/2017 12:22 PM, Stephen Morris wrote:
On 13/02/2017 19:21, Stephen Morris wrote:
I've removed the driver from DKMS in Ubuntu and re-added it, then run a
DKMS AUTOINSTALL to rebuild and re-install the driver back into the
running kernel and under Ubuntu the modprobe command to active the
driver is not issued either, but also under Ubuntu is seems that when
the rmmod command is issued to remove the driver from the running kernel
which removes wifi access, the dns resolver service seems to also be
shutdown, because after the driver is rebuilt by DKMS and the modprobe
issued a sudo apt-get update fails to be able to resolve the repository
names.
I've tried the same thing under Fedora to see if Fedora has the same
functionality, which fortunately Fedora doesn't, after the DKMS process
is done and the modprobe issued a sudo dnf update successfully refreshes
the repository lists and installs any available updates after prompting
whether or not to do so.
I've been watching this thread a bit and I'm not a DKMS user, but
from what I can gather, DKMS should do an automatic modprobe when
a kernel is upgraded or whatever based on certain criteria. Section 2
of the webpage at:
https://wiki.centos.org/HowTos/BuildingKernelModules
describes the process (the example is a patched CIFS filesystem). In a
nutshell:
1. The module's source directory must be in
/usr/src/<module>-<version>
2. There is a "dkms.conf" file in that directory that contains
some specific info.
3. It has been added to the DKMS tree via "dkms add"
4. It has been built under DKMS control via "dkms build"
5. It has been installed under DKMS control via "dkms install"
Note that I've never tried a DKMS add-on module, but that seems to be
the way it's done. I think that dkms.conf file is pretty critical,
along with the "dkms add", "dkms build" and "dkms install". I don't
believe "dkms autoinstall" would modprobe modules that weren't added,
built and install using dkms as they weren't fully inserted under dkms'
care. That's just a guess.
I just built a module (evdi) under DKMS for a Mimo USB-based display. I
don't have the hardware handy (it's here somewhere), but I copied the
driver source to /usr/src/evdi-1.2.65 and created a dkms.conf file in
there that contains:
PACKAGE_NAME="evdi"
PACKAGE_VERSION=1.0.0
AUTOINSTALL=yes
MAKE[0]="make all INCLUDEDIR=/lib/modules/$kernelver/build/include
KVERSION=$kernelver DKMS_BUILD=1"
DEST_MODULE_LOCATION[0]="/kernel/drivers/gpu/drm/evdi"
BUILT_MODULE_NAME[0]="evdi"
CLEAN="make clean DKMS_BUILD=1"
Then I did (as root):
dkms add -m evdi -v 1.2.65
That added it to dkms' build stack as witnessed by dkms creating a
/var/lib/dkms/evdi/1.2.65 directory with a subdirectory named after the
current kernel version and a symlink, "source", pointing at
/usr/src/evdi-1.2.65. The next command:
dkms build -m evdi -v 1.2.65
actually built the driver, creating an "x86_64" subdirectory below the
kernel version directory with "log" and "module" subdirs below that.
The log subdirectory contains the build log of the module and the
module subdir contains the actual module (evdi.ko). I then ran:
dkms install -m evdi -v 1.2.65
and saw dkms install the module into /lib/modules/`uname -r`/extra/ and
do a full depmod:
# dkms install -m evdi -v 1.2.65
evdi:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.9.7-201.fc25.x86_64/extra/
Adding any weak-modules
depmod.......
DKMS: install completed.
Doing a "modinfo evdi" returns the data I'd expect.
I won't know if it auto-modprobes until I get the new kernel update
and find the Mimo display and plug it in. Just thought you'd like to
see what I've done.
UPDATE: Just got the new kernel and dkms did build the module for the
kernel without me telling it to.
I located the display device, plugged it in and it "just worked." I
did NOT see the module in the output of "lsmod" but the device did
work. I don't know why it doesn't show up in lsmod, but it may be that
this is an X/Wayland module only, even though it's a ".ko" file.
Thanks for the info Rick, what you did to manually use dkms to build and
install the driver in to the kernel is the same process I went through
which didn't issue a modprobe to make the network device usable, so I
couldn't access the network until I manually issued a modprobe which
then made the device immediately usable.
I also tried it a different way by issuing the same manual steps but
each time specifying the -c parameter to point it to the dkms.conf file
but that achieved the same results. This method though did highlight
what I consider the be a bug in DKMS, in that I consider that if I
specify the -c parameter I should not have to specify the -m and -v
parameters, but my experience with it is that DKMS complains about
insufficient parameters when running the build and install steps if -m
and -v are not supplied.
Just one comment on your dkms.conf file contents you have listed above,
I'm surprised that your module gets compiled at boot time as the
documentation I have read on the dkms.conf file dictates that the value
for PACKAGE_VERSION must match the version part of the directory
containing the source code, so in your case it should be 1.2.65 not 1.0.0.
Just as a side info, there is a known bug in DKMS (which I encountered
in my testing trying to get things to work) that if, in your case, there
are multiple version directories in /var/lib/dkms/evdi and any of those
directories don't physically exist, dkms fails with an error that it
can't find dkms.conf.
From the documentation I have read, when DKMS runs at boot time to
check if it needs to build and install the driver into the running
kernel, the command that is issued is DKMS AUTOINSTALL, which is why
AUTOINSTALL=yes in dkms.conf is critical.
Just for reference I have listed the contents of my dkms.conf file. On
git.com where I obtained my driver code from there was also a branch for
and rtl8812au network driver, where they supplied a dkms.conf file, and
my dkms.conf is based on that.
PACKAGE_NAME="rtl8814AU"
PACKAGE_VERSION="4.3.21_17997.20160531"
BUILT_MODULE_NAME[0]="8814au"
MAKE="'make' -j3 KVER=${kernelver}"
CLEAN="'make' clean"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
For me DKMS loses a lot of it usefulness if the driver is not loaded
(modprobed) at boot time if a compile is required for the running kernel
as I have network mounts in /etc/fstab that I would prefer to not have
to mount manually every time a kernel update occurs if the driver is not
compiled at kernel install time. I also don't understand why these
issues are occurring under both F25 and Ubuntu 16.10 as up to the point
of where I stopped using Mandriva (when it was forked to Mageia) 3 - 5
years ago, I was using dkms all the time for multiple drivers and didn't
encounter any of these problems.
regards,
Steve
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 -
- -
- The trouble with troubleshooting is that trouble sometimes -
- shoots back. -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx