Skip to content

[RFC] linux-stable: Allow out of tree modules to survive - #1947

Draft
joebonrichie wants to merge 1 commit into
mainfrom
out-of-tree-modules-survive
Draft

joebonrichie wants to merge 1 commit into
mainfrom
out-of-tree-modules-survive

Conversation

@joebonrichie

Copy link
Copy Markdown
Contributor

Summary

Allow linux module updates to survive moss state changes using the same trick as /usr/local

Test Plan

out of tree installed module framework-laptop-kmod now survives moss state changes

Checklist

  • Recipe was built and tested against the volatile stream
  • This change could gainfully be highlighted in the Stream Update notes once merged

Allow linux module updates to survive moss state changes using the same
trick as /usr/local
@joebonrichie
joebonrichie requested a review from a team as a code owner July 5, 2026 18:56
@hphilm

hphilm commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

So this would partly enable dkms support as well? Since we already have some extramodules like Nvidia driver compiled per kernel update, do we see any issues adding this as well?

@joebonrichie

Copy link
Copy Markdown
Contributor Author

It look's like our default make modules_install behavior installs to /lib/modules/<kernel-version>/updates but we install packaged out of tree modules e.g nvidia to /lib/modules/<kernel-version>/extra

Currently the user will still have to manually rebuild and install the module if the kernel is updated but could take a look at getting dkms working as well. All this change does for the moment is add an escape hatch for the updates module folder so it doesn't get wiped with each moss transaction.

@ReillyBrogan

Copy link
Copy Markdown
Member

Wouldn't it make more sense to use depmod.d configuration instead?

@joebonrichie

Copy link
Copy Markdown
Contributor Author

Yeah that's definitely an option, could add a default depmod conf e.g.

/etc/depmod.d/usermods.conf
external * /var/lib/kernel-modules

The user can override INSTALL_MOD_PATH to make modules_install to install to the var location and that should work

I think the tricky bit is documentation/getting this to work OOTB, you'd probably want make modules_install to just work instead of being a special snowflake distribution.

@hphilm

hphilm commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

If with this current change enables something without a fuzz why not merge it as is ...

@joebonrichie

Copy link
Copy Markdown
Contributor Author

There's an issue where stale directory entries remain in /var once the kernel has been updated, hold off for now.

@ReillyBrogan

Copy link
Copy Markdown
Member

I think the tricky bit is documentation/getting this to work OOTB

My strong preference is adding documentation for this instead.

@hphilm
hphilm marked this pull request as draft July 7, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants