diff -Nru iio-sensor-proxy-3.3/debian/changelog iio-sensor-proxy-3.3/debian/changelog --- iio-sensor-proxy-3.3/debian/changelog 2022-03-04 15:19:47.000000000 +0800 +++ iio-sensor-proxy-3.3/debian/changelog 2022-03-18 12:02:27.000000000 +0800 @@ -1,3 +1,12 @@ +iio-sensor-proxy (3.3-0ubuntu6) jammy; urgency=medium + + * d/p/0003-prefer-buffer-driver-to-polling-driver.patch: + Prefer buffer driver to polling driver for ALS + * d/p/0002-force-iio-buffer-als-on-some-dell-models.patch: + Removed in favor of the patch above + + -- Yao Wei (魏銘廷) Fri, 18 Mar 2022 12:02:27 +0800 + iio-sensor-proxy (3.3-0ubuntu5) jammy; urgency=medium * d/p/0002-force-iio-buffer-als-on-some-dell-models.patch: diff -Nru iio-sensor-proxy-3.3/debian/patches/0002-force-iio-buffer-als-on-some-dell-models.patch iio-sensor-proxy-3.3/debian/patches/0002-force-iio-buffer-als-on-some-dell-models.patch --- iio-sensor-proxy-3.3/debian/patches/0002-force-iio-buffer-als-on-some-dell-models.patch 2022-03-04 15:19:47.000000000 +0800 +++ iio-sensor-proxy-3.3/debian/patches/0002-force-iio-buffer-als-on-some-dell-models.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,42 +0,0 @@ -Description: Force IIO_SENSOR_PROXY_TYPE to iio-buffer-als for some Dell models -We are encountering issues, that when enabling some Dell laptops, the readings -from iio-poll-als are unstable, or could freeze on certain value. On these -systems they have ENV{IIO_SENSOR_PROXY_TYPE}="iio-poll-als iio-buffer-als", and -removing iio-poll-als makes reading stable. -. -This adds workaround to the affected Dell laptop models which may equip with -ALS. -Author: Yao Wei -Bug: https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/352 -Bug-Ubuntu: https://bugs.launchpad.net/somerville/+bug/1947955 -Index: iio-sensor-proxy-3.3/data/80-iio-sensor-proxy.rules -=================================================================== ---- iio-sensor-proxy-3.3.orig/data/80-iio-sensor-proxy.rules -+++ iio-sensor-proxy-3.3/data/80-iio-sensor-proxy.rules -@@ -16,6 +16,26 @@ SUBSYSTEM=="iio", TEST=="scan_elements/i - SUBSYSTEM=="iio", TEST=="in_proximity_raw", ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-proximity" - SUBSYSTEM=="input", ENV{ID_INPUT_ACCELEROMETER}=="1", ENV{IIO_SENSOR_PROXY_TYPE}+="input-accel" - -+# Force iio-buffer-als proxy type -+# Dell -+SUBSYSTEM=="iio", ATTR{name}=="als", ATTRS{subsystem_vendor}=="0x1028", ATTRS{subsystem_device}=="0x0b02", ENV{IIO_SENSOR_PROXY_TYPE}="iio-buffer-als" -+SUBSYSTEM=="iio", ATTR{name}=="als", ATTRS{subsystem_vendor}=="0x1028", ATTRS{subsystem_device}=="0x0b04", ENV{IIO_SENSOR_PROXY_TYPE}="iio-buffer-als" -+SUBSYSTEM=="iio", ATTR{name}=="als", ATTRS{subsystem_vendor}=="0x1028", ATTRS{subsystem_device}=="0x0b05", ENV{IIO_SENSOR_PROXY_TYPE}="iio-buffer-als" -+SUBSYSTEM=="iio", ATTR{name}=="als", ATTRS{subsystem_vendor}=="0x1028", ATTRS{subsystem_device}=="0x0b06", ENV{IIO_SENSOR_PROXY_TYPE}="iio-buffer-als" -+SUBSYSTEM=="iio", ATTR{name}=="als", ATTRS{subsystem_vendor}=="0x1028", ATTRS{subsystem_device}=="0x0b07", ENV{IIO_SENSOR_PROXY_TYPE}="iio-buffer-als" -+SUBSYSTEM=="iio", ATTR{name}=="als", ATTRS{subsystem_vendor}=="0x1028", ATTRS{subsystem_device}=="0x0b08", ENV{IIO_SENSOR_PROXY_TYPE}="iio-buffer-als" -+ -+SUBSYSTEM=="iio", ATTR{name}=="als", ATTRS{subsystem_vendor}=="0x1028", ATTRS{subsystem_device}=="0x0b09", ENV{IIO_SENSOR_PROXY_TYPE}="iio-buffer-als" -+SUBSYSTEM=="iio", ATTR{name}=="als", ATTRS{subsystem_vendor}=="0x1028", ATTRS{subsystem_device}=="0x0b0b", ENV{IIO_SENSOR_PROXY_TYPE}="iio-buffer-als" -+SUBSYSTEM=="iio", ATTR{name}=="als", ATTRS{subsystem_vendor}=="0x1028", ATTRS{subsystem_device}=="0x0b0d", ENV{IIO_SENSOR_PROXY_TYPE}="iio-buffer-als" -+ -+SUBSYSTEM=="iio", ATTR{name}=="als", ATTRS{subsystem_vendor}=="0x1028", ATTRS{subsystem_device}=="0x0b0e", ENV{IIO_SENSOR_PROXY_TYPE}="iio-buffer-als" -+SUBSYSTEM=="iio", ATTR{name}=="als", ATTRS{subsystem_vendor}=="0x1028", ATTRS{subsystem_device}=="0x0b0f", ENV{IIO_SENSOR_PROXY_TYPE}="iio-buffer-als" -+SUBSYSTEM=="iio", ATTR{name}=="als", ATTRS{subsystem_vendor}=="0x1028", ATTRS{subsystem_device}=="0x0b10", ENV{IIO_SENSOR_PROXY_TYPE}="iio-buffer-als" -+ -+SUBSYSTEM=="iio", ATTR{name}=="als", ATTRS{subsystem_vendor}=="0x1028", ATTRS{subsystem_device}=="0x0b2a", ENV{IIO_SENSOR_PROXY_TYPE}="iio-buffer-als" -+SUBSYSTEM=="iio", ATTR{name}=="als", ATTRS{subsystem_vendor}=="0x1028", ATTRS{subsystem_device}=="0x0b2b", ENV{IIO_SENSOR_PROXY_TYPE}="iio-buffer-als" -+ - 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 diff -Nru iio-sensor-proxy-3.3/debian/patches/0003-prefer-buffer-driver-to-polling-driver.patch iio-sensor-proxy-3.3/debian/patches/0003-prefer-buffer-driver-to-polling-driver.patch --- iio-sensor-proxy-3.3/debian/patches/0003-prefer-buffer-driver-to-polling-driver.patch 1970-01-01 08:00:00.000000000 +0800 +++ iio-sensor-proxy-3.3/debian/patches/0003-prefer-buffer-driver-to-polling-driver.patch 2022-03-18 12:00:50.000000000 +0800 @@ -0,0 +1,35 @@ +From 716ee37d514db965f9e10b070a3a2ce1c7629e76 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Tue, 15 Mar 2022 10:57:26 +0100 +Subject: [PATCH] main: Prefer buffer driver to polling driver +Origin: upstream, https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/355 + +In c7fb43e0, we added a buffer driver for ambient light sensors, but we +added it to the list of drivers in a way that would favour polling +drivers. Since we started using IIO_SENSOR_PROXY_TYPE to tag devices, +and as those can support multiple drivers, we need to prefer the buffer +driver as it's the one that doesn't require constant monitoring. + +This also fixes operations on some Dell laptops where the polling driver +is completely broken. + +See https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/352 + +--- + src/iio-sensor-proxy.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: iio-sensor-proxy-3.3/src/iio-sensor-proxy.c +=================================================================== +--- iio-sensor-proxy-3.3.orig/src/iio-sensor-proxy.c ++++ iio-sensor-proxy-3.3/src/iio-sensor-proxy.c +@@ -61,8 +61,8 @@ static const SensorDriver * const driver + &iio_buffer_accel, + &iio_poll_accel, + &input_accel, +- &iio_poll_light, + &iio_buffer_light, ++ &iio_poll_light, + &hwmon_light, + &fake_compass, + &fake_light, diff -Nru iio-sensor-proxy-3.3/debian/patches/series iio-sensor-proxy-3.3/debian/patches/series --- iio-sensor-proxy-3.3/debian/patches/series 2022-03-04 15:19:47.000000000 +0800 +++ iio-sensor-proxy-3.3/debian/patches/series 2022-03-18 12:00:42.000000000 +0800 @@ -1,2 +1,2 @@ ubuntu_tests_timeout.patch -0002-force-iio-buffer-als-on-some-dell-models.patch +0003-prefer-buffer-driver-to-polling-driver.patch