620.70.06: platform power mode unreadable (NV_ERR_INVALID_DATA at platform_request_handler_ctrl.c:2118), GPU stuck at base clock; 615.78.08 clean on same BIOS

Aperta
#1,549 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c, linux

Direzione di ricerca

Start in src/nvidia/src/kernel/platform/platform_request_handler_ctrl.c around lines 1428 and 2113-2120, where NV_ERR_INVALID_DATA from pfmreqhndlrGetPerfSensorCounterById_IMPL() is treated as fatal in _pfmreqhndlrUpdatePpmdLimit(). Then compare the dsmOrderOfPrecedenceList and DSMCalls[] changes in src/nvidia/src/kernel/platform/acpi_common.c between 615.78.08 and 620.70.06. Done means identifying why the NVPCF_3X entry changes DSM selection on this platform, which needs firmware and driver knowledge beyond a newcomer's reach.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

On 620.70.06 the open module cannot read the platform power mode from the firmware: pfmreqhndlrGetPerfSensorCounterById() returns NV_ERR_INVALID_DATA for PFM_REQ_HNDLR_PPMD_SENSOR, _pfmreqhndlrUpdatePpmdLimit() asserts at platform_request_handler_ctrl.c:2118 and bails before emitting NV2080_NOTIFIERS_PLATFORM_POWER_MODE_CHANGE. nvidia-powerd therefore keeps whatever power budget it applied last, and the GPU sits at base clock under load with SW Power Cap and SW Thermal Slowdown both flagged as active at ~59 °C against an 87 °C target. Restarting nvidia-powerd restores clocks immediately (1050 MHz -> ~2520 MHz, 19 W -> 55 W) without any firmware or thermal change.

615.78.08 on the same kernel and the same BIOS produced 1 assertion per boot. 620.70.06 produces hundreds per boot and continues at ~1/s while the machine is idle.

Environment

Laptop Lenovo LOQ 15APH8 (82XT), board LNVNB161216
BIOS LYCN46WW, 06/30/2025
dGPU NVIDIA GeForce RTX 4050 Laptop GPU, 10de:28e1, VBIOS 95.07.22.00.50, 5-95 W
iGPU AMD Phoenix1
Kernel 7.3.4-1-cachyos
Driver 620.70.06, open kernel modules, built from tag 620.70.06 (locally built DKMS)
Previous driver 615.78.08, open kernel modules, same kernel, same BIOS, same machine

Regression boundary (assertions per boot)

journalctl -k -b -1..-9 | rg -c 'failed to get platform power mode from SBIOS':

Driver Assertions per boot
615.78.08 1, 1, 1 (three boots)
620.70.06 590, 20568, 8234, 9598, 15042, 18115, 1905

Current boot (17 min uptime, GPU idle): 874.

NVRM: nvAssertOkFailedNoLog: Assertion failed: Invalid data passed [NV_ERR_INVALID_DATA] (0x00000025)
returned from PlatformRequestHandler failed to get platform power mode from SBIOS
@ platform_request_handler_ctrl.c:2118

Driver-side path

620.70.06 src/nvidia/src/kernel/platform/platform_request_handler_ctrl.c:

  • :1428-1431 – pfmreqhndlrGetPerfSensorCounterById_IMPL() returns NV_ERR_INVALID_DATA (the documented "counter is not available" code) when the cache entry is neither bSupported nor bVolatile.
  • :2113-2120 – _pfmreqhndlrUpdatePpmdLimit() treats that same return as fatal: assert, then goto exit without filling ppmMaskCurrent/ppmIdxCurrent and without gpuNotifySubDeviceEvent(NV2080_NOTIFIERS_PLATFORM_POWER_MODE_CHANGE).
  • pfmreqhndlrHandleStatusChangeEvent() (:1489+) calls _pfmreqhndlrCallPshareStatus() and asserts on failure, so the status-change path is also degraded.

Net effect: the sensor that carries the platform's power-mode index is marked unavailable, so no client is ever told that the AC/DC budget changed, and nvidia-powerd keeps its previous decision.

Firmware side (this machine's own ACPI tables)

Dumping DSDT + SSDT* (acpidump, iasl -d) shows the platform does implement the interface; this is not a BIOS that lacks it:

  • \_SB.NPCF (HID NVDA0820) exposes _DSM UUID 36b49710-2483-11e7-9598-0800200c9a66, requires revision (Arg1) 0x0200, and implements sub-functions 0x00, 0x02, 0x04, 0x05, 0x07, 0x0A including a 6-element capability buffer and a 49-byte (0x31) power-budget payload.
  • A second platform DSM implements the GPS/PRH sub-functions 0x00 (FUNC_SUPPORT), 0x13, 0x20 (PSHARESTATUS) and 0x2A (PSHAREPARAMS), with different return sizes for revision 0x0100 and 0x0200.

With ACPI debug enabled (/sys/module/acpi/parameters/debug_level = 0xE), both are called continuously at ~2 Hz:

NVPCF DSM sub-func#1
NVPCF DSM sub-func#2
NV GPS DSM

The NVPCF calls reach implemented sub-functions; the GPS/PRH one is entered and returns without reaching any of its implemented cases (0x00, 0x13, 0x20, 0x2A), which is what an unsupported revision or sub-function probe looks like from the firmware side.

615 -> 620 source delta in this subsystem

git diff 615.78.08 620.70.06 -- src/nvidia/src/kernel/platform/ for the platform request handler is a pure rename (GPS_* -> PFM_REQ_HNDLR_*, ACPI_DSM_FUNCTION_GPS* -> ACPI_DSM_FUNCTION_PRH*); no logic changes. The behavioural delta is in src/nvidia/src/kernel/platform/acpi_common.c:

  • ACPI_DSM_FUNCTION_NVPCF_3X is added to dsmOrderOfPrecedenceList (after NVPCF_2X, before NVPCF).
  • genDsmSubFuncRemapTable grows a column for it (all zero), and ACPI_DSM_FUNCTION_GPS/GPS_2X become PRH/PRH_2X in DSMCalls[], the remap table and getDsmGetObjectSubfunction().
  • ACPI_DSM_FUNCTION_NVPCF_3X is appended to the enum before ACPI_DSM_FUNCTION_COUNT.

Hypothesis (not yet proven): the new NVPCF_3X entry changes which DSM is selected/remapped on this platform, so the driver ends up querying the NVPCF interface where 615 used GPS/PRH, and the sensor capability parse that feeds PFM_REQ_HNDLR_PPMD_SENSOR no longer succeeds. That would explain both the assert storm and the ACPI trace above. I have not isolated the exact selection decision.

Reproduction

  1. Boot 620.70.06 on this machine (battery or AC).
  2. sleep 60; journalctl -k -b | rg -c 'failed to get platform power mode' -> dozens.
  3. Put the dGPU under load (nvidia-smi dmon, or any 3D workload) -> P4, ~1050 MHz, ~19 W against an 83.7 W limit, SW Power Cap + SW Thermal Slowdown active.
  4. systemctl restart nvidia-powerd -> clocks jump to ~2520 MHz and the flags clear; the assertion storm stops.

Ask

  1. Is the NVPCF_3X precedence entry the intended cause here, or is there a platform capability that should gate it?
  2. Is _pfmreqhndlrUpdatePpmdLimit() supposed to treat "counter unavailable" as a permanent state, or should it re-query support / re-sample (the counter clearly becomes available again after nvidia-powerd restarts on this machine)?
  3. Happy to build and test a patch against 620.70.06 on this exact machine, and to submit a PR if you want the change proposed that way.

I can provide the full nvidia-bug-report.sh output and the decoded ACPI tables on request.

Lingua principale
C
Stelle
17.7k
Fork
2k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NVIDIA/open-gpu-kernel-modules

Tutte le issue di NVIDIA/open-gpu-kernel-modules

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.