After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763751 - orientation: Display orientation lags behind device orientation when it changes quickly
orientation: Display orientation lags behind device orientation when it chang...
Status: RESOLVED OBSOLETE
Product: gnome-settings-daemon
Classification: Core
Component: plugins
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2016-03-16 12:47 UTC by Máirín Duffy
Modified: 2019-03-20 11:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot of gnome-shell menu on thinkpad yoga s1 (3.51 KB, image/png)
2016-03-16 13:08 UTC, Máirín Duffy
Details

Description Máirín Duffy 2016-03-16 12:47:07 UTC
I have a Thinkpad Yoga S1. I updated to Fedora 24 last week. My laptop screen now seems to rotate randomly, I think it's too sensitive. I get up and walk away to get a coffee and come back and the screen is rotated perpendicular to where it should be. The pressure of my fingers hitting the keyboard, or if I cough, or fidget in my seat all seem to trigger it randomly as well. 

Going to the menu and rotating it back is difficult because it changes the direction of the mouse.

I can't find any menu or settings panel to modify this behavior; I would really prefer just to turn auto rotate off and only have it rotate when I opt into it rotating.

Is there any way to turn this feature off?

Can I provide any useful diagnostic information about the laptop to help with its excessive sensitivity?
Comment 1 Debarshi Ray 2016-03-16 12:54:15 UTC
Isn't it possible to lock orientation from the gnome-shell menu? ie. a button next to the settings, screen lock and power off buttons. Or is the button not there on your laptop?

(Even though this bug is assigned to me, I haven't touched this code. Hence the doubt.)
Comment 2 Máirín Duffy 2016-03-16 13:07:18 UTC
Hi Debarshi -

The buttons I have available in the gnome-shell menu are as follows, from left to right:

wrench/screwdriver - brings up control-panel / system settings

rotation button - rotates the display

lock icon - turns on the screensaver / screenlock (does not lock display rotation, locks screen and pulls up login screen)

power off button - brings up poweroff / reboot menu

There is no button to lock orientation that I can see.
Comment 3 Máirín Duffy 2016-03-16 13:08:19 UTC
Created attachment 324097 [details]
screenshot of gnome-shell menu on thinkpad yoga s1
Comment 4 Bastien Nocera 2016-03-16 13:11:57 UTC
(In reply to Máirín Duffy from comment #2)
<snip>
> rotation button - rotates the display

That's not "rotate display", that's the orientation lock.
Comment 5 Bastien Nocera 2016-03-16 13:15:04 UTC
What's the output of:
gdbus introspect --system --dest net.hadess.SensorProxy --object-path /net/hadess/SensorProxy
when the rotation happens?
Comment 6 Máirín Duffy 2016-03-16 13:24:20 UTC
Huh, that's weird. So if I press that button when the screen is rotated perpendicular, it rotates it back to normal.

But when the screen is normal, the icon does change to a lock. 

So, I'd like to be able to explicitly rotate the screen to perpendicular, it seems that is not possible since the button changes to a lock orientation functionality when it's in the normal orientation?

Here's the output of that command when it's rotated wrong:

[duffy@pandarocket ~]$ gdbus introspect --system --dest net.hadess.SensorProxy --object-path /net/hadess/SensorProxy
node /net/hadess/SensorProxy {
  interface org.freedesktop.DBus.Properties {
    methods:
      Get(in  s interface_name,
          in  s property_name,
          out v value);
      GetAll(in  s interface_name,
             out a{sv} properties);
      Set(in  s interface_name,
          in  s property_name,
          in  v value);
    signals:
      PropertiesChanged(s interface_name,
                        a{sv} changed_properties,
                        as invalidated_properties);
    properties:
  };
  interface org.freedesktop.DBus.Introspectable {
    methods:
      Introspect(out s xml_data);
    signals:
    properties:
  };
  interface org.freedesktop.DBus.Peer {
    methods:
      Ping();
      GetMachineId(out s machine_uuid);
    signals:
    properties:
  };
  interface net.hadess.SensorProxy {
    methods:
      ClaimAccelerometer();
      ReleaseAccelerometer();
      ClaimLight();
      ReleaseLight();
    signals:
    properties:
      readonly b HasAccelerometer = true;
      readonly s AccelerometerOrientation = 'normal';
      readonly b HasAmbientLight = true;
      readonly s LightLevelUnit = 'lux';
      readonly d LightLevel = 23.0;
  };
  node Compass {
  };
};



When I rotated it to run that command, the button turned into a lock orientation button and I was unable to get the screen to go into the correct orientation. I had to press the button over and over and jiggle the laptop to get it to go back to the right orientation.
Comment 7 Bastien Nocera 2016-03-16 13:54:59 UTC
(In reply to Máirín Duffy from comment #6)
> Huh, that's weird. So if I press that button when the screen is rotated
> perpendicular, it rotates it back to normal.

Because you're turning off the lock maybe?

> But when the screen is normal, the icon does change to a lock. 

That makes no sense. The button is a toggle setting, it doesn't know what the rotation is, or cares.

> So, I'd like to be able to explicitly rotate the screen to perpendicular, it
> seems that is not possible since the button changes to a lock orientation
> functionality when it's in the normal orientation?

We don't change the rotation when the screen is locked. So you'd rotate it, lock the orientation, and it shouldn't move.

<snip>
> Here's the output of that command when it's rotated wrong:
> 
>       readonly b HasAccelerometer = true;
>       readonly s AccelerometerOrientation = 'normal';

That smells of badly oriented accelerometer inside the machine, which is fixable, but in iio-sensor-proxy, not here.

> When I rotated it to run that command, the button turned into a lock
> orientation button and I was unable to get the screen to go into the correct
> orientation. I had to press the button over and over and jiggle the laptop
> to get it to go back to the right orientation.

I don't know what pressing the button over and over would have done, half the time you were wiggling it, the rotation wouldn't have changed.

In short, rotate the screen so that the desktop is in the orientation you expect, click the orientation lock button, reopen the menu and double-check that there's a little padlock on the icon, don't click it again.

If it changes orientation again, there's a bug, but that would be very suprising as I haven't seen that problem on a number of tablets/convertibles I tested.

Now. Put the device in a few positions, and attach the output of the gdbus command mentioned above:
- opened laptop
- inverted V (tent mode in Lenovo speak)
- opened like a laptop, but on its right side
http://www.gettyimages.fr/detail/photo/young-woman-lying-with-a-laptop-on-its-side-photo/92866045

See also https://bugzilla.gnome.org/show_bug.cgi?id=741481
(which might or might not be enough to clear that confusion about the button)

If in doubt about the value of the lock, run:
gsettings get org.gnome.settings-daemon.peripherals.touchscreen orientation-lock
Comment 8 Máirín Duffy 2016-03-16 14:15:04 UTC
normal opened laptop output
===========================

[duffy@pandarocket ~]$ gdbus introspect --system --dest net.hadess.SensorProxy --object-path /net/hadess/SensorProxy
node /net/hadess/SensorProxy {
  interface org.freedesktop.DBus.Properties {
    methods:
      Get(in  s interface_name,
          in  s property_name,
          out v value);
      GetAll(in  s interface_name,
             out a{sv} properties);
      Set(in  s interface_name,
          in  s property_name,
          in  v value);
    signals:
      PropertiesChanged(s interface_name,
                        a{sv} changed_properties,
                        as invalidated_properties);
    properties:
  };
  interface org.freedesktop.DBus.Introspectable {
    methods:
      Introspect(out s xml_data);
    signals:
    properties:
  };
  interface org.freedesktop.DBus.Peer {
    methods:
      Ping();
      GetMachineId(out s machine_uuid);
    signals:
    properties:
  };
  interface net.hadess.SensorProxy {
    methods:
      ClaimAccelerometer();
      ReleaseAccelerometer();
      ClaimLight();
      ReleaseLight();
    signals:
    properties:
      readonly b HasAccelerometer = true;
      readonly s AccelerometerOrientation = 'normal';
      readonly b HasAmbientLight = true;
      readonly s LightLevelUnit = 'lux';
      readonly d LightLevel = 18.0;
  };
  node Compass {
  };
};
[duffy@pandarocket ~]$ 





inverted v output
=================

[duffy@pandarocket ~]$ sleep 10; gdbus introspect --system --dest net.hadess.SensorProxy --object-path /net/hadess/SensorProxy
node /net/hadess/SensorProxy {
  interface org.freedesktop.DBus.Properties {
    methods:
      Get(in  s interface_name,
          in  s property_name,
          out v value);
      GetAll(in  s interface_name,
             out a{sv} properties);
      Set(in  s interface_name,
          in  s property_name,
          in  v value);
    signals:
      PropertiesChanged(s interface_name,
                        a{sv} changed_properties,
                        as invalidated_properties);
    properties:
  };
  interface org.freedesktop.DBus.Introspectable {
    methods:
      Introspect(out s xml_data);
    signals:
    properties:
  };
  interface org.freedesktop.DBus.Peer {
    methods:
      Ping();
      GetMachineId(out s machine_uuid);
    signals:
    properties:
  };
  interface net.hadess.SensorProxy {
    methods:
      ClaimAccelerometer();
      ReleaseAccelerometer();
      ClaimLight();
      ReleaseLight();
    signals:
    properties:
      readonly b HasAccelerometer = true;
      readonly s AccelerometerOrientation = 'bottom-up';
      readonly b HasAmbientLight = true;
      readonly s LightLevelUnit = 'lux';
      readonly d LightLevel = 23.0;
  };
  node Compass {
  };
};
[duffy@pandarocket ~]$ 





right side output
=================

[duffy@pandarocket ~]$ sleep 10; gdbus introspect --system --dest net.hadess.SensorProxy --object-path /net/hadess/SensorProxy
node /net/hadess/SensorProxy {
  interface org.freedesktop.DBus.Properties {
    methods:
      Get(in  s interface_name,
          in  s property_name,
          out v value);
      GetAll(in  s interface_name,
             out a{sv} properties);
      Set(in  s interface_name,
          in  s property_name,
          in  v value);
    signals:
      PropertiesChanged(s interface_name,
                        a{sv} changed_properties,
                        as invalidated_properties);
    properties:
  };
  interface org.freedesktop.DBus.Introspectable {
    methods:
      Introspect(out s xml_data);
    signals:
    properties:
  };
  interface org.freedesktop.DBus.Peer {
    methods:
      Ping();
      GetMachineId(out s machine_uuid);
    signals:
    properties:
  };
  interface net.hadess.SensorProxy {
    methods:
      ClaimAccelerometer();
      ReleaseAccelerometer();
      ClaimLight();
      ReleaseLight();
    signals:
    properties:
      readonly b HasAccelerometer = true;
      readonly s AccelerometerOrientation = 'left-up';
      readonly b HasAmbientLight = true;
      readonly s LightLevelUnit = 'lux';
      readonly d LightLevel = 8.0;
  };
  node Compass {
  };
};
[duffy@pandarocket ~]$
Comment 9 Máirín Duffy 2016-03-16 14:19:15 UTC
I just triggered it accidentally to rotate incorrectly again; it rotated perpendicular while the laptop was open in normal / standard position; i ran the script again and this was the output;

gdbus introspect --system --dest net.hadess.SensorProxy --object-path /net/hadess/SensorProxy


node /net/hadess/SensorProxy {
  interface org.freedesktop.DBus.Properties {
    methods:
      Get(in  s interface_name,
          in  s property_name,
          out v value);
      GetAll(in  s interface_name,
             out a{sv} properties);
      Set(in  s interface_name,
          in  s property_name,
          in  v value);
    signals:
      PropertiesChanged(s interface_name,
                        a{sv} changed_properties,
                        as invalidated_properties);
    properties:
  };
  interface org.freedesktop.DBus.Introspectable {
    methods:
      Introspect(out s xml_data);
    signals:
    properties:
  };
  interface org.freedesktop.DBus.Peer {
    methods:
      Ping();
      GetMachineId(out s machine_uuid);
    signals:
    properties:
  };
  interface net.hadess.SensorProxy {
    methods:
      ClaimAccelerometer();
      ReleaseAccelerometer();
      ClaimLight();
      ReleaseLight();
    signals:
    properties:
      readonly b HasAccelerometer = true;
      readonly s AccelerometerOrientation = 'normal';
      readonly b HasAmbientLight = true;
      readonly s LightLevelUnit = 'lux';
      readonly d LightLevel = 21.0;
  };
  node Compass {
  };
};
Comment 10 Bastien Nocera 2016-03-16 14:28:33 UTC
The computed AccelerometerOrientation looks correct in comment 8.

Comment 9 seems to point to the orientation changing too quickly for the XRandR calls to catch up (changing the orientation takes a while, and we don't queue the display orientation changes).

That last bit would explain why the display and the accelerometer get out of sync.

But that doesn't explain why it gets the wrong value for a short period of time. For that, you'll need to file a bug at:
https://github.com/hadess/iio-sensor-proxy/issues
with the debug output requested in:
https://github.com/hadess/iio-sensor-proxy/blob/master/README.md
Comment 11 GNOME Infrastructure Team 2019-03-20 11:33:22 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/291.