Results 1 to 2 of 2

Thread: insmod: ERROR: could not insert module ./drivers/hid/hid-redragon.ko: Invalid paramet

  1. #1
    Join Date
    Mar 2023
    Beans
    26
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Exclamation insmod: ERROR: could not insert module ./drivers/hid/hid-redragon.ko: Invalid paramet

    [SOLVED]



    I am trying to insert hid-redragon.ko module in my current kernel.

    Code:
    # uname -r
    5.19.0-41-generic
    Code:
    # apt source linux-image-unsigned-$(uname -r)
    This download linux-hwe-5.19-5.19.0 (that is not the same exact version of my running kernel, I don't know why this happen...).

    Code:
    # cd linux-hwe-5.19-5.19.0
    
    # chmod a+x debian/scripts/*
    
    # chmod a+x -R ./scripts
    
    # cp /boot/config-$(uname -r) ./.config
    
    # make oldconfig
    
    # make -j 24
    
    # sudo find . | grep -i "redragon\.ko"
    
    # insmod ./drivers/hid/hid-redragon.ko 
    insmod: ERROR: could not insert module ./drivers/hid/hid-redragon.ko: Invalid parameters
    How can I solve this ?
    Last edited by ricciolino; August 27th, 2023 at 11:01 PM. Reason: SOLVED

  2. #2
    Join Date
    Mar 2023
    Beans
    26
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Red face Re: insmod: ERROR: could not insert module ./drivers/hid/hid-redragon.ko: Invalid par

    Without needed to recompile the whole kernel, I actually solved by running these two commands:

    Code:
    sudo apt install --reinstall linux-modules-extra-6.2.0-26-generic
    sudo apt install --reinstall linux-modules-extra-5.19.0-41-generic
    Now *.ko modules came back to original locations:

    Code:
    /usr/lib/modules/6.2.0-26-generic/kernel/drivers/hid/hid-redragon.ko
    /usr/lib/modules/5.19.0-41-generic/kernel/drivers/hid/hid-redragon.ko

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •