2

I have a convertible laptop (HP Envy x360 15-aq015nd) with Gnome.

In the live modus (on a USB, before installing), the automatic rotation worked perfectly. I think it even enabled itself when I folded the keyboard behind the screen, and disabled when folding it back to a 'normal' laptop.

But now that I have installed it to the SSD, the screen isn't rotating anymore, even when manually disabling rotation-lock (from the top-right menu).

I tried monitoring the iio with monitor-sensor...

Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has accelerometer (orientation: undefined)
=== No ambient light sensor

So the sensor is found, but not read.

I found out that I can manually trigger updating the sensor with cat /sys/bus/iio/devices/iio:device0/in_accel_x_raw (or y, or z).

Only when using that command while holding the laptop in another orientation, the screen rotates, and monitor-sensor outputs another line. for example:

Accelerometer orientation changed: right-up

The only way to turn the screen back is rotating the laptop, and cat the raw output again.

Does anyone know what is wrong with my system, or with Gnome?

1

Thanks for your research. I am having the exact same problem with my Dell Latitude 3379. My limited amount of searching yields nothing about configuring sensor updates. I don't really feel like spending the time diving into the kernel, so until some update fixes this, I am just going to run a bash script

#!/bin/sh
while true
do
    cat /sys/bus/iio/devices/iio:device6/in_accel_x_raw
    sleep 1s
done       

(Removing or modifying sleep 1s will make it react more quickly to a change in orientation.)

to trigger updates. I could add it to my startup applications, but I want to remember to check if some update or condition fixes it. (I'm sure you figured this out but I want to leave a trail for the next person).

  • 1
    Yes, thanks for clarifying it to everyone. I've done a comparable thing, but with sleep 1 which may make it more processor and battery friendly – Wilco Verhoef Nov 15 '17 at 10:31
  • @WilcoVerhoef I had forgotten about this post. This issue has mostly gone away for me—I suspect through system updates (Ubuntu 17.10). However, before the fixes, I discovered that this script probably will not work most of the time, as the iio device numbers are reassigned on boot (the accelerometer may be at any iio:device#). A more robust script could probably be created to check the device assignments and only read the proper device, but hopefully the fixes I experienced are sufficient. Can't say that I have rigorously tested it. – nayrangnu Dec 29 '17 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.