From 20c41c1126c1502fb20cc0bca19c5b6191dacf9f Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 11 Aug 2017 19:41:19 +0200 Subject: [PATCH] Revert "main: Add artificial delay before starting daemon" This reverts commit 5468452f7a72566d2e6ddc44f9396d3d088fa9fb as the problem was root-caused and fixed in the upstream kernel. Please see README for the fix' details. Closes: #116 --- README.md | 16 +++++++--------- src/iio-sensor-proxy.c | 2 -- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 4566eff..cc0c4ea 100644 --- a/README.md +++ b/README.md @@ -89,16 +89,14 @@ If your device does not contain a compass, you can run tests with: Known problems -------------- -Every Linux kernel from 4.3 up to the latest versions (4.12-rc3 at the time of writing) have a bug that -make iio-sensor-proxy fail to see any events coming from sensors until the sensor is unplugged and replugged -or suspended and resumed. +Every Linux kernel from 4.3 up to version 4.12 had a bug that made +made iio-sensor-proxy fail to see any events coming from sensors until the +sensor was power-cycled (unplugged and replugged, or suspended and resumed). -A work-around for this problem was added in [this commit](https://github.com/hadess/iio-sensor-proxy/commit/5468452f7a72566d2e6ddc44f9396d3d088fa9fb) -to minimise the impact of this kernel bug. The bug has been reported but still not root-caused. It's -a race condition and hard to "not reproduce" with certainty, meaning a number of possible of unaffected -kernels work because of different timings. - -See also [this linux-iio thread](https://www.spinics.net/lists/linux-iio/msg29983.html). +The bug was finally fixed in [this commit](https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?h=fixes-togreg&id=eafad73ed3851707fa6e3124a255fc049ff9545d) +in the upstream kernel and backported to stable releases. If you experience +unresponsive sensors, ask your distributor to make sure this patch was +applied to the version you're using. References ---------- diff --git a/src/iio-sensor-proxy.c b/src/iio-sensor-proxy.c index e4765de..e6add62 100644 --- a/src/iio-sensor-proxy.c +++ b/src/iio-sensor-proxy.c @@ -795,8 +795,6 @@ int main (int argc, char **argv) SensorData *data; int ret = 0; - g_usleep (G_USEC_PER_SEC * 3); - data = g_new0 (SensorData, 1); data->previous_orientation = ORIENTATION_UNDEFINED; data->uses_lux = TRUE;