ublue-os / bluefin

The next generation Linux workstation, designed for reliability, performance, and sustainability.
https://projectbluefin.io
Apache License 2.0
1.25k stars 163 forks source link

Screen orientation auto-rotate not working since upgrading to DX 41 stable (SELinux denying iio-sensor-proxy access to accelerometer) #1952

Open jleonardfl opened 1 day ago

jleonardfl commented 1 day ago

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

No staged image present
Current booted state is native ostree
Current rollback state is native ostree

Output of groups

john wheel

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

❯ rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.service: last run failed
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx:stable
                   Digest: sha256:bbead96c89e810857dadd0654e6580d3f69533a93b586f4c04f55dd6e26d6dfb
                  Version: 41.20241117.3 (2024-11-17T15:49:59Z)
          LayeredPackages: mullvad-vpn
❯ journalctl -b | grep iio-sensor-proxy
Nov 20 02:24:07 krillin systemd[1]: Starting iio-sensor-proxy.service - IIO Sensor Proxy service...
Nov 20 02:24:07 krillin systemd[1]: Started iio-sensor-proxy.service - IIO Sensor Proxy service.
Nov 20 02:24:07 krillin audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=iio-sensor-proxy comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not open for write '/sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_accel_x_en'
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not enable sensor /sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_accel_x_en
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not open for write '/sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_accel_z_en'
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not enable sensor /sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_accel_z_en
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not open for write '/sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_timestamp_en'
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not enable sensor /sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_timestamp_en
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not open for write '/sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_accel_y_en'
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not enable sensor /sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_accel_y_en
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Failed to enable any sensors for device '/sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0'
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not open for write '/sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_accel_x_en'
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not enable sensor /sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_accel_x_en
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not open for write '/sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_accel_z_en'
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not enable sensor /sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_accel_z_en
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not open for write '/sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_timestamp_en'
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not enable sensor /sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_timestamp_en
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not open for write '/sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_accel_y_en'
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not enable sensor /sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_accel_y_en
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Failed to enable any sensors for device '/sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0'
Nov 20 02:24:07 krillin iio-sensor-proxy[1818]: ** (iio-sensor-proxy:1818): WARNING **: 02:24:07.524: Could not open for write '/sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/buffer/enable'
Nov 20 02:24:07 krillin systemd[1]: iio-sensor-proxy.service: Deactivated successfully.
Nov 20 02:24:07 krillin audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=iio-sensor-proxy comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
❯ ls -l /sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_accel_x_en
-rw-r--r--. 1 root root 4096 Nov 20 02:24 /sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0005/HID-SENSOR-200073.19.auto/iio:device0/scan_elements/in_accel_x_en
❯ sudo ausearch -m avc -c iio-sensor-prox -ts boot
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:152): avc:  denied  { write } for  pid=1818 comm="iio-sensor-prox" name="in_accel_x_en" dev="sysfs" ino=61055 scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:153): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:154): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:155): avc:  denied  { write } for  pid=1818 comm="iio-sensor-prox" name="in_accel_z_en" dev="sysfs" ino=61047 scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:156): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:157): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:158): avc:  denied  { write } for  pid=1818 comm="iio-sensor-prox" name="in_timestamp_en" dev="sysfs" ino=61044 scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:159): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:160): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:161): avc:  denied  { write } for  pid=1818 comm="iio-sensor-prox" name="in_accel_y_en" dev="sysfs" ino=61052 scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:162): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:163): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:164): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:165): avc:  denied  { write } for  pid=1818 comm="iio-sensor-prox" name="in_accel_x_en" dev="sysfs" ino=61055 scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:166): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:167): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:168): avc:  denied  { write } for  pid=1818 comm="iio-sensor-prox" name="in_accel_z_en" dev="sysfs" ino=61047 scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:169): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:170): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:171): avc:  denied  { write } for  pid=1818 comm="iio-sensor-prox" name="in_timestamp_en" dev="sysfs" ino=61044 scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:172): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:173): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:174): avc:  denied  { write } for  pid=1818 comm="iio-sensor-prox" name="in_accel_y_en" dev="sysfs" ino=61052 scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:175): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:176): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:177): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:178): avc:  denied  { write } for  pid=1818 comm="iio-sensor-prox" name="buffer" dev="sysfs" ino=61035 scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:179): avc:  denied  { write } for  pid=1818 comm="iio-sensor-prox" name="enable" dev="sysfs" ino=61041 scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:180): avc:  denied  { create } for  pid=1818 comm="iio-sensor-prox" scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=unix_dgram_socket permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:181): avc:  denied  { write } for  pid=1818 comm="iio-sensor-prox" name="trigger" dev="sysfs" ino=61067 scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir permissive=0
----
time->Wed Nov 20 02:24:07 2024
type=AVC msg=audit(1732087447.523:182): avc:  denied  { write } for  pid=1818 comm="iio-sensor-prox" name="current_trigger" dev="sysfs" ino=61068 scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0