[systemd-devel] Bad accelerometer values cause incorrect screen rotation

Bastien Nocera hadess at hadess.net
Thu Sep 5 10:07:15 UTC 2019


Hey,

On Thu, 2019-09-05 at 17:05 +0800, Daniel Drake wrote:
> Hi,
> 
> Over the years we've seen a bunch of reports of systems that
> automatically rotate the display to some incorrect orientation, based
> on trusting some accelerometer data values which were not interpreted
> correctly. I have another affected system in hand here.

I've read through this, and I'm happy blacklisting the hp_accel driver
in code. For the other devices, I'd rather leave it as-is.

> When this unfortunate situation happens, the user experience is
> really
> terrible. Except for workarounds that involve going to the command
> line, the best workaround under GNOME seems to be to physically
> rotate
> the device into a position that causes the screen orientation to be
> normal/unrotated, then while maintaining and holding the device in
> that highly awkward position with one hand, try your very best to
> manipulate the mouse cursor with your other hand and navigate the
> menu
> to enable Orientation Lock.

FYI, Windows+O in GNOME to toggle the orientation lock setting.

> Ideally I think we should disable the automatic rotation on all
> devices except for:
>  - Laptops that have detachable screens (effectively converting them
> into a tablet) with the accelerometer mounted to the screen
>  - Convertible laptops where the screen can be physically rotated
> around and folded down to sit on top of the keyboard, with the
> accelerometer mounted to the screen
> - All in One PCs
> - Tablets
> - Smartphones

Where would we get this information? From the same DSDT that doesn't
have enough information? That doesn't sound like a good idea.

If we disable iio-sensor-proxy's functionality by default, I'll be sent
more bug reports than I already receive from folks where the sensor
drivers aren't working or not compiled in, so that's a big no-no from
me.

Also, it would be pretty trivial changing the default GNOME
configuration to have the accelerometer pegged to the default
orientation.

Cheers



More information about the systemd-devel mailing list