jetson-customize-clocks
NVIDIA/skills
플래싱 전에 BPMP DTB 및 nvpower.sh 파일을 편집하여 NVIDIA Jetson 장치에서 CPU, GPU 및 EMC 클럭 동작을 잠그거나, 제한하거나, 사용자 지정할 수 있습니다.
...모든 것을 확장하십시오시계 사용자 지정
목적
이미지를 플래싱하기 전에 Linux_for_Tegra/ 이미지를 플래싱하기 전에 파일을 편집하여 Jetson 타겟의 CPU, GPU 및 EMC 클럭 동작을 사용자 정의합니다. 적용 대상은 다음 두 계층입니다:
- 다음 위치의 BPMP DTB:
Linux_for_Tegra/bootloader/— 클럭별max-rate-custom상한값, 그리고 EMC DVFS 게이트(모든 SoC의 bwmgr + cactmon; T26x 전용 osp-controller). - nvpower.sh 파일 내
Linux_for_Tegra/rootfs/etc/systemd/nvpower.sh— cpufreq/devfreq 거버너 및 (선택 사항) 부팅 시 sysfs에 기록되는 장치별 최소/최대/정적 속도.
일반적인 트리거: "CPU/GPU/EMC 주파수 잠금", "GPU를 Fmax로 고정", "EMC를 MAXN으로 고정", "EMC DVFS 비활성화/활성화", "CPU DVFS 비활성화/활성화", "CPU/GPU 최대 속도 설정", "cpufreq 거버너 변경".
적용 범위 외: 실행 중인 대상에서의 런타임 클럭 튜닝(플래시 단계 없음), nvpmodel 전원 모드 편집(동급 스킬 /jetson-customize-nvpmodel) 및 실리콘 상한값 재정의(max-rate-maxn 읽기 전용입니다).
필수 조건
다음에 따라 활성 프로필을 해결하십시오
../../context/target-platform-contract.md.
다음의 경우에는 거부하고 경로를 재설정하십시오:
| 조건 | 다음 조건으로 거부: |
|---|---|
활성 프로필이 없거나, active: NA |
다음으로 라우팅: /jetson-set-target 또는 /jetson-init-target. |
프로필에 다음이 누락된 경우 bsp_image: 차단 |
경로: /jetson-init-image. |
누락됨 |
경로: /jetson-init-image. |
누락되었거나 Git 저장소가 아님 |
경로: /jetson-init-source. |
경로 해결:
다음 위치에서bsp_image.root_path:존재할 경우, 그렇지 않으면./Image fromsource.root_path:존재할 경우, 그렇지 않으면./Source
이 스킬에서는 읽기 전용입니다; 모든 쓰기 작업
(작업 1의 BPMP DTB 및 작업 2의 nvpower.sh)은
(오버레이 추적기) 아래에 위치하게 됩니다. 이것이 바로
다음에서 변하지 않는 워크플로우입니다
../../context/bsp-customization-workflow.md#workflow-invariants —
상류에서 수동으로 편집하면 디프 트레일이 조용히 파괴되며
/jetson-promote-image 무작위 작업을 생성합니다.
지침
- 위의 전제 조건(활성 프로필, BSP 이미지 추출, 소스 오버레이 추적기 초기화)을 해결하십시오.
- 아래 표에서 작업을 선택하십시오.
- 링크된 절차 섹션 — 작업 1(BPMP DTB), 작업 2(
nvpower.sh) 또는 두 작업 모두에 대한 MAXN 레시피를 따르십시오. - 각 작업의 커밋 규칙에 따라 오버레이 트래커 내의 편집 내용을 커밋하십시오.
- 다음 명령을 사용하여 배포하십시오
/jetson-promote-image→/jetson-flash-image를 사용하여 배포하십시오. 새로운 BPMP DTB는nvpower.sh다음 부팅 시부터 적용됩니다.
지원되는 작업
| 작업 | 편집 위치 | 절차 섹션 |
|---|---|---|
| CPU/GPU 클럭을 특정 속도로 고정 | BPMP DTB max-rate-custom 클럭 노드에서 + nvpower.sh 거버너 performance |
"내용 편집: max-rate-custom" + "편집 내용 선택" |
| EMC를 초기 속도로 고정 (EMC DVFS 비활성화) | BPMP DTB: bwmgr.enabled = 0, cactmon.enabled = 0, 또한 /delete-node/ osp-controller T26x 모델에서만 |
"내용 수정: EMC DVFS 비활성화 / 활성화" |
| EMC DVFS 다시 활성화 | BPMP DTB: bwmgr.enabled = 1, cactmon.enabled = 1, 복원 osp-controller T26x에서 |
"내용 수정: EMC DVFS 비활성화/활성화" |
| 부하 테스트를 위해 모든 항목을 MAXN으로 고정 | 위 설정과 nvpmodel MAXN을 결합하여 부팅 시 기본값으로 설정 | 레시피 참조 |
| 잠금 없이 클럭의 하드 상한값 낮추기 | BPMP DTB max-rate-custom 만 |
"내용 수정: max-rate-custom" |
| 핀 고정 없이 장치의 속도를 제한 | nvpower.sh sysfs를 통해 최소/최대값을 고정하지 않고 |
"편집 항목 선택" |
작업 1 — BPMP DTB 수정
다음에 설명된 BPMP-DTB 사용자 정의 프로토콜을 따르십시오
../../references/bsp-customization-bpmp-dtb.md.
이 프로토콜은 구체적인 절차를 규정합니다 — 첫 번째 적용 시 원본 그대로 가져오기,
dtc 디컴파일, 재컴파일, 유효성 검사, 커밋. 이 기술은
클럭 관련 콘텐츠(프로토콜의 “DTS 편집” 단계에서 어떤 노드와
속성을 편집할지)만 제공합니다.
편집된 .dtb 는
오버레이 트래커에 저장됩니다. /jetson-promote-image의 채널 A는
트래커를 순회하며 파일을 bsp_image로 복사합니다.
를
직접 편집하지 마십시오. 이는 입력값이 아닌 프로모트 출력값입니다.
SKU가 올바른 BPMP DTB를 해결합니다
프로토콜의 "활성 BPMP DTB 해결" 섹션에 따라,
BPFDTB_FILE 활성 플래시 구성에서 읽어옵니다. 일반적인 Thor /
단일 SKU 구성 형식의 경우, 이는 보드별 구성의 정적 BPFDTB_FILE=... 줄이며
해당 값은 있는 그대로 최종적인 효력을 가집니다. .conf 에 있는 정적라인이며, 해당 값은 있는 그대로 최종적인 것입니다.
SKU 다중화 구성 형태(Orin AGX 개발 키트 구성 체인
에서 board_sku/board_FAB
를 통해 update_flash_args_common — 참조
../../context/bsp-customization-software-layers.md#per-board-conf-dispatch--update_flash_args_common),
다음과 같이 디스패치 체인을 순회하십시오 board_sku= 그리고
board_FAB= 활성 프로필에서 디스패치 체인을 탐색한 후,
디스패치 출력에서 BPFDTB_FILE 디스패치 출력에서 읽습니다 —
보드별 정적 행이 아닌 .conf. 비다중화 구성의 경우 정적 값과 디스패치된
값이 일치하며, 디스패치는
구성 체인이 조건부로
BPFDTB_FILE.
유효 최대 속도 목록 (검토)
런타임 상한선의 두 계층을 모두 검사하십시오 — 참조 references/clock-control-model.md#effective-runtime-ceiling —를 확인한 후 max-rate-custom 값을 결정하기 전에 런타임 상한의 두 계층을 모두 검사하십시오 — 참조—
검토 쿡북(BPMP 측 디컴파일 + grep; nvpmodel 측 부팅 기본 모드에 대한 awk)은 references/bpmp-dtb-clock-edits.md#inspection-cookbook.
nvpmodel 계층에 대해서는 다음을 참조하십시오 /jetson-customize-nvpmodel.
이 단계는 상태를 변경하지 않습니다. 이는
"콘텐츠 편집: max-rate-custom "명명된 클럭 노드에서 콘텐츠 편집" 단계의 편집 규모를 결정하기 위한 전제 조건입니다.
콘텐츠 편집: max-rate-custom 명명된 클럭 노드에서
프로토콜의 “DTS 편집” 단계에서, 명명된 클럭 노드 내부의 속성을 수정하십시오.
절대 lateinit. max-rate-custom
클럭의 하드 캡(max-rate-maxn 정의된 경우에만 해당하며, 그렇지 않으면 실행 중인 max_rate 값을 사용해야 함).
DTS 편집 양식, 의미론 및 nvpmodel ↔ BPMP 클럭 노드
매핑은 references/bpmp-dtb-clock-edits.md.
그런 다음 제어권을 프로토콜로 다시 넘기십시오 — 프로토콜의 “재컴파일”, “재컴파일된 블롭의 타당성 검사”,
“오버레이 트래커에 스테이징” 및 “정리”
단계가 나머지 과정을 처리합니다.
프로토콜에 따른 커밋 메시지 규칙:
.
콘텐츠 편집: EMC DVFS 비활성화/활성화
기본 동작(EMC DVFS 켜짐)은 편집이 필요하지 않습니다. EMC
DVFS 비활성화는 프로토콜의 동일한 “DTS 편집” 단계 내에서 적용되는
다중 노드 편집이며, bwmgr 토글이 아닙니다:
| # | 편집 | 범위 |
|---|---|---|
| 1 | bwmgr.enabled = <0x00> |
모든 SoC, 필수 |
| 2 | cactmon.enabled = <0x00> |
모든 SoC, 필수 |
| 3 | /delete-node/ osp-controller |
T26x (Thor) 필수 — T23x (Orin)에는 해당 노드가 없으므로 건너뜁니다 |
탐지: dtc -I dtb -O dts
— 일치 항목 없음 ⇒ T23x 경로. 전체 DTS 스니펫, 생존 경로
오류 모드 및 재활성화 절차는
references/emc-dvfs-disable.md.
다중 노드 편집이 완료되면 프로토콜의 “재컴파일”부터 “정리” 단계까지 적용하십시오.
커밋 메시지 규칙:
.
비활성화 시 유휴 전력 소비가 증가합니다. 스트레스/성능 테스트용으로 의도된 것이며, 실제 운영 환경의 rootfs에는 적용하지 마십시오.
재실행 + 항등성
프로토콜의 “재실행 가능성” 섹션에 따라, 동일한 목표값으로 이
스킬을 재실행하면 아무 작업도 수행하지 않는 커밋이 생성됩니다. 다른
값으로 재실행하면 동일한 속성이 다시 쓰여지며 — git log -- $BPMP_REL 실행별 이력을 보여줍니다. 시계를
원래 max-rate-maxn 상한값으로 되돌리려면, DTS를 편집하여
max-rate-custom 줄을 제거하고 재컴파일하십시오.
작업 2 — nvpower.sh 편집
수정 nvpower.sh를 수정합니다. 이 스크립트는 부팅 시 nvpower.service 를 통해 부팅 시 실행되어
cpufreq / devfreq 거버너와 속도를 설정합니다.
스크립트별 파일
이 작업이 수정하는 스크립트의 상대 경로는 다음과 같습니다:
Linux_for_Tegra/rootfs/etc/systemd/nvpower.sh
이 스크립트는 두 개의 루트에 위치하며, 이 작업은 두 경로를 모두 탐색합니다:
| 역할 | 위치 | 스킬이 기록하나요? |
|---|---|---|
| 탐지 + 원본 상태 유지 | |
아니요 — 읽기 전용 |
| 오버레이 편집 대상 + git 커밋 | |
예 |
이후의 하위 단계에서 '스크립트별 파일'이란 다음 경로 아래에 있는 오버레이
복사본을 의미합니다 . 복사본은 아래의 pristine-import 단계에서
한 번 읽힌 후, 다시는 수정되지 않습니다.
오버레이 편집 레시피 (nvpower.sh 편집 전에 적용)
워크플로 문서의 표준
‘Off-skill 편집’ 레시피를 따르십시오.
프리스틴 임포트 + 사용자 정의 커밋 쌍으로 구성되며, 둘 다
미리보기 게이트의 제어를 받습니다. nvpower.sh 는 전파 설정이 없는
단일 파일이며, 하나의 프리스타인 커밋과 하나의 사용자 지정 커밋으로
전체 변경 사항을 다룹니다.
이 스킬에 대한 구체적인 대체 내용:
는/ rootfs/etc/systemd/nvpower.sh.- 권장되는 원본 가져오기 메시지:
import pristine: rootfs/etc/systemd/nvpower.sh, 본문Source:./Linux_for_Tegra/ (BSP ) - 권장 커스터마이징 커밋 헤더:
jetson-customize-clocks: nvpower.sh, 본문 예시:set_cpufreq_governor: desired_cpufreq_gov "schedutil" -> "performance".
편집 내용 선택
함수 위치(set_cpufreq_governor, set_devfreq_governor), 일반적인 편집 레시피(Fmax 고정, 정적 속도, 최소/최대 한계) 및 nvidia-l4t-init 패키지 업그레이드 시 주의사항은 references/nvpower-sh-edits.md.
배포
오버레이 트래커의 사용자 지정 커밋은 그 자체로는 기기에 도달하지 않습니다. 배포 체인은 다음과 같습니다:
/jetson-promote-image— 오버레이에 있는 모든 추적 파일을 다음으로 복사합니다로 복사합니다. 차이점 인식(바이트 단위로 동일한 파일은 건너뜁니다); 다음을 사용합니다/Linux_for_Tegra/ sudo cp -p를rootfs/*를 사용하며,/jetson-flash-image— 업데이트된 내용을bsp_image를 장치에 플래시합니다.nvpower.service다음 부팅 시 새 스크립트를 실행합니다.- (대안, 플래시 없음)
실행 중인 대상의/Linux_for_Tegra/rootfs/etc/systemd/nvpower.sh /etc/systemd/nvpower.sh에 복사한 다음sudo systemctl restart nvpower.service(또는 재부팅).
편집 커밋하지 않고 편집 — 또는
직접 편집하는 경우 /jetson-promote-image
다음 /jetson-init-image 재추출 시 아무런 알림 없이 사라집니다.
레시피 — 부하/성능 테스트를 위해 모든 항목을 MAXN에 고정
작업 1과 2를 결합합니다. 작업 1의 BPMP는 프로토콜의 한 라운드(단일 디컴파일 / 다중 노드
편집 / 재컴파일 / 커밋 사이클 — 동일한
BPMP DTB에 대해 프로토콜을
두 번 왕복하지 마십시오)를 통해 모든 흐름을 편집합니다 .dtb):
- BPMP DTB("콘텐츠 편집:
max-rate-custom"명명된 클럭 노드" 단계 콘텐츠):max-rate-custom모든 CPU / GPU / EMC 클럭에서 설정하지 않은 상태로 둡니다; 상한선을 낮추는 기존max-rate-custom상한을 낮추는 기존 라인을 제거합니다. - BPMP DTB(“콘텐츠 수정: EMC DVFS 비활성화/활성화” 단계 내용): EMC를 초기화 속도로 고정 —
bwmgr.enabled = 0,cactmon.enabled = 0, 여기에/delete-node/ osp-controllerT26x에서 (T23x에서는 건너뛰기). - 두 콘텐츠 편집을 하나의 프로토콜 "DTS 편집" 호출 내에 모두 적용한 다음, 나머지 프로토콜 단계(재컴파일, 정상성 검사, 두 콘텐츠 편집을 모두 포함하는 단일 사용자 지정 커밋)를 실행합니다.
- nvpower.sh (작업 2): 설정
desired_cpufreq_gov="performance"그리고desired_devfreq_gov="performance"무조건 적용;set_devfreq_governor에서 GPU/nvjpg 건너뛰기 설정 제거. 작업 2의 오버레이 편집 레시피(“nvpower.sh 편집 전 적용할 오버레이 편집 레시피” 단계)를 통해 적용됩니다. 이는 BPMP-DTB 프로토콜의 커밋과는 별개로, rootfs 스크립트에 대한 별도의 오버레이 추적기 프리스타인 + 사용자 지정 커밋 쌍입니다. - 부팅 기본 nvpmodel 모드를 다음을 통해 MAXN으로 설정합니다
/jetson-customize-nvpmodel— 클럭별 nvpmodel 상한값을max-rate-maxnBPMP DTB 내용과 관계없이 상한을 제한합니다.
배포 /jetson-promote-image → /jetson-flash-image 는 (오버레이 트래커를 통해) 새로운 BPMP DTB와 편집된 nvpower.sh (동일한 오버레이 트래커를 통해)을 다음 플래시 시점에 반영합니다.
제한 사항
- 이미지 빌드 시점에 한함. 모든 수정 사항은
에 반영되며,/Linux_for_Tegra/ /jetson-promote-image→/jetson-flash-image를 통해서만 기기에 전달됩니다. 실행 중인 타겟 튜닝은 적용 범위를 벗어납니다. max-rate-custom는 상한값만 낮춥니다. 반드시max-rate-maxn보다 엄격히 낮아야 하며, 실리콘 상한을 높이는 것은 지원되지 않습니다.- 유효 상한은 2층입니다. 런타임 상한은
min(BPMP cap, active-nvpmodel-mode cap)입니다. nvpmodel 상한은/jetson-customize-nvpmodel가 관리하며, 이 스킬은 이를 수정하지 않습니다. - SoC에 따라 달라지는 EMC DVFS 게이트입니다. EMC DVFS를 비활성화하려면 T23x(bwmgr + cactmon)와 T26x(bwmgr + cactmon + delete
osp-controller). 잘못 감지될 경우 정의되지 않은 동작이 발생합니다. - T23x의 GPU 상한은 다중 노드 구조입니다. GPU 클럭은
nafll_gpusys분할되어 있으며,nafll_gpcX; 이 상한은 모든 노드에 적용될 때만 구속력을 갖습니다. nvpower.sh는 패키지로 관리됩니다. 이 기능은nvidia-l4t-init; 패키지 업그레이드는 기존 편집 내용을 덮어씁니다. 장기간 유지되는 설정의 경우 systemd 드롭인 또는 동급 헬퍼를 사용하는 것이 좋습니다.- ODMDATA가 우선합니다. ODMDATA 토큰이 특정 속성을 포함하는 경우, 해당 토큰은 플래시 시점에 BPMP DTS에 대한 직접 수정을 재정의합니다. BPMP DTS에 대한 직접 수정은 NVIDIA 토큰이 적용되지 않는 속성에 대한 대체 수단입니다.
max-rate-maxnlateinit는 사용이 금지됩니다.max-rate-maxn는 칩 수준의 상한선(읽기 전용)입니다.lateinit는 부팅 시 클럭 초기화용이며 상한값 재정의용이 아닙니다. 두 항목 모두 절대 수정해서는 안 됩니다.- BPMP DTB는 SKU 멀티플렉싱될 수 있습니다. 복합/분산 플래시 구성(Orin AGX 개발 키트 체인)에서,
BPFDTB_FILE는 다음으로 선택됩니다.board_sku/board_FAB를 통해update_flash_args_common를 통해 선택됩니다. 체인이 조건부로 이를 재정의할 때 정적BPFDTB_FILE=라인을 읽는 것은 체인이 조건부로 이를 재정의하는 경우 잘못된 방법입니다; 대신 디스패치를 통해 해결하십시오.
문제 해결
| 오류 | 원인 | 해결 방법 |
|---|---|---|
max-rate-custom 로 설정되었으나 클럭이 여전히 max-rate-maxn T23x GPU |
단순히 nafll_gpusys 만 제한되었고, nafll_gpcX 파티션은 여전히 max-rate-maxn 로 실행되며, 실질적인 상한선을 거의 독점하고 있습니다. |
동일한 max-rate-custom 을 nafll_gpusys 에 적용하고, nafll_gpcX 열거된 모든 grep -nE '^\s*nafll_gpc[0-9]+\s*:' . |
| EMC DVFS 비활성화가 적용된 것으로 보이지만 EMC는 여전히 T26x에서 스케일링됩니다 | 단순히 bwmgr.enabled = <0x00> 설정되었을 뿐입니다; osp-controller 유지되며 QoS 경로를 통해 주파수 변경을 재발행합니다. |
수정 사항 #2 (cactmon.enabled = <0x00>) 및 #3 (/delete-node/ osp-controller)를 동일한 “DTS 편집” 단계 내에 추가하십시오. 다음을 확인하십시오 osp-controller 다음 dtc -I dtb -O dts → 0이 예상됩니다. |
T23x에서 EMC DVFS 비활성화가 거부되었으며, osp-controller |
T23x (Orin) BPMP DTB에는 osp-controller; T23x에서는 편집 #3을 건너뛰어야 합니다. |
다음 단계를 통해 SoC 제품군을 감지하십시오 grep -c osp-controller 단계를 통해 SoC 패밀리를 감지하고, 카운트가 1 이상일 때만 #3을 적용하십시오. |
편집 후 BPMP가 DTB 로딩을 거부함: max-rate-custom >= max-rate-maxn |
max-rate-custom 실리콘 상한치 이상으로 설정된 경우. |
더 낮게 max-rate-custom 엄격히 아래로 max-rate-maxn. 만약 max-rate-maxn 해당 노드에 없으면, 실행 중인 대상의 라이브 캡을 조회하십시오: cat /sys/kernel/debug/bpmp/debug/clk/. |
osp-controller 다음 조건이 충족된 후 다시 나타납니다: status = "disabled" |
status = "disabled" 는 노드를 디바이스 트리에서 제거하지 않습니다. BPMP는 여전히 해당 노드를 탐색합니다. |
다음으로 대체하십시오 /delete-node/ osp-controller; — BPMP가 경로를 건너뛰려면 해당 노드가 존재해서는 안 됩니다. |
다음에 대한 수정: nvpower.sh 다음에서 편집 내용: apt upgrade |
nvpower.sh 는 nvidia-l4t-init deb에 속해 있어 업그레이드 시 덮어쓰입니다. |
장기간 유지되는 테스트 환경의 경우, systemd 드롭인 파일이나 nvpower.sh에 참조되는 systemd 드롭인 파일이나 형제 헬퍼 파일에 패키지 수정 내용을 포함시키십시오. nvpower.sh 그 자리에서 수정하는 대신, systemd 드롭인 파일이나 해당 파일이 참조하는 형제 헬퍼 파일에 패키지 설정을 편집하십시오. |
/jetson-promote-image BPMP DTB를 수정한 후에는 이 파일의 수정이 아무런 효과를 내지 않습니다 |
편집 내용은 에 적용되었으며, 이는 /jetson-promote-image의 출력값에 적용된 것이지, 입력값이 아닙니다. |
수정 내용을 (오버레이 트래커)로 이동시킨 후 BPMP-DTB 프로토콜을 통해 커밋하십시오. |
| Cap은 첫 부팅 시 적용되는 것으로 보이지만, 전원 모드 변경 후 재설정됩니다 | 활성 nvpmodel 모드의 클럭당 상한값은 max-rate-custom. |
두 레이어를 모두 확인하십시오. nvpmodel이 바인딩 상태라면, 다음을 통해 nvpmodel 상한을 높이거나 제거하십시오 /jetson-customize-nvpmodel. BPMP 상한값만으로는 런타임 상한을 결정할 수 없습니다. |
참고 문헌
../../references/bsp-customization-bpmp-dtb.md— 표준 BPMP-DTB 사용자 정의 프로토콜(원본 임포트, 디컴파일, 편집, 재컴파일, 타당성 검사, 커밋). 이 기술의 작업 1은 콘텐츠만 소비하는 단계이며, 프로토콜이 메커니즘을 담당합니다.references/clock-control-model.md— 레이어 스택, 이중 상한 개요, 유효 런타임 상한 공식.references/bpmp-dtb-clock-edits.md— 이중 상한선 의미론, DTS 편집 양식, nvpmodel ↔ BPMP 클럭 노드 매핑, 검사 가이드.references/emc-dvfs-disable.md— DTS 스니펫을 포함한 전체 SoC 조건부 EMC DVFS 비활성화 절차, 감지, 재활성화.references/nvpower-sh-edits.md—nvpower.sh함수 위치 + 일반적인 편집 레시피 + 패키지 업그레이드 시 주의사항./jetson-customize-nvpmodel— 관련 기술: nvpmodel 전력 모드. 활성 모드의 클럭당 상한은 BPMP DTB 상한보다 낮게 제한됩니다.
---
name: jetson-customize-clocks
description: Lock, cap, or customize CPU, GPU, and EMC clock behavior on NVIDIA Jetson devices by editing BPMP DTB and nvpower.sh before flashing.
license: Apache-2.0
---
# Customize Clocks
## Purpose
Customize CPU, GPU, and EMC clock behavior on a Jetson target by editing files under `Linux_for_Tegra/` before flashing the image. Two layers are in scope:
- The **BPMP DTB** at `Linux_for_Tegra/bootloader/<BPFDTB_FILE>` — per-clock `max-rate-custom` ceilings, plus the EMC DVFS gate (bwmgr + cactmon on all SoCs; osp-controller on T26x only).
- **nvpower.sh** at `Linux_for_Tegra/rootfs/etc/systemd/nvpower.sh` — cpufreq / devfreq governors and (optionally) per-device min / max / static rates written to sysfs at boot.
Common triggers: "lock CPU/GPU/EMC frequency", "pin GPU to Fmax", "pin EMC to MAXN", "disable/enable EMC DVFS", "disable/enable CPU DVFS", "set CPU/GPU max rate", "change cpufreq governor".
Out of scope: runtime clock tuning on a live target (no flash step), nvpmodel power-mode edits (use the sibling skill `/jetson-customize-nvpmodel`), and silicon-ceiling overrides (`max-rate-maxn` is read-only).
## Prerequisites
Resolve the active profile per
[`../../context/target-platform-contract.md`](../../context/target-platform-contract.md).
Refuse and route in these cases:
| Condition | Refuse with |
|---|---|
| No active profile, or `active: NA` | Route to `/jetson-set-target` or `/jetson-init-target`. |
| Profile lacks `bsp_image:` block | Route to `/jetson-init-image`. |
| `<bsp_image.root_path>/Linux_for_Tegra/` missing | Route to `/jetson-init-image`. |
| `<source.root_path>/Linux_for_Tegra/` missing or not a git repo | Route to `/jetson-init-source`. |
Resolve paths:
- `<bsp_image.root_path>` from `bsp_image.root_path:` if present, else `<workspace>/Image`.
- `<source.root_path>` from `source.root_path:` if present, else `<workspace>/Source`.
`<bsp_image.root_path>` is **read-only** for this skill; every write
(Operation 1's BPMP DTB and Operation 2's `nvpower.sh`) lands under
`<source.root_path>` (the overlay tracker). This is the workflow
invariant in
[`../../context/bsp-customization-workflow.md#workflow-invariants`](../../context/bsp-customization-workflow.md#workflow-invariants) —
hand-editing upstream silently destroys the diff trail and makes
`/jetson-promote-image` a noop.
## Instructions
1. Resolve the prerequisites above (active profile, BSP image extracted, source overlay tracker initialized).
2. Pick the operation from the table below.
3. Follow the linked procedure section — Operation 1 (BPMP DTB), Operation 2 (`nvpower.sh`), or the MAXN recipe for both.
4. Commit the edit inside the overlay tracker per each Operation's commit convention.
5. Deploy with `/jetson-promote-image` → `/jetson-flash-image`. The new BPMP DTB and `nvpower.sh` take effect on the next boot.
### Supported operations
| Operation | Where the edit lives | Procedure section |
|---|---|---|
| Lock a CPU / GPU clock to a specific rate | BPMP DTB `max-rate-custom` on the clock node + `nvpower.sh` governor `performance` | "Content edit: `max-rate-custom`" + "Pick the edit" |
| Lock EMC at its init rate (disable EMC DVFS) | BPMP DTB: `bwmgr.enabled = 0`, `cactmon.enabled = 0`, plus `/delete-node/ osp-controller` on T26x only | "Content edit: EMC DVFS disable / enable" |
| Re-enable EMC DVFS | BPMP DTB: `bwmgr.enabled = 1`, `cactmon.enabled = 1`, restore `osp-controller` on T26x | "Content edit: EMC DVFS disable / enable" |
| Pin everything to MAXN for stress runs | Combine the above + nvpmodel MAXN as boot default | see Recipe |
| Lower a clock's hard ceiling without locking | BPMP DTB `max-rate-custom` only | "Content edit: `max-rate-custom`" |
| Bound a device's rate without pinning | `nvpower.sh` min/max via sysfs | "Pick the edit" |
## Operation 1 — BPMP DTB edits
Follow the BPMP-DTB customization protocol in
[`../../references/bsp-customization-bpmp-dtb.md`](../../references/bsp-customization-bpmp-dtb.md).
The protocol owns the mechanics — pristine import on first touch,
`dtc` decompile, recompile, sanity-check, commit. This skill
supplies only the **clock-specific content** (which nodes and
properties to edit during the protocol's "Edit the DTS" step).
The edited `.dtb` lands in the `<source.root_path>/Linux_for_Tegra/`
overlay tracker. `/jetson-promote-image`'s channel A walks the
tracker and copies the file into `bsp_image`. **Do not edit
`<bsp_image.root_path>/Linux_for_Tegra/bootloader/<bpmp-dtb>`
directly** — that's the promote output, not an input.
### Resolve the SKU-correct BPMP DTB
Per the protocol's "Resolving the active BPMP DTB" section, read
`BPFDTB_FILE` from the active flash conf. For the common Thor /
single-SKU conf shapes this is the static `BPFDTB_FILE=...` line
in the per-board `.conf` and the value is authoritative as-is.
For **SKU-multiplexed conf shapes** (Orin AGX devkit conf chain
that selects a different BPMP DTB per `board_sku`/`board_FAB`
via `update_flash_args_common` — see
[`../../context/bsp-customization-software-layers.md#per-board-conf-dispatch--update_flash_args_common`](../../context/bsp-customization-software-layers.md#per-board-conf-dispatch--update_flash_args_common)),
walk the dispatch chain with `board_sku=<module.sku>` and
`board_FAB=<module.revision or empty>` from the active profile,
and read `BPFDTB_FILE` from the dispatch output — **not** from
the static line of the per-board `.conf`. Static and dispatched
values match for non-multiplexed confs; the dispatch is
mandatory only when the conf chain conditionally overrides
`BPFDTB_FILE`.
### List effective max rates (inspection)
Inspect both layers of the runtime ceiling — see [`references/clock-control-model.md#effective-runtime-ceiling`](references/clock-control-model.md#effective-runtime-ceiling) — before deciding on a `max-rate-custom` value.
Inspection cookbook (BPMP-side decompile + grep; nvpmodel-side awk over the boot default mode) is in [`references/bpmp-dtb-clock-edits.md#inspection-cookbook`](references/bpmp-dtb-clock-edits.md#inspection-cookbook).
For the nvpmodel layer see [`/jetson-customize-nvpmodel`](../jetson-customize-nvpmodel/SKILL.md).
This step does not mutate state — it's a precondition for sizing
the edit in the "Content edit: `max-rate-custom` on a named clock node" step.
### Content edit: `max-rate-custom` on a named clock node
During the "Edit the DTS" step of the protocol, modify the property
inside the named clock node — never `lateinit`. `max-rate-custom`
must be strictly below the clock's hard cap (`max-rate-maxn` if
defined, otherwise the live `max_rate` from a running target of
the same chip / SKU).
DTS edit form, semantics, and the nvpmodel ↔ BPMP clock-node
mapping live in [`references/bpmp-dtb-clock-edits.md`](references/bpmp-dtb-clock-edits.md).
Then hand control back to the protocol — its "Recompile", "Sanity-check
the recompiled blob", "Stage in the overlay tracker", and "Cleanup"
steps cover the rest.
Commit-message convention per the protocol:
`<BPMP_BASENAME>: jetson-customize-clocks — <clock-node> max-rate-custom = <value>`.
### Content edit: EMC DVFS disable / enable
Default behavior (EMC DVFS on) requires no edit. Disabling EMC
DVFS is a **multi-node edit** applied inside the same "Edit the DTS" step of
the protocol, **not** a `bwmgr` toggle:
| # | Edit | Scope |
|---|---|---|
| 1 | `bwmgr.enabled = <0x00>` | All SoCs, mandatory |
| 2 | `cactmon.enabled = <0x00>` | All SoCs, mandatory |
| 3 | `/delete-node/ osp-controller` | **T26x (Thor) mandatory** — T23x (Orin) has no such node, skip |
Detection: `dtc -I dtb -O dts <bpmp-dtb> | grep -c osp-controller`
— zero hits ⇒ T23x path. Full DTS snippets, the surviving-paths
failure modes, and the re-enable procedure are in
[`references/emc-dvfs-disable.md`](references/emc-dvfs-disable.md).
Apply the protocol's "Recompile" through "Cleanup" steps once the multi-node edit is in
place. Commit-message convention:
`<BPMP_BASENAME>: jetson-customize-clocks — EMC DVFS disable (bwmgr + cactmon[+ osp-controller])`.
Disabling raises idle power; intended for stress / performance
tests, not production rootfs.
### Re-run + idempotency
Per the protocol's "Re-runnability" section, re-running this
skill with the same target value produces a no-op commit. Re-
running with a different value rewrites the same property — `git
log -- $BPMP_REL` shows the per-run history. To return a clock
to its `max-rate-maxn` ceiling, edit the DTS to remove the
`max-rate-custom` line and recompile.
## Operation 2 — nvpower.sh edits
Edits `nvpower.sh`, which runs at boot via `nvpower.service` to set
cpufreq / devfreq governors and rates.
### The per-script file
The script this Operation edits has the relative path:
```
Linux_for_Tegra/rootfs/etc/systemd/nvpower.sh
```
It lives in **two** roots; the Operation walks both:
| Role | Location | Skill writes? |
|---|---|---|
| Detection + pristine source | `<bsp_image.root_path>/Linux_for_Tegra/rootfs/etc/systemd/` | no — read-only |
| Overlay edit target + git commit | `<source.root_path>/Linux_for_Tegra/rootfs/etc/systemd/` | yes |
Subsequent sub-steps refer to **the per-script file** to mean the overlay
copy under `<source.root_path>`. The `<bsp_image.root_path>` copy is read
once during the pristine-import step below, then never touched again.
### Overlay edit recipe (apply before editing nvpower.sh)
Follow the canonical
[Off-skill edits recipe](../../context/bsp-customization-workflow.md#off-skill-edits)
in the workflow doc — pristine import + customization commit pair, both
gated by the preview gate. `nvpower.sh` is a single file with no
propagation set; one pristine commit + one customization commit covers
the entire change.
Concrete substitutions for this skill:
- `<rel>/<file>` is `rootfs/etc/systemd/nvpower.sh`.
- Suggested pristine-import message:
`import pristine: rootfs/etc/systemd/nvpower.sh`,
body `Source: <bsp_image.root_path>/Linux_for_Tegra/ (BSP <bsp_image.version>)`.
- Suggested customization-commit header:
`jetson-customize-clocks: nvpower.sh <summary>`,
body lines like `set_cpufreq_governor: desired_cpufreq_gov "schedutil" -> "performance"`.
### Pick the edit
Function locations (`set_cpufreq_governor`, `set_devfreq_governor`), common-edit recipes (pin to Fmax, static rate, min/max bounds), and the `nvidia-l4t-init` package-upgrade caveat live in [`references/nvpower-sh-edits.md`](references/nvpower-sh-edits.md).
### Deploy
The customization commit in the overlay tracker does not reach the device
on its own. The Deploy chain:
1. **`/jetson-promote-image`** — copies every tracked file in the overlay
into `<bsp_image.root_path>/Linux_for_Tegra/`. Diff-aware (skip
byte-identical); uses `sudo cp -p` for `rootfs/*` destinations.
2. **`/jetson-flash-image`** — flashes the updated `bsp_image` to the
device. `nvpower.service` runs the new script on the next boot.
3. (Alternate, no flash) Copy `<source.root_path>/Linux_for_Tegra/rootfs/etc/systemd/nvpower.sh`
directly to the running target's `/etc/systemd/nvpower.sh`, then
`sudo systemctl restart nvpower.service` (or reboot).
Editing `<source.root_path>/...` without committing — or editing
`<bsp_image.root_path>/...` directly — does nothing for `/jetson-promote-image`
and is silently lost on the next `/jetson-init-image` re-extract.
## Recipe — pin everything to MAXN for stress / performance runs
Combines Operations 1 + 2. Operation 1's BPMP edits all flow
through one round of the protocol (a single decompile / multi-node
edit / recompile / commit cycle — don't round-trip the protocol
twice for the same `.dtb`):
1. **BPMP DTB** (the "Content edit: `max-rate-custom` on a named clock node" step content): leave `max-rate-custom` unset on every CPU / GPU / EMC clock; remove existing `max-rate-custom` lines that lower the ceiling.
2. **BPMP DTB** (the "Content edit: EMC DVFS disable / enable" step content): pin EMC at its init rate — `bwmgr.enabled = 0`, `cactmon.enabled = 0`, plus `/delete-node/ osp-controller` on T26x (skip on T23x).
3. Apply both content edits inside one protocol "Edit the DTS" invocation, then run the remaining protocol steps (recompile, sanity-check, single customization commit covering both content edits).
4. **nvpower.sh** (Operation 2): set `desired_cpufreq_gov="performance"` and `desired_devfreq_gov="performance"` unconditionally; remove the GPU/nvjpg skip in `set_devfreq_governor`. Applies via Operation 2's overlay edit recipe (the "Overlay edit recipe (apply before editing nvpower.sh)" step) — a separate overlay-tracker pristine + customization commit pair on the rootfs script, distinct from the BPMP-DTB protocol's commit.
5. Set the boot-default nvpmodel mode to MAXN via [`/jetson-customize-nvpmodel`](../jetson-customize-nvpmodel/SKILL.md) — the per-clock nvpmodel cap clamps below `max-rate-maxn` regardless of BPMP DTB content.
Deploy [`/jetson-promote-image`](../jetson-promote-image/SKILL.md) → [`/jetson-flash-image`](../jetson-flash-image/SKILL.md) picks up the new BPMP DTB (via the overlay tracker) and the edited `nvpower.sh` (via the same overlay tracker) on the next flash.
## Limitations
- **Image-build-time only.** All edits land under `<source.root_path>/Linux_for_Tegra/` and reach the device only via `/jetson-promote-image` → `/jetson-flash-image`. Live-target tuning is out of scope.
- **`max-rate-custom` only lowers the ceiling.** It must be strictly below `max-rate-maxn`; raising the silicon cap is not supported.
- **Effective ceiling is two-layer.** The runtime ceiling is `min(BPMP cap, active-nvpmodel-mode cap)`. The nvpmodel cap is owned by `/jetson-customize-nvpmodel`; this skill does not edit it.
- **SoC-conditional EMC DVFS gate.** Disabling EMC DVFS requires editing different node sets on T23x (bwmgr + cactmon) vs T26x (bwmgr + cactmon + delete `osp-controller`). Mis-detection produces undefined behavior.
- **T23x GPU cap is multi-node.** The GPU clock is split across `nafll_gpusys` and every `nafll_gpcX`; the cap binds only when applied to all of them.
- **`nvpower.sh` is package-managed.** It ships in `nvidia-l4t-init`; package upgrades clobber in-place edits. Long-lived setups should prefer a systemd drop-in or sibling helper.
- **ODMDATA wins.** When an ODMDATA token covers a property, the token overrides direct BPMP DTS edits at flash time. Direct BPMP DTS edits are the fallback for properties no NVIDIA token reaches.
- **`max-rate-maxn` and `lateinit` are off-limits.** `max-rate-maxn` is the silicon ceiling (read-only). `lateinit` is for boot-time clock init, not ceiling overrides — never touch either.
- **BPMP DTB may be SKU-multiplexed.** On compound / dispatched flash confs (Orin AGX devkit chain), `BPFDTB_FILE` is selected by `board_sku` / `board_FAB` via `update_flash_args_common`. Reading the static `BPFDTB_FILE=` line is wrong when the chain conditionally overrides it; resolve via the dispatch instead.
## Troubleshooting
| Error | Cause | Solution |
|---|---|---|
| `max-rate-custom` set but clock still ramps to `max-rate-maxn` on T23x GPU | Only `nafll_gpusys` was capped; the `nafll_gpcX` partitions still run at `max-rate-maxn` and dominate the effective ceiling. | Apply the same `max-rate-custom` to `nafll_gpusys` **and** every `nafll_gpcX` node enumerated by `grep -nE '^\s*nafll_gpc[0-9]+\s*:' <decompiled.dts>`. |
| EMC DVFS disable appears to apply but EMC still scales on T26x | Only `bwmgr.enabled = <0x00>` was set; `osp-controller` survives and re-issues frequency changes via the QoS path. | Add edits #2 (`cactmon.enabled = <0x00>`) and #3 (`/delete-node/ osp-controller`) inside the same "Edit the DTS" step. Verify `osp-controller` via `dtc -I dtb -O dts <bpmp-dtb> \| grep -c osp-controller` → expect 0. |
| EMC DVFS disable rejected on T23x with "node not found" for `osp-controller` | T23x (Orin) BPMP DTBs do not contain `osp-controller`; edit #3 must be skipped on T23x. | Detect SoC family with the `grep -c osp-controller` step; only apply #3 when the count is ≥1. |
| BPMP refuses to load DTB after edit: `max-rate-custom >= max-rate-maxn` | `max-rate-custom` was set to or above the silicon ceiling. | Lower `max-rate-custom` strictly below `max-rate-maxn`. If `max-rate-maxn` is absent from the node, query the live cap on a running target: `cat /sys/kernel/debug/bpmp/debug/clk/<clock>/max_rate`. |
| `osp-controller` re-appears after `status = "disabled"` | `status = "disabled"` does not remove the node from the device tree; BPMP still walks it. | Replace with `/delete-node/ osp-controller;` — the node must not exist for BPMP to skip the path. |
| Edits to `nvpower.sh` lost after `apt upgrade` | `nvpower.sh` is owned by the `nvidia-l4t-init` deb and gets overwritten on upgrade. | For long-lived test setups, package edits into a systemd drop-in or a sibling helper file referenced by `nvpower.sh`, rather than editing `nvpower.sh` in place. |
| `/jetson-promote-image` is a no-op after editing the BPMP DTB | The edit was applied to `<bsp_image.root_path>/Linux_for_Tegra/`, which is `/jetson-promote-image`'s output — not its input. | Move the edit to `<source.root_path>/Linux_for_Tegra/bootloader/<BPFDTB_FILE>` (the overlay tracker) and commit through the BPMP-DTB protocol. |
| Cap appears to apply on first boot then resets after a power-mode change | The active nvpmodel mode's per-clock cap clamps below `max-rate-custom`. | Inspect both layers; if nvpmodel is binding, raise (or remove) the nvpmodel cap via `/jetson-customize-nvpmodel`. The BPMP cap alone is not the runtime ceiling. |
## References
- [`../../references/bsp-customization-bpmp-dtb.md`](../../references/bsp-customization-bpmp-dtb.md) — canonical BPMP-DTB customization protocol (pristine import, decompile, edit, recompile, sanity-check, commit). Operation 1 of this skill is a content-only consumer; the protocol owns the mechanics.
- [`references/clock-control-model.md`](references/clock-control-model.md) — layer stack, two-ceilings overview, effective-runtime-ceiling formula.
- [`references/bpmp-dtb-clock-edits.md`](references/bpmp-dtb-clock-edits.md) — two-ceilings semantics, DTS edit form, nvpmodel ↔ BPMP clock-node mapping, inspection cookbook.
- [`references/emc-dvfs-disable.md`](references/emc-dvfs-disable.md) — full SoC-conditional EMC DVFS disable procedure with DTS snippets, detection, re-enable.
- [`references/nvpower-sh-edits.md`](references/nvpower-sh-edits.md) — `nvpower.sh` function locations + common-edit recipes + package-upgrade caveat.
- [`/jetson-customize-nvpmodel`](../jetson-customize-nvpmodel/SKILL.md) — sibling skill: nvpmodel power modes. The active mode's per-clock cap clamps below the BPMP DTB cap.
모든 파일
9개 파일jetson-customize-clocks 설치
스킬 파일을 다운로드하여 .claude/skills/ 디렉터리에 압축을 풀어주세요.
ZIP 다운로드저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.
git clone https://github.com/NVIDIA/skills/tree/main/skills/jetson-customize-clocks # Copy SKILL.md to your .claude/skills/ directory
복사





집
