You are not logged in.
Pages: 1
Topic closed
Hi,
I have a thinkad yoga (not the ideapad) and I want to use the accelerometer to rotate the screen. My problem is that I do not know how to retrieve the accelerometer data.
lsusb
give me
Bus 003 Device 004: ID 056a:00ec Wacom Co., Ltd
Bus 003 Device 003: ID 0483:91d1 STMicroelectronics
Bus 003 Device 002: ID 8087:8000 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 5986:029d Acer, Inc
Bus 001 Device 003: ID 04f3:0254 Elan Microelectronics Corp.
Bus 001 Device 002: ID 8087:07dc Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
and I suspect the accelerometer to be the STMicroelectronics entry. I looked at the Lenovo documentation and I have not found the name of the yoga accelerometer. Howevers the Helix one and another model (I forgot the name) is STMicroelectronics LSM303DLHC and the gyroscope is STMicroelectronics L3GD20.
It seems the lenovo tablet have the same accelerometer and a different gyroscope L3G4200D.
Someone already tried to use the accelerometer link . The drivers can be found searching linux in the constructor website
However, I am missing some dependency to build it (linux/delay.h for example) and after the compilation, I do not know what to do.
The other solution would be to use Tp smapi, but I read that the newer Lenovo are not supported anymore...
Can someone help me?
Thank you very much.
Offline
It looks like that driver needs updating, it won't build with current gcc against 3.14.0 kernel.
First I had to export C_INCLUDE_PATH to point to kernel source tree include directory (linux-api-headers doesn't contain linux/err.h).
And then ran onto all sorts of trouble, first of all, kernel own headers point to asm directory wich doesn't exist (asm-generic does), so after creating symlinks, build continues but then stops on
/usr/src/linux-3.14.0/include/linux/thread_info.h:54:29: fatal error: asm/thread_info.h: No such file or directory
#include <asm/thread_info.h>
There is no thread_info in asm-generic. Anyone with a nice insight on this information, I'm positive I'm doing something wrong but non-existing header definitions in own kernel source is a bit wtf ???? for me.
/edit: Contacting maintainers listed in the source files could be of use for the OP also.
Last edited by combuster (2014-03-31 08:31:22)
Offline
I think I found another solution,
following post from djahma and pfpschneider on ubuntu forum I found a way. It seems the driver are already in the kernel source. However, unlike in fedora, they are not compiled in the default kernel version.
So I just tried to download and compile a custom kernel. The Drivers are in "Device Drivers -> Industrial I/O support (IIO [=y])". I enabled all the device from STMicroelectronics and HID too.I still have issues to have a nice grub entry, but when I boot using the entry generated by archlinux, I have now 3 new devices under "/sys/bus/iio/devices/" (magnetometer,accelerometer and gyroscope). I need now to find a way to enable and use them.
Last edited by Tioz (2014-04-06 21:35:44)
Offline
Small update.
Someone managed to use the sensor of the "ideapad yoga 2 pro" if someone else it interested a good starting point is to look at:
https://github.com/pfps/yoga-laptop
The thinkpad yoga do not use the same sensors as the ideapad. There is a nice discussion in the "issues" of the project about the thinkpad.
Offline
I've put together a small package to do exactly this, though it relies on an ACPI event and not on the accelerometers:
https://aur.archlinux.org/packages/thin … ga-rotate/
The downside of using ACPI is that it only rotates in one direction, and only when the laptop is completely unfolded - but that covers my use case completely. Also it currently assumes that the Wacom input will follow the screen rotation, which seems to be the case in Gnome 3.12 by default, and can be set in KDE using kcm-wacomtablet (available from AUR).
Offline
I also have a laptop (Dell Inspiron 7347) with the same accelerometer: 0483:91d1 in lsusb
My problem now is that if I manually rotate (not tried yet automatic rotation) the screen the touchscreen calibration is not changed, so it is completely out. Did anyone try to fix that?
Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee
Offline
Works for me now. Please see the Warning I put on top of the wiki page:
https://wiki.archlinux.org/index.php/ST … enetometer
Last edited by OdinEidolon (2015-01-18 14:06:03)
Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee
Offline
Have you tried spin? It seems to do what you want.
Offline
Also, thinkpad-yoga-scripts.
Offline
For the Yoga 3 Pro, this one works perfectly...it's written in C and isn't hard on the CPU. I haven't used it long enough to see the effect on battery life, however.
Offline
Thanks for sharing. I'm going to go ahead and close this old thread now.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Online
Pages: 1
Topic closed