-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to make it work for Thinkpad Yoga? #4
Comments
I changed /bin/sh to /bin/bash in the scriptsand pushed this change. What changes did you make to the drivers' Makefile? I recently made a change orientation is waiting for data from the sensor. This indicates that you have It is entirely possible that the Thinkpad Yoga hassomething If you dohave this device then something else is going wrong. You will sudo ./generic-buffer -n als -c 10 You should see something like the following. (For the light sensor you may sensors> sudo ./generic_buffer -n als -c 10 Let me know what you do see. peter On 03/24/2014 04:16 AM, Micha Moskovic wrote:
|
Thanks for trying to help me. Bus 001 Device 003: ID 0483:91d1 STMicroelectronics A quick googling shows that quirks are needed for this device too, see I applied the patch in that mail (by hand, automatic patching failed)
and from there it just repeats the same thing every second, no matter |
Hmm. It appears that the sensor is not updating. The Orientation lines are the I would try generic-buffer and see whether you can get any of the four (or If you can't get the sensors to change values, then the next step, I think is peter On 03/24/2014 07:11 AM, Micha Moskovic wrote:
|
I played a bit with generic_buffer, and it turns out that the sensors |
Weird. Does this happen for the other sensors as well? This really looks as if something extra should be done to set up thesensors. peter On 03/24/2014 11:42 AM, Micha Moskovic wrote:
|
Yes, same thing happens with all other sensors. On 24 Mar 2014, at 20:38, Peter F. Patel-Schneider [email protected] wrote:
|
Yes, the quirk looks fine. However, the Linux setup for these sensors is peter On 03/25/2014 03:18 AM, Micha Moskovic wrote:
|
Hello, Thank you. |
@TheTioz for the Thinkpad Yoga, the drivers included in Linux 3.14 work, in the sense that they produce an output. |
Ok, thank you for the information. |
Hi @michamos , |
Sorry, I forgot about this issue. On 08 May 2014, at 21:46, TheTioz [email protected] wrote:
|
Ok thanks. I also do not have much time. I will try to find time to do some test and take a look at libiio. If I have enough time, I will also report the bug. |
Hi @michamos, "The sensors appear to be in one of several states: first time I ran the sensors, the data where produced following the mode 2(I think) or maybe 3. Then (I had to reboot because my keyboard was not working any-more), I had the sensors working following mainly 4 and sometime 2 or 3. In mode 4, the sensors output value so fast that the value is repeated between 5 and 30 times. In the other mode however, the output are ways more slow. I do no think it is a bug, but just us failing to put the sensors in a good state. I will investigate more before posting a bug report. cheers |
I would also be happy to do any testing required to get the Yoga sensors to work. |
Hi @catch22 |
At this point it is probably better to use the 3.15 or 3.16 drivers, as there has been quite a bit of work done on them since the versions that I grabbed and patched. You will probably have to add the quirk for the Thinkpad Yoga if it isn't already in hid-sensor-hub.c. (If it is the STM hub then the quirk is already present.) I'll grab the 3.15 drivers. If they work for me I'll do an update. |
Hmm. It's not so simple. There are lots of changes in 3.15 so you either have to have quite a bit of the hid/iio subsystem or be running a 3.15 kernel. I'm on a cell-phone connection so I won't be able to upgrade to 3.15 for a while. Anyway, if you want to test something out, get a 3.15 kernel. You may be able to use the standard drivers from there, with no modifications. (By the way, Fedora 20 just put out a 3.15 kernel so an up-to-date Fedora would be a good setup to test with.) |
Ok, I currently run an archlinux, I will compile a custom kernel and see how is it working. Do you know if they are still changing the driver in 3.16 (I can try the release candidate). |
There have been quite a few patches submitted in this area. I don't know whether they make anything better for Yogas, but if you can try 3.16 it might be a good idea to do so. |
Hello, 3.15.3 So it seems that pfps program should be working and maybe necessitate a little fine tuning in order not to use to much resources. 3.16-rc3 It also seems a new devices drivers has been added. |
Right now orientation has a timed loop. It looks as if in 3.15 it can set up the sensor so that it can do a wait and get control after a significant change. I'll look into this when I get 3.15 installed. Do you think that there is a regression in 3.16? Did you try to control the sensor as you did in 3.15? It may be that some random factor caused the sensor to be initialized in different states and that is what you are seeing in 3.16. |
I made more tests. the situation for 3.16 looks like a regression. generic-buffer stays stuck. Then if you do cat in_sensorsName_raw... , generic-buffer will output 1 or 2 line and get stuck again, then you can do cat again and again to output more values (the values are outputted both by cat and the generic-buffer). In my laptop the situation for 3.15 is the following. After booting the sensor output the value really quickly. If you do cat in_sensorsName_sample_frequency, the sensors will put itself in the "normal" state. Then for the accelerometer and the gyroscope, you can play around with the hysteresis. I did not manage to change anything (hysteresis, sampling frequency) for the other captor. I hope I am clear enough. |
I have finally installed 3.16 (
However, I observed that screen rotation now generates the an ACPI event, namely the same one that previously only occurred when the tablet was "flipped around" ( Update: I can also read the Is there anything I can do to help? |
Exactly when are the ACPI events generated? When the laptop is physically moved or when the display is rotated (so that the top of the display is the LHS of the screen, for example)? The flipped around event does not occur on the Yoga 2 Pro, I think. When do you see it? The drivers changed quite a bit for 3.16, with new ways of setting them up. If you can figure out how the setup works in 3.16 and get that implemented, it would certainly help. I think that the drivers can be set up to report only significant changes, and the code can then just wait for it, instead of having a read-sleep loop. This would eliminate the 1/2s or so delay. |
When the laptop is physically rotated in space (it only fires once I fully rotate the device, e.g., rotate the entire laptop by 90 degree to the left, but without moving the hinge). The ACPI event that is fired is the same one that is generated when the hinge is rotated all the way around (coincidentally, while in the latter state the ACPI events do not fire anymore for the rotations..). Is there something specific I could try to get your code to run? |
So it looks as if there is something on the Thinkpad Yogas looking at the sensors and reporting ACPI events. Hopefully that is not interfering with the way the orientation program works. (I expect not, as I expect that the ACPI events come from the embedded controller.) As far as updating the code, you would have to find the updated documentation on how the IIO system works and figure out how to set up the sensor to report significant changes and then how to wait for sensor output. This is probably not going to be trivial. I probably won't a chance to work on this for a while yet, but eventually I will be updating the code for 3.16. |
Hi,
I have a Thinkpad Yoga laptop, and I am trying to make the sensors work, with no luck so far.
I am using Ubuntu 14.04 with kernel 3.13.0-18-generic on AMD64, and I managed to compile the drivers you provided (the Makefile needs to be adapted though as for the Fedora case).
I blacklisted the original modules and inserted yours instead as in the README, then ran setup (the first line has to be changed to
#!/bin/bash
, since you use bashisms and on Debian derivatives,sh != bash
).This is the output of
orientation --debug 4
and of
sudo ls -R /sys/bus/iio/devices/iio:device0
Please tell me if you need more informaton.
The text was updated successfully, but these errors were encountered: