temp/iio-sensor-proxy: Support set_polling
In order to reduce the power usage when using sensors let's implement set_polling as described [1]. The patch was linked in the MR that adds libssc support [2] and is from [3].
An alternative implementation is also available [4], but that seems to have GLib threading issues [5].
1: #2455 (comment 453587) 2: https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/381#note_2567822 3: https://gitlab.freedesktop.org/verdre/iio-sensor-proxy/-/commit/7a7a5f3ea04ff4c134f3dbbbc005b8c26d0af300 4: https://gitlab.freedesktop.org/verdre/iio-sensor-proxy/-/commit/74a5860474b6e79cd6e3be13d1ff8dd9cd810b8b 5: https://mastodon.social/@verdre/113390737074625004
Hopefully fixes: #2455 (closed)
Merge request reports
Activity
- Resolved by Alistair Francis
This seems to be an improvement for me. At least the
iio-sensor-proxy
process is now a lot lower down in top.I don't think the C code is production ready, but at least it's something
Edited by Alistair FrancisWhile I agree that I'd be nice if Jonas or somebody else would get around to polish the patches - and upstream them - I can confirm that this does what I hoped for. On both my Pixel 3a and OP6 I can re-enable
iio-sensor-proxy
without having it constantly using CPU, even when the screen is off, all while keeping functionality in place.If no further issues pop up I'd thus say: let's merge.
- Resolved by Robert Eckelmann
If there's no further resistance against this change - can we land it? :)
changed milestone to %v24.12 Release
added backport-to-v24.06 label
added backport-to-v24.12 label and removed backport-to-v24.06 label
added 67 commits
-
367ca486...1ba238d3 - 66 commits from branch
postmarketOS:master
- 49e70bd5 - temp/iio-sensor-proxy: Support set_polling (MR 5853)
-
367ca486...1ba238d3 - 66 commits from branch
enabled an automatic merge when all merge checks for 49e70bd5 pass
Thanks for trying to add this to our list of patches!
Unfortunately, I have many issues with that patch still combined with libssc. I have been working on fixes things in iio-sensor-proxy and libssc regarding this patch. Some bugs have been squashed over the last weeks which were hard to track and solve, but there's a remaining one causing serious issues.
So this patch just 'worked' for you all it seems?
EDIT: I see what happens: the sensor is created each time it is enabled, but never freed. I think it leaks memory... Side effect: the problems I encounter do not happen then because a fresh sensor is created each time.
Edited by Dylan Van Assche