New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Apple Magic Trackpad 2 in bcm5974 driver #332

Open
wants to merge 5 commits into
base: master
from

Conversation

Projects
None yet
@robotrovsky

robotrovsky commented Oct 9, 2016

Incorporated the driver for the Apple Magic Trackpad 2 into the bcm5974 (MacBook Tochpad) driver. The Magic Trackpad 2 needs to be switched into the finger-reporting-mode, just like the other MacBook-Touchpads as well. But the format is different to the ones before. The Header is 12 Bytes long and each reported finger is additional 9 Bytes. The data order is as well different.

This is my first contribution. Please let me know if i have to change anything or submit the patch to someone else.

Kind regards
Marek

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky Oct 9, 2016

Ok. I already read, that pull-requests through github are not accepted. I contacted the maintainer via email.

robotrovsky commented Oct 9, 2016

Ok. I already read, that pull-requests through github are not accepted. I contacted the maintainer via email.

laijs pushed a commit to laijs/linux that referenced this pull request Feb 22, 2017

Merge pull request #332 from laijs/lkl/stackoverflow
fix stackoverflow in test_getdents64()
@orospakr

This comment has been minimized.

Show comment
Hide comment
@orospakr

orospakr May 1, 2017

Hi @robotrovsky, did you email the linux-input mailing list or the maintainer Henrik Rydberg directly?

orospakr commented May 1, 2017

Hi @robotrovsky, did you email the linux-input mailing list or the maintainer Henrik Rydberg directly?

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky May 1, 2017

Hi @orospakr ! Yes i wrote to Henrik Rydberg and he told me to submit the patch according to the guidelines. But i still don´t think, that the driver is complete this way. I would like to rewrite the driver alongside the Magic Trackpad I, but unfortunately i don't have time to do this right now. tiziano88/magic-trackpad-2-linux#4 (comment)

robotrovsky commented May 1, 2017

Hi @orospakr ! Yes i wrote to Henrik Rydberg and he told me to submit the patch according to the guidelines. But i still don´t think, that the driver is complete this way. I would like to rewrite the driver alongside the Magic Trackpad I, but unfortunately i don't have time to do this right now. tiziano88/magic-trackpad-2-linux#4 (comment)

@elbamos

This comment has been minimized.

Show comment
Hide comment
@elbamos

elbamos May 15, 2017

@robotrovsky Is there a way I can help you?

elbamos commented May 15, 2017

@robotrovsky Is there a way I can help you?

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky May 15, 2017

Hi @elbamos! Thank you very much for your offer to help out. If you like to, you could port the driver over to magic trackpad I (magic mouse) driver, to get bluetooth working. Otherwise i think i will find some time to work on this the next two months. I already organized a USB Protocol Analyzer, to reverse engineer the protocol further, and make the settings adjustable (click firm, silent, etc...).

robotrovsky commented May 15, 2017

Hi @elbamos! Thank you very much for your offer to help out. If you like to, you could port the driver over to magic trackpad I (magic mouse) driver, to get bluetooth working. Otherwise i think i will find some time to work on this the next two months. I already organized a USB Protocol Analyzer, to reverse engineer the protocol further, and make the settings adjustable (click firm, silent, etc...).

@AlexCzar

This comment has been minimized.

Show comment
Hide comment
@AlexCzar

AlexCzar Jun 15, 2017

Hi, @robotrovsky! Really appreciate your effort! What is the best place to track progress on this? As soon as it's in mainline I'm buying the M. pad :)

AlexCzar commented Jun 15, 2017

Hi, @robotrovsky! Really appreciate your effort! What is the best place to track progress on this? As soon as it's in mainline I'm buying the M. pad :)

@bithooked

This comment has been minimized.

Show comment
Hide comment
@bithooked

bithooked Jul 6, 2017

Any update on this? I have an expensive MT2 collecting dust since I switched back to Linux full time. How can we help?

bithooked commented Jul 6, 2017

Any update on this? I have an expensive MT2 collecting dust since I switched back to Linux full time. How can we help?

@compressed

This comment has been minimized.

Show comment
Hide comment
@compressed

compressed Jul 6, 2017

Yes, I'd love to see this as well. I can help with testing too.

I'm currently using https://github.com/robbi5/magictrackpad2-dkms on arch for the time being, it's a bit clunky (only works wired) using DKMS (and linux 4.11 caused some issues) but at least I can use the magic trackpad :)

compressed commented Jul 6, 2017

Yes, I'd love to see this as well. I can help with testing too.

I'm currently using https://github.com/robbi5/magictrackpad2-dkms on arch for the time being, it's a bit clunky (only works wired) using DKMS (and linux 4.11 caused some issues) but at least I can use the magic trackpad :)

@bithooked

This comment has been minimized.

Show comment
Hide comment
@bithooked

bithooked Jul 6, 2017

That's where I was headed next. I'm going to be trying it on Manjaro so it's good to hear it works on Arch before attempting it. Agreed, Bluetooth support would be great but I can deal with a wire for now.

There's also a thread on that project that explains better what needs to be done. tiziano88/magic-trackpad-2-linux#4

bithooked commented Jul 6, 2017

That's where I was headed next. I'm going to be trying it on Manjaro so it's good to hear it works on Arch before attempting it. Agreed, Bluetooth support would be great but I can deal with a wire for now.

There's also a thread on that project that explains better what needs to be done. tiziano88/magic-trackpad-2-linux#4

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky Jul 7, 2017

I have time this weekend and will prepare the patch nearly as-is according to the guidelines and send it to the mailinglist. I know i should have done this a long time ago.

robotrovsky commented Jul 7, 2017

I have time this weekend and will prepare the patch nearly as-is according to the guidelines and send it to the mailinglist. I know i should have done this a long time ago.

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky commented Jul 8, 2017

Ok. So i send in the patch:
http://www.spinics.net/lists/kernel/msg2551703.html

fengguang added a commit to 0day-ci/linux that referenced this pull request Jul 8, 2017

input: mouse: bcm5974: Add driver for Apple Magic Trackpad 2
Added support for Apple Magic Trackpad 2 in bcm5974 (MacBook Tochpad) driver.
The Magic Trackpad 2 needs to be switched into the finger-reporting-mode,
just like the other macbook touchpads as well. But the format is different to
the ones before. The Header is 12 Bytes long and each reported finger is
additional 9 Bytes. The data order is as well different.

The driver currently only supports USB. One option would be to integrate
bluetooth support into the bcm driver or to move the driver to the
hid-magicmouse which supports bluetooth. I integrated the driver into the bcm
and not the magicmouse driver, because this way i was able to compare the
outcome with the macbook touchpad as i dont own a magicmouse or a magictrackpad.

The patch has been tested by several people with a dkms:
https://github.com/robbi5/magictrackpad2-dkms
torvalds#332

Signed-off-by: Marek Wyborski <marek.wyborski@emwesoft.com>
@Hubro

This comment has been minimized.

Show comment
Hide comment
@Hubro

Hubro Jul 14, 2017

I absolutely love Apple's keyboards and mouse pads, but unfortunately I only use Linux. As soon as Magic TrackPad 2 works in Linux over Bluetooth with basic click, right click and scroll I'll buy one. I'd be happy to help test any unstable drivers.

Hubro commented Jul 14, 2017

I absolutely love Apple's keyboards and mouse pads, but unfortunately I only use Linux. As soon as Magic TrackPad 2 works in Linux over Bluetooth with basic click, right click and scroll I'll buy one. I'd be happy to help test any unstable drivers.

@anton-johansson

This comment has been minimized.

Show comment
Hide comment
@anton-johansson

anton-johansson Jul 19, 2017

I'm eagerly waiting to be able to use my trackpad. Is there anywhere I can track progress of this change?

I'll gladly help testing aswell!

anton-johansson commented Jul 19, 2017

I'm eagerly waiting to be able to use my trackpad. Is there anywhere I can track progress of this change?

I'll gladly help testing aswell!

@coxley

This comment has been minimized.

Show comment
Hide comment
@coxley

coxley Jul 20, 2017

👍 Have been waiting for this for awhile.

coxley commented Jul 20, 2017

👍 Have been waiting for this for awhile.

@zavorka

This comment has been minimized.

Show comment
Hide comment
@zavorka

zavorka Aug 26, 2017

Awesome work! I was actually trying to decode some usbmon traces myself, fortunately I've discovered this PR before I actually dived deeper into it.

So with the kernel driver available, what is needed to be configured in the userspace (Xorg server) to get the pointer behavior close to the one we're used to from macOS?

zavorka commented Aug 26, 2017

Awesome work! I was actually trying to decode some usbmon traces myself, fortunately I've discovered this PR before I actually dived deeper into it.

So with the kernel driver available, what is needed to be configured in the userspace (Xorg server) to get the pointer behavior close to the one we're used to from macOS?

@postadelmaga

This comment has been minimized.

Show comment
Hide comment
@postadelmaga

postadelmaga Sep 7, 2017

When can we expect this to be merged in the kernel tree ?

postadelmaga commented Sep 7, 2017

When can we expect this to be merged in the kernel tree ?

@kingkian

This comment has been minimized.

Show comment
Hide comment
@kingkian

kingkian commented Sep 14, 2017

+1!!!!

@oscarbranson

This comment has been minimized.

Show comment
Hide comment
@oscarbranson

oscarbranson commented Sep 28, 2017

+9000!

@yselivonchyk

This comment has been minimized.

Show comment
Hide comment
@yselivonchyk

yselivonchyk Nov 14, 2017

Is it possible to get it working under Gnome (which comes by default with 17.10) ?

yselivonchyk commented Nov 14, 2017

Is it possible to get it working under Gnome (which comes by default with 17.10) ?

@arduino-man

This comment has been minimized.

Show comment
Hide comment
@arduino-man

arduino-man Dec 3, 2017

Yes is it possible to get it working under Gnome. I am using it as we speak. Thumb rejection is not quite as fast as on the Mac OS (if your thumb and your index are both on the track pad it takes about 500 ms to start ignoring the thumb and let you move with the index) but this is an amazing driver.

arduino-man commented Dec 3, 2017

Yes is it possible to get it working under Gnome. I am using it as we speak. Thumb rejection is not quite as fast as on the Mac OS (if your thumb and your index are both on the track pad it takes about 500 ms to start ignoring the thumb and let you move with the index) but this is an amazing driver.

@yselivonchyk

This comment has been minimized.

Show comment
Hide comment
@yselivonchyk

yselivonchyk Dec 3, 2017

@arduino-man can you please describe some steps of how to get it working? So far I have magictrackpad identified as a pointer device (pointer events only) on Ubuntu 17.10 and there is a this driver that I could not figure out how to bring in

yselivonchyk commented Dec 3, 2017

@arduino-man can you please describe some steps of how to get it working? So far I have magictrackpad identified as a pointer device (pointer events only) on Ubuntu 17.10 and there is a this driver that I could not figure out how to bring in

@arduino-man

This comment has been minimized.

Show comment
Hide comment
@arduino-man

arduino-man Dec 3, 2017

I basically uninstalled everything that has "synaptic" in the name. Then proceeded to "sudo apt-get install xserver-xorg-input-libinput-hwe" after removing synaptic Linux immediately defaulted to libinput.

I used these commands to remove everything: sudo apt-get remove xserver-xorg-input-synaptics*

Then just reboot

arduino-man commented Dec 3, 2017

I basically uninstalled everything that has "synaptic" in the name. Then proceeded to "sudo apt-get install xserver-xorg-input-libinput-hwe" after removing synaptic Linux immediately defaulted to libinput.

I used these commands to remove everything: sudo apt-get remove xserver-xorg-input-synaptics*

Then just reboot

@AlexCzar

This comment has been minimized.

Show comment
Hide comment
@AlexCzar

AlexCzar May 31, 2018

Will it have the same disconnect-reconnect problem as driver for magic trackpad I has? Basically it works good on a very small subset of bluetooth adapters, while for vast majority it disconnects and after several painful seconds reconnects, with magic trackpad I it happens every few minutes, almost completely unusable.

AlexCzar commented May 31, 2018

Will it have the same disconnect-reconnect problem as driver for magic trackpad I has? Basically it works good on a very small subset of bluetooth adapters, while for vast majority it disconnects and after several painful seconds reconnects, with magic trackpad I it happens every few minutes, almost completely unusable.

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky Jun 3, 2018

I am finished uploading the new driver. It now supports bluetooth and USB and seems to work very well. Tap-to-click, two-finger-scroll and three-finger-drag work as well. Please try it in combination with xf86-input-mtrack and give me some feedback ;-)

It can be found here:
https://github.com/robotrovsky/Linux-Magic-Trackpad-2-Driver

I hope to get it this time into the kernel...

robotrovsky commented Jun 3, 2018

I am finished uploading the new driver. It now supports bluetooth and USB and seems to work very well. Tap-to-click, two-finger-scroll and three-finger-drag work as well. Please try it in combination with xf86-input-mtrack and give me some feedback ;-)

It can be found here:
https://github.com/robotrovsky/Linux-Magic-Trackpad-2-Driver

I hope to get it this time into the kernel...

@poisonnuke

This comment has been minimized.

Show comment
Hide comment
@poisonnuke

poisonnuke Jun 3, 2018

@robotrovsky may I ask for some help to understand this? I tought recognition of tap and two-finger scroll and so on is not part of the driver, but of the MT event-system? What role does the magic-mouse driver play at all together with the bcm5974?

Is there something about the taptic engine inside? If not, is there any way to find some information about this? I need to disable the default forcepress feedback and send out my own profiles on demand, if possible with different tactile profiles.

If any help or assistance is needed during development, I would be pleased to do so.

poisonnuke commented Jun 3, 2018

@robotrovsky may I ask for some help to understand this? I tought recognition of tap and two-finger scroll and so on is not part of the driver, but of the MT event-system? What role does the magic-mouse driver play at all together with the bcm5974?

Is there something about the taptic engine inside? If not, is there any way to find some information about this? I need to disable the default forcepress feedback and send out my own profiles on demand, if possible with different tactile profiles.

If any help or assistance is needed during development, I would be pleased to do so.

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky Jun 3, 2018

@poisonnuke This driver is now inside of hid-magicmouse and not inside of bcm5974. You are right, that two-finger-scroll etc. is not handled by the hardware-driver but by the xorg driver "mtrack". There is no more connection to the bcm5974 driver.
Force Touch is not implemented right now, it would be no problem, but i want to get the normal behaviour stable, before i add force-touch as an option.

robotrovsky commented Jun 3, 2018

@poisonnuke This driver is now inside of hid-magicmouse and not inside of bcm5974. You are right, that two-finger-scroll etc. is not handled by the hardware-driver but by the xorg driver "mtrack". There is no more connection to the bcm5974 driver.
Force Touch is not implemented right now, it would be no problem, but i want to get the normal behaviour stable, before i add force-touch as an option.

@poisonnuke

This comment has been minimized.

Show comment
Hide comment
@poisonnuke

poisonnuke Jun 3, 2018

@robotrovsky what about the pressure, can I access this simply inside the emit_touch (which seems to be the major function for sending touch points to mtrack?) in the input_dev struct?

what about the modifications in hid-core.c, hid-apple.c and hid-ids.h?

How long do you think you will need to implement force-feedback? As mentioned, I can support you in any manner, currently Im counting on this functionality of the trackpad as one building block for my master-thesis :)

poisonnuke commented Jun 3, 2018

@robotrovsky what about the pressure, can I access this simply inside the emit_touch (which seems to be the major function for sending touch points to mtrack?) in the input_dev struct?

what about the modifications in hid-core.c, hid-apple.c and hid-ids.h?

How long do you think you will need to implement force-feedback? As mentioned, I can support you in any manner, currently Im counting on this functionality of the trackpad as one building block for my master-thesis :)

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky Jun 3, 2018

@poisonnuke the pressure is not explicitly used, but it should be the 8th of the 9 bytes in a finger report. First i want to test it with libinput and synaptics. Then i will try to get it to mainline. Afterwards i maybe would implement further features.
Feel free to open an issue in
https://github.com/robotrovsky/Linux-Magic-Trackpad-2-Driver
with further questions. As this is a special use-case, i think your questions may not be of interest for most people following this discussion.

robotrovsky commented Jun 3, 2018

@poisonnuke the pressure is not explicitly used, but it should be the 8th of the 9 bytes in a finger report. First i want to test it with libinput and synaptics. Then i will try to get it to mainline. Afterwards i maybe would implement further features.
Feel free to open an issue in
https://github.com/robotrovsky/Linux-Magic-Trackpad-2-Driver
with further questions. As this is a special use-case, i think your questions may not be of interest for most people following this discussion.

@adam-h

This comment has been minimized.

Show comment
Hide comment
@adam-h

adam-h Jun 4, 2018

@robotrovsky Loaded this via dkms on Arch 4.16.12.1 with mtrack and it's looking good both via Bluetooth and USB 👍

adam-h commented Jun 4, 2018

@robotrovsky Loaded this via dkms on Arch 4.16.12.1 with mtrack and it's looking good both via Bluetooth and USB 👍

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky Jun 4, 2018

@adam-h thank you for your feedback. Indeed i messed up the hid-quirks.c file. But anyways for testing (like it seems you did) it is sufficient to compile hid-magicmouse. Good to hear that it works for you. If you modify the xorg-config file for mtrack with better options, please report back.

@adam-h would you mind releasing your DKMS? I would put the link to it in the driver description. This would allow a lot more people to test the driver.

robotrovsky commented Jun 4, 2018

@adam-h thank you for your feedback. Indeed i messed up the hid-quirks.c file. But anyways for testing (like it seems you did) it is sufficient to compile hid-magicmouse. Good to hear that it works for you. If you modify the xorg-config file for mtrack with better options, please report back.

@adam-h would you mind releasing your DKMS? I would put the link to it in the driver description. This would allow a lot more people to test the driver.

@adam-h

This comment has been minimized.

Show comment
Hide comment
@adam-h

adam-h Jun 5, 2018

@robotrovsky I've created a branch on my fork with what I'm using here. Although this is my first time using dkms or loading custom modules, so I'm surely not the best person to write this for general use!

I also tried to include hid-quirks in the build (just adding hid-quirks.o to the makefile with the magicmouse) but that failed due to missing MODULE_LICENSE. Although ti seems to work find with just hid-magicmouse.

adam-h commented Jun 5, 2018

@robotrovsky I've created a branch on my fork with what I'm using here. Although this is my first time using dkms or loading custom modules, so I'm surely not the best person to write this for general use!

I also tried to include hid-quirks in the build (just adding hid-quirks.o to the makefile with the magicmouse) but that failed due to missing MODULE_LICENSE. Although ti seems to work find with just hid-magicmouse.

@markmcd

This comment has been minimized.

Show comment
Hide comment
@markmcd

markmcd Jun 5, 2018

When building this on 4.9.0, I get compile errors on this line:

/var/lib/dkms/hid-magicmouse-dkms/4.17+magictrackpad2/build/hid-magicmouse.c:45:33: error: passing argument 1 of ‘__check_old_set_param’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 module_param_call(scroll_speed, param_set_scroll_speed, param_get_uint, &scroll_speed, 0644);

I played around for a bit trying to force -Wno-error into CFLAGS but I couldn't get it to work (this is way out of my normal expertise 😄)

markmcd commented Jun 5, 2018

When building this on 4.9.0, I get compile errors on this line:

/var/lib/dkms/hid-magicmouse-dkms/4.17+magictrackpad2/build/hid-magicmouse.c:45:33: error: passing argument 1 of ‘__check_old_set_param’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 module_param_call(scroll_speed, param_set_scroll_speed, param_get_uint, &scroll_speed, 0644);

I played around for a bit trying to force -Wno-error into CFLAGS but I couldn't get it to work (this is way out of my normal expertise 😄)

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky Jun 5, 2018

@adam-h thank you very much. This will make it more easy to test. I pulled your changes into my repository.
I also tested the xf86-libinput and xf86-synaptics. xf86-libinput works very good and provides better scrolling than xf86-mtrack. But it doesn't allow three-finger-drag, but tap-to-drag. I am now finishing the event reporting as it can be improved. I had problems to use the trackpad at the borders, but already fixed this in my local copy. As soon as i see no more improvement to event reporting i will commit the changes.

robotrovsky commented Jun 5, 2018

@adam-h thank you very much. This will make it more easy to test. I pulled your changes into my repository.
I also tested the xf86-libinput and xf86-synaptics. xf86-libinput works very good and provides better scrolling than xf86-mtrack. But it doesn't allow three-finger-drag, but tap-to-drag. I am now finishing the event reporting as it can be improved. I had problems to use the trackpad at the borders, but already fixed this in my local copy. As soon as i see no more improvement to event reporting i will commit the changes.

@caseyWebb

This comment has been minimized.

Show comment
Hide comment
@caseyWebb

caseyWebb Jun 5, 2018

I compiled this in 4.17 on Manjaro and can confirm 2-finger scroll is working with both libinput and mtrack. Thanks so much for the patch @robotrovsky!

caseyWebb commented Jun 5, 2018

I compiled this in 4.17 on Manjaro and can confirm 2-finger scroll is working with both libinput and mtrack. Thanks so much for the patch @robotrovsky!

@vibraphone

This comment has been minimized.

Show comment
Hide comment
@vibraphone

vibraphone Jun 7, 2018

I can confirm this works on Fedora 28. You must recompile the kernel as by default the old hid_magicmouse driver is built in (not a module). I do see some message in dmesg output:

[    3.559367] magicmouse 0003:05AC:0265.0004: hiddev98,hidraw3: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-14.1/input0
[    3.559369] magicmouse 0003:05AC:0265.0004: magicmouse input not registered
[    3.559697] magicmouse: probe of 0003:05AC:0265.0004 failed with error -12
[    3.559818] input: Apple Inc. Magic Trackpad 2 as /devices/pci0000:00/0000:00:14.0/usb1/1-14/1-14.1/1-14.1:1.1/0003:05AC:0265.0005/input/input9
[    3.559933] magicmouse 0003:05AC:0265.0005: input,hiddev98,hidraw3: USB HID v1.10 Mouse [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-14.1/input1
[    3.560203] magicmouse 0003:05AC:0265.0006: hiddev99,hidraw4: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-14.1/input2
[    3.560204] magicmouse 0003:05AC:0265.0006: magicmouse input not registered
[    3.560533] magicmouse: probe of 0003:05AC:0265.0006 failed with error -12
[    3.560607] magicmouse 0003:05AC:0265.0007: hiddev99,hidraw4: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-14.1/input3
[    3.560608] magicmouse 0003:05AC:0265.0007: magicmouse input not registered
[    3.560940] magicmouse: probe of 0003:05AC:0265.0007 failed with error -12

Despite the errors, the module shows up in lsmod and I get 2-finger scrolling in Xorg, which I did not with the old driver. I was also able to get 3-finger dragging with mtrack by building+installing p2rkw/xf86-input-mtrack.

Thanks a bunch!!!

vibraphone commented Jun 7, 2018

I can confirm this works on Fedora 28. You must recompile the kernel as by default the old hid_magicmouse driver is built in (not a module). I do see some message in dmesg output:

[    3.559367] magicmouse 0003:05AC:0265.0004: hiddev98,hidraw3: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-14.1/input0
[    3.559369] magicmouse 0003:05AC:0265.0004: magicmouse input not registered
[    3.559697] magicmouse: probe of 0003:05AC:0265.0004 failed with error -12
[    3.559818] input: Apple Inc. Magic Trackpad 2 as /devices/pci0000:00/0000:00:14.0/usb1/1-14/1-14.1/1-14.1:1.1/0003:05AC:0265.0005/input/input9
[    3.559933] magicmouse 0003:05AC:0265.0005: input,hiddev98,hidraw3: USB HID v1.10 Mouse [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-14.1/input1
[    3.560203] magicmouse 0003:05AC:0265.0006: hiddev99,hidraw4: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-14.1/input2
[    3.560204] magicmouse 0003:05AC:0265.0006: magicmouse input not registered
[    3.560533] magicmouse: probe of 0003:05AC:0265.0006 failed with error -12
[    3.560607] magicmouse 0003:05AC:0265.0007: hiddev99,hidraw4: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-14.1/input3
[    3.560608] magicmouse 0003:05AC:0265.0007: magicmouse input not registered
[    3.560940] magicmouse: probe of 0003:05AC:0265.0007 failed with error -12

Despite the errors, the module shows up in lsmod and I get 2-finger scrolling in Xorg, which I did not with the old driver. I was also able to get 3-finger dragging with mtrack by building+installing p2rkw/xf86-input-mtrack.

Thanks a bunch!!!

@wernerb

This comment has been minimized.

Show comment
Hide comment
@wernerb

wernerb Jun 8, 2018

did make, installed using dkms and installed xf86-input-mtrack-git through AUR yet with mtrack the pointer is not working though mtrack is recognising it. Libinput does work but no tap to click, nor can I get 2-finger scroll working. Any tips? (Im on 4.16 arch linux under XFCE). Connecting through USB

[    83.319] (II) config/udev: Adding input device Apple Inc. Magic Trackpad 2 (/dev/input/mouse0)
[    83.319] (II) No input driver specified, ignoring this device.
[    83.319] (II) This device may have been added with another device file.
[    83.419] (II) config/udev: Adding input device Apple Inc. Magic Trackpad 2 (/dev/input/event5)
[    83.419] (**) Apple Inc. Magic Trackpad 2: Applying InputClass "libinput pointer catchall"
[    83.419] (**) Apple Inc. Magic Trackpad 2: Applying InputClass "Touchpads"
[    83.419] (II) Using input driver 'mtrack' for 'Apple Inc. Magic Trackpad 2'
[    83.419] (**) Apple Inc. Magic Trackpad 2: always reports core events
[    83.419] (**) Apple Inc. Magic Trackpad 2: always reports core events
[    83.419] (**) Option "FingerHigh" "10"
[    83.419] (**) Option "FingerLow" "10"
[    83.419] (**) Option "ButtonIntegrated" "true"
[    83.419] (**) Option "TapButton1" "1"
[    83.419] (**) Option "TapButton2" "3"
[    83.419] (**) Option "TapButton3" "2"
[    83.419] (**) Option "TapButton4" "0"
[    83.419] (**) Option "ClickTime" "25"
[    83.419] (**) Option "ScrollSmooth" "1"
[    83.419] (**) Option "ScrollDistance" "75"
[    83.419] (**) Option "ScrollUpButton" "5"
[    83.419] (**) Option "ScrollDownButton" "4"
[    83.419] (**) Option "ScrollLeftButton" "7"
[    83.419] (**) Option "ScrollRightButton" "6"
[    83.419] (**) Option "SwipeDistance" "1"
[    83.419] (**) Option "SwipeClickTime" "0"
[    83.419] (**) Option "SwipeSensitivity" "1000"
[    83.419] (**) Option "SwipeUpButton" "1"
[    83.419] (**) Option "SwipeDownButton" "1"
[    83.419] (**) Option "SwipeLeftButton" "1"
[    83.419] (**) Option "SwipeRightButton" "1"
[    83.420] (**) Option "TapDragEnable" "false"
[    83.420] (**) Option "Sensitivity" "0.55"
[    83.420] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0265.0008/input/input33/event5"
[    83.420] (II) XINPUT: Adding extended input device "Apple Inc. Magic Trackpad 2" (type: TOUCHPAD, id 10)
[    83.420] (II) mtrack[9] driver/mtrack.c:564: (II) device control: init
[    83.420] (**) Option "Device" "/dev/input/event5"
[    83.476] (II) mtrack[2] src/capabilities.c:183: (II) Capabilities: 
[    83.476] (II) mtrack[...]: devname: Apple Inc. Magic Trackpad 2
[    83.476] (II) mtrack[...]: devid: 5ac 265 110
[    83.476] (II) mtrack[...]: enabled caps: left middle right
[    83.560] (**) Apple Inc. Magic Trackpad 2: (accel) keeping acceleration scheme 1
[    83.560] (**) Apple Inc. Magic Trackpad 2: (accel) acceleration profile 0
[    83.560] (**) Apple Inc. Magic Trackpad 2: (accel) acceleration factor: 2.000
[    83.560] (**) Apple Inc. Magic Trackpad 2: (accel) acceleration threshold: 4
[    83.560] (II) mtrack[10] driver/mtrack.c:567: (II) device control: on
[    83.616] (WW) mtrack[3] src/mconfig.c:180: (WW) Touchpad has minimal capabilities. Some features will be unavailable.

dmesg:

[ 2299.056634] usb 1-1.3: USB disconnect, device number 17
[ 2300.592709] usb 1-1.3: new full-speed USB device number 18 using xhci_hcd
[ 2300.734842] usb 1-1.3: New USB device found, idVendor=05ac, idProduct=0265
[ 2300.734844] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2300.734845] usb 1-1.3: Product: Magic Trackpad 2
[ 2300.734847] usb 1-1.3: Manufacturer: Apple Inc.
[ 2300.734848] usb 1-1.3: SerialNumber: CC2752201D7J2Y1AS
[ 2300.761653] hid-generic 0003:05AC:0265.0021: hiddev0,hidraw0: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-1.3/input0
[ 2300.761822] input: Apple Inc. Magic Trackpad 2 as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0265.0022/input/input42
[ 2300.767201] hid-generic 0003:05AC:0265.0022: input,hiddev1,hidraw1: USB HID v1.10 Mouse [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-1.3/input1
[ 2300.767357] hid-generic 0003:05AC:0265.0023: hiddev2,hidraw2: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-1.3/input2
[ 2300.767434] hid-generic 0003:05AC:0265.0024: hiddev3,hidraw3: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-1.3/input3

EDIT: added dmesg

wernerb commented Jun 8, 2018

did make, installed using dkms and installed xf86-input-mtrack-git through AUR yet with mtrack the pointer is not working though mtrack is recognising it. Libinput does work but no tap to click, nor can I get 2-finger scroll working. Any tips? (Im on 4.16 arch linux under XFCE). Connecting through USB

[    83.319] (II) config/udev: Adding input device Apple Inc. Magic Trackpad 2 (/dev/input/mouse0)
[    83.319] (II) No input driver specified, ignoring this device.
[    83.319] (II) This device may have been added with another device file.
[    83.419] (II) config/udev: Adding input device Apple Inc. Magic Trackpad 2 (/dev/input/event5)
[    83.419] (**) Apple Inc. Magic Trackpad 2: Applying InputClass "libinput pointer catchall"
[    83.419] (**) Apple Inc. Magic Trackpad 2: Applying InputClass "Touchpads"
[    83.419] (II) Using input driver 'mtrack' for 'Apple Inc. Magic Trackpad 2'
[    83.419] (**) Apple Inc. Magic Trackpad 2: always reports core events
[    83.419] (**) Apple Inc. Magic Trackpad 2: always reports core events
[    83.419] (**) Option "FingerHigh" "10"
[    83.419] (**) Option "FingerLow" "10"
[    83.419] (**) Option "ButtonIntegrated" "true"
[    83.419] (**) Option "TapButton1" "1"
[    83.419] (**) Option "TapButton2" "3"
[    83.419] (**) Option "TapButton3" "2"
[    83.419] (**) Option "TapButton4" "0"
[    83.419] (**) Option "ClickTime" "25"
[    83.419] (**) Option "ScrollSmooth" "1"
[    83.419] (**) Option "ScrollDistance" "75"
[    83.419] (**) Option "ScrollUpButton" "5"
[    83.419] (**) Option "ScrollDownButton" "4"
[    83.419] (**) Option "ScrollLeftButton" "7"
[    83.419] (**) Option "ScrollRightButton" "6"
[    83.419] (**) Option "SwipeDistance" "1"
[    83.419] (**) Option "SwipeClickTime" "0"
[    83.419] (**) Option "SwipeSensitivity" "1000"
[    83.419] (**) Option "SwipeUpButton" "1"
[    83.419] (**) Option "SwipeDownButton" "1"
[    83.419] (**) Option "SwipeLeftButton" "1"
[    83.419] (**) Option "SwipeRightButton" "1"
[    83.420] (**) Option "TapDragEnable" "false"
[    83.420] (**) Option "Sensitivity" "0.55"
[    83.420] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0265.0008/input/input33/event5"
[    83.420] (II) XINPUT: Adding extended input device "Apple Inc. Magic Trackpad 2" (type: TOUCHPAD, id 10)
[    83.420] (II) mtrack[9] driver/mtrack.c:564: (II) device control: init
[    83.420] (**) Option "Device" "/dev/input/event5"
[    83.476] (II) mtrack[2] src/capabilities.c:183: (II) Capabilities: 
[    83.476] (II) mtrack[...]: devname: Apple Inc. Magic Trackpad 2
[    83.476] (II) mtrack[...]: devid: 5ac 265 110
[    83.476] (II) mtrack[...]: enabled caps: left middle right
[    83.560] (**) Apple Inc. Magic Trackpad 2: (accel) keeping acceleration scheme 1
[    83.560] (**) Apple Inc. Magic Trackpad 2: (accel) acceleration profile 0
[    83.560] (**) Apple Inc. Magic Trackpad 2: (accel) acceleration factor: 2.000
[    83.560] (**) Apple Inc. Magic Trackpad 2: (accel) acceleration threshold: 4
[    83.560] (II) mtrack[10] driver/mtrack.c:567: (II) device control: on
[    83.616] (WW) mtrack[3] src/mconfig.c:180: (WW) Touchpad has minimal capabilities. Some features will be unavailable.

dmesg:

[ 2299.056634] usb 1-1.3: USB disconnect, device number 17
[ 2300.592709] usb 1-1.3: new full-speed USB device number 18 using xhci_hcd
[ 2300.734842] usb 1-1.3: New USB device found, idVendor=05ac, idProduct=0265
[ 2300.734844] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2300.734845] usb 1-1.3: Product: Magic Trackpad 2
[ 2300.734847] usb 1-1.3: Manufacturer: Apple Inc.
[ 2300.734848] usb 1-1.3: SerialNumber: CC2752201D7J2Y1AS
[ 2300.761653] hid-generic 0003:05AC:0265.0021: hiddev0,hidraw0: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-1.3/input0
[ 2300.761822] input: Apple Inc. Magic Trackpad 2 as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0265.0022/input/input42
[ 2300.767201] hid-generic 0003:05AC:0265.0022: input,hiddev1,hidraw1: USB HID v1.10 Mouse [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-1.3/input1
[ 2300.767357] hid-generic 0003:05AC:0265.0023: hiddev2,hidraw2: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-1.3/input2
[ 2300.767434] hid-generic 0003:05AC:0265.0024: hiddev3,hidraw3: USB HID v1.10 Device [Apple Inc. Magic Trackpad 2] on usb-0000:00:14.0-1.3/input3

EDIT: added dmesg

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky Jun 8, 2018

wernerb that is weird, as it is exactly the setup with which i developed the driver (arch 4.16, xfce, mtrack). I also see, that you are using the correct mtrack profile.
Could you uninstall the mtrack driver, then delete the 90-magictrackpad.conf and restart X. This way it should load the libinput driver. Then you are able to enable tap-to-click in the Xfce-Settings for Mouse and Touchpad. I would like to know if this is working to track down the problem.

Please also make sure that the correct hid-magicmouse driver gets loaded. Please try the following steps:

cd linux/drivers/hid
make
sudo rmmod hid_magicmouse
sudo insmod ./hid-magicmouse.ko
tail -f ~/.local/share/xorg/Xorg.0.log

Now unplug the trackpad and plug it back in. What is your output?

Please open an issue in the project, if the problem persists.

robotrovsky commented Jun 8, 2018

wernerb that is weird, as it is exactly the setup with which i developed the driver (arch 4.16, xfce, mtrack). I also see, that you are using the correct mtrack profile.
Could you uninstall the mtrack driver, then delete the 90-magictrackpad.conf and restart X. This way it should load the libinput driver. Then you are able to enable tap-to-click in the Xfce-Settings for Mouse and Touchpad. I would like to know if this is working to track down the problem.

Please also make sure that the correct hid-magicmouse driver gets loaded. Please try the following steps:

cd linux/drivers/hid
make
sudo rmmod hid_magicmouse
sudo insmod ./hid-magicmouse.ko
tail -f ~/.local/share/xorg/Xorg.0.log

Now unplug the trackpad and plug it back in. What is your output?

Please open an issue in the project, if the problem persists.

@wernerb

This comment has been minimized.

Show comment
Hide comment
@wernerb

wernerb Jun 8, 2018

So this is the libinput log:

[  2639.715] (II) config/udev: Adding input device Apple Inc. Magic Trackpad 2 (/dev/input/mouse0)
[  2639.715] (II) No input driver specified, ignoring this device.
[  2639.715] (II) This device may have been added with another device file.
[  2639.856] (II) config/udev: Adding input device Apple Inc. Magic Trackpad 2 (/dev/input/event5)
[  2639.856] (**) Apple Inc. Magic Trackpad 2: Applying InputClass "libinput pointer catchall"
[  2639.856] (II) Using input driver 'libinput' for 'Apple Inc. Magic Trackpad 2'
[  2639.856] (**) Apple Inc. Magic Trackpad 2: always reports core events
[  2639.856] (**) Option "Device" "/dev/input/event5"
[  2639.856] (**) Option "_source" "server/udev"
[  2639.913] (II) event5  - Apple Inc. Magic Trackpad 2: is tagged by udev as: Mouse
[  2639.913] (II) event5  - Apple Inc. Magic Trackpad 2: device is a pointer
[  2639.913] (II) event5  - Apple Inc. Magic Trackpad 2: device removed
[  2640.000] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0265.0026/input/input43/event5"
[  2640.000] (II) XINPUT: Adding extended input device "Apple Inc. Magic Trackpad 2" (type: MOUSE, id 10)
[  2640.001] (**) Option "AccelerationScheme" "none"
[  2640.002] (**) Apple Inc. Magic Trackpad 2: (accel) selected scheme none/0
[  2640.002] (**) Apple Inc. Magic Trackpad 2: (accel) acceleration factor: 2.000
[  2640.002] (**) Apple Inc. Magic Trackpad 2: (accel) acceleration threshold: 4
[  2640.057] (II) event5  - Apple Inc. Magic Trackpad 2: is tagged by udev as: Mouse
[  2640.057] (II) event5  - Apple Inc. Magic Trackpad 2: device is a pointer

was the libinput settings before your instructions.
I also noticed there was no touchpad tab in xfce settings

Now with your instructions it worked, and was able to activate tap to click and two finger scrolling working correctly!

So apparently the dkms install did not work?

wernerb commented Jun 8, 2018

So this is the libinput log:

[  2639.715] (II) config/udev: Adding input device Apple Inc. Magic Trackpad 2 (/dev/input/mouse0)
[  2639.715] (II) No input driver specified, ignoring this device.
[  2639.715] (II) This device may have been added with another device file.
[  2639.856] (II) config/udev: Adding input device Apple Inc. Magic Trackpad 2 (/dev/input/event5)
[  2639.856] (**) Apple Inc. Magic Trackpad 2: Applying InputClass "libinput pointer catchall"
[  2639.856] (II) Using input driver 'libinput' for 'Apple Inc. Magic Trackpad 2'
[  2639.856] (**) Apple Inc. Magic Trackpad 2: always reports core events
[  2639.856] (**) Option "Device" "/dev/input/event5"
[  2639.856] (**) Option "_source" "server/udev"
[  2639.913] (II) event5  - Apple Inc. Magic Trackpad 2: is tagged by udev as: Mouse
[  2639.913] (II) event5  - Apple Inc. Magic Trackpad 2: device is a pointer
[  2639.913] (II) event5  - Apple Inc. Magic Trackpad 2: device removed
[  2640.000] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:05AC:0265.0026/input/input43/event5"
[  2640.000] (II) XINPUT: Adding extended input device "Apple Inc. Magic Trackpad 2" (type: MOUSE, id 10)
[  2640.001] (**) Option "AccelerationScheme" "none"
[  2640.002] (**) Apple Inc. Magic Trackpad 2: (accel) selected scheme none/0
[  2640.002] (**) Apple Inc. Magic Trackpad 2: (accel) acceleration factor: 2.000
[  2640.002] (**) Apple Inc. Magic Trackpad 2: (accel) acceleration threshold: 4
[  2640.057] (II) event5  - Apple Inc. Magic Trackpad 2: is tagged by udev as: Mouse
[  2640.057] (II) event5  - Apple Inc. Magic Trackpad 2: device is a pointer

was the libinput settings before your instructions.
I also noticed there was no touchpad tab in xfce settings

Now with your instructions it worked, and was able to activate tap to click and two finger scrolling working correctly!

So apparently the dkms install did not work?

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky Jun 8, 2018

@wernerb i am glad that it works now. Maybe the DKMS did not work. I never have tried it. I have my own script, which does xz on the hid-magicmouse.ko and then copies hid-magicmouse.ko.xz to the correct folder in my custom kernel. To make sure the module gets loaded at startup i added a file
/etc/modules-load.d/hid-magicmouse.conf
with this content:
hid-magicmouse

robotrovsky commented Jun 8, 2018

@wernerb i am glad that it works now. Maybe the DKMS did not work. I never have tried it. I have my own script, which does xz on the hid-magicmouse.ko and then copies hid-magicmouse.ko.xz to the correct folder in my custom kernel. To make sure the module gets loaded at startup i added a file
/etc/modules-load.d/hid-magicmouse.conf
with this content:
hid-magicmouse

@markmcd

This comment has been minimized.

Show comment
Hide comment
@markmcd

markmcd Jun 11, 2018

Just updating that I managed to get my installation working with a couple of tweaks... I had to update the signature of param_set_scroll_speed by removing the const keyword from the kp arg, then it compiled & installed fine.

I did end up with the same symptoms as wernerb, as a different module seemed to be hijacking the trackpad (completely my fault). I just rmmod'd hid_generic & hid_magicmouse, modprobe'd hid-magicmouse back and voila, it works!

Thanks again for your work here @robotrovsky (and @adam-h for the dkms piece)!

markmcd commented Jun 11, 2018

Just updating that I managed to get my installation working with a couple of tweaks... I had to update the signature of param_set_scroll_speed by removing the const keyword from the kp arg, then it compiled & installed fine.

I did end up with the same symptoms as wernerb, as a different module seemed to be hijacking the trackpad (completely my fault). I just rmmod'd hid_generic & hid_magicmouse, modprobe'd hid-magicmouse back and voila, it works!

Thanks again for your work here @robotrovsky (and @adam-h for the dkms piece)!

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky Jun 11, 2018

@markmcd that you had to remove the const keyword is weird, as this is from the original hid-magicmouse driver and i haven't touched it neither i use the parameter for the MT2. Could you tell me your Distribution and Kernel Version, please? And maybe the compile-error you get regarding the "const", if it is no problem.

Anyways, good that the driver works now.

robotrovsky commented Jun 11, 2018

@markmcd that you had to remove the const keyword is weird, as this is from the original hid-magicmouse driver and i haven't touched it neither i use the parameter for the MT2. Could you tell me your Distribution and Kernel Version, please? And maybe the compile-error you get regarding the "const", if it is no problem.

Anyways, good that the driver works now.

@markmcd

This comment has been minimized.

Show comment
Hide comment
@markmcd

markmcd Jun 12, 2018

This is a custom fork of Debian: 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux.

The compile error was in a previous comment (incompatible pointer types) but here it is anyways:

/var/lib/dkms/hid-magicmouse-dkms/4.17+magictrackpad2/build/hid-magicmouse.c:45:33: error: passing argument 1 of ‘__check_old_set_param’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 module_param_call(scroll_speed, param_set_scroll_speed, param_get_uint, &scroll_speed, 0644);

markmcd commented Jun 12, 2018

This is a custom fork of Debian: 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux.

The compile error was in a previous comment (incompatible pointer types) but here it is anyways:

/var/lib/dkms/hid-magicmouse-dkms/4.17+magictrackpad2/build/hid-magicmouse.c:45:33: error: passing argument 1 of ‘__check_old_set_param’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 module_param_call(scroll_speed, param_set_scroll_speed, param_get_uint, &scroll_speed, 0644);
@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky Jun 12, 2018

@markmcd ah ok. Now i see. Thank you!

robotrovsky commented Jun 12, 2018

@markmcd ah ok. Now i see. Thank you!

@poisonnuke

This comment has been minimized.

Show comment
Hide comment
@poisonnuke

poisonnuke Jun 14, 2018

There is one small issue with pressure-sensing:

the trackpad is able to determine the applied pressure of every finger. This driver only uses the pressure of the first finger, but if using more then one finger, this value fluctuates a lot.
To get the real pressure, every finger has to be read out and the maximum value over all been taken into account.

There is one phenomenom I quit do not understand: if two fingers apply exactly the same pressure (more then 10N in total, thats the maximum of the trackpad), then you get exactly 192 as maximum reported for each finger. But if one finger is slightly lifted, the other finger reports a pressure >250. Im not shure how to solve that problem.

poisonnuke commented Jun 14, 2018

There is one small issue with pressure-sensing:

the trackpad is able to determine the applied pressure of every finger. This driver only uses the pressure of the first finger, but if using more then one finger, this value fluctuates a lot.
To get the real pressure, every finger has to be read out and the maximum value over all been taken into account.

There is one phenomenom I quit do not understand: if two fingers apply exactly the same pressure (more then 10N in total, thats the maximum of the trackpad), then you get exactly 192 as maximum reported for each finger. But if one finger is slightly lifted, the other finger reports a pressure >250. Im not shure how to solve that problem.

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky commented Jun 14, 2018

@poisonnuke

This comment has been minimized.

Show comment
Hide comment
@poisonnuke

poisonnuke Jun 14, 2018

ok didnt see that update. thx

how do applications handle the pressure input? Thought this would be a general value for all slots. And still there is the issue with two fingers, where the max pressure is 192 instead of 255. As long if this is an issue for anyone else? But looks like as if the driver cannot do anything about it.

poisonnuke commented Jun 14, 2018

ok didnt see that update. thx

how do applications handle the pressure input? Thought this would be a general value for all slots. And still there is the issue with two fingers, where the max pressure is 192 instead of 255. As long if this is an issue for anyone else? But looks like as if the driver cannot do anything about it.

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky Jun 14, 2018

@poisonnuke unluckily we dont have the spec. The truth is i cannot tell you for sure, why it is this way or if the bitmask for pressure could be chosen better. If you find a better way to extract the pressure from the reports it would be very welcome.

robotrovsky commented Jun 14, 2018

@poisonnuke unluckily we dont have the spec. The truth is i cannot tell you for sure, why it is this way or if the bitmask for pressure could be chosen better. If you find a better way to extract the pressure from the reports it would be very welcome.

@poisonnuke

This comment has been minimized.

Show comment
Hide comment
@poisonnuke

poisonnuke Jun 21, 2018

Using the finger with the maximum pressure seems to be the best way, and most people wont feel this during practial usage, because it happens very seldomly.

Does anyone use 3 or 4 finger gestures? Do you have too issues, that the 3rd and 4th finger sometimes isnt recognized, so instead a 2-finger gesture is reported for a short amount of time? Cant tell if it is a hardware-related problem or even some sort of "human-factor" issue where the touchpad doesnt see my fingers at all.

poisonnuke commented Jun 21, 2018

Using the finger with the maximum pressure seems to be the best way, and most people wont feel this during practial usage, because it happens very seldomly.

Does anyone use 3 or 4 finger gestures? Do you have too issues, that the 3rd and 4th finger sometimes isnt recognized, so instead a 2-finger gesture is reported for a short amount of time? Cant tell if it is a hardware-related problem or even some sort of "human-factor" issue where the touchpad doesnt see my fingers at all.

@sque

This comment has been minimized.

Show comment
Hide comment
@sque

sque Jul 5, 2018

@robotrovsky Just installed the driver on debian testing and it works as expected with Wayland. I have not made thorough experiments, but I really want to say at least a big thank you! ❤️

sque commented Jul 5, 2018

@robotrovsky Just installed the driver on debian testing and it works as expected with Wayland. I have not made thorough experiments, but I really want to say at least a big thank you! ❤️

@sdfgsdfgd

This comment has been minimized.

Show comment
Hide comment
@sdfgsdfgd

sdfgsdfgd Jul 30, 2018

Has it been submitted to kernel yet ? Can we confirm which version will include please, thanks 👍

sdfgsdfgd commented Jul 30, 2018

Has it been submitted to kernel yet ? Can we confirm which version will include please, thanks 👍

@robotrovsky

This comment has been minimized.

Show comment
Hide comment
@robotrovsky

robotrovsky commented Oct 5, 2018

@sdfgsdfgd Finally YES!! Thanks to Sean O'Brien who modified it and send it in.

https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git/commit/?h=for-next&id=9d7b18668956c411a422d04c712994c5fdb23a4b

Maybe 4.20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment