"Operation not permitted" when trying to `modprobe xpad`

if you are facing this error modprobe: ERROR: could not insert 'rtl8723de': Operation not permitted

The solution is to disabled the Secure Boot. Firstly check if SecureBoot is enabled on Ubuntu.

Install mokutil "sudo apt-get install mokutil"

and check the status of SecureBoot "mokutil --sb-state"

In case it is enabled run command "sudo mokutil --disable-validation"

Now enter a temporary password between 8 to 16 digits. We will use this password later. Enter the same password again to confirm. Once it’s done reboot the system and press any key when you see the blue screen (MOK management). Select Change Secure Boot state. Enter the password you had selected before and press Enter. Select Yes to disable Secure Boot in shim-signed. Press Enter key to finish the whole procedure.


Predictably, it was some dumb Secure Boot thing. Once I signed the module with

sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n xpad)

I could modprobe it without issues, and the controller works well.

The files MOK.priv and MOK.der are Secure Boot keys, which I'd previously created using this answer to get VirtualBox working.