systemofapwne / leetmouse

A fork of the Linux mouse driver with acceleration
GNU General Public License v2.0
93 stars 10 forks source link

Can't bind mouse to driver. #9

Closed Vinjul1704 closed 2 years ago

Vinjul1704 commented 3 years ago

Hello, I am trying to use my Logitech MX Ergo with leetmouse, although I am unable to bind it to the driver.

The driver automatically binds the ID "5-3.2:1.1", but my mouse is ID "5-3.2:1.2" and trying to manually unbind it from usbhid and binding it to leetmouse results in the error "No such device".

I am runnind Arch Linux and tried all 3 setup methods.

Any idea what's going on? Thanks!

gnusenpai commented 8 months ago

Did you ever figure this out? Same mouse and same problem. I tried embedding a simplified version of leetmouse into the kernel to get around the binding issue, but this mouse uses a separate HID driver and does not work at all with the HIDBP driver (which leetmouse is derived from). I looked into modifying the logitech dj or hidpp drivers, but there isn't an obvious way to hack acceleration onto them...

Vinjul1704 commented 8 months ago

Did you ever figure this out? Same mouse and same problem. I tried embedding a simplified version of leetmouse into the kernel to get around the binding issue, but this mouse uses a separate HID driver and does not work at all with the HIDBP driver (which leetmouse is derived from). I looked into modifying the logitech dj or hidpp drivers, but there isn't an obvious way to hack acceleration onto them...

It's been a while and I am not sure what I did and if it worked. I might have just given up and thought it was due to me using a wireless mouse?

systemofapwne commented 8 months ago

Binding the mouse happens via a udev rule. If your mouse (for some reason) is not following that very rule, leetmouse can't and will not bind to that. I for myself have the same effect with a bluetooth "Microsoft Surface Arch" mouse. Solution: Try to first manually bind your mouse to that driver. If this works, write a udev rule for your mouse.

gnusenpai commented 8 months ago

It's been a while, but I had to hack one of the values here just to get the driver to bind to the mouse: https://github.com/systemofapwne/leetmouse/blob/2406c9614056237319e108b1419d2920c772c0ef/driver/usbmouse.c#L340-L344 The mouse wasn't functional, but when enabling the debug parameter, I did see values changing when moving the mouse and clicking buttons. That was as far as I could go on my own. If you need more (or different) details, I can dig them up again.

MCPO-Spartan-117 commented 8 months ago

The mouse isn't functional because it needs special bluetooth/vendor drivers that the generic HID driver provides and clearly, the simple boot driver doesn't as the mouse doesn't work with the kernel's default HIDBP, this also might be why some razer mice don't work.

Like the note in usbmouse.c says, this really should be reimplemented as apart of the HID subsystem rather than a hacked on out of branch driver.

gnusenpai commented 8 months ago

Any pointers on how I can manually find and hardcode the offsets? It's definitely not ideal, but it's probably the only way I'm gonna get acceleration on this mouse.