Bug 1223051 - Lenovo Thinkpad S540 range is incorrect
Summary: Lenovo Thinkpad S540 range is incorrect
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 22
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-19 17:01 UTC by Tommy
Modified: 2015-06-30 20:12 UTC (History)
8 users (show)

Fixed In Version: kernel-4.0.6-200.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-27 12:39:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tommy 2015-05-19 17:01:07 UTC
Description of problem:
2015 Lenovo Thinkpad yoga 15 not in hwdb, and also wrongly in synaptics topbuttonpad_pnp_ids

cat /sys/devices/platform/i8042/serio1/firmware_id
PNP: LEN002d PNP0f13

(You can also add /* S540 */ behind LEN2000 in topbuttonpad_pnp_ids, as I have this one too)

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Peter Hutterer 2015-05-21 03:07:08 UTC
Please run the touchpad-edge-detector on the S540 and paste the output here, thanks. Is that one an Oct 2014 model or the first revision one?

As for the hwdb for the 2015 generation - we don't actually need that entry anymore, the kernel is now re-routing the buttons for us. I'll drop this from the upstream hwdb soon.

Comment 2 Tommy 2015-05-21 17:25:44 UTC
Hi again, My S540 (PNPID LEN2000) must be a 1st gen. one, as it was purchased sometime Q1 2014. Here's the touchpad-edge-detector output for that laptop:

sudo touchpad-edge-detector /dev/input/event6
Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event6
Move one finger around the touchpad to detect the actual edges
Kernel says:	x [1024..5112], y [1024..3834]
Touchpad sends:	x [1024..5113], y [2021..4831] /
Touchpad sends:	x [1024..5113], y [2021..4832] |
Touchpad sends:	x [1024..5113], y [2021..4832] \
Touchpad sends:	x [1024..5113], y [2021..4832] \
Touchpad sends:	x [1024..5113], y [2021..4832] /

The Thinkpad Yoga 15 (PNPID LEN002D) has the following values:

sudo touchpad-edge-detector /dev/input/event6
Touchpad AlpsPS/2 ALPS DualPoint TouchPad on /dev/input/event6
Move one finger around the touchpad to detect the actual edges
Kernel says:	x [0..4095], y [0..2047]
Touchpad sends:	x [118..3970], y [110..1963] \
Touchpad sends:	x [115..3970], y [100..1963] /
Touchpad sends:	x [111..3970], y [100..1963] /
Touchpad sends:	x [101..3971], y [100..1963] -
Touchpad sends:	x [101..3971], y [100..1963] \

Does the PNPID for this (LEN002D) need to be removed from the topbuttonpad_pnp_ids list?

Thanks!

Comment 3 Tommy 2015-05-21 18:56:26 UTC
I am seeing the same behaviour as described here on my S540 on F22 beta:
https://bugzilla.redhat.com/show_bug.cgi?id=1089689

Comment 4 Peter Hutterer 2015-05-22 07:06:30 UTC
(In reply to Tommy from comment #2)
> Hi again, My S540 (PNPID LEN2000) must be a 1st gen. one, as it was
> purchased sometime Q1 2014. Here's the touchpad-edge-detector output for
> that laptop:
> 
> sudo touchpad-edge-detector /dev/input/event6
> Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event6
> Move one finger around the touchpad to detect the actual edges
> Kernel says:	x [1024..5112], y [1024..3834]
> Touchpad sends:	x [1024..5113], y [2021..4831] /
> Touchpad sends:	x [1024..5113], y [2021..4832] |
> Touchpad sends:	x [1024..5113], y [2021..4832] \
> Touchpad sends:	x [1024..5113], y [2021..4832] \
> Touchpad sends:	x [1024..5113], y [2021..4832] /

There's a scratch build running now with the fix, please give it a try.
rawhide: http://koji.fedoraproject.org/koji/taskinfo?taskID=9825561
F22: http://koji.fedoraproject.org/koji/taskinfo?taskID=9825924
 
> The Thinkpad Yoga 15 (PNPID LEN002D) has the following values:
>
> sudo touchpad-edge-detector /dev/input/event6
> Touchpad AlpsPS/2 ALPS DualPoint TouchPad on /dev/input/event6
> Move one finger around the touchpad to detect the actual edges
> Kernel says:	x [0..4095], y [0..2047]
> Touchpad sends:	x [118..3970], y [110..1963] \
> Touchpad sends:	x [115..3970], y [100..1963] /
> Touchpad sends:	x [111..3970], y [100..1963] /
> Touchpad sends:	x [101..3971], y [100..1963] -
> Touchpad sends:	x [101..3971], y [100..1963] \
> 
> Does the PNPID for this (LEN002D) need to be removed from the
> topbuttonpad_pnp_ids list?

shouldn't be needed, if the device isn't a synaptics pad this code doesn't go into effect anyway.

Comment 5 Tommy 2015-05-22 08:14:12 UTC
Hi, installed the kernel an rebooted: 
uname -a
Linux localhost.localdomain 4.0.4-301.bz1223051.fc22.x86_64 #1 SMP Fri May 22 05:15:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

I'm seeing no difference in the touchpad behaviour on my S540. 
I guess I should have described the problems I am seeing a little earlier, sorry for that. But anyway:

If I start movement on the touchpad in the bottom half area, the mouse pointer does not move. If I start from the top half area, I can move all the way down to the bottom of the touchpad.

Right clicking is only possible in the bottom right quadrant of the touchpad.

Two finger clicks does not give a right click, except for the bottom half quadrant.

Two finger scroll is ok when starting in top half. 

Tap to click ok in top half.

I am able to do middle button clicks in the entire bottom half of the touchpad.

So i have a feeling that I am seeing button areas which cover the bottom 50%  of my touchpad, instead of just the lowest area.

Comment 6 Tommy 2015-05-24 17:51:56 UTC
In comment #5

"If I start movement on the touchpad in the bottom half area, the mouse pointer does not move."

should be 

"If I start movement on the touchpad in the bottom half area, the mouse pointer does not move until my finger moves into the upper half of the touchpad area."

Comment 7 Peter Hutterer 2015-05-26 03:04:22 UTC
Can you run xinput list-props <device name> please and post the output here. I'm wondering if you're somehow running the wrong driver or something.

(In reply to Tommy from comment #5)
> Right clicking is only possible in the bottom right quadrant of the touchpad.
> 
> Two finger clicks does not give a right click, except for the bottom half
> quadrant.

yeah, that's intentional and can be changed by changing:
gsettings set org.gnome.desktop.peripherals.touchpad click-method "fingers"
the default is on "areas" for your touchpad.
 
> Two finger scroll is ok when starting in top half. 
> 
> Tap to click ok in top half.
> 
> I am able to do middle button clicks in the entire bottom half of the
> touchpad.
> 
> So i have a feeling that I am seeing button areas which cover the bottom 50%
> of my touchpad, instead of just the lowest area.

The buttons should cover about 10mm on the bottom edge of the touchpad. When the buttons are that big, usually the range is incorrect. The kernel patch was supposed to fix this though. Can you run the touchpad-edge-detector again please with the kernel I provided?

that also affects the movement detection, if you start within the button zone the cursor won't move (this is intentional, it avoids cursor movements when a button is triggered). so afaict right now the real issue is that the button ranges are out of whack for some reason.

Comment 8 Tommy 2015-05-26 17:17:48 UTC
Hi, I agree that the area is the problem here. The button area is approx. 4 cm up from the bottom (y-axis).

Here are the results of the commands you asked for:

xinput
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ SYNAPTICS Synaptics Large Touch Screen  	id=10	[slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad              	id=13	[slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                   	id=14	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Video Bus                               	id=8	[slave  keyboard (3)]
    ↳ Power Button                            	id=9	[slave  keyboard (3)]
    ↳ Integrated Camera                       	id=11	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=12	[slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                  	id=15	[slave  keyboard (3)]

xinput list-props 13
Device 'SynPS/2 Synaptics TouchPad':
	Device Enabled (140):	1
	Coordinate Transformation Matrix (142):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Tapping Enabled (279):	1
	libinput Tapping Enabled Default (280):	0
	libinput Accel Speed (281):	0.000000
	libinput Accel Speed Default (282):	0.000000
	libinput Natural Scrolling Enabled (283):	1
	libinput Natural Scrolling Enabled Default (284):	0
	libinput Send Events Modes Available (260):	1, 1
	libinput Send Events Mode Enabled (261):	0, 0
	libinput Send Events Mode Enabled Default (262):	0, 0
	libinput Left Handed Enabled (285):	0
	libinput Left Handed Enabled Default (286):	0
	libinput Scroll Methods Available (287):	1, 0, 0
	libinput Scroll Method Enabled (288):	1, 0, 0
	libinput Scroll Method Enabled Default (289):	1, 0, 0
	libinput Click Methods Available (290):	1, 1
	libinput Click Method Enabled (291):	1, 0
	libinput Click Method Enabled Default (292):	1, 0
	Device Node (263):	"/dev/input/event6"
	Device Product ID (264):	2, 7

uname -a
Linux localhost.localdomain 4.0.4-301.bz1223051.fc22.x86_64 #1 SMP Fri May 22 05:15:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

sudo touchpad-edge-detector /dev/input/event6
Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event6
Move one finger around the touchpad to detect the actual edges
Kernel says:	x [1024..5112], y [1024..3834]
Touchpad sends:	x [1025..5112], y [2022..4832] |
Touchpad sends:	x [1024..5113], y [2021..4832] |
Touchpad sends:	x [1024..5113], y [2021..4832] \

Comment 9 Tommy 2015-05-26 17:22:12 UTC
I should perhaps mention that I installed only kernel, kernel-core, and kernel-modules packages from you build. Is this perhaps insufficient?

Comment 10 Peter Hutterer 2015-05-27 00:10:43 UTC
oops, sorry. the patch wasn't actually applied to the source.

fwiw, this line is what matters: Kernel says:	x [1024..5112], y [1024..3834]
but since the y coordinate you can actually produce are 2022-4832 you have an offset of where libinput thinks the buttons are. once the patch takes effect, the kernel should say the right coordinates here.
these things have a resolution of ~42 units/mm, so an offset of 1000 is ca 24mm. And that's why the buttons are so high up on your touchpad.

new scratch build started here:
http://koji.fedoraproject.org/koji/taskinfo?taskID=9854684

Comment 11 Peter Hutterer 2015-05-27 02:06:17 UTC
renaming to reflect the actual bug, as said in comment #1 the pnpid doesn't need to be added anymore.

Comment 12 Tommy 2015-05-27 18:27:29 UTC
Works perfectly now.

sudo touchpad-edge-detector /dev/input/event6
Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event6
Move one finger around the touchpad to detect the actual edges
Kernel says:	x [1024..5113], y [2021..4832]
Touchpad sends:	x [1025..5113], y [2024..4831] -
Touchpad sends:	x [1024..5113], y [2021..4831] /
Touchpad sends:	x [1024..5113], y [2021..4832] |
Touchpad sends:	x [1024..5113], y [2021..4832] /
Touchpad sends:	x [1024..5113], y [2021..4832] \^C

Comment 13 Tommy 2015-05-27 18:37:53 UTC
As for the Thinkpad yoga 15, the "areas" mode works fine. However, I am seeing some strange behavior in the lower 1 cm of the touchpad when in "fingers" mode. I am able to right-click by pressing a single finger across the whole "button area" at the bottom, and all the way at the bottom, there is a tiny band of left-click again.

There is a slight offset here as well.

sudo touchpad-edge-detector /dev/input/event6
Touchpad AlpsPS/2 ALPS DualPoint TouchPad on /dev/input/event6
Move one finger around the touchpad to detect the actual edges
Kernel says:	x [0..4095], y [0..2047]
Touchpad sends:	x [111..3968], y [99..1963] |\
Touchpad sends:	x [109..3970], y [96..1963] -
Touchpad sends:	x [106..3970], y [96..1963] |
Touchpad sends:	x [105..3974], y [96..1963] /
Touchpad sends:	x [105..3974], y [96..1963] |
Touchpad sends:	x [105..3974], y [96..1963] \^C

Should I file a new bug for this, or are these known issues?

Comment 14 Tommy 2015-05-28 14:58:30 UTC
Created a new bug for the Thinkpad yoga 15: https://bugzilla.redhat.com/show_bug.cgi?id=1225967

Comment 15 Tommy 2015-06-08 11:43:18 UTC
Hi, do you know which kernel version will have the fix?

Comment 16 Peter Hutterer 2015-06-08 23:42:24 UTC
reassigning to kernel. Bug summary: S540 needs the min/max quirk as the other *40 laptops. Commit is upstream in Dmitry's branch:

https://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/commit/?h=for-linus&id=7f2ca8b55aeff1fe51ed3570200ef88a96060917

Can we pull that into the Fedoras please?

Comment 17 Josh Boyer 2015-06-09 17:37:21 UTC
(In reply to Peter Hutterer from comment #16)
> reassigning to kernel. Bug summary: S540 needs the min/max quirk as the
> other *40 laptops. Commit is upstream in Dmitry's branch:
> 
> https://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/commit/?h=for-
> linus&id=7f2ca8b55aeff1fe51ed3570200ef88a96060917
> 
> Can we pull that into the Fedoras please?

Added on all branches.  Thanks!

Comment 18 Fedora Update System 2015-06-23 20:22:37 UTC
kernel-4.0.6-300.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/kernel-4.0.6-300.fc22

Comment 19 Fedora Update System 2015-06-23 20:23:08 UTC
kernel-4.0.6-200.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/kernel-4.0.6-200.fc21

Comment 20 Fedora Update System 2015-06-25 08:18:42 UTC
Package kernel-4.0.6-300.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-4.0.6-300.fc22'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-10677/kernel-4.0.6-300.fc22
then log in and leave karma (feedback).

Comment 21 Fedora Update System 2015-06-27 12:39:11 UTC
kernel-4.0.6-300.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2015-06-30 20:12:35 UTC
kernel-4.0.6-200.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.