Bug 109501

Summary: Screen Rotation no longer works on Lenovo Yoga 2 Pro
Product: Drivers Reporter: Geoffrey (f4fxl)
Component: Platform_x86Assignee: drivers_platform_x86 (drivers_platform_x86)
Status: NEW ---    
Severity: normal CC: arek.burdach, bugzilla, dmitry.torokhov, dvhart, f3flight, f4fxl, hoshiyamazaki01, iliyabo, jaksi, katyl, luciano, trygvis
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 4.3.3 Subsystem:
Regression: Yes Bisected commit-id:

Description Geoffrey 2015-12-16 20:04:17 UTC
Since 4.3.X kernel the screen no longer works on my Lenovo Yoga 2 Pro.
It was working fine with 4.2.x kernel : screen and touch screen input were both rotating correctly when the unit was rotated.
Booting to 4.2.x brings screen rotation back.

ideapad_laptop is loaded.

lsusb :
Bus 001 Device 002: ID 8087:8000 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 005: ID 1bcf:2c43 Sunplus Innovation Technology Inc. 
Bus 002 Device 004: ID 04f3:016f Elan Microelectronics Corp. 
Bus 002 Device 003: ID 2047:0855 Texas Instruments Invensense Embedded MotionApp HID Sensor
Bus 002 Device 002: ID 8087:07dc Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Maybe I will give this a try : https://github.com/pfps/yoga-laptop
Comment 1 Geoffrey 2015-12-18 13:37:50 UTC
Ok the link on github is completely outdated, nevermind.

Looking at the logs of ideapad-laptop I assume one of the commits that were made on 2015-11-08 broke the screen rotation on yoga 2 pro.
Comment 3 Darren Hart 2015-12-19 06:14:26 UTC
Hi Geoffrey,

The only changes to this driver between v4.2 and v4.3 were to the DMI match table for the no hw rfkill switch. I wouldn't expect either of these to affect your screen/touchpad rotation as you describe here.

6d212b8 ideapad-laptop: add alternative representation for Yoga 2 to DMI table
fa92a31 ideapad-laptop: Add Lenovo Yoga 3 14 to no_hw_rfkill dmi list

Can you provide a list of all the loaded modules on your system?

$ lsmod
Comment 4 Geoffrey 2016-01-30 07:04:46 UTC
Hi Darren,

Sorry for the very late reply and thanks for coming back to this.
You are right the changes should not affect rotation.

Here are the loaded modules. The  sensor modules are loaded, maybe those are making trouble ?

