-
-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Screen orientation auto-rotate not working since upgrading to DX 41 stable (SELinux denying iio-sensor-proxy access to accelerometer) #1952
Comments
Same issue on my yoga 2 in 1 and same errors in my log. |
Can you provide the SElabel on the binary being used? |
|
I have the same output for this command. For what it's worth, this is also on a lenovo 2-in-1. |
Seems this is related to 2 issues in Fedora and SELinux policies for iio-sensor-proxy https://bugzilla.redhat.com/show_bug.cgi?id=231976 https://bugzilla.redhat.com/show_bug.cgi?id=2324181 |
I managed to get this to work on my Lenovo yoga x1 2nd gen by making use of the information provided in https://bugzilla.redhat.com/show_bug.cgi?id=2319766 on the second work around but I doesn't work for me if I just use the example commands. I needed to adjust the TE file a little bit and generate a PP file. If I just run sudo grep iio-sensor /var/log/audit/audit.log | grep denied | audit2allow -M iio_sensor it won't be enough because this generates the PP file based on iio-sensor-proxy activity does far but I think iio-sensor-proxy aborts in the middle so not all the events that it will generated will be captured in the audit log. My TE iio_sensor.te file that allows this to work is: module iio_sensor 1.0; require { #============= iiosensorproxy_t ============== which if I understand correctly gives permission to iio sensor proxy to do what it needs to do to detect the sensor data. If I just run: and then I run the following commands to transform the te file into a pp file: and install it with you would need to restart iio-sensor-proxy service to check if this has worked by doing if this detect orientation changes you should be good to go but on KDE you need to have enabled the touch mode otherwise KDE will ignore orientation changes. I guess we can wait for Fedora team to fix this, but I'm not sure if it will work since I'm not sure if SE policies database is refreshed with each new image, I have no idea how this works. hope you find this useful, if this still doesn't work for you probably some permissions still missing, check the /var/log/audit/audit.log file for any iio_sensor denied events, there shouldn't be any but I have only tested this on my laptop so not sure if it will work for all 2-in-1 laptops. |
Describe the bug
When laptop is folded to tablet mode, rotating the device does not cause display orientation to change.
What did you expect to happen?
When laptop is in tablet mode, turning the device 90 degrees would cause the screen orientation to adjust to the device orientation. This was how it behaved before I upgraded to DX 41 + GNOME 47.
Output of
bootc status
Output of
groups
Extra information or context
SELinux seems to be stopping iio-sensor-proxy from getting write access to the accelerometer. This behavior (and the lack of working auto-rotate) is new since i rebased from DX 40 gts to DX 41 stable. Filesystem permissions for the sensors all seem to be -rw-r--r--.
GNOME seems to recognize when the device is folded back, since touching a text input box brings up the keyboard when folded as a tablet, but not when folded as a laptop.
iio-sensor-proxy version:
iio-sensor-proxy-3.5-5.fc41.x86_64
The text was updated successfully, but these errors were encountered: