Skip to content

Port arch-ipad-rotate-output daemon to C99 - #229

Merged
henrikklee merged 3 commits into
OrchardLinux:mainfrom
tcballard:perf-rotate-output-c
Dec 6, 2026
Merged

henrikklee merged 3 commits into
OrchardLinux:mainfrom
tcballard:perf-rotate-output-c

Conversation

@tcballard

Copy link
Copy Markdown
Contributor

Replaces the Python 3 desktop/configuration/rotate-output daemon with a zero-dependency C99 binary (desktop/configuration/rotate-output.c, ~40 KB ELF, linked only with -lm).

  • Reduces resident memory on devices with an accelerometer from ~13 MiB (Python 3) to ~0.5 MiB.
  • Preserves the debounced orientation state machine, accelerometer mount-matrix & turning-rate detector, wlr-randr output selection & J120 speaker-transform publishing, monitor-sensor restart logic, and discovery timeout exit.
  • Updated tests/test_rotate_output.py to run all 14 end-to-end and policy unit tests directly against the compiled C binary.

Tested: 44/44 pass (test_rotate_output.py, test_package_staging.py, test_package.py).

tcballard and others added 2 commits December 2, 2026 11:25
Replaces the Python 3 desktop/configuration/rotate-output daemon with a
zero-dependency C99 binary (desktop/configuration/rotate-output.c, ~40 KB ELF,
~0.5 MiB RSS).

Preserves the exact debounced orientation state machine, accelerometer
mount-matrix & turning-rate detector, wlr-randr output selection and
speaker-transform publishing, monitor-sensor restart logic, and discovery
exit behavior.

Assisted-by: LLM
# Conflicts:
#	CHANGELOG.md
#	Makefile
#	desktop/install-tree
#	release/audit.py
#	tests/package_tree.py
#	tests/test_package.py
@henrikklee
henrikklee merged commit e9ad85a into OrchardLinux:main Dec 6, 2026
11 checks passed
@henrikklee

Copy link
Copy Markdown
Contributor

Merged, thank you Tom! Rotation runs on every board with an accelerometer, so this frees memory almost everywhere.

On your branch we merged main in (it now builds next to the other C helpers, and the old Python script is gone from the install list) and added the changelog line. Last one: #230.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants