From: bugzilla-daemon@kernel.org
To: linux-iio@vger.kernel.org
Subject: [Bug 219890] illuminance sensor is jittering between correct value and 0.03lux
Date: Fri, 21 Mar 2025 06:04:43 +0000 [thread overview]
Message-ID: <bug-219890-217253-nAEgNmgUD7@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-219890-217253@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=219890
--- Comment #28 from Fred (wysiwyg81@rbox.co) ---
Hello,
After test as suggested here :
https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/407#note_2828458
it seems buffer work better than polling !
Disable polling :
❯ cat /usr/lib/udev/rules.d/80-iio-sensor-proxy.rules
# iio-sensor-proxy
# IIO sensor to D-Bus proxy
ACTION=="remove", GOTO="iio_sensor_proxy_end"
# Set the sensor type for all the types we recognise
SUBSYSTEM=="hwmon", TEST=="light", ENV{IIO_SENSOR_PROXY_TYPE}+="hwmon-als"
SUBSYSTEM=="iio", TEST=="in_accel_x_raw", TEST=="in_accel_y_raw",
TEST=="in_accel_z_raw", ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-accel"
SUBSYSTEM=="iio", TEST=="scan_elements/in_accel_x_en",
TEST=="scan_elements/in_accel_y_en", TEST=="scan_elements/in_accel_z_en",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-buffer-accel"
SUBSYSTEM=="iio",
TEST=="scan_elements/in_rot_from_north_magnetic_tilt_comp_en",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-buffer-compass"
#SUBSYSTEM=="iio", TEST=="in_illuminance_input",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-als"
#SUBSYSTEM=="iio", TEST=="in_illuminance0_input",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-als"
#SUBSYSTEM=="iio", TEST=="in_illuminance_clear_raw",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-als"
#SUBSYSTEM=="iio", TEST=="in_illuminance_raw",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-als"
#SUBSYSTEM=="iio", TEST=="in_intensity_clear_raw",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-als"
SUBSYSTEM=="iio", TEST=="scan_elements/in_intensity_both_en",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-buffer-als"
SUBSYSTEM=="iio", TEST=="in_proximity_raw",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-proximity"
SUBSYSTEM=="iio", TEST=="in_proximity0_raw",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-proximity"
SUBSYSTEM=="input", ENV{ID_INPUT_ACCELEROMETER}=="1",
ENV{IIO_SENSOR_PROXY_TYPE}+="input-accel"
ENV{IIO_SENSOR_PROXY_TYPE}=="", GOTO="iio_sensor_proxy_end"
# We got here because we have a sensor type, which means we need the service
TAG+="systemd", ENV{SYSTEMD_WANTS}+="iio-sensor-proxy.service"
LABEL="iio_sensor_proxy_end"
~
❯ monitor-sensor --light
Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has ambient light sensor (value: 234,999995, unit: lux)
Light changed: 163,999996 (lux)
Light changed: 133,999997 (lux)
Light changed: 237,999995 (lux)
Light changed: 207,999995 (lux)
Light changed: 133,999997 (lux)
Light changed: 228,999995 (lux)
Light changed: 231,999995 (lux)
Light changed: 229,999995 (lux)
Light changed: 133,999997 (lux)
Light changed: 225,999995 (lux)
Light changed: 229,999995 (lux)
Light changed: 173,999996 (lux)
Light changed: 237,999995 (lux)
Light changed: 188,999996 (lux)
Light changed: 137,999997 (lux)
Light changed: 227,999995 (lux)
Disabling buffer:
cat /usr/lib/udev/rules.d/80-iio-sensor-proxy.rules
# iio-sensor-proxy
# IIO sensor to D-Bus proxy
ACTION=="remove", GOTO="iio_sensor_proxy_end"
# Set the sensor type for all the types we recognise
SUBSYSTEM=="hwmon", TEST=="light", ENV{IIO_SENSOR_PROXY_TYPE}+="hwmon-als"
SUBSYSTEM=="iio", TEST=="in_accel_x_raw", TEST=="in_accel_y_raw",
TEST=="in_accel_z_raw", ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-accel"
SUBSYSTEM=="iio", TEST=="scan_elements/in_accel_x_en",
TEST=="scan_elements/in_accel_y_en", TEST=="scan_elements/in_accel_z_en",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-buffer-accel"
SUBSYSTEM=="iio",
TEST=="scan_elements/in_rot_from_north_magnetic_tilt_comp_en",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-buffer-compass"
SUBSYSTEM=="iio", TEST=="in_illuminance_input",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-als"
SUBSYSTEM=="iio", TEST=="in_illuminance0_input",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-als"
SUBSYSTEM=="iio", TEST=="in_illuminance_clear_raw",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-als"
SUBSYSTEM=="iio", TEST=="in_illuminance_raw",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-als"
SUBSYSTEM=="iio", TEST=="in_intensity_clear_raw",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-als"
#SUBSYSTEM=="iio", TEST=="scan_elements/in_intensity_both_en",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-buffer-als"
SUBSYSTEM=="iio", TEST=="in_proximity_raw",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-proximity"
SUBSYSTEM=="iio", TEST=="in_proximity0_raw",
ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-proximity"
SUBSYSTEM=="input", ENV{ID_INPUT_ACCELEROMETER}=="1",
ENV{IIO_SENSOR_PROXY_TYPE}+="input-accel"
ENV{IIO_SENSOR_PROXY_TYPE}=="", GOTO="iio_sensor_proxy_end"
# We got here because we have a sensor type, which means we need the service
TAG+="systemd", ENV{SYSTEMD_WANTS}+="iio-sensor-proxy.service"
LABEL="iio_sensor_proxy_end"
~
❯ monitor-sensor --light
Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has ambient light sensor (value: 263,000000, unit: lux)
Light changed: 203,000000 (lux)
Light changed: 148,000000 (lux)
Light changed: 0,030000 (lux)
Light changed: 230,000000 (lux)
Light changed: 237,000000 (lux)
Light changed: 172,000000 (lux)
Light changed: 143,000000 (lux)
Light changed: 0,030000 (lux)
Light changed: 233,000000 (lux)
Light changed: 0,030000 (lux)
Light changed: 237,000000 (lux)
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2025-03-21 6:04 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 9:38 [Bug 219890] New: illuminance sensor is jittering between correct value and 0.03lux bugzilla-daemon
2025-03-17 10:25 ` [Bug 219890] " bugzilla-daemon
2025-03-17 12:14 ` [Bug 219890] New: " Jonathan Cameron
2025-03-17 12:15 ` [Bug 219890] " bugzilla-daemon
2025-03-17 13:02 ` bugzilla-daemon
2025-03-17 18:57 ` Jonathan Cameron
2025-03-17 13:37 ` bugzilla-daemon
2025-03-17 18:57 ` bugzilla-daemon
2025-03-17 22:13 ` bugzilla-daemon
2025-03-18 8:05 ` bugzilla-daemon
2025-03-18 8:06 ` bugzilla-daemon
2025-03-18 11:56 ` bugzilla-daemon
2025-03-18 11:57 ` bugzilla-daemon
2025-03-18 17:47 ` bugzilla-daemon
2025-03-18 18:25 ` bugzilla-daemon
2025-03-18 18:27 ` bugzilla-daemon
2025-03-18 18:31 ` bugzilla-daemon
2025-03-18 18:36 ` bugzilla-daemon
2025-03-19 0:51 ` bugzilla-daemon
2025-03-19 0:54 ` bugzilla-daemon
2025-03-19 8:14 ` bugzilla-daemon
2025-03-19 13:11 ` bugzilla-daemon
2025-03-19 13:17 ` bugzilla-daemon
2025-03-19 13:19 ` bugzilla-daemon
2025-03-19 19:25 ` bugzilla-daemon
2025-03-19 19:48 ` bugzilla-daemon
2025-03-19 20:59 ` bugzilla-daemon
2025-03-19 23:19 ` bugzilla-daemon
2025-03-20 17:27 ` bugzilla-daemon
2025-03-20 17:46 ` bugzilla-daemon
2025-03-20 18:08 ` bugzilla-daemon
2025-03-21 6:04 ` bugzilla-daemon [this message]
2025-03-21 16:36 ` bugzilla-daemon
2025-03-22 9:38 ` bugzilla-daemon
2025-03-22 15:11 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-219890-217253-nAEgNmgUD7@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.