You are not logged in.
Hi, I am running Arch Linux with GNOME 3.18 and GDM on my Lenovo Yoga 2 Pro. Formerly I tried Fedora 23 beta, which also included GNOME 3.18, and had a feature that enabled the desktop environment to auto rotate the screen.
Trying to obtain the same effect in Arch, I have found the iio-sensor-proxy project and installed it. However, it does not function correctly at startup, only after restarting my GNOME shell session (Alt-F2 + r).
I have also tried to file an issue to the developers, but since it was already functioning correctly in Fedora, I tend to believe it to be a configuration issue.
I don't have much experience debugging GNOME applications, and don't know where to ask really, so any pointers would be of great help.
Offline
Ok, I haven't solved my issue yet, and I still couldn't pinpoint its root cause. In Fedora 23, auto rotation "just works".
1. So the chain starts with iio-sensor-proxy, which is working properly, as far as I could tell.
Here is my test case: immediately after reboot, I am running the following commands:
gsettings set org.gnome.settings-daemon.plugins.orientation active false
/usr/lib/gnome-settings/daemon/gsd-test-orientation2. The following output basically proves that the sensors are properly read and processed by the gnome-settings-daemon component.
(gsd-test-orientation:29957): orientation-plugin-DEBUG: Found orientation 'normal' for accelerometer
(gsd-test-orientation:29957): orientation-plugin-DEBUG: Orientation changed to 'normal', switching screen rotation
(gsd-test-orientation:29957): orientation-plugin-DEBUG: Found orientation 'left-up' for accelerometer
(gsd-test-orientation:29957): orientation-plugin-DEBUG: Orientation changed to 'left-up', switching screen rotation
(gsd-test-orientation:29957): orientation-plugin-DEBUG: Found orientation 'normal' for accelerometer
(gsd-test-orientation:29957): orientation-plugin-DEBUG: Orientation changed to 'normal', switching screen rotation3. The gnome-settings-daemon actually has a number of plugins. Above I have tested the orientation plugin, which seems to do its job (communicate with iio-sensor-proxy, send rotate commands via D-Bus to the XRandr plugin. Let's test that one by running dbus-monitor:
method call time=1448062752.030396 sender=:1.9 -> destination=org.gnome.SettingsDaemon.XRANDR serial=271 path=/org/gnome/SettingsDaemon/XRANDR; interface=org.gnome.SettingsDaemon.XRANDR_2; member=RotateTo
int32 8
int64 1448062752030
method call time=1448062752.030988 sender=:1.9 -> destination=:1.13 serial=272 path=/org/gnome/Mutter/DisplayConfig; interface=org.gnome.Mutter.DisplayConfig; member=ApplyConfiguration
uint32 7
boolean false
array [
struct {
uint32 0
int32 0
int32 0
int32 0
uint32 3
array [
uint32 0
]
array [
]
}
]
array [
struct {
uint32 0
array [
dict entry(
string "primary"
variant boolean true
)
dict entry(
string "presentation"
variant boolean false
)
dict entry(
string "underscanning"
variant boolean false
)
]
}
]
error time=1448062752.035386 sender=:1.13 -> destination=:1.9 error_name=org.freedesktop.DBus.Error.AccessDenied reply_serial=272
string "The requested configuration is based on stale information"Ok, so we might have something here (but what?) Apparently, Mutter is responding that it has stale information (line 822) - whatever that may mean.
4. In ways I don't understand, each (successful or unsuccessful) rotation attempt of the screen looks correlated to the following error in the kernel, in the i915 module.
Here is an output of dmesg:
[ 618.658358] [drm:check_crtc_state [i915]] *ERROR* mismatch in ips_enabled (expected 1, found 0)
[ 618.658364] ------------[ cut here ]------------
[ 618.658381] WARNING: CPU: 0 PID: 953 at drivers/gpu/drm/i915/intel_display.c:12324 check_crtc_state+0x8df/0xf80 [i915]()
[ 618.658383] pipe state doesn't match!
[ 618.658384] Modules linked in: sha256_ssse3 sha256_generic hmac drbg ansi_cprng ctr ccm cmac ecb rfcomm hid_sensor_accel_3d hid_sensor_als hid_sensor_gyro_3d hid_sensor_incl_3d hid_sensor_rotation hid_sensor_magn_3d hid_sensor_trigger hid_sensor_iio_common industrialio_triggered_buffer kfifo_buf industrialio bnep hid_multitouch hid_sensor_hub uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common btusb videodev btrtl btbcm btintel media usbhid bluetooth fuse joydev mousedev arc4 thinkpad_acpi nvram msr nls_iso8859_1 nls_cp437 vfat fat iTCO_wdt iTCO_vendor_support intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp iwlmvm kvm_intel kvm mac80211 iwlwifi snd_hda_codec_hdmi crct10dif_pclmul crc32_pclmul crc32c_intel snd_hda_codec_realtek snd_hda_codec_generic aesni_intel aes_x86_64
[ 618.658444] lrw gf128mul glue_helper ablk_helper cfg80211 input_leds cryptd snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm psmouse snd_timer pcspkr shpchp snd mei_me soundcore mei lpc_ich i2c_i801 serio_raw thermal ideapad_laptop i2c_hid sparse_keymap int3400_thermal dw_dmac rfkill hid int3402_thermal acpi_thermal_rel 8250_dw battery fan i2c_designware_platform int3403_thermal dw_dmac_core i2c_designware_core spi_pxa2xx_platform processor_thermal_device gpio_lynxpoint int340x_thermal_zone intel_soc_dts_iosf iosf_mbi evdev mac_hid ac processor sch_fq_codel ip_tables x_tables ext4 crc16 mbcache jbd2 sd_mod atkbd libps2 ahci libahci ehci_pci ehci_hcd libata xhci_pci xhci_hcd scsi_mod usbcore usb_common i8042 serio sdhci_acpi sdhci led_class mmc_core i915 video button intel_gtt i2c_algo_bit
[ 618.658512] drm_kms_helper drm
[ 618.658518] CPU: 0 PID: 953 Comm: Xorg Tainted: G W 4.2.5-1-ARCH #1
[ 618.658520] Hardware name: LENOVO 20266/Yoga2, BIOS 76CN43WW 03/30/2015
[ 618.658522] 0000000000000000 00000000dc82a420 ffff8800991cb788 ffffffff81570d0a
[ 618.658527] 0000000000000000 ffff8800991cb7e0 ffff8800991cb7c8 ffffffff810748a6
[ 618.658531] ffff8800991cb7c8 ffff88025553f350 ffff880254028000 ffff88025553f000
[ 618.658535] Call Trace:
[ 618.658544] [<ffffffff81570d0a>] dump_stack+0x4c/0x6e
[ 618.658550] [<ffffffff810748a6>] warn_slowpath_common+0x86/0xc0
[ 618.658554] [<ffffffff81074935>] warn_slowpath_fmt+0x55/0x70
[ 618.658568] [<ffffffffa0119ccf>] check_crtc_state+0x8df/0xf80 [i915]
[ 618.658578] [<ffffffffa00064ba>] ? drm_calc_vbltimestamp_from_scanoutpos+0x17a/0x330 [drm]
[ 618.658597] [<ffffffffa012c746>] intel_modeset_check_state+0x216/0xb50 [i915]
[ 618.658612] [<ffffffffa0126d5c>] ? __intel_set_mode+0x92c/0xb60 [i915]
[ 618.658627] [<ffffffffa012dd87>] intel_crtc_set_config+0x4c7/0x580 [i915]
[ 618.658639] [<ffffffffa000f9d6>] drm_mode_set_config_internal+0x66/0x100 [drm]
[ 618.658650] [<ffffffffa00147e9>] drm_mode_setcrtc+0x3e9/0x500 [drm]
[ 618.658658] [<ffffffffa0005575>] drm_ioctl+0x125/0x610 [drm]
[ 618.658666] [<ffffffffa0014400>] ? drm_mode_setplane+0x1b0/0x1b0 [drm]
[ 618.658671] [<ffffffff811e2b65>] do_vfs_ioctl+0x295/0x480
[ 618.658677] [<ffffffff811ecc67>] ? __fget+0x77/0xb0
[ 618.658680] [<ffffffff811e2dc9>] SyS_ioctl+0x79/0x90
[ 618.658684] [<ffffffff8108301e>] ? SyS_rt_sigprocmask+0x8e/0xc0
[ 618.658688] [<ffffffff8157626e>] entry_SYSCALL_64_fastpath+0x12/0x71
[ 618.658691] ---[ end trace c3d0f2d3666ee3fd ]---Since it shows that bug on successful rotations too, I'm not sure how related it is to the problem.
The strangest bit is that, if I manually rotate the screen, say, by running:
xrandr -o invertedthen everything starts working fine afterwards.
So I'm really at a loss right now, because I don't know where's the bug, whom should I talk to, and most importantly, why does it "just work" in Fedora 23.
Does anyone have any idea?
Last edited by vladimiroltean (2015-11-20 23:56:48)
Offline