[regression][precise] synaptics: Vertical edge scrolling broken in the latest kernel 3.2.0-30.48

Bug #1046512 reported by Anca Emanuel on 2012-09-05
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Seth Forshee
Precise
Medium
Seth Forshee
Quantal
Medium
Seth Forshee

Bug Description

== SRU Justification ==

Impact: A patch to deal with out-of-specificaton position values with one Synaptics touchpad broke vertical edge scrolling on some other touchpads. The firmware for these touchpads uses a special value of 8176 to indicate a finger at the right or bottom of the touchpad whose precise position cannot be determined. This value is not documented in the interfacing guide from Synaptics and is outside of the range of values that the documentation indicates will be reported for finger positions.

Fix: Adjustments to the handling of position values that fall outside of the documented ranges. Treat only values above 8176 as wrapped negative values, and clamp the value 8176 to the maximum specified position value for the axis to make it something more reasonable.

Test Case: Verify that the patch fixes edge scrolling on an affected machine. Verified on LP#1046512.

---

The old kernel, 3.2.0-29.46 works as expected.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: linux-image-3.2.0-30-generic 3.2.0-30.48
ProcVersionSignature: Ubuntu 3.2.0-30.48-generic 3.2.27
Uname: Linux 3.2.0-30-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 2.0.1-0ubuntu12
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: SB [HDA ATI SB], device 0: ALC663 Analog [ALC663 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: emanuel 1801 F.... pulseaudio
 /dev/snd/controlC0: emanuel 1801 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'SB'/'HDA ATI SB at 0xfdaf4000 irq 16'
   Mixer name : 'Realtek ALC663'
   Components : 'HDA:10ec0663,104311c3,00100001 HDA:11c11040,10431636,00100200'
   Controls : 28
   Simple ctrls : 14
Card1.Amixer.info:
 Card hw:1 'HDMI'/'HDA ATI HDMI at 0xfddec000 irq 45'
   Mixer name : 'ATI R6xx HDMI'
   Components : 'HDA:1002aa01,00aa0100,00100000'
   Controls : 6
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'IEC958',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
Date: Wed Sep 5 22:44:47 2012
HibernationDevice: RESUME=UUID=6433010e-6c54-4069-998d-e304f780bd6e
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MachineType: ASUSTeK Computer Inc. X71TL
ProcEnviron:
 LANGUAGE=en_US:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB:
 0 radeondrmfb
 1 radeondrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-30-generic root=UUID=a7fa1141-e974-4958-b771-5b1850d477cb ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.2.0-30-generic N/A
 linux-backports-modules-3.2.0-30-generic N/A
 linux-firmware 1.79
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 10/14/2008
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 303
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: X71TL
dmi.board.vendor: PEGATRON CORPORATION
dmi.board.version: 1.0
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK Computer Inc.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr303:bd10/14/2008:svnASUSTeKComputerInc.:pnX71TL:pvr1.0:rvnPEGATRONCORPORATION:rnX71TL:rvr1.0:cvnASUSTeKComputerInc.:ct10:cvr:
dmi.product.name: X71TL
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK Computer Inc.

Anca Emanuel (anca-emanuel) wrote :
Brad Figg (brad-figg) on 2012-09-05
Changed in linux (Ubuntu):
status: New → Confirmed
Joseph Salisbury (jsalisbury) wrote :

Can you test the latest mainline kernel[0] to see if commit c0394506e69b37c47d391c2a7bbea3ea236d8ec8 fixes this bug?

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.6-rc4-quantal/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
tags: added: kernel-da-key
Anca Emanuel (anca-emanuel) wrote :

uname -a
Linux asus 3.6.0-030600rc4-generic #201209011435 SMP Sat Sep 1 18:36:00 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Kernel 3.6-rc4 have the same behavior.
3.2.0-29.46 is working ok. I think this patch was added later:

Ben Hutchings - Aug. 7, 2012, 3:28 a.m.
3.2-stable review patch. If anyone has any objections, please let me know.

------------------

From: Seth Forshee <email address hidden>

commit c0394506e69b37c47d391c2a7bbea3ea236d8ec8 upstream.

The touchpad on the Acer Aspire One D250 will report out of range values
in the extreme lower portion of the touchpad. These appear as abrupt
changes in the values reported by the hardware from very low values to
very high values, which can cause unexpected vertical jumps in the
position of the mouse pointer.

What seems to be happening is that the value is wrapping to a two's
compliment negative value of higher resolution than the 13-bit value
reported by the hardware, with the high-order bits being truncated. This
patch adds handling for these values by converting them to the
appropriate negative values.

The only tricky part about this is deciding when to treat a number as
negative. It stands to reason that if out of range values can be
reported on the low end then it could also happen on the high end, so
not all out of range values should be treated as negative. The approach
taken here is to split the difference between the maximum legitimate
value for the axis and the maximum possible value that the hardware can
report, treating values greater than this number as negative and all
other values as positive. This can be tweaked later if hardware is found
that operates outside of these parameters.

BugLink: http://bugs.launchpad.net/bugs/1001251
Signed-off-by: Seth Forshee <email address hidden>
Reviewed-by: Daniel Kurtz <email address hidden>
Signed-off-by: Dmitry Torokhov <email address hidden>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <email address hidden>

Anca Emanuel (anca-emanuel) wrote :

Confirmed.
Reverting that in upstream kernel solves my problem.

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd linux
cp /boot/config-`uname -r` .config
yes '' | make oldconfig
git revert c0394506e69b37c47d391c2a7bbea3ea236d8ec8
CONCURRENCY_LEVEL=`getconf _NPROCESSORS_ONLN` fakeroot make-kpkg --initrd --append-to-version=-revertedc0394506 kernel_image kernel_headers
cd ..
sudo dpkg -i linux*.deb

After reboot:

uname -a
Linux asus 3.6.0-rc4-revertedc0394506+ #1 SMP Thu Sep 6 10:33:54 EEST 2012 x86_64 x86_64 x86_64 GNU/Linux

My touchpad (vertical scroll) works as expected.

Tim Gardner (timg-tpi) on 2012-09-06
Changed in linux (Ubuntu):
assignee: nobody → Seth Forshee (sforshee)
Changed in linux (Ubuntu Quantal):
status: Incomplete → In Progress
Changed in linux (Ubuntu Precise):
assignee: nobody → Seth Forshee (sforshee)
status: New → In Progress
Seth Forshee (sforshee) wrote :

Anca: I'm unclear as to the precise nature of your problem. Is the touchpad completely broken, or is it just vertical scrolling that's broken?

In either case it appears that your touchpad is behaving outside of the specification for Synaptics touchpads, as the patch shouldn't have any impact on devices behaving within the specification. Once you've clarified exactly how your touchpad is malfunctioning I'll add some debug code to the driver to help us diagnose what's going wrong.

Changed in linux (Ubuntu Precise):
status: In Progress → Incomplete
Anca Emanuel (anca-emanuel) wrote :

Hi Seth, only the vertical scroll is not working as before. I need to insist scrolling, try again, work, not work, try again... etc.
Please note, https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1046543 and https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1046504

Seth Forshee (sforshee) on 2012-09-06
summary: - [regression][precise] synaptics: Touchpad unresponsive in the latest
- kernel 3.2.0-30.48
+ [regression][precise] synaptics: Vertical edge srolling broken in the
+ latest kernel 3.2.0-30.48

On Thu, Sep 6, 2012 at 5:42 PM, Seth Forshee <email address hidden> wrote:
> ** Summary changed:
>
> - [regression][precise] synaptics: Touchpad unresponsive in the latest kernel 3.2.0-30.48
> + [regression][precise] synaptics: Vertical edge srolling broken in the latest kernel 3.2.0-30.48

typo ? scrolling

Seth,

I can confirm the same observation here. After building my own kernel (and reverting your patch) as Anca describes in comment #4 and booting it, vertical scrolling works again as it should.

Thus, I suppose my own bug report (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1046504) is a duplicate.

Best,
Jonas

Seth Forshee (sforshee) wrote :

Thanks. I've put the test build at the link below. Please install, then install the input-utils package and reboot into the debug kernel.

After rebooting, try to avoid touching the touchpad. Use Ctrl-Alt-F1 to switch to a virtual console and log in. Run 'sudo lsinput' and identify the touchpad device in the ouput, making note of the number of the associated input device (e.g. if the device is /dev/input/event0 then the device number is 0). Then run 'sudo input-events devnr > input-events-lr.txt', where devnr is the device number from lsinput. Drag your finger slowly across the touchpad from the extreme left to the extreme right, keeping the virtical position of your finger roughly near the center of the touchpad, then press Ctrl-C. Next run 'sudo input-events devnr > input-events-tb.txt' and drag your finger from the extreme top to the extreme bottom with the horizontal position roughly in the center, then press Ctrl-C. Then run 'dmesg > dmesg.txt'.

After that you can switch back to the desktop by pressing Ctrl-Alt-F7. Please attach intput-events-lr.txt, input-events-tb.txt and dmesg.txt to this bug. Thanks!

http://people.canonical.com/~sforshee/lp1046512/linux-3.2.0-31.49~lp1046512v201209061431/

summary: - [regression][precise] synaptics: Vertical edge srolling broken in the
+ [regression][precise] synaptics: Vertical edge scrolling broken in the
latest kernel 3.2.0-30.48
Jonas T. (jo-t) wrote :

Here you go.

Best,
Jonas

Seth Forshee (sforshee) wrote :

Thanks, Jonas. Unfortunately we seem to have overflowed the kernel log buffer. Could you attach your /var/log/kern.log?

Anca Emanuel (anca-emanuel) wrote :

Here is my data.

Changed in linux (Ubuntu Precise):
importance: Undecided → Medium
Seth Forshee (sforshee) on 2012-09-06
Changed in linux (Ubuntu Precise):
status: Incomplete → In Progress
Jonas T. (jo-t) wrote :

Seth, sure, no problem. I've stripped everything except the test run with the debug kernel from kern.log.

Best,
Jonas

Seth Forshee (sforshee) wrote :

Thanks to both of you. I understand what the problem is now, but the behavior I'm seeing could be interpreted differently depending on the touchpad so I'm a bit unsure how to handle it at this point. I'm working on it though, and I'll try to have something to test in the next couple of days.

Jonas T. (jo-t) wrote :

Seth,
alright. Let us know if you need anything else. Knowing these kind of hw-problems, I'll be happy to help!

Btw, I don't know if that is of any help: The behavior you describe in the original patch that we reverted (jumping cursor) was/is present here.

Jonas

Seth Forshee (sforshee) wrote :

I've posted a test kernel with a proposed fix at the link below. Please give it a try and let me know if it fixes the issue.

http://people.canonical.com/~sforshee/lp1046512/linux-3.2.0-31.49~lp1046512v201209071619/

Changed in linux (Ubuntu Precise):
status: In Progress → Incomplete
Anca Emanuel (anca-emanuel) wrote :

Works for me.
Thanks.

Jonas T. (jo-t) wrote :

Seth,
works almost for me. :) That is, the vertical scroll area is almost in the correct place. It's much better than without your latest patch, but the scroll area is still shifted a little bit to the left. Scrolling on the far right edge of the touchpad sometimes works, sometimes not.

Best,
Jonas

Jonas T. (jo-t) wrote :

Let me correct my previous comment #18: Previous versions of the linux kernel (e.g., 3.2.0-27-generic) exhibit exactly the same vertical scroll behavior as your latest patched version. So I can second Anca: "Works for me". :)

Best,
Jonas

Seth Forshee (sforshee) on 2012-09-10
Changed in linux (Ubuntu Precise):
status: Incomplete → In Progress
Seth Forshee (sforshee) on 2012-09-10
description: updated
Tim Gardner (timg-tpi) on 2012-09-10
Changed in linux (Ubuntu Precise):
status: In Progress → Fix Committed
Tim Gardner (timg-tpi) on 2012-09-10
Changed in linux (Ubuntu Quantal):
status: In Progress → Fix Committed
Yann (ylevot) wrote :

Seth,

I'm arriving a bit late, but I've tested your kernel as well : It also works perfectly for me.

Thanks !

Yann.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.5.0-14.16

---------------
linux (3.5.0-14.16) quantal-proposed; urgency=low

  [ Bernhard Froemel ]

  * SAUCE: apple-gmux: Fix index read functions

  [ Kamal Mostafa ]

  * SAUCE: input: Cypress PS/2 Trackpad move PSMOUSE_CYPRESS enum
    - LP: #1041594

  [ Seth Forshee ]

  * SAUCE: Input: synaptics - Adjust threshold for treating position values
    as negative
    - LP: #1046512

  [ Upstream Kernel Changes ]

  * mei: check for error codes that mei_flow_ctrl_creds retuns
  * mei: make mei_write_message more readable
  * mei: mei_irq_thread_write_handler check for overflow
  * mei: group wd_interface_reg with watchdog variables within struct
    mei_device
  * mei: don't query HCSR for host buffer depth
  * mei: revamp host buffer interface function
  * mei: mei_device can be const for mei register access functions
  * mei: remove write only wariable wd_due_counter
  * mei: mei_wd_host_init: update the comment
  * mei: introduce mei_data2slots wrapper
  * mei: streamline the _mei_irq_thread_close/ioctol functions
  * mei: mei_irq_thread_write_handler - line break fix
  * mei: use module_pci_driver
  * mei: fix device stall after wd is stopped
 -- Leann Ogasawara <email address hidden> Mon, 10 Sep 2012 13:05:18 -0700

Changed in linux (Ubuntu Quantal):
status: Fix Committed → Fix Released
Luis Henriques (henrix) wrote :

This bug is awaiting verification that the kernel for Precise in -proposed solves the problem (3.2.0-32.51). Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-precise' to 'verification-done-precise'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-precise
Jonas T. (jo-t) wrote :

Luis,

I'm a little bit confused as to whom exactly you are addressing. That is, who is supposed to do the testing? We, the users or Seth Forshee, Tim Gardner, ...? If its us, I'll be happy to do my share...

Best,
Jonas

Anca Emanuel (anca-emanuel) wrote :

uname -a
Linux asus 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Works for me.
you can add verification-done-precise

Seth Forshee (sforshee) wrote :

Jonas: Anyone with affected hardware can do the testing. I do not have affected hardware, so I'm not able to verify the fix.

Jonas T. (jo-t) wrote :

Seth, thanks!

I'll check on my affected laptop probably today or tomorrow.

Jonas

Seth Forshee (sforshee) on 2012-09-28
tags: added: verification-done-precise
removed: verification-needed-precise
Yann (ylevot) wrote :

The proposed update works fine for me as well.

Thanks !

Yann.

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :
Download full text (18.4 KiB)

This bug was fixed in the package linux - 3.2.0-32.51

---------------
linux (3.2.0-32.51) precise-proposed; urgency=low

  [Luis Henriques]

  * Release Tracking Bug
    - LP: #1056036

  [ Keng-Yu Lin ]

  * SAUCE: Intel xhci: Only switch the switchable ports
    - LP: #1034814

  [ Kyle Fazzari ]

  * SAUCE: input: Cypress PS/2 Trackpad fix disabling tap-to-click
    - LP: #1048816

  [ Seth Forshee ]

  * SAUCE: Input: synaptics - Adjust threshold for treating position values
    as negative
    - LP: #1046512

  [ Stefan Bader ]

  * Revert "SAUCE: Force xsave off on older Xen hypervisors"
    - LP: #1044550

  [ Upstream Kernel Changes ]

  * Revert "HID: wiimote: fix invalid power_supply_powers call"
    - LP: #1048605
  * Revert "drm/radeon: fix bo creation retry path"
    - LP: #1049899
  * HID: wiimote: fix invalid power_supply_powers call
    - LP: #1048605
  * HID: add ASUS AIO keyboard model AK1D
    - LP: #1027789, #1049899
  * nfs: tear down caches in nfs_init_writepagecache when allocation fails
    - LP: #1049899
  * NFS: Use kcalloc() when allocating arrays
    - LP: #1049899
  * NFSv4.1 fix page number calculation bug for filelayout decode buffers
    - LP: #1049899
  * fix page number calculation bug for block layout decode buffer
    - LP: #1049899
  * pnfs: defer release of pages in layoutget
    - LP: #1049899
  * ext4: avoid kmemcheck complaint from reading uninitialized memory
    - LP: #1049899
  * fuse: verify all ioctl retry iov elements
    - LP: #1049899
  * Bluetooth: Fix legacy pairing with some devices
    - LP: #1049899
  * xhci: Increase reset timeout for Renesas 720201 host.
    - LP: #1049899
  * xhci: Add Etron XHCI_TRUST_TX_LENGTH quirk.
    - LP: #1049899
  * USB: ftdi_sio: Add VID/PID for Kondo Serial USB
    - LP: #1049899
  * USB: option: Add Vodafone/Huawei K5005 support
    - LP: #1049899
  * USB: add USB_VENDOR_AND_INTERFACE_INFO() macro
    - LP: #1049899
  * USB: support the new interfaces of Huawei Data Card devices in option
    driver
    - LP: #1049899
  * usb: serial: mos7840: Fixup mos7840_chars_in_buffer()
    - LP: #1049899
  * usb: gadget: u_ether: fix kworker 100% CPU issue with still used
    interfaces in eth_stop
    - LP: #1049899
  * ARM: 7483/1: vfp: only advertise VFPv4 in hwcaps if CONFIG_VFPv3 is
    enabled
    - LP: #1049899
  * ARM: 7488/1: mm: use 5 bits for swapfile type encoding
    - LP: #1049899
  * ARM: 7489/1: errata: fix workaround for erratum #720789 on UP systems
    - LP: #1049899
  * drm/i915: ignore eDP bpc settings from vbt
    - LP: #1049899
  * ALSA: hda - fix Copyright debug message
    - LP: #1049899
  * sched: fix divide by zero at {thread_group,task}_times
    - LP: #1049899
  * ath9k: fix decrypt_error initialization in ath_rx_tasklet()
    - LP: #1049899
  * drm/nvd0/disp: mask off high 16 bit of negative cursor x-coordinate
    - LP: #1049899
  * drm/i915: reorder edp disabling to fix ivb MacBook Air
    - LP: #1049899
  * audit: don't free_chunk() after fsnotify_add_mark()
    - LP: #1049899
  * audit: fix refcounting in audit-tree
    - LP: #1049899
  * vfs: canonicalize create mode in build_open_flags()
    - LP: #1049899
  * PCI: EHCI: Fix crash d...

Changed in linux (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.