[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] hw/usb/dev-hid: add a Mac guest compatibility o

From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] hw/usb/dev-hid: add a Mac guest compatibility option to usb-tablet
Date: Thu, 19 Jan 2017 10:06:47 +0100

On Mi, 2017-01-18 at 15:30 +0100, Phil Dennis-Jordan wrote:
> Darwin/OS X/macOS's HID driver stack does not correctly drive Qemu's
> simulated USB Tablet. This adds a boolean option "mac_compat" which
> subtly changes the device so it behaves in a way that Mac guests can
> handle.
> The specific incompatibilities with the regular Qemu USB tablet are:
>  1. Absolute pointing devices with HID Report Descriptor usage page of
> 0x01 (pointing) are handled by the macOS HID driver as analog sticks,
> so the movement of the cursor ends up being the cumulative deviance
> from the centre position.
>  2. The bInterfaceProtocol of 0x02 enables a particular macOS HID
> driver mode which only works properly with mice (relative motion) not
> absolute pointing devices, so spurious events with relative
> coordinates are generated in addition to absolute ones. This manifests
> as a very jittery cursor.
> The workaround is to report a usage page of 0x02 (mouse) and a
> bInterfaceProtocol value of 0x00.

Waded through the specs.  Setting bInterfaceProtocol to 0x00 should be
done anyway.  Only boot protocol devices (which the tablet isn't) should
set this to 1 (kbd) or 2 (mouse).  No need to hide that behind a macos
option, we can do that for everybody.

The other one is more tricky.  Declaring the device as "mouse" is
clearly wrong according to the specs.  There is no explicit "tablet"
device.  "pointing" comes closest.

Does the issue still show up with bInterfaceProtocol being fixed?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]