Bug 193761

Summary: acer-wmi module creates unusable accelerometer interface
Product: Drivers Reporter: Samuel Sieb (samuel-kbugs)
Component: Platform_x86Assignee: drivers_platform_x86 (drivers_platform_x86)
Status: NEW ---    
Severity: normal CC: jlee
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.9.3 Subsystem:
Regression: No Bisected commit-id:
Attachments: acpidump output for Acer Aspire E5-523
0001-acer-wmi-setup-accelerometer-when-appropriate-acpi-d.patch

Description Samuel Sieb 2017-01-31 22:01:57 UTC
See full logs and acpi dump at bug #193751.
laptop info:
DMI: Acer Aspire ES1-522/BELLEMERE_BE, BIOS V1.07 04/18/2016

I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="Acer BMA150 accelerometer"
P: Phys=wmi/input1
S: Sysfs=/devices/virtual/input/input12
U: Uniq=
H: Handlers=event11 js0 
B: PROP=0
B: EV=9
B: ABS=7

# evtest /dev/input/event11
evtest: Operation not permitted

Any attempt at reading the device gives that.
Comment 1 Lee, Chun-Yi 2017-02-07 11:03:35 UTC
Hi Samuel,

Could you please help to check that if this patch works on your machine to fix issue?

platform/x86: acer-wmi: setup accelerometer when machine has appropriate notify event
http://git.infradead.org/linux-platform-drivers-x86.git/commit/98d610c3739ac354319a6590b915f4624d9151e6

Thanks a lot!
Comment 2 Samuel Sieb 2017-04-27 03:45:25 UTC
Sorry for the delay, I didn't have access to the hardware.  As far as I can tell, this patch doesn't make any difference.  I still get the "Operation not permitted" error.  However, this is a different Acer laptop than the one I provided the info for originally.  Would you like the info for this one as well?
Comment 3 Samuel Sieb 2017-04-27 03:48:21 UTC
DMI: Acer Aspire E5-523/Wasp_SR, BIOS V1.13 11/15/2016
The info for the accelerometer is exactly the same as the original description.
Comment 4 Lee, Chun-Yi 2017-04-27 06:58:28 UTC
(In reply to Samuel Sieb from comment #2)
> Sorry for the delay, I didn't have access to the hardware.  As far as I can
> tell, this patch doesn't make any difference.  I still get the "Operation
> not permitted" error.  However, this is a different Acer laptop than the one
> I provided the info for originally.  Would you like the info for this one as
> well?

I checked the DSDT of your Acer Aspire ES1-522, it doesn't have SENR device with BST0001 _HID like this:

        Device (SENR)
        {
            Name (_HID, "BST0001")  // _HID: Hardware ID
            Name (_UID, Zero)  // _UID: Unique ID
            Name (_STA, 0x0F)  // _STA: Status

So, the 98d610c3739 patch should works to fix issue.

Could you please check if the "Acer BMA150 accelerometer" input device still shows on issue machine with 98d610c3739 patch?

If you still see that accelerometer input device was created, please attach acpidump again.

Thanks
Comment 5 Samuel Sieb 2017-04-27 14:48:59 UTC
Created attachment 256095 [details]
acpidump output for Acer Aspire E5-523

The accelerometer info in /proc/bus/input/devices looks exactly the same as the other laptop.
Comment 6 Lee, Chun-Yi 2017-04-27 16:19:47 UTC
(In reply to Samuel Sieb from comment #5)
> Created attachment 256095 [details]
> acpidump output for Acer Aspire E5-523
> 
> The accelerometer info in /proc/bus/input/devices looks exactly the same as
> the other laptop.

I still didn't find SENR device in tables. If the 98d610c37 patch got be applied, then the accelerometer input device should not be created.

What's the kernel version are you using? Is it applied 98d610c37 patch?

Thanks
Comment 7 Samuel Sieb 2017-04-27 19:35:31 UTC
I applied the patch to 4.10.11 and the accelerometer device is still created.  I will see if I can add some debugging lines in to verify it's doing what it's expected to.
Comment 8 Lee, Chun-Yi 2017-04-28 04:05:01 UTC
(In reply to Samuel Sieb from comment #7)
> I applied the patch to 4.10.11 and the accelerometer device is still
> created.  I will see if I can add some debugging lines in to verify it's
> doing what it's expected to.

OK! I know what's the problem now. My 98d610c37 patch only fixed the issue when BST0001 device doesn't have SENR name, but it didn't fix problem on a machine that it totally have no BST0001.

I am producing a patch.
Comment 9 Lee, Chun-Yi 2017-04-28 07:45:33 UTC
Created attachment 256105 [details]
0001-acer-wmi-setup-accelerometer-when-appropriate-acpi-d.patch

Hi Samuel,

Could you please test this patch? I hope the it fix problem.

Thanks a lot!
Comment 10 Samuel Sieb 2017-04-28 18:29:21 UTC
Yes, the device is gone now.
Comment 11 Lee, Chun-Yi 2017-04-29 00:36:57 UTC
(In reply to Samuel Sieb from comment #10)
> Yes, the device is gone now.

Cool! Thanks for your testing!