Bug 196871

Summary: iio accelerometer works correctly only if continously polled on Lenovo Yoga 520 80x8.
Product: Drivers Reporter: Gianluca Boiano (boiano.gianluca)
Component: Platform_x86Assignee: drivers_platform_x86 (drivers_platform_x86)
Status: RESOLVED CODE_FIX    
Severity: normal CC: andy.shevchenko, boiano.gianluca, jonas.bosse
Priority: P1    
Hardware: All   
OS: Linux   
URL: https://github.com/hadess/iio-sensor-proxy/issues/182
Kernel Version: 4.13.3 Subsystem:
Regression: No Bisected commit-id:
Attachments: output of -$ sudo G_MESSAGES_DEBUG=all /usr/sbin/iio-sensor-proxy

Description Gianluca Boiano 2017-09-08 17:52:28 UTC
After having updated the kernel to 4.12.10 
I've updated iio-sensor-proxy to latest commit, libgudev to 232 and here I post the log with DEBUG variable enabled.

https://gist.github.com/M0Rf30/8ed0318ebaa87c790579ab1dfc5d6360

monitor-sensor gives "undefined"
after sending this command:
watch -n 0.1 cat '/sys/bus/iio/devices/iio:device'*/*raw*
it works like a charm and the relative entry in journal become

set 02 13:04:48 unknown iio-sensor-prox[414]: process_scan_1.....

Stopping the watch process it returns to

set 02 13:04:50 unknown iio-sensor-prox[414]: No new data available on 'iio:device0'
and no more reactions

Suspend / resume seems to work. Before the 4.12.10 kernel, watch process didn't work after resume.

Here dmesg:
https://gist.github.com/M0Rf30/ee393fb81b6b6eb9389781e284629258

kernel version (uname -a ):
Linux unknown 4.12.10-1-zen #1 ZEN SMP PREEMPT Wed Aug 30 17:48:24 UTC 2017 x86_64 GNU/Linux

here udevadm info --export-db output:
https://gist.github.com/M0Rf30/79f6f67181a18d4a95947afaf4d82bd4

here gdbus introspect --system --dest net.hadess.SensorProxy --object-path /net/hadess/SensorProxy output:
https://gist.github.com/M0Rf30/15ec09d3e75a895aa197fc33f09a35ac
Comment 1 Jonas Bosse 2017-09-10 20:46:41 UTC
Created attachment 258291 [details]
output of -$ sudo G_MESSAGES_DEBUG=all /usr/sbin/iio-sensor-proxy

kernel: 4.13.0-mainline
iio-sensor-proxy: latest commit (10 sept. 2017)
libgudev: 232
Comment 2 Jonas Bosse 2017-09-10 20:54:33 UTC
(In reply to Jonas Bosse from comment #1)
> Created attachment 258291 [details]
> output of -$ sudo G_MESSAGES_DEBUG=all /usr/sbin/iio-sensor-proxy
> 
> kernel: 4.13.0-mainline
> iio-sensor-proxy: latest commit (10 sept. 2017)
> libgudev: 232

The bug was recreated on a LENOVO Yoga 510-14IKB

suspend/resume doesn't change the behavior.
Comment 3 Gianluca Boiano 2018-01-02 09:41:17 UTC
Fixed for me. I will close this issue
Comment 4 Andy Shevchenko 2021-02-15 11:17:12 UTC
Sounds to me like a PDx86 issue, but maybe IIO. Move to PDx86 (on a FYI basis), although bug report is closed.