Skip to content
Snippets Groups Projects

temp/iio-sensor-proxy: Support set_polling

Merged Alistair Francis requested to merge alistair23/pmaports:alistair/iio-sensor into master

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

Merge request pipeline #211460 passed

Merge request pipeline passed for 49e70bd5

Merged by Oliver SmithOliver Smith 3 months ago (Dec 5, 2024 10:36pm UTC)

Merge details

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    • de3d8d07 - temp/iio-sensor-proxy: Support set_polling

    Compare with previous version

  • added 1 commit

    • 367ca486 - temp/iio-sensor-proxy: Support set_polling

    Compare with previous version

  • Alistair Francis resolved all threads

    resolved all threads

  • 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 Francis
  • While 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.

  • Glad to see this is working as originally explained

  • Mrtsting this right now on my xiaomi-beryllium, really seems to reduce drain on battery.

  • Robert Eckelmann approved this merge request

    approved this merge request

  • Robert Eckelmann resolved all threads

    resolved all threads

  • changed milestone to %v24.12 Release

  • Oliver Smith approved this merge request

    approved this merge request

  • Thanks everyone!

  • added backport-to-v24.12 label and removed backport-to-v24.06 label

  • Oliver Smith added 67 commits

    added 67 commits

    Compare with previous version

  • Oliver Smith enabled an automatic merge when all merge checks for 49e70bd5 pass

    enabled an automatic merge when all merge checks for 49e70bd5 pass

  • merged

  • 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
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading