USB Trackpad

I am currently unable to use my Apple trackpad as a USB input device. It is detected by sys-usb as a trackpad. However, I don’t see a /etc/qubes-rpc/policy/qubes.InputTrackpad or /etc/qubes-rpc/policy/qubes.InputTouchpad file.

/etc/qubes-rpc/policy/qubes.InputMouse already has sys-usb dom0 allow. I tested this with a USB mouse, and it works for mouse, but not for USB trackpad.

Please let me know if you have any ideas for troubleshooting this.

Update:
Adding sys-usb dom0 allow to qubes.InputTablet allows the trackpad to be detected, however, it does not work properly. Right click does not work, tracking requires a ridiculous amount of pressure in order to register pointer movement, and libinput throws errors (full output).

Hi @vxc!

There is a potential that you might need to set up a similar rule for qubes.InputTablet, but I’m pretty sure that the kernel treats the Apple Magic Trackpad as a pointer device (like a USB mouse), not a tablet device (like a Wacom tablet used for drawing).

Is it possible for you to post the output of lsusb from your USB qube (or dom0 if your USB controllers are in dom0)? That would help solve this faster.

If any of what I said is unclear, feel free to ask me to explain, and I’ll happily do up a step-by-step for you :slight_smile:

lsusb from sys-usb:

Bus 002 Device 007: ID 05ac: 0265 Apple, Inc. Magic Trackpad

Ok, so it’s detected, but not passing through to dom0…

What does the output of xinput in dom0 say?
(Or if you want to install it in your sys-usb, you can try that too)

Misread OP. Apologize.

Ok, so it’s detected, but not passing through to dom0…

Correct. xinput in dom0 also confirms this (it is nowhere to be found in xinput).

you might need to set up a similar rule for qubes.InputTablet

I tried adding sys-usb dom0 allow to qubes.InputTablet, and currently the trackpad is being passed through to dom0. It is listed in xinput as a Virtual core pointer.

Now the issue is that the trackpad it is behaving like a pressure sensitive tablet. The pointer can be moved but only if I put significant pressure on it. By comparison, when I have it connected to my windows or fedora pc, I barely have to apply any pressure in order to move the pointer which is the expected behavior.

Right click does not work. Output from libinput list-devices in dom0 produces these error messages.

event4  - sys-usb: Apple Inc. Magic Trackpad 2: libinput bug: Internal or external? Please file a bug.
event4  - sys-usb: Apple Inc. Magic Trackpad 2: kernel bug: non clickpad without right button?
event5  - sys-usb: Apple Inc. Magic Trackpad 2: libinput bug: Internal or external? Please file a bug.
event5  - sys-usb: Apple Inc. Magic Trackpad 2: kernel bug: non clickpad without right button?

...

Device:           sys-usb: Apple Inc. Magic Trackpad 2
Kernel:           /dev/input/event4
Group:            5
Seat:             seat0, default
Size:             162x115mm
Capabilities:     pointer gesture
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   *two-finger edge 
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   flat *adaptive
Rotation:         n/a

Device:           sys-usb: Apple Inc. Magic Trackpad 2
Kernel:           /dev/input/event5
Group:            6
Seat:             seat0, default
Size:             162x115mm
Capabilities:     pointer gesture
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   *two-finger edge 
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   flat *adaptive
Rotation:         n/a

@alzer89, do you or anyone else have additional ideas for troubleshooting this? Also, am I asking in the wrong place? Perhaps there’s a better forum to discuss this issue. Please let me know if I should move this elsewhere.

That sounds like a driver issue. This is usually common with Apple hardware, unfortunately.

If you like, you could try installing this in sys-usb:

This approach appeared to work when I tried to get the rumble and gyroscope working on my game controllers when connected via USB.

Not promising it will work, but hey, it might :slight_smile:

1 Like

The driver for this trackpad is already mainlined. I think there is a problem with the way qubes is handling this device. It should be detected as a touchpad and not a tablet.

xinput list-props also shows that it doesn’t have the option to right click.

Device 'qubesdev':
        Device Enabled (120):   1
        Coordinate Transformation Matrix (122): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (240):     0
        Device Accel Constant Deceleration (241):       1.000000
        Device Accel Adaptive Deceleration (242):       1.000000
        Device Accel Velocity Scaling (243):    10.000000

This is quite disappointing. Unless someone has suggestions I give up.

I was able to get the trackpad fully functioning by using the 2 articles below. After adding sys-usb dom0 allow to qubes.InputTablet, the solution required installing libinput-utils in dom0, then creating 2 files in dom0:

  1. /etc/X11/xorg.conf.d/30-touchpad.conf
    libinput - ArchWiki
  2. /etc/libinput/local-overrides.quirks
    Debugging touchpad pressure/size ranges — libinput 1.22.0 documentation

In local-overrides.quirks, I set AttrPressureRange=2:1.