You are not logged in.

#1 2016-02-03 16:21:45

eduncan911
Member
Registered: 2015-05-02
Posts: 93
Website

Installing to /usr/lib/modules/4.4.1-2-ARCH/kernel/drivers/gpu/drm ?

Where can a package safely install a kernel module .ko to, and have it persist between kernel upgrades?

Does a kernel module built against an older kernel/kernel-headers expected to continue functioning?  (given that nothing has changed in regards to the headers it uses in the kernel)

/TL;DR

There is a DisplayLink AUR package that is installing a kernel module into this directory:

/usr/lib/modules/4.4.1-2-ARCH/kernel/drivers/gpu/drm/evdi/

This breaks after every kernel and kernel-headers upgrade because the version number changes.

It's a PITA to resolve because you have to:

* wait for the kernel headers to be released (do NOT upgrade the kernel until headers are released). e.g. linux-headers (4.4.1-1 -> 4.4.1-2) this time around.
* pacman -Syu (it MUST include the linux-headers upgrade that matches the to-be-upgraded kernel)
* Reboot (which is required for the new linux-headers to be picked up)
* evdi.ko module will fail to load, DisplayLink service will fail to start
* pacman -R displaylink
* rm -rf ~/build/displaylink (required cause you need to force a rebuild)
* git clone https://aur.archlinux.org/displaylink.git ~/build/displaylink
* cd ~/build/displaylink
* makepkg -sri

You need to force a fresh build, and not to use the cached versions of the package build for re-install, to get the evdi.ko kernel module moved to the proper place:

evdi.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /usr/lib/modules/4.4.1-2-ARCH/kernel/drivers/gpu/drm/evdi/

Maybe the package maintainer needs to be moving this module to a different location?  A more "general / non-versioned" directory?

Offline

#2 2016-02-13 19:21:44

khalaan
Member
Registered: 2014-04-17
Posts: 2

Re: Installing to /usr/lib/modules/4.4.1-2-ARCH/kernel/drivers/gpu/drm ?

Seems to me that you probably neglected to read the front page of the AUR which clearly states

DISCLAIMER: AUR packages are user produced content. Any use of the provided files is at your own risk.

Additionally, beyond the idea of ymmv coming with user produced modules you could do like most of us have and register the module as a DKMS module and let it do what it does best. That's how my laptop ensures I have wifi after kernel upgrades and display drivers after each kernel upgrade. Or I guess whining about others doing work for you is an option too I suppose.

Offline

#3 2016-02-13 20:07:15

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: Installing to /usr/lib/modules/4.4.1-2-ARCH/kernel/drivers/gpu/drm ?

you can use DKMS to build the module against the new kernel with "-k" flag, once the headers are updated as well.
That's what makepkg is doing when you build the package, apart from building it against the running kernel instead of the newest one.

eduncan911 wrote:

* rm -rf ~/build/displaylink (required cause you need to force a rebuild)
* git clone https://aur.archlinux.org/displaylink.git ~/build/displaylink
* cd ~/build/displaylink
* makepkg -sri

Instead of doing all that, you could just use "makepkg -f" to force rebuild.

Last edited by ooo (2016-02-13 20:08:48)

Offline

#4 2016-02-17 04:12:44

eduncan911
Member
Registered: 2015-05-02
Posts: 93
Website

Re: Installing to /usr/lib/modules/4.4.1-2-ARCH/kernel/drivers/gpu/drm ?

ooo wrote:

you can use DKMS to build the module against the new kernel with "-k" flag, once the headers are updated as well.
That's what makepkg is doing when you build the package, apart from building it against the running kernel instead of the newest one.

That may be the answer.  I'll try this the next time a kernel is released.

ooo wrote:
eduncan911 wrote:

* rm -rf ~/build/displaylink (required cause you need to force a rebuild)
* git clone https://aur.archlinux.org/displaylink.git ~/build/displaylink
* cd ~/build/displaylink
* makepkg -sri

Instead of doing all that, you could just use "makepkg -f" to force rebuild.

I tried that first, yep.  -f works for the makepkg... but, that's not when the supporting module was being moved to the kernel header location.  i'll have to look at my machine when i get home; but, if I recall, it was part of the dependency check/download portion that moved it.  which, "-f" did not re-run.  Hence, I had to wipe out the whole thing.

I also had to reboot FIRST because the new kernel headers needed to be read/in use in order to get the module moved to the correct directory.

the "-k" may be the answer.

Last edited by eduncan911 (2016-02-17 04:14:15)

Offline

#5 2016-02-17 13:52:07

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Installing to /usr/lib/modules/4.4.1-2-ARCH/kernel/drivers/gpu/drm ?

eduncan911, the moving kernel module to correct location is done in the display.install file by dkms commands .

I'm not very familiar with dkms,but think using a .servicefile to rebuild kernelmodules with dkms is a common solution.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB