From f5552f1b55185dd198e023e55effc849eb7320a6 Mon Sep 17 00:00:00 2001 From: Saya Andy Date: Wed, 9 Sep 2026 10:02:15 +0700 Subject: fix: disable ambient light sensor as it is outputting garbage --- config.sh | 14 +++++--------- .../etc/dconf/db/local.d/00-als | 2 ++ .../etc/dconf/db/local.d/00-power-button | 2 -- .../usr/local/share/selinux/iio-qipcrtr.te | 22 +++++++++++----------- 4 files changed, 18 insertions(+), 22 deletions(-) create mode 100644 root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/db/local.d/00-als delete mode 100644 root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/db/local.d/00-power-button diff --git a/config.sh b/config.sh index d944bb6..f232f48 100755 --- a/config.sh +++ b/config.sh @@ -709,17 +709,13 @@ install -Dm644 /tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system /etc/systemd/system/surface-video-firmware.service systemctl enable surface-video-firmware.service -# Suspend on Snapdragon is still very unstable. This is the reason why -# 'mem_sleep_default=s2idle' is set explicitly in the cmdline as 'deep' mode -# does not function at all. -# Even then, suspending via gnome settings daemon results in hard freeze. -# This is why: -# logind behavior is kept intact with suspend behavior. -# gnome default power button behavior was replaced with 'interactive'. install -Dm644 /tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/logind.conf.d/60-surface-power-key.conf \ /etc/systemd/logind.conf.d/60-surface-power-key.conf -install -Dm644 /tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/db/local.d/00-power-button \ - /etc/dconf/db/local.d/00-power-button + +# Ambient light sensor seems to go nuts after I fixed iio-sensor-proxy. Turning +# it off for now. +install -Dm644 /tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/db/local.d/00-als \ + /etc/dconf/db/local.d/00-als install -Dm644 /tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/profile/user \ /etc/dconf/profile/user diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/db/local.d/00-als b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/db/local.d/00-als new file mode 100644 index 0000000..ae14928 --- /dev/null +++ b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/db/local.d/00-als @@ -0,0 +1,2 @@ +[org/gnome/settings-daemon/plugins/power] +ambient-enabled=false diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/db/local.d/00-power-button b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/db/local.d/00-power-button deleted file mode 100644 index 1b69eab..0000000 --- a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/db/local.d/00-power-button +++ /dev/null @@ -1,2 +0,0 @@ -[org/gnome/settings-daemon/plugins/power] -power-button-action='interactive' diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/local/share/selinux/iio-qipcrtr.te b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/local/share/selinux/iio-qipcrtr.te index d92dc21..b3be8fb 100644 --- a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/local/share/selinux/iio-qipcrtr.te +++ b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/local/share/selinux/iio-qipcrtr.te @@ -1,16 +1,16 @@ module iio-qipcrtr 1.0; -// Fedora's policy grants iiosensorproxy_t no qipcrtr_socket permissions at -// all: the class exists but nothing allows it, because upstream -// iio-sensor-proxy talks to sensors over IIO and never needed QRTR. The SSC -// backend libssc brings in here reaches the Qualcomm Sensor Core over the -// QRTR bus (libssc probes AF_QIPCRTR first; the fastrpc/hexagonrpcd path is -// what actually serves this board, but the probe alone gets the daemon -// killed by "QRTR bus unavailable" + "No sensors" without these perms). -// -// Hand-written rather than audit2allow'd per-incident: create/bind/... is -// the full client lifecycle, so a policy reload or libssc update cannot -// surface a new denied perm one at a time. +# Fedora's policy grants iiosensorproxy_t no qipcrtr_socket permissions at +# all: the class exists but nothing allows it, because upstream +# iio-sensor-proxy talks to sensors over IIO and never needed QRTR. The SSC +# backend libssc brings in here reaches the Qualcomm Sensor Core over the +# QRTR bus (libssc probes AF_QIPCRTR first; the fastrpc/hexagonrpcd path is +# what actually serves this board, but the probe alone gets the daemon +# killed by "QRTR bus unavailable" + "No sensors" without these perms). +# +# Hand-written rather than audit2allow'd per-incident: create/bind/... is +# the full client lifecycle, so a policy reload or libssc update cannot +# surface a new denied perm one at a time. require { type iiosensorproxy_t; class qipcrtr_socket { create bind connect read write getattr setattr getopt setopt shutdown }; -- cgit v1.3.1+17