You are not logged in.

#1 2012-06-03 06:01:32

Padfoot
Member
Registered: 2010-09-03
Posts: 381

[SOLVED] Help needed with ACPI accelerometer - Acer Iconia Tab W501

Hi,

I am trying to get the accelerometer working on my Acer Iconia Tab W501

In windows, it reported as a BMA150 device, so I have that driver loading on boot.

After months of googling and making a mess in /sys, I still have not got the device working. I was working under the assumption that the device hangs off the i2c bus, but a "lucky google" today uncovered that it is showing up through acpi - acpid is present in my daemons array of rc.conf and the kernel module acer_wmi is also loaded.

The device is certainly sending signals to the kernel. Upon boot, dmesg ends up as follows:

.......
[   11.689709] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   12.108374] EXT4-fs (sda2): re-mounted. Opts: commit=0
[   12.148026] EXT4-fs (sda3): re-mounted. Opts: commit=0
[   17.759006] FS-Cache: Loaded
[   17.780371] FS-Cache: Netfs 'cifs' registered for caching
[   17.816097] CIFS VFS: default security mechanism requested.  The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.3
[   22.459133] wlan0: no IPv6 routers present

Now, if I rotate the device, and run dmesg again, I have the following:

........
[ 1255.189705] acer_wmi: Unknown function number - 5 - 1
[ 1257.363688] acer_wmi: Unknown function number - 5 - 1
[ 1268.268809] acer_wmi: Unknown function number - 5 - 1
[ 1268.409270] acer_wmi: Unknown function number - 5 - 1
[ 1308.653700] acer_wmi: Unknown function number - 5 - 1
[ 1308.784623] acer_wmi: Unknown function number - 5 - 1

acpi -V does not show the device:

Battery 0: Full, 100%
Battery 0: design capacity 2865 mAh, last full capacity 2678 mAh = 93%
Adapter 0: on-line
Thermal 0: ok, 59.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 87.0 degrees C
Thermal 0: trip point 1 switches to mode passive at temperature 77.0 degrees C
Cooling 0: LCD 0 of 9
Cooling 1: Processor 0 of 3
Cooling 2: Processor 0 of 10

nor is it configured on boot - dmesg | grep ACPI:

[    0.404389] pnp: PnP ACPI init
[    0.404443] ACPI: bus type pnp registered
[    0.405020] pnp 00:00: Plug and Play ACPI device, IDs PNP0a08 PNP0a03 (active)
[    0.405295] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.405829] pnp 00:02: Plug and Play ACPI device, IDs PNP0103 (active)
[    0.406106] pnp 00:03: Plug and Play ACPI device, IDs PNP0200 (active)
[    0.406268] pnp 00:04: Plug and Play ACPI device, IDs PNP0c04 (active)
[    0.406514] pnp 00:05: Plug and Play ACPI device, IDs PNP0b00 (active)
[    0.406613] pnp 00:06: Plug and Play ACPI device, IDs PNP0800 (active)
[    0.406774] pnp 00:07: Plug and Play ACPI device, IDs PNP0303 (active)
[    0.407104] system 00:08: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.407390] system 00:09: Plug and Play ACPI device, IDs PNP0c01 (active)
[    0.408373] pnp: PnP ACPI: found 10 devices
[    0.408377] ACPI: ACPI bus type pnp unregistered
[    4.684770] ACPI: Power Button [PWRB]
[    4.685381] ACPI: acpi_idle registered with cpuidle
[    4.686148] ACPI: Lid Switch [LID]
[    4.692517] ACPI: Power Button [PWRF]
[    4.696710] [Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness
[    4.719486] ACPI: Video Device [VGA] (multi-head: yes  rom: no  post: no)
[    4.729977] ACPI: AC Adapter [AC0] (on-line)
[    4.746949] ACPI: Battery Slot [BAT0] (battery present)
[    4.824909] ACPI: Thermal Zone [THRM] (61 C)
[    5.220895] acer_wmi: Acer Laptop ACPI-WMI Extras

Yet, running acpi_listen generates the following when the tablet is rotated:

 PNP0C14:00 000000bc 00000000
 PNP0C14:00 000000bc 00000000
 PNP0C14:00 000000bc 00000000
 PNP0C14:00 000000bc 00000000

So, it would seem the device is working and sending data to the kernel/drivers, it appears some config is needed to get it properly recognised and an entry in /dev generated.

Really hoping there is an acpi expert around who may be able to help me get the device properly recognised and configures, ideally, as a /dev/input/js*

Cheers.

Last edited by Padfoot (2012-06-07 00:24:31)

Offline

#2 2012-06-07 00:23:56

Padfoot
Member
Registered: 2010-09-03
Posts: 381

Re: [SOLVED] Help needed with ACPI accelerometer - Acer Iconia Tab W501

Solved. I now have a working accelerometer. The acer-wmi kernel module needs to be patched to recognise and configure the device. I am now running a custom kernel with this patch and it is working brilliantly.

See this thread for the patch.

http://www.linuxforums.org/forum/hardwa … post893463

Offline

#3 2013-03-27 10:14:21

marzoul
Member
Registered: 2012-10-29
Posts: 35

Re: [SOLVED] Help needed with ACPI accelerometer - Acer Iconia Tab W501

Padfoot,

I know this several-monthes-old thread, but it should apply to my case: I'm running an Acer Aspire 5920G laptop, and at boot time a BMA150 accelerometer is found.

dmesg says that the device is /devices/virtual/input/input7, also linked to the files /dev/input/event7 and /dev/input/js0.
However, I can't get any reading from this accelerometer.
It's not really necessary for my laptop, but I would LOVE to see something out of it.

acpi -V does not show the device
acpi_listen outputs nothing when I rotate the laptop
Nothing is sent as keyboard event (as the power buttons etc do)
Also, opening the file /dev/input/even7 or /dev/input/js0 fails (and these are the ONLY files in /dev/input that I can't open).
FInally, X ignores the device when booting so it is not X eating all events.

I run Linux 3.7.10 x86-64 and didn't apply the mentioned patch because the accelerometer is perfectly found...
I'm very frustrated.
Is there anything I did wrong ?

Offline

#4 2013-03-31 08:34:13

Padfoot
Member
Registered: 2010-09-03
Posts: 381

Re: [SOLVED] Help needed with ACPI accelerometer - Acer Iconia Tab W501

There is no need to patch the kernel anymore as current kernels have the acer wmi accelerometer patch merged.

Ensure you have the kernel module acer_wmi loading and then the events should be propogated. acpi_listen should show the events.

Using the code from here: http://www.jezra.net/blog/Python_Joysti … ng_Gobject i have written a little daemon that monitors the accelerometer and automatically rotates the screen based on it's position.

Cheers.

[EDIT] Being a laptop, I am guessing the accelerometer is possibly on the hard drive?? used for shock protection?? So if that is the case, I am not sure you will be able to utilise it in the same way as a tablet's accelerometer. There are articles on the web for setting up hard drive accelerometers in linux. The other consideration you need is that the accelerometer may not be on acpi. It could be on the i2c bus (commonly where sensors such as fan speed, core temps etc are located), in which case you will need the i2c driver to get the accelerometer events recognised in the kernel (ensure i2c kernel modules are loaded). So check exactly how the kernel detects the accelerometer, is it on acpi or the i2c bus?[/EDIT]

Last edited by Padfoot (2013-03-31 08:42:51)

Offline

Board footer

Powered by FluxBB