Bug 111321

Summary: Rotation only works after suspend
Product: Drivers Reporter: Andreas Nilsson (bugs)
Component: Input DevicesAssignee: drivers_input-devices
Status: NEW ---    
Severity: normal CC: arek.burdach, badshah400, bugzilla, f4fxl, jaksi, josh_bell7, katyl
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 4.5.0-0.rc0.git8.1.fc24.x86_64 Subsystem:
Regression: No Bisected commit-id:

Description Andreas Nilsson 2016-01-26 10:50:42 UTC
I hope I'm filing this in the right component, please reassign if not.

I have a Lenovo Yoga 3 with a built in rotation sensor. The sensor doesn't kick in unless I first suspend it. It works as expected after I suspend it and wake it up again.

Apparently others have the same issue.
https://github.com/hadess/iio-sensor-proxy/issues/66
Comment 1 Atri Bhattacharya 2016-01-26 11:18:31 UTC
I am facing the same problem as OP (Lenovo Yoga 2 Pro). This seems to be a regression from kernel 4.2.x, since the rotation sensors worked right off a boot in that version, but since an upgrade to kernel 4.3 it works only after suspending and waking up once.
Comment 2 Atri Bhattacharya 2016-01-26 11:24:05 UTC
Sorry, just to add, I am on openSUSE Tumbleweed, so the issue seems to be distro blind.

> uname -rvmo
4.4.0-1-default #1 SMP PREEMPT Mon Jan 11 14:46:34 UTC 2016 (83948c1) x86_64 GNU/Linux
Comment 3 Eric Lehmann 2016-02-01 19:01:12 UTC
I am also experiencing this issue on my Lenovo Yoga 900 laptop, using 4.5-rc2 compiled on archlinux. Rotation and ambient light sensors in the laptop fail to function until after a suspend resume. 
Linux pyke 4.5.0-rc2-mainline #1 SMP PREEMPT Mon Feb 1 08:12:01 EST 2016 x86_64 GNU/Linux
Went scouring through dmesg and was able to find the following log entry immediately following a resume, but am unsure of it's relevance. 
hid_sensor_rotation HID-SENSOR-20008a.6.auto: Unbalanced pm_runtime_enable!
Comment 4 Geoffrey 2016-02-03 15:02:48 UTC
hi all,

I filed this bug https://bugzilla.kernel.org/show_bug.cgi?id=109501, which might be linked to this one.
Comment 5 Geoffrey 2016-02-03 20:32:35 UTC
Actually this issue is the same as the one I filed.
Comment 6 Joshua 2016-04-11 01:43:35 UTC
Can confirm this issue for the Thinkpad Yoga S1. The regression seems to be some time after kernel 4.2.3.

Here's some speculation that might be useful: Parts of the community using my machine have found that suspension doesn't work unless the sensors are turned off first. Here's a thread discussing the issue: https://github.com/admiralakber/thinkpad-yoga-scripts/issues/1

Hope this helps!
Josh.
Comment 7 RussianNeuroMancer 2016-07-29 17:35:06 UTC
Same issue with Dell Venue 11 Pro 7140.
Comment 8 Joshua 2016-09-08 05:58:49 UTC
Following up on this one: The sensor seems to be working again in kernel 4.7.2 on the Thinkpad Yoga S1. Are you able to test this again Andreas?
Comment 9 Atri Bhattacharya 2016-09-08 06:18:48 UTC
Thinkpad Yoga 260 (Intel Sensor Hub patches applied): still doesn't work with Kernel 4.7.2 from a cold boot. Works after suspend.
Comment 10 jaksi 2017-01-17 10:55:08 UTC
I have the same issue on the Thinkpad Yoga 260 using 4.9.4.

Some additional information: the raw accelerometer output (/sys/bus/iio/devices/iio:device3/in_accel_{x,y,z}_raw) is fine even before suspending, but the buffered output only works after suspending and resuming.
Comment 11 RussianNeuroMancer 2018-01-30 04:26:34 UTC
Resolved:

https://github.com/hadess/iio-sensor-proxy/issues/116