linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Daniel Manrique <daniel.manrique@canonical.com>
Cc: linux-input@vger.kernel.org
Subject: Re: Bug: touchpad unresponsive after resume from S3 (psmouse driver)
Date: Thu, 1 Dec 2011 22:16:23 -0800	[thread overview]
Message-ID: <20111202061623.GA9688@core.coreip.homeip.net> (raw)
In-Reply-To: <4ED7E60F.7020306@canonical.com>

On Thu, Dec 01, 2011 at 03:39:43PM -0500, Daniel Manrique wrote:
> 
> The ssleep(1); line is what appears to do the trick; the version that just
> queries the ID exhibits the same problem I reported initially, while the one
> that just ssleeps works fine, with the touchpad working OK after resuming.
> 
> I'll await further instructions on this, thanks so much for your help!
> 

OK, great. Could you please try the patch below to make sure it works as
intended and I'll queue it to upstream/stable?

Thanks.

-- 
Dmitry

Input: synaptics - fix touchpad not working after S2R on Vostro V13

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Synaptics touchpads on several Dell laptops, particularly Vostro V13
systems, may not respond properly to PS/2 commands and queries immediately
after resuming from suspend to RAM. This leads to unresponsive touchpad
after suspend/resume cycle.

Adding a 1-second delay after resetting the device allows touchpad to
finish initializing (calibrating?) and start reacting properly.

Reported-by: Daniel Manrique <daniel.manrique@canonical.com>
Tested-by: Daniel Manrique <daniel.manrique@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/mouse/synaptics.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)


diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 06c9ee5..8081a0a 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -24,6 +24,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/delay.h>
 #include <linux/dmi.h>
 #include <linux/input/mt.h>
 #include <linux/serio.h>
@@ -1288,6 +1289,16 @@ static int synaptics_reconnect(struct psmouse *psmouse)
 
 	do {
 		psmouse_reset(psmouse);
+		if (retry) {
+			/*
+			 * On some boxes, right after resuming, the touchpad
+			 * needs some time to finish initializing (I assume
+			 * it needs time to calibrate) and start responding
+			 * to Synaptics-specific queries, so let's wait a
+			 * bit.
+			 */
+			ssleep(1);
+		}
 		error = synaptics_detect(psmouse, 0);
 	} while (error && ++retry < 3);
 

  reply	other threads:[~2011-12-02  6:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-29 16:26 Bug: touchpad unresponsive after resume from S3 (psmouse driver) Daniel Manrique
2011-11-29 17:53 ` Dmitry Torokhov
2011-11-29 19:43   ` Daniel Manrique
2011-11-30  0:17     ` Dmitry Torokhov
2011-11-30 15:18       ` Daniel Manrique
2011-12-01  5:15         ` Dmitry Torokhov
2011-12-01 20:39           ` Daniel Manrique
2011-12-02  6:16             ` Dmitry Torokhov [this message]
2011-12-02 17:39               ` Daniel Manrique

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=20111202061623.GA9688@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=daniel.manrique@canonical.com \
    --cc=linux-input@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).