Kernel modules contain .ko.xz files

I am using majaro with kernel 5.14 . Why the kernel modules in /lib/modules/5.14.10-1-MANJARO/kernel/drivers are in .ko.xz format instead of just .ko format ? Is this specific to manjaro ? I recently built the btusb.ko module and placed it in that directory and it loads fine while being a .ko file instead of .ko.xz.

It means, that the module is compressed with the LZMA algorithm in the xz data format. This saves space. May other distributions also do this.

It just means that the module is not compressed.

2 Likes

So it does not matter if the modules are in .ko.xz or .ko. The kernel can use both files and the .xz compression is applied just for saving space. Got it !
Also if I compress the btusb.ko file into .ko.xz there shouldn’t be any problems right ?