All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Jason Gerecke <killertofu@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>, Ping Cheng <pinglinux@gmail.com>,
	Linux Input <linux-input@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] HID: wacom: ask for a in-prox report when it was missed
Date: Mon, 16 Mar 2015 15:27:33 -0400	[thread overview]
Message-ID: <20150316192733.GD4053@mail.corp.redhat.com> (raw)
In-Reply-To: <CANRwn3R7nBPxPynexP+yU43puxgNmj=35ghh01ioUqmNjdTy+g@mail.gmail.com>

On Mar 16 2015 or thereabouts, Jason Gerecke wrote:
> On 3/16/2015 7:50 AM, Jiri Kosina wrote:
> > On Thu, 5 Mar 2015, Benjamin Tissoires wrote:
> >
> >> If noone listens to the input device when a tool comes in proximity,
> >> the tablet does not send the in-prox event when a client becomes available.
> >> That means that no events will be sent until the tool is taken out of
> >> proximity.
> >>
> >> In this situation, ask for the report WACOM_REPORT_INTUOSREAD which will
> >> read the corresponding feature and generate an in-prox event.
> >> To make some generation of hardware working, we need to unset the
> >> quirk NO_GET set by hid-core because the interfaces are seen as "boot
> >> mouse".
> >>
> >> We don't schedule this read in a worker while we are in an IO interrupt.
> >> We know that usbhid will do it asynchronously. If this is triggered by
> >> uhid, then this is obviously a client side bug :)
> >>
> >> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> >
> > Ping, Jason, I'd like to get your Ack on this before pushing this through
> > if possible.
> >
> > Thanks.
> >
> 
> This update seems to have solved the issue I was having earlier. I do
> still see some weird behavior with the Intuos3 though. For whatever
> reason, if a tool is in prox and no client is connected, the device
> will repeatedly connect and disconnect from the bus. For example,
> while sitting at a VT after connecting the device:
> 
> [  209.890431] usb 2-1.5.4: new full-speed USB device number 10 using ehci-pci
> [  209.992189] input: Wacom Intuos3 6x8 as
> /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5.4/2-1.5.4:1.0/0003:056A:00B1.0009/input/input26
> [  209.992475] input: Wacom Intuos3 6x8 Pad as
> /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5.4/2-1.5.4:1.0/0003:056A:00B1.0009/input/input27
> [  209.992846] wacom 0003:056A:00B1.0009: hidraw4: USB HID v1.00 Mouse
> [Tablet PTZ-630] on usb-0000:00:1d.0-1.5.4/input0
> [  213.022545] usb 2-1.5.4: USB disconnect, device number 10
> [  213.344055] usb 2-1.5.4: new full-speed USB device number 11 using ehci-pci
> [  213.445779] input: Wacom Intuos3 6x8 as
> /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5.4/2-1.5.4:1.0/0003:056A:00B1.000A/input/input28
> [  213.446185] input: Wacom Intuos3 6x8 Pad as
> /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5.4/2-1.5.4:1.0/0003:056A:00B1.000A/input/input29
> [  213.446703] wacom 0003:056A:00B1.000A: hidraw4: USB HID v1.00 Mouse
> [Tablet PTZ-630] on usb-0000:00:1d.0-1.5.4/input0
> [  214.815925] usb 2-1.5.4: USB disconnect, device number 11
> [  215.246142] usb 2-1.5.4: new full-speed USB device number 12 using ehci-pci
> 
> [ ... and so on ...]
> 
> It makes using the device from a VT difficult (e.g. for debugging),
> but in the typical case where X is started shortly after boot and
> hotplugs devices as soon as they're available it shouldn't pose a
> problem. If Benjamin has any ideas I'd like to hear them, but in the
> meantime I'm comfortable seeing this go upstream:

HID_QUIRK_ALWAYS_POLL :)

Some usb devices do not like to not be polled and keep
disconnecting/reconnecting. Looks like the Intuos 3 is one of them.
The only cons are that the device won't save power when no one is reading
the inputs. Not sure if that is a requirement for Wacom tablets though.

Note that HID_QUIRK_ALWAYS_POLL should make this patch useless in these
cases, the kernel will keep track of the current device because it will
receive the events.

> 
> Acked-by: Jason Gerecke <killertofu@gmail.com>

Thanks!

Cheers,
Benjamin

  parent reply	other threads:[~2015-03-16 19:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05 22:36 [PATCH v2] HID: wacom: ask for a in-prox report when it was missed Benjamin Tissoires
2015-03-16 14:50 ` Jiri Kosina
2015-03-16 18:53   ` Jason Gerecke
2015-03-16 18:53     ` Jason Gerecke
2015-03-16 19:20     ` Jiri Kosina
2015-03-16 19:27     ` Benjamin Tissoires [this message]
2015-03-16 20:51       ` Jason Gerecke
2015-03-16 21:04         ` Benjamin Tissoires
2015-03-16 22:36           ` Jason Gerecke
2015-03-16 22:36           ` Jason Gerecke
2015-03-17 22:49             ` Benjamin Tissoires

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150316192733.GD4053@mail.corp.redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=jkosina@suse.cz \
    --cc=killertofu@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pinglinux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.