Code Monkey home page Code Monkey logo

Comments (13)

rohitpid avatar rohitpid commented on September 7, 2024 3

Hey @robotrovsky,

Thanks for the response and support! I do have a fork which has my changes and I rebase off of your changes periodically. I have mm1, mm2, trackpad1 and trackpad2 handy to test :-).

I figured out the bytes that are sent and received to get battery percentage reports from the mouse. Do you know how we should set this? Magic Mouse 1 and Magic Trackpad 1 report the battery percentages already but I cannot see where in hid-magicmouse.c any of it is reported. Perhaps it's in another module? Do you have any ideas or know where this is done?

from linux-magic-trackpad-2-driver.

Dygear avatar Dygear commented on September 7, 2024 2

from linux-magic-trackpad-2-driver.

bobbysue avatar bobbysue commented on September 7, 2024 1

Thank you! I hadn't seen that article- it looks like they have issued an update giving you and Claudio credit, though the main text still seems off... AFAIK nobody else involved, including the kernel maintainers who gave comments, work for Google/ChromeOS...

FYI: There will probably need to be adjustments to userspace programs for the low pressure levels from the trackpad. We had an offset to make it higher, but the maintainers objected to having it in the driver, saying there should be userspace quirks for it.

from linux-magic-trackpad-2-driver.

mwyborski avatar mwyborski commented on September 7, 2024

Hi @rohitpid ,
i haven't send in the patch. Maybe it would be better to separate the two drivers, because i can't test the magic mouse 2, so i would send in a patch, that i can't even test. But i don't want to slow you down. We could make a branch for the magic mouse 2 or you fork and you keep on working on base of this driver. I don't know when i will find the time to review it and send it in, but i hope to do it soon. I have never committed something to the kernel and i don't know how complicated this will be, so i want to be able to say, that the driver is tested.

Keep up the good work, i think a lot of users are waiting for the magic mouse 2, and what i can do to support you, i will do ;-)

from linux-magic-trackpad-2-driver.

rohitpid avatar rohitpid commented on September 7, 2024

So using a packet logger on mac, it seems that magic mouse 2 and magic trackpad 2 send bytes [41 f0] to the mouse and then receive [a1 f0 90 00 62] responses. The 62 at the end directly reports the 98% charge value of my mouse (0x62 hex = 98 dec). Looks like the way to report this out is through power_supply and power_supply_desc objects but if anyone has an example of how to do this, I'd appreciate it.

For reference magic mouse 1 sends [43 47] and gets back [a3 47 14] (the 14 correctly corresponds to 20% battery)

The weird thing is, the magic mouse 1 creates a node in /sys/class/power_supply/hid-67:d9:3f:67:56:c4-battery/capacity but the code in hid-magicmouse doesn't have any power_supply structs.

from linux-magic-trackpad-2-driver.

bobbysue avatar bobbysue commented on September 7, 2024

If you are interested, I could prepare a patch to submit for mainline review. I would need to know who to include for "signed-off-by" lines.

from linux-magic-trackpad-2-driver.

mwyborski avatar mwyborski commented on September 7, 2024

Hi @bobbysue,
exucse the late answer. I am on vacation right now. I should have submitted the patch time ago. So if you would like to do this, i would appreciate it. Please make sure, that you check the patch with checkpatch.pl and that we are not changing the behaviour of the original driver for the MM and MT1. Please include @ponyfleisch and me in the signed-off-by and CC us, when you send in the patch:

"Claudio Mettler" [email protected] https://github.com/ponyfleisch/hid-magictrackpad2
me: "Marek Wyborski" [email protected]

Thank you!!

from linux-magic-trackpad-2-driver.

mwyborski avatar mwyborski commented on September 7, 2024

@bobbysue maybe you have the time to look into these two issues, which seem to have the same problem, before you submit the patch:

#11
#23

from linux-magic-trackpad-2-driver.

rohitpid avatar rohitpid commented on September 7, 2024

@robotrovsky @bobbysue I have magic mouse 2 code that I want to submit too. Would you like me to submit it all together so that we get functionality for both?

from linux-magic-trackpad-2-driver.

bobbysue avatar bobbysue commented on September 7, 2024

@robotrovsky I haven't been able to reproduce the bugs. I've also been testing on kernel v4.18, but using chromiumOS (so no xf86)

@rohitpid I think it makes sense to submit the changes separately to reduce the complexity of each patch.

from linux-magic-trackpad-2-driver.

mwyborski avatar mwyborski commented on September 7, 2024

@bobbysue Thank you for mainlining!!! That was great!

I close this now and update the readme.

from linux-magic-trackpad-2-driver.

mwyborski avatar mwyborski commented on September 7, 2024

@bobbysue dont take all the credit for google:
https://www.phoronix.com/scan.php?page=news_item&px=Linux-Apple-Magic-Trackpad-2

from linux-magic-trackpad-2-driver.

mwyborski avatar mwyborski commented on September 7, 2024

@bobbysue no problem. It was just funny to read "Thanks Google: Linux Kernel Finally Nearing Support For The Apple Magic Trackpad 2" and then seeing that they actually talk about this driver. What actually would be really nice, would not be google working on the driver but apple releasing the spec to do the driver the right way. But i doubt this will happen.

The problem is that the pressures are not correct at all. Only for the first finger, from what i saw.

from linux-magic-trackpad-2-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.