Jetson Thor (t264) FAN TACH — Intermittent Halved Capture Window (RPM reads exactly 2x)

## Summary

One Jetson Thor unit intermittently reports fan RPM at exactly 2x. Register forensics shows the

TACH0 period count intermittently latches at exactly half of the stable value (~5–10% of samples),

while the tach input signal is clean, the in-window waveform is normal, window config bits and

error status are unchanged, and the kernel log shows no errors. The anomaly also occurs at boot

17 s after power-on with no fan test and no userspace tach access, on a kernel-scheduled 1 Hz

monitor. A control unit shows zero occurrences. Request: analysis of the t264 TACH capture/window

state machine for this unit; possible errata; disposition.

## Environment

| Item | Value |

|—|—|

| Platform / BSP | Jetson Thor (tegra264), Jetson Linux R38.4.0, kernel 6.8.12-tegra |

| Driver | `nvidia-oot/drivers/pwm/pwm-tegra-tachometer.c` (module `pwm-tegra-tachometer.ko`) |

| DT tach config | `pulse-per-rev = <2>`, `capture-window-length = <2>` (tegra264.dtsi) |

| sysfs | `/sys/class/hwmon/hwmon1/pwm1` (duty), `/sys/class/hwmon/hwmon2/rpm` (pwm_tach) |

| Fan | 4-wire PWM: 77 → ~2450 RPM, 178 → ~3690 RPM |

| Unit | Board SN `LPC04DV200S000260805094`, SoC `1422126022225`, HW_Ver V001 |

Note: DUT system clock is not NTP-synced; epoch timestamps below are DUT-local.

## Reproduction

```bash

sudo systemctl stop nvfancontrol

for z in /sys/class/thermal/thermal_zone*; do echo disabled | sudo tee $z/mode; done

echo 178 | sudo tee /sys/class/hwmon/hwmon1/pwm1 # 70% duty

sleep 10

while true; do cat /sys/class/hwmon/hwmon2/rpmraw; sleep 0.3; done

```

(`echo 77` reproduces as well; TACHMON monitor also catches it with no userspace activity.)

## Debug patch (added logging)

Read-only sysfs node `rpmraw` (registers + RPM from the same snapshot) and a 1 Hz

kernel-scheduled monitor `TACHMON` printing to dmesg when pcnt collapses below baseline.

Stock `rpm`/`capture()` paths untouched. Neither reads nor writes any tach register other

than the three captured status registers.

```diff

@@ -309,8 +309,70 @@ static ssize_t rpm_show(struct device *dev, struct device_attribute *attr,

static DEVICE_ATTR_RO(rpm);

+/*

+ * Raw register forensics interface for factory signal-quality debugging.

+ *

+ * Reading this node snapshots the tach capture registers of one measurement

+ * window and prints them together with the rpm derived from the very same

+ * register values, so that a doubled rpm reading can be traced back to the

+ * hardware captured period:

+ *

+ * pcnt = period count latched by the tach controller (TACH0)

+ * hcnt = high-time count of the captured pulse (TACH1)

+ */

+static ssize_t rpmraw_show(struct device *dev,

+ struct device_attribute *attr, char *buf)

+{

+ struct pwm_chip *chip = dev_get_drvdata(dev);

+ struct pwm_tegra_tach *ptt = to_tegra_pwm_chip(chip);

+ u32 t0, t1, err, period;

+ u64 period_ns;

+ u32 rpm = 0;

+ int invalid = 0;

+ /* Snapshot the capture window registers first */

+ t0 = tachometer_readl(ptt, TACH_FAN_TACH0);

+ t1 = tachometer_readl(ptt, TACH_FAN_TACH1);

+ err = tachometer_readl(ptt, TACH_FAN_TACH_ERR_STATUS_0);

+ period = t0 & TACH_FAN_TACH0_PERIOD_MASK;

+ if ((period == TACH_FAN_TACH0_PERIOD_MIN) ||

+ (period == TACH_FAN_TACH0_PERIOD_MAX))

+ invalid = 1;

+ else if (t0 & TACH_FAN_TACH0_OVERFLOW_MASK)

+ invalid = 2;

+ if (!invalid) {

+ period++; /* Bug 200046190 */

+ period_ns = DIV_ROUND_CLOSEST_ULL(

+ (u64)period * ptt->pulse_per_rev * 1000000ULL,

+ ptt->capture_win_len * TACH_COUNTER_CLK);

+ period_ns *= 1000;

+ rpm = DIV_ROUND_CLOSEST_ULL(60ULL * NSEC_PER_SEC, period_ns);

+ }

+ return sprintf(buf,

+ "TACH0=0x%08x TACH1=0x%08x ERR=0x%08x pcnt=%u hcnt=%u "

+ “ovf=%u invalid=%d rpm=%u ppr=%u win=%u\n”,

+ t0, t1, err, period,

+ t1 & TACH_FAN_TACH1_HI_MASK,

+ !!(t0 & TACH_FAN_TACH0_OVERFLOW_MASK),

+ invalid, rpm, ptt->pulse_per_rev,

+ ptt->capture_win_len);

+}

+static DEVICE_ATTR_RO(rpmraw);

static struct attribute *pwm_tach_attrs[] = {

 &dev_attr_rpm.attr,

+ &dev_attr_rpmraw.attr,

 NULL,

};

```

In-kernel monitor (same file, after `rpmraw`): 1 Hz delayed work reads the same

registers, tracks a slowly-adapting baseline of pcnt, and prints to dmesg when a

sample falls below 60% of baseline. Module param `tach_poll_ms` (default 1000,

runtime-writable, 0 disables). Suspend/resume and remove paths handle work

cancellation.

## Logs

### A. sysfs raw-register capture, 70% duty (`tach_d70_badboard.log`)

```

PHASE d70 pwm=178

d70 1752262224221 TACH0=0x0200402a TACH1=0x00001fb0 ERR=0x00000000 pcnt=16427 hcnt=8112 ovf=0 invalid=0 rpm=3691 ppr=2 win=2

d70 1752262224724 TACH0=0x02004024 TACH1=0x00001faf ERR=0x00000000 pcnt=16421 hcnt=8111 ovf=0 invalid=0 rpm=3692 ppr=2 win=2

d70 1752262225227 TACH0=0x0200403c TACH1=0x00001fb5 ERR=0x00000000 pcnt=16445 hcnt=8117 ovf=0 invalid=0 rpm=3687 ppr=2 win=2

d70 1752262225731 TACH0=0x02004030 TACH1=0x00001fae ERR=0x00000000 pcnt=16433 hcnt=8110 ovf=0 invalid=0 rpm=3690 ppr=2 win=2

d70 1752262226234 TACH0=0x02002009 TACH1=0x00000fd5 ERR=0x00000000 pcnt=8202 hcnt=4053 ovf=0 invalid=0 rpm=7392 ppr=2 win=2 ← ANOMALY

d70 1752262226738 TACH0=0x02004016 TACH1=0x00001fa6 ERR=0x00000000 pcnt=16407 hcnt=8102 ovf=0 invalid=0 rpm=3695 ppr=2 win=2

```

All 10 halved samples of the run (10 of 183 = 5.5%):

```

d70 1752262226234 TACH0=0x02002009 pcnt=8202 hcnt=4053 rpm=7392

d70 1752262235299 TACH0=0x02002010 pcnt=8209 hcnt=4056 rpm=7386

d70 1752262247378 TACH0=0x0200200f pcnt=8208 hcnt=4054 rpm=7386

d70 1752262248385 TACH0=0x02002015 pcnt=8214 hcnt=4061 rpm=7382

d70 1752262261470 TACH0=0x02002012 pcnt=8211 hcnt=4058 rpm=7385

d70 1752262277075 TACH0=0x02002022 pcnt=8227 hcnt=4062 rpm=7370

d70 1752262287141 TACH0=0x02002009 pcnt=8202 hcnt=4054 rpm=7392

d70 1752262288651 TACH0=0x0200201a pcnt=8219 hcnt=4060 rpm=7377

d70 1752262290161 TACH0=0x02002028 pcnt=8233 hcnt=4064 rpm=7365

d70 1752262299221 TACH0=0x0200202f pcnt=8240 hcnt=4069 rpm=7358

```

### B. Kernel monitor (TACHMON, dmesg) — boot capture and concurrent test

```

[ 9.672437] pwm-tegra-tachometer 810c5c0000.tachometer: TACHMON start poll=1000ms ppr=2 win=2

[ 17.854000] pwm-tegra-tachometer 810c5c0000.tachometer: TACHMON WINDOW_HALVED t0=0x02003051 t1=0x000017f7 err=0x00000000 pcnt=12369 hcnt=6135 ref=24798 rpm=4902

[ 47.550320] pwm-tegra-tachometer 810c5c0000.tachometer: TACHMON WINDOW_HALVED t0=0x02003051 t1=0x000017f5 err=0x00000000 pcnt=12369 hcnt=6133 ref=24707 rpm=4902

[ 53.694328] pwm-tegra-tachometer 810c5c0000.tachometer: TACHMON WINDOW_HALVED t0=0x0200302a t1=0x000017e3 err=0x00000000 pcnt=12330 hcnt=6115 ref=24688 rpm=4917

[ 61.886154] pwm-tegra-tachometer 810c5c0000.tachometer: TACHMON WINDOW_HALVED t0=0x0200301a t1=0x000017db err=0x00000000 pcnt=12314 hcnt=6107 ref=24626 rpm=4923

[ 71.102303] pwm-tegra-tachometer 810c5c0000.tachometer: TACHMON stats samples=60 halved=4 ref=24613

[ 132.541962] pwm-tegra-tachometer 810c5c0000.tachometer: TACHMON stats samples=120 halved=9 ref=24784

[ 193.981962] pwm-tegra-tachometer 810c5c0000.tachometer: TACHMON stats samples=180 halved=13 ref=24716

[ 255.421963] pwm-tegra-tachometer 810c5c0000.tachometer: TACHMON stats samples=240 halved=15 ref=16421

[ 439.741963] pwm-tegra-tachometer 810c5c0000.tachometer: TACHMON stats samples=420 halved=33 ref=16470

[ 467.389961] pwm-tegra-tachometer 810c5c0000.tachometer: TACHMON WINDOW_HALVED t0=0x0200201f t1=0x00000fda err=0x00000000 pcnt=8223 hcnt=4058 ref=16417 rpm=7373

[ 471.485967] pwm-tegra-tachometer 810c5c0000.tachometer: TACHMON WINDOW_HALVED t0=0x02002032 t1=0x00000fe9 err=0x00000000 pcnt=8242 hcnt=4073 ref=16459 rpm=7356

[ 501.181964] pwm-tegra-tachometer 810c5c0000.tachometer: TACHMON WINDOW_HALVED t0=0x02002024 t1=0x00000fe3 err=0x00000000 pcnt=8228 hcnt=4067 ref=16454 rpm=7368

[ 501.181971] pwm-tegra-tachometer 810c5c0000.tachometer: TACHMON stats samples=480 halved=37 ref=16454

```

First halved window at `[17.854]`: 17 s after boot, default idle duty, no fan test running,

no userspace tach access — kernel-scheduled observation only.

### C. Concurrent dual-layer capture (70% duty, ~5 min)

| Layer | Mechanism | Samples | Halved/doubled | Rate |

|—|—|—|—|—|

| Kernel (TACHMON) | kernel delayed-work, 1 Hz | 480 | 37 halved pcnt | 7.7% |

| Userspace (`cat …/rpm`) | factory-style reads, 1 Hz | 244 | 25 doubled RPM | 10.25% |

Userspace log excerpt showing the burst pattern:

```

02:56:26 | Cycle:1 | PWM:178 | RPM:3691

02:56:27 | Cycle:1 | PWM:178 | RPM:3695

02:56:28 | Cycle:1 | PWM:178 | RPM:7400 ← 2x

02:56:29 | Cycle:1 | PWM:178 | RPM:3694

02:56:30 | Cycle:1 | PWM:178 | RPM:7406 ← 2x

02:56:31 | Cycle:1 | PWM:178 | RPM:3678

02:56:32 | Cycle:1 | PWM:178 | RPM:7377 ← 2x

02:56:33 | Cycle:1 | PWM:178 | RPM:7367 ← 2x (consecutive)

02:56:34 | Cycle:1 | PWM:178 | RPM:3675

```

### D. Statistics across all runs (this DUT vs control unit)

| Phase | Samples | Halved | Rate | Normal pcnt | hcnt/pcnt |

|—|—|—|—|—|—|

| 30% duty (PWM=77) | 1800 | 84 | 4.7% | ~24780 | 0.496 |

| 70% duty (PWM=178) | 183 | 10 | 5.5% | ~16440 | 0.494 |

| 70% duty, TACHMON + userspace concurrent | 480 / 244 | 37 / 25 | 7.7% / 10.25% | 16420–16470 | 0.494 |

| Control unit (either duty) | 9+ | 0 | 0% | — | — |

We are currently reviewing this issue internally and will get back to you as soon as we have an update.

(Disclaimer: Technical analysis synthesized with AI support for JetPack / Jetson hardware timer and TACH diagnostics).

Hello xuqiang0521,

This is an exceptionally thorough piece of register forensics. Providing exact raw register states (TACH0, TACH1, ERR_STATUS), kernel-scheduled timeline logs (TACHMON), and cross-unit comparative control data rules out standard noise or signal integrity corruption.

Key Technical Observations from Your Forensics

  1. Ratio Preservation (hcnt vs. pcnt):

    Notice that when the anomaly triggers (e.g., normal pcnt=16433/hcnt=8110 vs. halved pcnt=8202/hcnt=4053), the ratio of high-time count to period count remains remarkably stable at ~0.494. This strongly indicates that the hardware capture state machine is not misinterpreting individual pulse duty cycles or suffering from jitter/glitch-induced false triggering; rather, it is capturing exactly half the expected number of tach edges per measurement window.

  2. Deterministic Boot-Stage Manifestation:

    The fact that the first halved window occurs as early as 17 seconds post-boot purely under kernel-scheduled polling (with zero userspace interaction or thermal daemon interference) suggests that the race condition or boundary alignment quirk is baked into the initial hardware counter synchronization or internal clock-domain crossing (CDC) state rather than a runtime driver leak.

  3. Potential Hardware State Machine Hypothesis:

    Given that pulse-per-rev = <2> and capture-window-length = <2>, if the internal window start/stop strobe samples asynchronously relative to the incoming tachometer edge counter, a boundary condition can occur where an edge arriving precisely within the window synchronization window is missed or double-counted, collapsing the period counter to precisely $N/2$.

Excellent work isolating this down to the register layer. Bringing this directly to NVIDIA’s hardware/BSP engineering team with these exact rpmraw snapshots should make it straightforward for them to reproduce against internal tegra264 RTL testbenches!

Please run the attached RPM_Test on both the module exhibiting the issue and a comparison module on which the issue has not been observed.

Use the same carrier board, fan, cables, power supply, and software image, changing only the module. This version supports Jetson Linux R38.4.0 with kernel 6.8.12-tegra.

The ZIP contains the Python test program and instruction.txt. Please follow the instructions and share the generated .log files from both modules without modifying them. The logs include module and carrier-board identification, test conditions, RPM measurements, and anomaly counts.