Module                  Size  Used by
fuse                   94208  3
cmac                   16384  2
ecb                    16384  1
ctr                    16384  3
ccm                    20480  3
pci_stub               16384  1
vboxpci                24576  0
vboxnetadp             28672  0
vboxnetflt             28672  0
binfmt_misc            20480  1
vboxdrv               450560  3 vboxnetadp,vboxnetflt,vboxpci
bnep                   20480  2
snd_hda_codec_hdmi     49152  1
hid_sensor_magn_3d     16384  1
hid_sensor_gyro_3d     16384  0
hid_sensor_accel_3d    16384  1
hid_sensor_rotation    16384  0
hid_sensor_incl_3d     16384  0
hid_sensor_als         16384  1
hid_sensor_trigger     16384  12 hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_rotation,hid_sensor_als,hid_sensor_magn_3d
hid_sensor_iio_common    16384  7 hid_sensor_trigger,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    16384  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              16384  1 industrialio_triggered_buffer
industrialio           57344  12 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
uvcvideo               90112  0
videobuf2_vmalloc      16384  1 uvcvideo
videobuf2_memops       16384  1 videobuf2_vmalloc
videobuf2_core         49152  1 uvcvideo
v4l2_common            16384  1 videobuf2_core
videodev              163840  3 uvcvideo,v4l2_common,videobuf2_core
hid_multitouch         20480  0
media                  24576  2 uvcvideo,videodev
hid_generic            16384  0
hid_sensor_hub         20480  8 hid_sensor_trigger,hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_rotation,hid_sensor_als,hid_sensor_magn_3d,hid_sensor_iio_common
intel_rapl             20480  0
x86_pkg_temp_thermal    16384  0
intel_powerclamp       16384  0
coretemp               16384  0
kvm_intel             163840  0
kvm                   507904  1 kvm_intel
btusb                  45056  0
btrtl                  16384  1 btusb
arc4                   16384  2
btbcm                  16384  1 btusb
btintel                16384  1 btusb
crct10dif_pclmul       16384  0
bluetooth             512000  24 bnep,btbcm,btrtl,btusb,btintel
crc32_pclmul           16384  0
usbhid                 49152  0
nls_utf8               16384  1
nls_cp437              20480  1
vfat                   20480  1
fat                    69632  1 vfat
jitterentropy_rng      16384  0
iTCO_wdt               16384  0
iTCO_vendor_support    16384  1 iTCO_wdt
sha256_ssse3           28672  1
sha256_generic         24576  1 sha256_ssse3
hmac                   16384  1
drbg                   24576  1
ansi_cprng             16384  0
efi_pstore             16384  1
aesni_intel           167936  8
aes_x86_64             20480  1 aesni_intel
lrw                    16384  1 aesni_intel
gf128mul               16384  1 lrw
glue_helper            16384  1 aesni_intel
iwlmvm                200704  0
ablk_helper            16384  1 aesni_intel
cryptd                 20480  2 aesni_intel,ablk_helper
snd_hda_codec_realtek    81920  1
snd_hda_codec_generic    73728  1 snd_hda_codec_realtek
mac80211              626688  1 iwlmvm
i915                 1122304  7
snd_hda_intel          36864  10
iwlwifi               131072  1 iwlmvm
efivars                20480  1 efi_pstore
pcspkr                 16384  0
snd_hda_codec         135168  4 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel
serio_raw              16384  0
snd_hda_core           65536  5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
snd_hwdep              16384  1 snd_hda_codec
ideapad_laptop         24576  0
drm_kms_helper        131072  1 i915
i2c_i801               20480  0
cfg80211              540672  3 iwlwifi,mac80211,iwlmvm
snd_pcm               102400  4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_core
sparse_keymap          16384  1 ideapad_laptop
drm                   348160  8 i915,drm_kms_helper
snd_timer              32768  1 snd_pcm
snd                    81920  28 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
sg                     32768  0
rfkill                 24576  7 cfg80211,ideapad_laptop,bluetooth
mei_me                 28672  0
soundcore              16384  1 snd
lpc_ich                24576  0
shpchp                 36864  0
mei                    94208  1 mei_me
mfd_core               16384  2 lpc_ich,hid_sensor_hub
i2c_algo_bit           16384  1 i915
video                  36864  2 i915,ideapad_laptop
soc_button_array       16384  0
battery                16384  0
int3403_thermal        16384  0
dw_dmac                16384  0
dw_dmac_core           24576  1 dw_dmac
int3402_thermal        16384  0
processor_thermal_device    16384  0
i2c_designware_platform    16384  0
intel_soc_dts_iosf     16384  1 processor_thermal_device
i2c_designware_core    16384  1 i2c_designware_platform
iosf_mbi               16384  2 intel_soc_dts_iosf,intel_rapl
int340x_thermal_zone    16384  3 int3402_thermal,processor_thermal_device,int3403_thermal
int3400_thermal        16384  0
acpi_thermal_rel       16384  1 int3400_thermal
ac                     16384  0
intel_smartconnect     16384  0
button                 16384  1 i915
processor              36864  0
evdev                  20480  13
joydev                 20480  0
parport_pc             28672  0
ppdev                  20480  0
lp                     20480  0
parport                49152  3 lp,ppdev,parport_pc
efivarfs               16384  1
autofs4                40960  2
ext4                  577536  1
crc16                  16384  2 ext4,bluetooth
mbcache                20480  1 ext4
jbd2                  106496  1 ext4
sd_mod                 40960  4
ahci                   36864  3
crc32c_intel           24576  0
libahci                32768  1 ahci
xhci_pci               16384  0
xhci_hcd              172032  1 xhci_pci
libata                233472  2 ahci,libahci
psmouse               126976  0
ehci_pci               16384  0
scsi_mod              229376  3 sg,libata,sd_mod
ehci_hcd               77824  1 ehci_pci
usbcore               233472  7 btusb,uvcvideo,ehci_hcd,ehci_pci,usbhid,xhci_hcd,xhci_pci
usb_common             16384  1 usbcore
thermal                20480  0
fan                    16384  0
sdhci_acpi             16384  0
sdhci                  40960  1 sdhci_acpi
i2c_hid                20480  0
mmc_core              126976  2 sdhci,sdhci_acpi
hid                   118784  5 i2c_hid,hid_multitouch,hid_generic,hid_sensor_hub,usbhid
Comment 5 Geoffrey 2016-01-30 07:40:19 UTC
Hi Again,

I just compiled and installed 4.4 kernel. Rotation is still broken....
Comment 6 Geoffrey 2016-01-30 18:59:40 UTC
No luck with 4.5rc1 .... :/
Comment 7 Geoffrey 2016-02-03 15:12:41 UTC
Related issue ?
https://bugzilla.kernel.org/show_bug.cgi?id=111321
Comment 8 Geoffrey 2016-02-03 20:27:21 UTC
I confirm above comment, when the computer resumes from suspend the screen rotates just fine.
Comment 9 Dmitry Sutyagin 2016-02-10 17:36:13 UTC
Same here but with Dell Venue 11 Pro 7140. Rotation also starts working after suspend-resume (I use "freeze" state, so it's not a real suspend). Downgrading from 4.4.1 to 4.1.7 resolves the issue.
Comment 10 Luciano 2016-12-12 18:59:31 UTC
Hi, I thought I should chime in. I have a Toshiba Radius 12 laptop, and the same problem, on just released 4.9.0. Rotation works after a suspend-to-memory.
Comment 11 jaksi 2017-01-17 01:00:37 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 12 iliyabo 2017-02-06 18:21:48 UTC
Same issue on Lenovo Yoga 510. Just as #11, the raw values work, however trying iio-sensor-proxy doesn't work. It's developer (hadess on github) said it's a driver bug.
Comment 13 Hoshi Yamazaki 2019-04-17 20:19:01 UTC
I confirm that I bug still occurs, see my DMESG log:
https://pastebin.com/2vAe5ZxY

Something is wrong in GPIO:
[    6.396503] i915 0000:00:02.0: cannot find GPIO chip gpio_crystalcove, deferring
Comment 14 Hoshi Yamazaki 2019-04-18 17:21:12 UTC
Bug appears still in 5.1.0-rc5-mainline kernel from Meffi repo under Arch Linux.
Comment 15 Hoshi Yamazaki 2019-04-25 06:56:01 UTC
5.1.0-rc6 still does not works