touchpad doesn't reconnect after resume: Synaptics ps2

Bug #551234 reported by Peter Petrakis
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
Medium
Unassigned
linux (Ubuntu)
Fix Released
Medium
Canonical Kernel Team
Lucid
Fix Released
Low
Tim Gardner

Bug Description

Upcoming Dell Laptop being worked on by OEM has a touchpad that works fine on boot, but
after coming back from S3 suspend, the system doesn't detect that a touchpad is present.

The kernel psmouse driver was instrumented and later the libps2 core and found we were
bailing in psmouse_probe with -ENODEV.

[ 2241.043143] XXX loading psmouse module
[ 2241.043321] XXX finished loading psmouse [0]
[ 2241.043614] XXX (psmouse_connect) ENTER
[ 2241.043622] XXX (psmouse_probe) ENTER:879
[ 2241.043626] XXX (psmouse_probe) HERE [/root/build/linux-2.6.31/drivers/input/mouse/psmouse-base.c:887]
[ 2241.240721] XXX (psmouse_connect) psmouse probe failed ENODEV

        printk(KERN_INFO "XXX (%s) HERE [%s:%d] \n", __FUNCTION__, __FILE__, __LINE__);

        param[0] = 0xa5;
        if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID))
                return -1;

and...

Here's what's going on in libps2 during the failed probe which results in -ENODEV

     0 kseriod(41): -> ps2_init
ps2_init args [ps2dev=0xf006de08 serio=0xf6d36200 ]
exit 17 kseriod(41): -> ps2_init
ps2_init args []
     0 kseriod(41): -> ps2_command
ps2_command args [ps2dev=0xf006de08 param=0xf75bbeaa command=0x2f2 ]
(ps2_command) libps2.c:172
(ps2_command) libps2.c:177
(ps2_command) libps2.c:182
(ps2_command) libps2.c:197
    42 kseriod(41): -> ps2_sendbyte
ps2_sendbyte args [ps2dev=0xf006de08 byte=0xf2 timeout=0xc8 ]
exit 200048 kseriod(41): -> ps2_sendbyte
ps2_sendbyte args [return=0xffffffffffffffff ]
(ps2_command) libps2.c:224
exit 200070 kseriod(41): -> ps2_command
ps2_command args [return=0xffffffffffffffff ]

Generated by systemtap
...
probe kernel.function("ps2_*").call {
        printf ("%s -> %s\n", thread_indent(1), probefunc())
        printf ("%s args [%s]\n", probefunc(), $$parms)
}

probe kernel.function("ps2_*").return {
        printf ("exit %s -> %s\n", thread_indent(-1), probefunc())
        printf ("%s args [%s]\n", probefunc(), $$return)
}

So I noticed that while we have some elaborate reset code once we know what
kind of ps2 device we have, the probe routine itself by comparison doesn't try
as hard.

 The attached patch perfoms a psmouse_reset on the port should the
initial probe fail followed by a therapeutic 1/2 sec sleep. The attach patch
does exactly that and retries that probe up to 3 times. I only need one reset
to recover the Synaptic touchpad.

Revision history for this message
Peter Petrakis (peter-petrakis) wrote :
Jerone Young (jerone)
description: updated
tags: added: kernel-series-unknown
Revision history for this message
Peter Petrakis (peter-petrakis) wrote :

Reproduced on 2.6.31 (karmic) and 2.6.32 (lucid) kernel series.

Jerone Young (jerone)
Changed in oem-priority:
importance: Undecided → High
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Assigning to this to the canonical-kernel-team so they can have a look to the patch too.

Changed in linux (Ubuntu):
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
importance: Undecided → Medium
status: New → Triaged
tags: added: patch
Revision history for this message
Peter Petrakis (peter-petrakis) wrote :

Cleaned up patch and dropped the msleep as it appears not be necessary.

Andy Whitcroft (apw)
Changed in linux (Ubuntu):
milestone: none → lucid-updates
Jerone Young (jerone)
Changed in oem-priority:
status: New → In Progress
Revision history for this message
Jerone Young (jerone) wrote :

Work is still happening upstream on a proper patch for this issue.

Revision history for this message
Peter Petrakis (peter-petrakis) wrote :

This fix has finally been distilled and has been proposed for Linus to
pull:

http://git.kernel.org/?p=linux/kernel/git/dtor/input.git;a=commit;h=ef110b24e28f36620f63dab94708a17c7e267358

The root cause is we have a synaptics touchpad device that fails to be
identified as a genuine synaptics device, so the ps2 subsystem fails back
to the generic psmouse driver.

The psmouse driver does *not* issue a reset to device on reconnect, which
is ps2 slang for resume. Had it been probed correctly, it would have received
a reset on reconnect from the synaptics driver.

So we've succeeded in making the psmouse driver a little more robust but have
yet to resolve the root cause, which is to correctly identify and configure the touchpad
as a genuine synaptic device.

We're working on getting the datasheet for this part.

Revision history for this message
Peter Petrakis (peter-petrakis) wrote :

The proposed fixed has been massaged and has finally landed in upstream.
Please consider the following commit for the next SRU cycle. Thank you.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ef110b24e28f36620f63dab94708a17c7e267358

Jerone Young (jerone)
Changed in oem-priority:
importance: High → Medium
Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Lucid):
assignee: nobody → Tim Gardner (timg-tpi)
importance: Undecided → Low
milestone: none → lucid-updates
status: New → In Progress
Revision history for this message
Tim Gardner (timg-tpi) wrote :

Please try linux-2.6.32-22.34~lp551234 in my PPA at http://ppa.launchpad.net/timg-tpi/ppa/ubuntu

Revision history for this message
Peter Petrakis (peter-petrakis) wrote :

@Tim, looks good.

Revision history for this message
Stefan Bader (smb) wrote :

This fix has been included upstream and in Maverick.

Changed in linux (Ubuntu Lucid):
status: In Progress → Fix Committed
Changed in linux (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted linux into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Jerone Young (jerone) wrote :

Verified Fixed.

Fix tested & verified. Kernel 2.6.32-23 now has touchpad working after suspend. This was tested on a Dell Inspiron n4010 that demonstrated the issue, where touchpad would not come back after suspend.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Jerone Young (jerone)
Changed in oem-priority:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (25.2 KiB)

This bug was fixed in the package linux - 2.6.32-23.37

---------------
linux (2.6.32-23.37) lucid-proposed; urgency=low

  [ Alex Deucher ]

  * SAUCE: drm/radeon/kms/atom: fix dual-link DVI on DCE3.2/4.0
    - LP: #564559

  [ Andy Whitcroft ]

  * [Config] ports -- build in dm-mod to enable LVM boot
    - LP: #560717
  * tools -- fix perf version extraction for multi-part flavours
    - LP: #555130
  * SAUCE: ACPI: EC: Allow multibyte access to EC (v3)
    - LP: #526354
  * [Config] enforce -- ensure dm_mod is built-in for LVM
    - LP: #560717
  * update to ubuntu-debian:7e708d33054c373faf41da23b73e8b48c342d958
    - LP: #570500, #576274

  [ Chase Douglas ]

  * Revert "(pre-stable): input: ALPS - Add signature for HP Pavilion dm3
    laptops"
    - LP: #550625
  * Enable ftrace function profiler
    - LP: #570389
  * enforce CONFIG_TMPFS_POSIX_ACL=y
    - LP: #575940

  [ Leann Ogasawara ]

  * Revert "staging/comdi -- disable"
    - LP: #563436
  * [Config] Enable multicast routing for sparc
    - LP: #416266
  * [Config] Add ahci.ko to virtual sub-flavour
    - LP: #570542

  [ Stefan Bader ]

  * Revert "SAUCE: drm/i915: Disable FBC on 915GM and 945GM"
    - LP: #588832

  [ Tim Gardner ]

  * ubuntu: rtl8192se -- update to version 0015.0127.2010
    - LP: #567016
  * [Config] Add atl1c to nic-modules udeb
    - LP: #557130

  [ Upstream Kernel Changes ]

  * Revert "(pre-stable) iwlwifi: fix nfreed--"
    - LP: #575853
  * Revert "backlight: mbp_nvidia_bl - add five more MacBook variants"
    - LP: #575853
  * Revert "(pre-stable) pata_via: Add VIA VX900 support"
    - LP: #575853
  * Revert "(pre-stable) x86-32, resume: do a global tlb flush in S4
    resume"
    - LP: #575853
  * Revert "x86: disable IOMMUs on kernel crash"
    - LP: #575853
  * Revert "sunrpc: fix peername failed on closed listener"
    - LP: #575853
  * Revert "sunrpc: move the close processing after do recvfrom method"
    - LP: #575853
  * Revert "(pre-stable) drm/edid: allow certain bogus edids to hit a fixup
    path rather than fail"
    - LP: #575853
  * Revert "drm/radeon/kms: don't print error on -ERESTARTSYS."
    - LP: #575853
  * Revert "ath9k: fix lockdep warning when unloading module" on stable
    kernels
    - LP: #588832
  * Staging: comedi: removed "depricated" from COMEDI_CB_BLOCK
    - LP: #483343
  * fat: fix buffer overflow in vfat_create_shortname()
    - LP: #575853
  * xfs: simplify inode teardown
    - LP: #575853
  * xfs: fix mmap_sem/iolock inversion in xfs_free_eofblocks
    - LP: #575853
  * xfs: I/O completion handlers must use NOFS allocations
    - LP: #575853
  * xfs: Wrapped journal record corruption on read at recovery
    - LP: #575853
  * xfs: Fix error return for fallocate() on XFS
    - LP: #575853
  * xfs: check for not fully initialized inodes in xfs_ireclaim
    - LP: #575853
  * xfs: fix timestamp handling in xfs_setattr
    - LP: #575853
  * xfs: Don't flush stale inodes
    - LP: #575853
  * xfs: Ensure we force all busy extents in range to disk
    - LP: #575853
  * xfs: reclaim inodes under a write lock
    - LP: #575853
  * xfs: Avoid inodes in reclaim when flushing from inode cache
    - LP: #575853
  * xfs: recla...

Changed in linux (Ubuntu Lucid):
status: Fix Committed → Fix Released
Jerone Young (jerone)
Changed in oem-priority:
status: Fix Committed → Fix Released
Revision history for this message
Bruce Kearns (brkearns67) wrote :

Nice to see the resume issue addressed. There was another issue in this bug - the fact that the Synaptics PS/2 touchpad was not being properly recognized at boot by the kernel. Is there another open bug to address this still open issue?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.