Closed miltmobley closed 7 years ago
I did some further research and decided the problem is in the kernel. Apparently, an acpi driver is supposed to get notifications from a hinge device (named 'Lid switch') and use the info to change the display mode. For some reason, it is not telling the display controller to rotate the image.
So it has nothing to do with the intel ish devices you are reading via iio.
I have received a Dell Inspiron 15 2-in-1 laptop that allows the screen to be rotated backwards up to 360 degrees relative to the base. At 360 degrees the laptop is like a tablet, since the keyboard is also disabled. With a rotation more than 180 degrees, the laptop is said to be in 'tent' mode, and can be placed on a table, etc. for viewing. In this mode it is most desirable for the screen to autorotate by 180 degrees. The autorotate feature works on Windows 10.
In my opensuse 42.2 installation running suse kernel 4.4.49-16, iio-sensor-proxy v1.1-1.1 was already installed. I ported the intel-ish-hid drivers from kernel.org snapshot 4.10.1 to the suse source for 4.4.49-16 and built it.
Your monitor-sensor program works, and prints messages when it detects orientation changes. However it does not detect a return to base right side up when the screen is rotated more than 180 degrees from the base. Also the display does not rotate at any time. The laptop has Intel HD graphics chip and drivers.
The desired behavior for this type of laptop would be: If the screen rotation from the base is <= 180 degrees, the orientation should follow the base. If the screen rotation is between 180 and 360 degrees the orientation should follow the screen.
I noticed there is a hidraw device for a hinge sensor in the system. You may have to use it to distinguish the two cases.
I could help with research into solving this problem if you can tell me the name of the gnome app component that receives the message, and also where the screen is rotated. I assume it is done by sending some command to the graphics driver.