mwyborski / Linux-Magic-Trackpad-2-Driver

503 stars 85 forks source link

Can't get it to work on Ubuntu 18:04 insmod: ERROR: could not insert module ./hid-magicmouse.ko: Invalid module format #29

Closed stefano099 closed 5 years ago

stefano099 commented 5 years ago

Hi i'm a noob, i have Ubuntu 18.04 with Kernel 4.18.6-041806-generic

`gjung@gjung-Lenovo-G570:/Linux-Magic-Trackpad-2-Driver/scripts$ sudo ./install.sh

Creating symlink /var/lib/dkms/hid-magicmouse-dkms/4.18+magictrackpad2/source -> /usr/src/hid-magicmouse-dkms-4.18+magictrackpad2

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping...

Building module: cleaning build area.... make -j4 KERNELRELEASE=4.18.6-041806-generic KERNEL_VERSION=4.18.6-041806-generic all..... cleaning build area...

DKMS: build completed.

hid-magicmouse: Running module version sanity check.

depmod...

Backing up initrd.img-4.18.6-041806-generic to /boot/initrd.img-4.18.6-041806-generic.old-dkms Making new initrd.img-4.18.6-041806-generic (If next boot fails, revert to initrd.img-4.18.6-041806-generic.old-dkms image) update-initramfs.............

DKMS: install completed. `

After reboot

lsmod | grep hid hidp 24576 1 bluetooth 548864 48 btrtl,hidp,btintel,btbcm,bnep,btusb,rfcomm mac_hid 16384 0 hid_magicmouse 20480 0 hid_generic 16384 0 usbhid 49152 0 hid 126976 4 hidp,usbhid,hid_generic,hid_magicmouse after this i will look if the driver was loaded correctly

`gjung@gjung-Lenovo-G570:~/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid$ make make -C /lib/modules/4.18.6-041806-generic/build M=/home/gjung/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid modules make[1]: Verzeichnis „/usr/src/linux-headers-4.18.6-041806-generic“ wird betreten Building modules, stage 2. MODPOST 1 modules make[1]: Verzeichnis „/usr/src/linux-headers-4.18.6-041806-generic“ wird verlassen

gjung@gjung-Lenovo-G570:~/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid$ sudo rmmod hid_magicmouse [sudo] Passwort für gjung:

gjung@gjung-Lenovo-G570:~/Linux-Magic-Trackpad-2-Driver/linux/drivers/hid$ sudo insmod ./hid-magicmouse.ko insmod: ERROR: could not insert module ./hid-magicmouse.ko: Invalid module format `

and this is my problem can enyone help?

stefano099 commented 5 years ago

Hi after e fresh Ubuntu 18.04 installing it works!