-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DKMS create .thinlto-cache at compiling dkms modules - but they dont get removed #292
Comments
The folder is created by the kernel build is it not? As such it should probably be removed by the kernel itself when we issue the I don't think dkms should know details like LTO (thin or not) and removing it's artefacts. From a very quick look this seems like a kernel bug - |
However, it looks like it might not be defined when the |
@ptr1337 can you try the above suggestion? @samitolvanen moving the export(s) further up makes sense to me. Considering you're the owner/maintainer of said code, can you send a patch upstream? Thanks o/ |
Can you send me maybe a patch which I should test? |
How about this patchset and then setting the cachedir to /tmp or something like this? |
Any news here? |
IIRC the issue was that the kernel Makefiles are not properly setting the respective variables. The linked patch may sidetrack that by storing the files outside of /usr/lib/modules Doubt I'll be working on this, but here are some general ideas:
|
Lets get this issue fixed asap rocky. |
@LethalManBoob I admire your enthusiasm. If you can reproduce the issue and can provide some feedback to my previous post #292 (comment) that would be great - @ptr1337 in case you've missed it. Alternatively, a clear reproducer would be appreciated. One which includes:
All and all, it sounds more like general kernel debugging/hacking ;-) |
This can be reproduced with following: If you have a kernel installed with ThinLTO, simply install any dkms module (like nvidia-dkms for example), then either remove the kernel or upgrade it --> Leftovers in /usr/lib/modules/$kernelversion+name |
@ptr1337 can you provide a PKGBUILD that achieves this? |
https://github.com/CachyOS/linux-cachyos/blob/master/linux-cachyos/PKGBUILD#L128 Change here the value to "thin" and then build the kernel. Be aware, that the prebuilt ones are only supported by x86-64-v3 supported CPUs and you might want to pull in the keyring, before installing the package. |
This indeed is a kernel bug.
But Therefore, the And it won't be deleted when executing By moving the assignment of I have opened a bug report https://bugzilla.kernel.org/show_bug.cgi?id=218825 |
The ThinLTO caching was removed in linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=aba091547ef6159d52471f42a3ef531b7b660ed8 |
Thanks, issue has been fixed after cherry picking the patch into the kernel. |
Let's hope that when/if thin-lto gets introduced the bug won't be reintroduced again 🤞 Closing issue |
Thanks for finding this issue and im really glad that this has been fixed. |
Hello,
When installing a Kernel with Clang Thin LTO dkms creates a folder called
.thinlto-cache
at/usr/lib/modules/$kernel/build/.thinlto
.Actually these folder should be removed, after the compilation of the dkms modules.
When a Kernel gets upgraded or removed, the folder still stays at
/usr/lib/modules
.My complete
/usr/lib/modules
contains folder from old kernels.The .thinlto-cache folder does not get copied at the packaging, I have checked this.
The text was updated successfully, but these errors were encountered: