This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 848270

Summary: Elantech touchpad properly detected but doesn't work without some wonky workaround
Product: [Fedora] Fedora Reporter: Nathanael Noblet <nathanael>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: gansalmon, itamar, jlee, jonathan, kernel-maint, madhu.chinakonda
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-31 22:15:20 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Attachments:
Description Flags
0001-acer-wmi-test-patch-for-remove-0x82-acpi-event-with.patch
none
dmidecode
none
ACPI dump from the acer
none
dmesg output with debug kernel
none
0001-acer-wmi-change-to-emit-touchpad-on-off-key.patch
none
0001-acer-wmi-enable-touchpad-when-acer-wmi-load.patch
none
0001-acer-wmi-test-patch-for-remove-code-to-run-LM-mode.patch none

Description Nathanael Noblet 2012-08-15 01:19:08 EDT
Description of problem:
Recently purchased a laptop with an Elantech touch pad. Everything I can tell seems to be properly detecting the device. On login via LiveCD (manually created one fully updated as of today (kernel 3.5.1)) xinput lists the device properties and says it is enabled, however moving the mouse does nothing. 

How reproducible:
Always

Additional info:

I can get it working if I do the following:

Log into X.
Switch to a VT, run evtest as root
Switch back to X
Toggle the touchpad via Fn+F7 (first off, then back on)
Switch to the VT running evtest, touch the touchpad (evtest starts to detect data)
quit evtest
switch to X

What is odd is that toggling the touchpad alone doesn't enable the device.

I am very motivated to do whatever to fix this as we have 26 devices that need to work soon.
Comment 1 Nathanael Noblet 2012-08-15 11:24:48 EDT
Booting into single user mode doesn't fix the issue. evtest shows no output, however Fn+F7 does cause output to start on second run.
Comment 2 Nathanael Noblet 2012-08-15 12:40:19 EDT
So thanks to jwb and mjg59 there is additional information and the real cause.

acer-wmi has two issues

#1) It is sending TOUCHPAD_TOGGLE and simultaneously changing state
#2) It disables the touchpad at init

It should apparently do neither of those.

Blacklisting acer-wmi fixes the issue
Comment 3 jlee 2012-08-15 23:38:17 EDT
Created attachment 604773 [details]
0001-acer-wmi-test-patch-for-remove-0x82-acpi-event-with.patch

Please help to test this testing patch. And, please attach dmidecode on bugzilla.
If this testing patch can avoid problem on your machine, then I will write code to parser the dmidecode information for grab the acpi code of touchpad.


Thanks a lot!
Joey Lee
Comment 4 Nathanael Noblet 2012-08-16 01:14:31 EDT
Created attachment 604789 [details]
dmidecode
Comment 5 Nathanael Noblet 2012-08-16 01:15:04 EDT
Will test and report back - thanks
Comment 6 Josh Boyer 2012-08-16 10:17:48 EDT
(In reply to comment #3)
> Created attachment 604773 [details]
> 0001-acer-wmi-test-patch-for-remove-0x82-acpi-event-with.patch
> 
> Please help to test this testing patch. And, please attach dmidecode on
> bugzilla.
> If this testing patch can avoid problem on your machine, then I will write
> code to parser the dmidecode information for grab the acpi code of touchpad.

That would likely fix issue #1, but do you think it would also fix the touchpad getting disabled during module init?
Comment 7 Nathanael Noblet 2012-08-17 14:50:58 EDT
It definitely fixes issue #1.

However Josh is correct that issue #2 is still at play. The device comes up with the touchpad disabled by default.
Comment 8 Nathanael Noblet 2012-08-17 14:55:30 EDT
Also I should note that the brightness control is entirely broken. Do you want a separate bug filed for that?
Comment 9 Nathanael Noblet 2012-09-13 16:11:39 EDT
Created attachment 612620 [details]
ACPI dump from the acer
Comment 10 Nathanael Noblet 2012-09-13 16:14:29 EDT
Created attachment 612621 [details]
dmesg output with debug kernel

One thing to note. This is running a kernel *with* the suggested patch for acer_wmi sent via email on 08/15. Which is likely why you see the unknown key 0x82 in dmesg. If you want me to re-run this without that patch let me know

>From 969d1c0bb4fc4b69ef9d037687b4591fbd9df24f Mon Sep 17 00:00:00 2001
From: Lee, Chun-Yi <jlee@suse.com>
Date: Thu, 16 Aug 2012 11:28:20 +0800
Subject: [PATCH] acer-wmi: test patch for remove 0x82 acpi event with KEY_TOUCHPAD_TOGGLE


Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
---
 drivers/platform/x86/acer-wmi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 3782e1c..db7376b 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -125,7 +125,7 @@ static const struct key_entry acer_wmi_keymap[] = {
 	{KE_IGNORE, 0x63, {KEY_BRIGHTNESSDOWN} },
 	{KE_KEY, 0x64, {KEY_SWITCHVIDEOMODE} },	/* Display Switch */
 	{KE_IGNORE, 0x81, {KEY_SLEEP} },
-	{KE_KEY, 0x82, {KEY_TOUCHPAD_TOGGLE} },	/* Touch Pad On/Off */
+//	{KE_KEY, 0x82, {KEY_TOUCHPAD_TOGGLE} },	/* Touch Pad On/Off */
 	{KE_IGNORE, 0x83, {KEY_TOUCHPAD_TOGGLE} },
 	{KE_END, 0}
 };
-- 1.6.0.2
Comment 11 jlee 2012-09-14 05:21:19 EDT
(In reply to comment #9)
> Created attachment 612620 [details]
> ACPI dump from the acer

Per DSDT the touchpad status should return from acpi event:

    Method (GOTS, 1, NotSerialized)
    {  
        Store (Zero, Local0)
        If (LEqual (^^PCI0.LPC0.EC0.ODST, Zero))        /* ODD status */
        {  
            Or (Local0, One, Local0)                    /* 0 bit for ODD power state */
        }

        If (LEqual (^^PCI0.LPC0.EC0.TOHP, Zero))        /* Touchpad status? */
        {  
            Or (Local0, 0x02, Local0)                   /* enable the 1 bit (10) in bitmap of device status */
        }

        Store (Local0, Arg0)
        Return (Zero)
    }

I will attach a patch for this. Let's fix the touchpad status problem, then look at the issue when system boot.
Comment 12 jlee 2012-09-15 20:21:36 EDT
Created attachment 613362 [details]
0001-acer-wmi-change-to-emit-touchpad-on-off-key.patch

This patch for acer-wmi change to emit KEY_TOUCHPAD_ON/OFF when grab acpi event of touchpad state.
Comment 13 jlee 2012-09-15 20:24:49 EDT
Of course please remove test patch on Comment#3 before test 0001-acer-wmi-change-to-emit-touchpad-on-off-key.patch.
Comment 14 jlee 2012-09-15 21:56:30 EDT
Created attachment 613366 [details]
0001-acer-wmi-enable-touchpad-when-acer-wmi-load.patch

A test patch for enable touchpad when acer-wmi load.

Sorry for I doesn't have machine to verify. If you got any problem, please remove battery and ac-power then boot system again.
Comment 15 Nathanael Noblet 2012-09-17 23:38:11 EDT
So with both patches 

0001-acer-wmi-change-to-emit-touchpad-on-off-key.patch
0001-acer-wmi-enable-touchpad-when-acer-wmi-load.patch

The touchpad toggle button works as expected. However it stills starts disabled.
Comment 16 Nathanael Noblet 2012-09-17 23:45:50 EDT
Ok scratch that, the touchpad comes up initialized to whatever state it was when it was rebooted/shutdown. Can it be unconditionally be turned on when the machine boots? That seems like a more sensible default perhaps?
Comment 17 jlee 2012-09-18 00:32:39 EDT
First, thanks for your help on testing, at least it confirm the first patch works on function key.

(In reply to comment #16)
> Ok scratch that, the touchpad comes up initialized to whatever state it was
> when it was rebooted/shutdown. Can it be unconditionally be turned on when
> the machine boots? That seems like a more sensible default perhaps?

I understand!
Actually, in 0001-acer-wmi-enable-touchpad-when-acer-wmi-load.patch, I try to enable touchpad when acer-wmi loaded, but looks it not work like my expect. That means need more detail to debug the initialization of acer-wmi.

Did you see "Enabled Launch Manager mode" message show up in dmesg or boot message?
Comment 18 Nathanael Noblet 2012-09-18 00:49:06 EDT
Yes, on boot I have one message like that when I do dmesg | grep Enabled.
Comment 19 jlee 2012-09-18 03:51:01 EDT
Created attachment 613883 [details]
0001-acer-wmi-test-patch-for-remove-code-to-run-LM-mode.patch

Please help to try this acer-wmi test patch, look at does it avoid the touchpad disabled problem when system boot.

I removed the code that do the launch manager mode setup, want to make sure this problem is really cause by this function.

Thanks
Comment 20 Nathanael Noblet 2012-10-26 23:25:38 EDT
So I finally noticed you had posted another bug. I built and tested against 3.6.3-2.

The following three patches were applied:

acer-wmi-change-touchpad-on-off-key.patch
acer-wmi-enable-touchpad-when-acer-wmi-loads.patch
acer-wmi-test-patch-for-remove-code-to-run-LM-mode.patch

When the machine boots, the touchpad is still at whatever state it was when you rebooted. So for example, if I reboot while the touchpad is active, on reboot it is active. If I disable (Fn+F7) the touchpad and reboot, the touchpad is inactive on reboot.

Anything else you need/want to know?
Comment 21 jlee 2012-10-30 06:16:59 EDT
(In reply to comment #20)
> So I finally noticed you had posted another bug. I built and tested against
> 3.6.3-2.
> 
> The following three patches were applied:
> 
> acer-wmi-change-touchpad-on-off-key.patch
> acer-wmi-enable-touchpad-when-acer-wmi-loads.patch
> acer-wmi-test-patch-for-remove-code-to-run-LM-mode.patch
> 
> When the machine boots, the touchpad is still at whatever state it was when
> you rebooted. So for example, if I reboot while the touchpad is active, on
> reboot it is active. If I disable (Fn+F7) the touchpad and reboot, the
> touchpad is inactive on reboot.

Thanks for your test, then I understand this behavior didn't introduce by launch manager mode. Looks the BIOS keep the touchpad state by itself.

> 
> Anything else you need/want to know?

I will try to find a way to enable it when system boot, but I prefer to keep this BIOS behavior.
Comment 22 Josh Boyer 2013-06-03 15:14:42 EDT
Are you still seeing this with the 3.9.4 kernel in updates-testing?
Comment 23 Nathanael Noblet 2013-06-03 15:27:42 EDT
I saw some improvements in a test a few weeks ago but I haven't had time to fully test the behaviour. I will test soon and let you know. I do know that Fn-F5 wasn't working to rotate through additional screens and wasn't sure if it was related.
Comment 24 Fedora End Of Life 2013-07-03 19:30:18 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 25 Fedora End Of Life 2013-07-31 22:15:27 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.