Comments (11)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
It does look as if you are close to getting the sensing to work. Try moving
the laptop around to see if the orientation numbers change. If they don't,
then it is likely that the sensor is not being initialized somehow. This is
likely to be because your sensor requires a quirk (something out of the
ordinary) to be correctly initialized and that quirk has not been added to
your distribution or to Linux as a whole. The sensor in the Yoga 2 Pro
needs such a quirk. You will have to find out which sensor you have and how
to get the right quirk set up. This is not easy.
You should also try out the generic_buffer program.
sudo ./generic_buffer -n accel_3d -c 100
should spit out a bunch of sensor values for whatever is thought to be the
accelerometer in your system. Move your laptop around to see if the values
change.
You also do not appear to have an ELAN Touchscreen. You will have to figure
out which touchscreen you have, if any.
The sensor can probably be found via lsusb
. On the Yoga 2 Pro it is
ID 2047:0855 Texas Instruments Invensense Embedded MotionApp HID Sensor
To find out your touchscreen name use xinput
and look for something named
a touchscreen.
Let me know how your investigations progress.
peter
On 05/02/2015 04:16 AM, Aradan wrote:
Hi, I was trying to test this in a Yoga 2 device with the 3.19 kernel
(I'm using Manjaro). How does the orientation script is supposed to work?
When I execute it (after running make) I get this|$ sudo ./orientation iio device number being used is 0 iio trigger
number being used is 0 Orientation 1, x: 7, y: -992, z: 7
Orientation 1, x: 7, y: -992, z: 7 Orientation at 0.0 is normal
Orientation 1, x: 7, y: -992, z: 7 Orientation 1, x: 7, y: -992,
z: 7 Orientation at 1.0 is normal ROTATE to normal unable to find
device ELAN Touchscreen Second child (xinput) returned 256 Orientation 1,
x: 7, y: -992, z: 7 Orientation 1, x: 7, y: -992, z: 7
Orientation at 2.0 is normal Orientation 1, x: 7, y: -992, z: 7
Orientation 1, x: 7, y: -992, z: 7 Orientation at 3.0 is normal
... |But nothing changes if I rotate my screen. I didn't install the drivers
since I'm using a new kernel, or should I?Regards
— Reply to this email directly or view it on GitHub
#37.-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJVRNK/AAoJECjN6+QThfjz+rEH/3BLce/XInwO1kz5mjgjmrEd
KuUZxA5gqcHN0471UylFqrUA9HMgKqnOKcMsJ1RxUdEL4kmXH+r1cngKr+Lcnx9c
bH3lcoEKhL2xMU/YopELelY6/T5dFZuGRvKxXjE2+Lnuwk1H5VdqxNr2/6IRlV88
yTbNGkPlqiuZ84PPUW8ERZwUbH2DF2d+7t4VsNhbzCzDlYxMp3Mg3X88UWkfr1a+
UJAD7BuXYLd/4A+O5BciYf2VvdBGWNOc06w1ltfZ0HHUMPAN4WV9Q2yk6zRkGtN8
/Sh5qiVgmqpFZP3UDMoWRcz9dtGmBDSMvCWwl2RBoPHuFwhMX3dQyAZ1v+Fmrf8=
=G3+O
-----END PGP SIGNATURE-----
from yoga-laptop.
from yoga-laptop.
Thanks for the help :)
Using the generic buffer does not show any improvement
$ sudo ./generic_buffer -n accel_3d -c 100
iio device number being used is 3
iio trigger number being used is 3
DEV_DIR_NAME /sys/bus/iio/devices/iio:device3 TRIGGER_NAME accel_3d-dev3
SCAN_SIZE 12
N000: in_accel_x 7 7.0 in_accel_y -992 -992.0 in_accel_z 7 7.0
N000: in_accel_x 7 7.0 in_accel_y -992 -992.0 in_accel_z 7 7.0
Also, it seems the sensors are not present when I use lsusb (I cannot see anything from Texas )
However, the touchscreen device works normally, xinput shows me this:
Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Atmel Atmel maXTouch Digitizer id=11 [slave pointer (2)]
⎜ ↳ ETPS/2 Elantech Touchpad id=14 [slave pointer (2)]
The maXTouch stuff is the one. I thought that the newest kernels were going to have everything already implemented, which seems not to be the case.
What I don't know is how to detect the accelerometer or sensors for the light. But according to your reply, it is a difficult task.
If I do lsmod, I can get some sensor outputs:
hid_sensor_incl_3d 12667 0
hid_sensor_rotation 12667 0
hid_sensor_accel_3d 12674 1
hid_sensor_gyro_3d 12667 0
hid_sensor_als 12639 0
hid_sensor_magn_3d 12667 0
hid_sensor_trigger 12521 12 hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_rotation,hid_sensor_als,hid_sensor_magn_3d
uvcvideo 84822 0
hid_sensor_iio_common 12737 6 hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_rotation,hid_sensor_als,hid_sensor_magn_3d
industrialio_triggered_buffer 12417 6 hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_rotation,hid_sensor_als,hid_sensor_magn_3d
kfifo_buf 12834 1 industrialio_triggered_buffer
industrialio 42744 10 hid_sensor_trigger,hid_sensor_gyro_3d,industrialio_triggered_buffer,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_rotation,hid_sensor_als,kfifo_buf,hid_sensor_magn_3d
hid_sensor_incl_3d 12667 0
hid_sensor_rotation 12667 0
hid_sensor_accel_3d 12674 1
hid_sensor_gyro_3d 12667 0
hid_sensor_als 12639 0
hid_sensor_magn_3d 12667 0
hid_sensor_trigger 12521 12 hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_rotation,hid_sensor_als,hid_sensor_magn_3d
uvcvideo 84822 0
hid_sensor_iio_common 12737 6 hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_rotation,hid_sensor_als,hid_sensor_magn_3d
industrialio_triggered_buffer 12417 6 hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_rotation,hid_sensor_als,hid_sensor_magn_3d
kfifo_buf 12834 1 industrialio_triggered_buffer
industrialio 42744 10 hid_sensor_trigger,hid_sensor_gyro_3d,industrialio_triggered_buffer,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_rotation,hid_sensor_als,kfifo_buf,hid_sensor_magn_3d
I will try to search a little more about this, but does not look easy
Cheers
from yoga-laptop.
Hi @pfps ,
I just change my Yoga 2 11 for a Yoga 3 14 and it seems to have same sensor controller.
I was quite lazy before... but as it's my second laptop with this chip I want to make it working ;)
And... I'm not quite far from make it working:
I use your commit: torvalds/linux@825747b and change value for my laptop
And it's working!
When I cat values in /sys/bus/iio/devices/iio:deviceX
values are moving according to environment (for als, gyro and magn).
Now my problem is about buffer... it's working only when I "cat" values.... :/
I don't know where to look...
from yoga-laptop.
@Aradan @pfps my uptream patch have been validated for inclusion in 4.3.
Let's test it when first RC goes out ;)
from yoga-laptop.
Cool, will it work on the small Yoga 2? Because the sensors are not from Texas. BTW, I was using Arch, I hope it works when the new kernel goes out
from yoga-laptop.
@davidcortesortuno I had support for sensors made by ITE used in yoga 2 11 and yoga 3 14 (and maybe other ;))
from yoga-laptop.
Hi, how can I test your patch? Since the gyroscope is not working on my Windows partition and I think it is a software rather than a hardware related stuff. I would like to check if it at least working.
from yoga-laptop.
Hi all,
4.3 rc1 have been released and I tested my yoga 3 14 with success \o/
I don't know for yoga 2 11 but I think it should work :)
from yoga-laptop.
I installed kernel 4.3 rc1 in Arch Linux and it is working! Thanks for submitting the patch. I hope I can use the light sensor in the future :) and also that the new kernel comes up soon
from yoga-laptop.
Hi, just to let you know, after this kernel patch it is possible to use screen rotation and ambient light sensors with iio-sensor-proxy
https://github.com/hadess/iio-sensor-proxy in Gnome 3.18 or newer, which works nicely
from yoga-laptop.
Related Issues (20)
- Not working on Yoga 2 13 (non-pro) HOT 47
- Can't compile on Ubuntu 14.10 HOT 4
- Not working with Yoga 3 Pro and Ubuntu 14.10 HOT 1
- orientation.c won't compile since last commit HOT 2
- Possible Error in code of orientation HOT 2
- Detecting screen folding degree and deactivating keyboard/touchpad if it passes 180 degree HOT 3
- Kernel 4.0 / Debian: make programs fails with "Undefined reference to `build_channel_array'" HOT 12
- Issue installing HOT 6
- Linux driver in Fedora 19-21 crashing after few seconds after the orientation program is started HOT 5
- no wifi on Yoga 3 14 HOT 1
- Debounce light sensor HOT 1
- Does nothing on Ubuntu 15.04 / 15.10 HOT 1
- Not working after suspend HOT 3
- Installing on ubuntu 15.10 HOT 7
- Ubuntu 15.10 - notify.h not found HOT 9
- Add another input to orientation HOT 2
- how to makethis work HOT 12
- Touchpad not being disabled HOT 1
- Documentation: Add Yoga 460 support start with kernel 4.10 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yoga-laptop.