Skip to content

fix(oms-58): carry PR #2549 CLPC platform-profile fix for no-ACPI kernels - #39

Closed
allanclempe wants to merge 1 commit into
oms-50-gpu-stats-ring-tag32from
oms-58-clpc-platform-profile-no-acpi
Closed

allanclempe wants to merge 1 commit into
oms-50-gpu-stats-ring-tag32from
oms-58-clpc-platform-profile-no-acpi

Conversation

@allanclempe

Copy link
Copy Markdown
Owner

Summary

Carries and verifies the kernel fix for Apple CLPC platform profiles (/sys/class/platform-profile, Low Power and High Power mode) being silently disabled on distribution linux-aurora kernels built with # CONFIG_ACPI is not set.

  • Adds patches/linux-pr2549-clpc-platform-profile-no-acpi.patch, rebased cleanly with zero fuzz onto aurora-silicon/linux db6da7821954 from open upstream PR aurora-silicon/linux#2549 (4dfa5b665833, Diljit Singh), keeping only the author's human Signed-off-by:
    • moves config ACPI_PLATFORM_PROFILE outside if ACPI in drivers/acpi/Kconfig
    • builds acpi/platform_profile.o in drivers/Makefile under ifndef CONFIG_ACPI
    • guards legacy acpi_kobj calls behind #ifdef CONFIG_ACPI via platform_profile_legacy_kobj() in drivers/acpi/platform_profile.c
    • changes APPLE_CLPC in drivers/soc/apple/Kconfig to select ACPI_PLATFORM_PROFILE unconditionally
    • requests CONFIG_ACPI_PLATFORM_PROFILE=y in arch/arm64/configs/asahi.config
  • Documents the patch, base commit db6da7821954, upstream PR #2549, and verification commands in patches/README.md.
  • Adds read-only diagnostic helper tools/clpc-platform-profile-check.sh and 40 host tests in tools/tests/clpc-platform-profile-check-test.sh verifying kernel config (plain and .gz), /sys/class/platform-profile/*/name|choices|profile, powerprofilesctl (PlatformDriver: platform_profile vs placeholder), and apple-clpc device-tree properties (apple,high-power-mode, apple,low-power-frequency-max-mhz, apple,smc).
  • Records root cause, live 2.3 J616c baseline (# CONFIG_ACPI is not set, CONFIG_ACPI_PLATFORM_PROFILE absent, missing /sys/class/platform-profile, PlatformDriver: placeholder, intact DT with apple,high-power-mode and 2808 MHz), linux-aurora 7.3.0.aurora1-3.1 .config / vmlinux symbol verification (platform_profile_class, devm_platform_profile_register, apple_clpc_profile_set), and upstream PR #2549 status in JOURNEY.md section 9.103.
  • Leaves tools/derive-j616c-image untouched; kernel pin promotion and module verification stay in OMS-51.

Where to open upstream PR

  • aurora-silicon/linux: Already open as aurora-silicon/linux#2549 ("soc: apple: clpc: offer platform profiles in kernels without ACPI", DjDeveloperr, head 4dfa5b665833). As of 2026-12-02 it has 9/9 CI checks passing, no conflicts on main, and passing hardware rows on J714s and K114s; it awaits one approving review from Core or Omarchy Mac and cleanup of a commit trailer noted in review. No duplicate PR needed on aurora-silicon/linux—add a J616c hardware row after booting 3.1 (OMS-57) and help review it to merge.
  • omacom/omarchy-pkgs (pkgbuilds/linux-aurora): Edge's linux-aurora 7.3.0.aurora4-1 (omacom/linux-aurora ea21b9af9a4c) still has select ACPI_PLATFORM_PROFILE if ACPI and # CONFIG_ACPI is not set. Once aurora-silicon/linux#2549 merges, ask omacom to advance linux-aurora past that merge commit (or carry patches/linux-pr2549-clpc-platform-profile-no-acpi.patch in the meantime).

Test plan

  • git apply --check and git am of patches/linux-pr2549-clpc-platform-profile-no-acpi.patch against pristine aurora-silicon/linux db6da7821954
  • Verified built linux-aurora 7.3.0.aurora1-3.1 .config (# CONFIG_ACPI is not set, CONFIG_ACPI_PLATFORM_PROFILE=y, CONFIG_APPLE_CLPC=y), CC drivers/acpi/platform_profile.o, and vmlinux / System.map symbols (platform_profile_class, platform_profile_init, platform_profile_register, devm_platform_profile_register, apple_clpc_profile_probe, apple_clpc_profile_get, apple_clpc_profile_set)
  • bash tools/tests/clpc-platform-profile-check-test.sh (40 passed, including large gzipped config SIGPIPE guard, mock 3.1 state, unpatched 2.3 state, missing/malformed DT, exit-2 error paths, and patch fixture checks)
  • bash tools/tests/gpu-stats-ring-check-test.sh (19 passed), omarchy-esp-generator-test.sh, select-speaker-volume-unlock-test.sh, touchid-probe-redact-test.sh (15 passed)
  • bash -n on tools/clpc-platform-profile-check.sh and all tools/tests/*.sh
  • Ran bash tools/clpc-platform-profile-check.sh --require-dt live on J616c 7.3.0-1-2.3-ARCH (confirmed exit 1 with expected baseline diagnostics and intact J616c DT high_power_mode=present low_power_max_mhz=2808 smc=present) and against the built 3.1 .config with mock sysfs/ppd + live J616c DT (confirmed exit 0)
  • Run bash tools/clpc-platform-profile-check.sh --require-dt live on J616c after booting linux-aurora 7.3.0.aurora1-3.1 (OMS-57) and cycle powerprofilesctl set power-saver|balanced|performance

Self-review

Checked git diff oms-50-gpu-stats-ring-tag32..HEAD (commit 2f30551):

  • Ensured parse_kconfig() scans the entire stream to EOF in awk (no early exit on pipes) and captures output via command substitution rather than process substitution so corrupt .gz configs fail with exit 2 and large compressed configs never trip SIGPIPE under set -euo pipefail.
  • Used POSIX-portable awk regexes (no {m,n} interval quantifiers), endian-independent od -An -v -t u1 decoding for 4-byte DT u32 properties, and explicit if guards under set -e.
  • Verified powerprofilesctl check catches both PlatformDriver: placeholder and any missing/unbacked performance, balanced, or power-saver profile entry.
  • Verified patches/linux-pr2549-clpc-platform-profile-no-acpi.patch uses standard a//b/ prefixes, applies cleanly with zero fuzz to db6da7821954, and carries only the author's human Signed-off-by.
  • Confirmed zero private information, zero unexpected files touched (tools/derive-j616c-image untouched), and git diff --check clean on all non-patch files.

…nels

Distribution linux-aurora kernels build with # CONFIG_ACPI is not set.
Because ACPI_PLATFORM_PROFILE sat inside `if ACPI` in drivers/acpi/Kconfig,
drivers/Makefile entered acpi/ only with CONFIG_ACPI, and APPLE_CLPC used
`select ACPI_PLATFORM_PROFILE if ACPI`, Kconfig dropped ACPI_PLATFORM_PROFILE
and apple_clpc_probe() skipped devm_platform_profile_register(). On the
J616c (2.3), apple-clpc binds with apple,high-power-mode and
apple,low-power-frequency-max-mhz=2808 in DT, yet /sys/class/platform-profile
never registers and powerprofilesctl falls back to PlatformDriver: placeholder.

- Add patches/linux-pr2549-clpc-platform-profile-no-acpi.patch rebased with
  zero fuzz onto aurora-silicon/linux db6da7821954 from open upstream PR
  aurora-silicon/linux#2549 (4dfa5b665833, Diljit Singh) with human-only
  sign-off; verified clean with git apply --check and git am, and compiled
  into linux-aurora 7.3.0.aurora1-3.1.
- Document the patch, base commit, and verification in patches/README.md.
- Add read-only tools/clpc-platform-profile-check.sh and 40 host tests in
  tools/tests/clpc-platform-profile-check-test.sh covering kernel config,
  /sys/class/platform-profile, powerprofilesctl, and CLPC DT properties.
- Record root cause, live 2.3 baseline, 3.1 vmlinux verification, and
  upstream PR #2549 status in JOURNEY.md section 9.103.
@allanclempe
allanclempe added this pull request to stack #56 December 2, 2026 23:11
@allanclempe
allanclempe removed this pull request from stack #56 December 3, 2026 03:56
@allanclempe

Copy link
Copy Markdown
Owner Author

Closing: already merged upstream in aurora-silicon/linux#3995 (which replaced aurora-silicon/linux#2549).

@allanclempe allanclempe closed this Dec 3, 2026
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.

1 participant