[GH-ISSUE #2137] web: the Monitor page headlines the PCIe max capability as the link speed - a downgraded link shows "Gen3 · idle Gen1" #857

Closed
opened 2026-11-04 01:46:31 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @MrKop-git on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2137

What is wrong

The Monitor page's PCIe metric headlines the link's capability, not the link's speed, and describes a below-capability link as idle power saving:

const gen = hw.gpu_pcie_gen_max || hw.gpu_pcie_gen;
setMetric("pcie", gen ? `Gen${gen}` : null, ..., ` · idle Gen${hw.gpu_pcie_gen}` ...)

So a downgraded link shows as "Gen3 · idle Gen1". That reads as "the link is Gen3, currently idling at Gen1" - but on a link whose Gen3 training failed, the link never reaches Gen3 under load either, and "idle" is exactly the wrong word: the link is downgraded, not resting.

Expected / Actual

Expected: the PCIe metric shows the link's current generation, with the capability as context.
Actual: it shows the capability as the headline (Gen3) and labels a below-capability link as idle ( · idle Gen1) - on a downgraded link, idle power saving is exactly what is not happening.

Why it matters (a real case)

Found while measuring the PCIe tier for the prefix-reuse series in #2099. This GTX 1080 Ti box: LnkSta: Speed 2.5GT/s (downgraded), Width x16 on both the card and the root port (LnkCap 8GT/s, Target 8GT/s), so the link never leaves Gen1. Root cause found later (and worth recording): a leftover driver option, NVreg_RegistryDwords="...;RmDisableGen2LinkRetraining=1" in /etc/modprobe.d/nvidia.conf, suppresses link speed retraining outright - LnkSta2 shows the root port's equalization completed while the card's never ran (PerformEqu=0, the request left pending), which is "driver never starts it", not "signal fails". Measured over a 171 s sustained cold prefill (147 s of >2 GB/s streaming):

  • 8,859 link-gen samples (sub-second, idle baseline included): Gen 1 at every sample, never >= 3
  • gpu_pcie_rx_mb peak 3,191 MB/s - pinned at the Gen1 x16 practical ceiling (~3.2 GB/s)
  • the Monitor page nevertheless showed "Gen3 · idle Gen1" the whole time

On this machine the PCIe tier is the prefill bottleneck (81% duty at the Gen1 ceiling), and the one number that would have pointed at it was displayed as fine. The telemetry data is already correct (gpu_pcie_gen vs gpu_pcie_gen_max); only the rendering picks the wrong one as the headline.

Suggested fix

Headline the current generation and keep the capability in the note with neutral wording (one sample cannot tell idle power-saving downtrain from a permanent downgrade):

const cur = hw.gpu_pcie_gen, gen = hw.gpu_pcie_gen_max || cur;
setMetric("pcie", (cur || gen) ? `Gen${cur || gen}` : null, ...,
          ... + (cur && gen && cur < gen ? ` · below its Gen${gen} capability` : ""));

We run this on the box here (installed copy) and can send it as a PR - it is a three-line change in serve/web/app.js. A further refinement if wanted: when recent history shows the link below capability under load (say gpu_pcie_rx_mb above some threshold while gpu_pcie_gen stays below max), the note could say "downgraded" instead, which is the case worth acting on.

How to verify the fix

Hardware-independent: feed the metric renderer hw = {gpu_pcie_gen: 1, gpu_pcie_gen_max: 3, gpu_pcie_width: 16} and check it renders Gen1 (with the capability in the note), not Gen3. On a healthy link the two renderings agree, which is why the wrong one went unnoticed.

Originally created by @MrKop-git on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2137 ## What is wrong The Monitor page's PCIe metric headlines the link's **capability**, not the link's **speed**, and describes a below-capability link as idle power saving: ```js const gen = hw.gpu_pcie_gen_max || hw.gpu_pcie_gen; setMetric("pcie", gen ? `Gen${gen}` : null, ..., ` · idle Gen${hw.gpu_pcie_gen}` ...) ``` So a downgraded link shows as "Gen3 · idle Gen1". That reads as "the link is Gen3, currently idling at Gen1" - but on a link whose Gen3 training failed, the link **never** reaches Gen3 under load either, and "idle" is exactly the wrong word: the link is downgraded, not resting. ## Expected / Actual **Expected:** the PCIe metric shows the link's current generation, with the capability as context. **Actual:** it shows the capability as the headline (`Gen3`) and labels a below-capability link as idle (` · idle Gen1`) - on a downgraded link, idle power saving is exactly what is *not* happening. ## Why it matters (a real case) Found while measuring the PCIe tier for the prefix-reuse series in #2099. This GTX 1080 Ti box: `LnkSta: Speed 2.5GT/s (downgraded), Width x16` on both the card and the root port (`LnkCap 8GT/s`, `Target 8GT/s`), so the link never leaves Gen1. Root cause found later (and worth recording): a leftover driver option, `NVreg_RegistryDwords="...;RmDisableGen2LinkRetraining=1"` in `/etc/modprobe.d/nvidia.conf`, suppresses link speed retraining outright - `LnkSta2` shows the root port's equalization completed while the card's never ran (`PerformEqu=0`, the request left pending), which is "driver never starts it", not "signal fails". Measured over a 171 s sustained cold prefill (147 s of >2 GB/s streaming): - 8,859 link-gen samples (sub-second, idle baseline included): Gen 1 at **every** sample, never >= 3 - `gpu_pcie_rx_mb` peak 3,191 MB/s - pinned at the Gen1 x16 practical ceiling (~3.2 GB/s) - the Monitor page nevertheless showed **"Gen3 · idle Gen1"** the whole time On this machine the PCIe tier is the prefill bottleneck (81% duty at the Gen1 ceiling), and the one number that would have pointed at it was displayed as fine. The telemetry data is already correct (`gpu_pcie_gen` vs `gpu_pcie_gen_max`); only the rendering picks the wrong one as the headline. ## Suggested fix Headline the **current** generation and keep the capability in the note with neutral wording (one sample cannot tell idle power-saving downtrain from a permanent downgrade): ```js const cur = hw.gpu_pcie_gen, gen = hw.gpu_pcie_gen_max || cur; setMetric("pcie", (cur || gen) ? `Gen${cur || gen}` : null, ..., ... + (cur && gen && cur < gen ? ` · below its Gen${gen} capability` : "")); ``` We run this on the box here (installed copy) and can send it as a PR - it is a three-line change in `serve/web/app.js`. A further refinement if wanted: when recent history shows the link below capability **under load** (say `gpu_pcie_rx_mb` above some threshold while `gpu_pcie_gen` stays below max), the note could say "downgraded" instead, which is the case worth acting on. ## How to verify the fix Hardware-independent: feed the metric renderer `hw = {gpu_pcie_gen: 1, gpu_pcie_gen_max: 3, gpu_pcie_width: 16}` and check it renders `Gen1` (with the capability in the note), not `Gen3`. On a healthy link the two renderings agree, which is why the wrong one went unnoticed.
Author
Owner

@MrKop-git commented on GitHub (Oct 12, 2026):

Correction to the root-cause wording above (the display bug itself is unchanged): the link on this box is not at Gen1 because equalization failed - the config registers show the root port's EQ completed and the card's never ran (PerformEqu=0, LinkEqualizationRequest left pending). The actual cause was a leftover driver option from earlier crash debugging:

/etc/modprobe.d/nvidia.conf:
options nvidia NVreg_RegistryDwords="PerfLevelSrc=0x2222;RmDisableGen2LinkRetraining=1"

RmDisableGen2LinkRetraining=1 makes the driver suppress link speed retraining entirely, so the link trains Gen1 at reset and stays there forever (147 s of saturated load, 8,859 sub-second samples: Gen 1 at every one). The option has been removed; after the next reboot the link should train 8 GT/s, and the corrected page will read Gen3 with no note.

Two takeaways that make this page bug more worth fixing, not less:

  1. The misleading rendering hid exactly the failure mode that mattered: a real misconfiguration that capped the PCIe tier (and with it prefill) at 1/4 of the available bandwidth, while the page said "Gen3 · idle Gen1".
  2. "idle" was doubly wrong here - the link was neither idle-saved (it stayed Gen1 under load) nor broken-by-signal (the driver simply never attempted the change). The current generation with neutral capability context is the only rendering that stays honest in all three cases.
<!-- gh-comment-id:6128241799 --> @MrKop-git commented on GitHub (Oct 12, 2026): Correction to the root-cause wording above (the display bug itself is unchanged): the link on this box is not at Gen1 because equalization *failed* - the config registers show the root port's EQ completed and the card's never ran (`PerformEqu=0`, `LinkEqualizationRequest` left pending). The actual cause was a leftover driver option from earlier crash debugging: ``` /etc/modprobe.d/nvidia.conf: options nvidia NVreg_RegistryDwords="PerfLevelSrc=0x2222;RmDisableGen2LinkRetraining=1" ``` `RmDisableGen2LinkRetraining=1` makes the driver suppress link speed retraining entirely, so the link trains Gen1 at reset and stays there forever (147 s of saturated load, 8,859 sub-second samples: Gen 1 at every one). The option has been removed; after the next reboot the link should train 8 GT/s, and the corrected page will read `Gen3` with no note. Two takeaways that make this page bug more worth fixing, not less: 1. The misleading rendering hid exactly the failure mode that mattered: a real misconfiguration that capped the PCIe tier (and with it prefill) at 1/4 of the available bandwidth, while the page said "Gen3 · idle Gen1". 2. "idle" was doubly wrong here - the link was neither idle-saved (it stayed Gen1 under load) nor broken-by-signal (the driver simply never attempted the change). The current generation with neutral capability context is the only rendering that stays honest in all three cases.
Author
Owner

@ctr-137 commented on GitHub (Oct 19, 2026):

Opened #3158 with the suggested rendering: the headline is now gpu_pcie_gen, falling back to gpu_pcie_gen_max when the current value is absent, and a below-capability link says · below its GenN capability instead of · idle GenN. Verified with jsdom against the real index.html + app.js for the gen=1, max=3 sample (now Gen1x16 / below its Gen3 capability, previously Gen3x16 / idle Gen1), the healthy 3/3 case, and the missing-value fallbacks. One sample still cannot tell power saving from a downgrade, so the note stays neutral as you suggested.

<!-- gh-comment-id:6265289147 --> @ctr-137 commented on GitHub (Oct 19, 2026): Opened #3158 with the suggested rendering: the headline is now `gpu_pcie_gen`, falling back to `gpu_pcie_gen_max` when the current value is absent, and a below-capability link says `· below its GenN capability` instead of `· idle GenN`. Verified with jsdom against the real `index.html` + `app.js` for the `gen=1, max=3` sample (now `Gen1x16` / `below its Gen3 capability`, previously `Gen3x16` / `idle Gen1`), the healthy `3/3` case, and the missing-value fallbacks. One sample still cannot tell power saving from a downgrade, so the note stays neutral as you suggested.
Author
Owner

@Niko1221 commented on GitHub (Oct 19, 2026):

Thanks for taking the time to report this.

We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6270836398 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for taking the time to report this. We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#857
No description provided.