Jetson Nano · Ubuntu 26.04 · Linux 5.10

Giving the original Jetson Nano a second life: Ubuntu 26.04 on JetPack 5's kernel

NVIDIA's last release for the 2019 Jetson Nano is JetPack 4.6.6: Ubuntu 18.04, Linux 4.9 and CUDA 10.2. We moved a Nano 4GB to Ubuntu 26.04 running on JetPack 5's Linux 5.10 kernel, with CUDA 11.4 and 12.6, TensorRT, an accelerated desktop and hardware video, put it to work on live object detection and metric depth, and wrote a converter so that other Nanos can follow. This is what we did, why, and what we learned.

A hobby project by igsova, with AI coding assistants doing much of the reading, building and bookkeeping. Every claim below was tested on the real board unless it says otherwise.

Code on GitHub Put it on your own Nano Is it safe?

5.10Linux kernel, up from 4.9
27kernel patches in the build
39numbered boot trials
23frames a second, live object detection
In short
YOLO26n drawing boxes around people, buses and traffic lights in a street clip, on the Nano's GPU Depth Anything V2 turning an indoor clip into a depth map in metres, on the Nano's GPU
Object detection (YOLO26n) and metric depth (Depth Anything V2) on the Nano's GPU through TensorRT 8.2, on every frame of two stock clips from Pexels. The clips play at their own speed; the time printed on each frame is the Nano's, measured as in the live webcam programs of sections 9 and 10.

1. Why bother

The Jetson Nano is still a lovely board: four ARM cores, a 128-core Maxwell GPU that runs CUDA, 4 GB of RAM, and dedicated engines for video. But its software stopped in time. JetPack 4.6.6 ships Ubuntu 18.04, which ended standard support in 2023, with Linux 4.9 and CUDA 10.2. Modern Python, ROS 2, current compilers and most new libraries don't target it any more.

NVIDIA's later releases, JetPack 5 and 6, only support the Xavier and Orin boards. The goal here was to see how far a Nano could be pulled forward anyway:

The intended uses drove the priorities: ROS 2 and Nav2, emulators, films over HDMI, a USB webcam with live object detection, and speech recognition.

2. Meet the hardware

At the heart of the Nano sits NVIDIA's Tegra X1 system-on-chip (internally "T210"). It isn't one processor but a collection of specialised engines sharing one memory. Knowing which engine does what makes the rest of this story much easier to follow.

Inside the Tegra X1 Block diagram: CPU cluster, Maxwell GPU, memory controller and LPDDR4, the host1x engine hub with VIC, NVDEC, NVENC and NVJPG, the display controllers driving HDMI and DisplayPort, and I/O blocks for USB, PCIe, SD card and serial. Tegra X1 (T210) system-on-chip CPU cluster 4 × ARM Cortex-A57 up to 1,479 MHz clocked by the DFLL (kernel: cpufreq) GPU (Maxwell, GM20B) 128 CUDA cores, sm_53 up to 921.6 MHz CUDA, OpenGL, Vulkan (kernel: nvgpu) Display controllers 2 heads: HDMI and DP SOR encoders, DPAUX (kernel: tegradc) Memory controller (MC) + EMC SMMU (IOMMU) · bandwidth manager · 204 → 1,600 MHz host1x: the engine hub command channels and sync points for the engines below VIC colour convert scale, blend falcon CPU + firmware NVDEC video decode H.264, H.265 NVENC video encode NVJPG JPEG codec I/O USB 2 + USB 3 (XUSB) PCIe → gigabit Ethernet SD card (SDMMC) UARTs, I2C, SPI, GPIO PMC: power domains fuses: chip ID 4 GB LPDDR4 shared by every engine QSPI flash boot firmware (never written) microSD card kernel, root filesystem HDMI / DP ports monitor
The Tegra X1 is a set of engines around one shared memory. The CPU and GPU get the attention, but video work runs on VIC, NVDEC, NVENC and NVJPG, which the CPU drives through a hub called host1x.

Some terms that come up again and again:

3. What JetPack actually is

"JetPack" sounds like one thing, but it's a bundle. At its base is L4T (Linux for Tegra), NVIDIA's board support package: boot firmware, a kernel with NVIDIA's drivers, and a set of closed user-space libraries. On top come CUDA, cuDNN, TensorRT and the multimedia stack. Each JetPack pins all of these to one Ubuntu release.

JetPack 4 versus JetPack 5 versus this project Three stacked columns. JetPack 4.6.6: Ubuntu 18.04, CUDA 10.2, L4T R32.7.6 libraries, Linux 4.9, supported on the Nano. JetPack 5.1: Ubuntu 20.04, CUDA 11.4, L4T R35 libraries, Linux 5.10, Xavier and Orin only. This project: Ubuntu 26.04, CUDA 11.4 and 12.6 with TensorRT 8.2 from JetPack 4, R35.6 libraries with a few R32.7.6 Nano pieces, Linux 5.10 with 27 patches, the Nano's original boot firmware. JetPack 4.6.6 (L4T R32.7.6) NVIDIA's final Nano release JetPack 5.1 (L4T R35) Xavier and Orin only, no Nano support This project the Nano today Ubuntu 18.04systemd 237, GCC 7 CUDA 10.2, cuDNN 8.2, TensorRT 8.2multimedia: nvvidconv, V4L2 codecs L4T user-space librariesGL, EGL, Vulkan, X driver, nvrm Linux 4.9 + NVIDIA driversnvgpu, nvmap, nvhost, tegradc Boot firmware + U-BootQSPI flash + SD boot partitions Ubuntu 20.04systemd 245 CUDA 11.4, cuDNN 8.6, TensorRT 8.5multimedia: NvBufSurface API L4T R35 librariesstill contain Tegra X1 code paths Linux 5.10 + NVIDIA driverssource still carries T210 drivers No Nano boot firmwareno Nano device tree, no flashing Ubuntu 26.04.1systemd 259 (needs Linux 5.4+) CUDA 11.4 + 12.6, TensorRT 8.2from JetPack 5 and 6; TensorRT from 4 R35.6 libraries, repackaged+ a few R32.7.6 Nano pieces Linux 5.10.216 + 27 patches+ the Nano's R32 device tree, ported The Nano's own boot firmwareuntouched; U-Boot loads 5.10 green arrows: what this project took from where
The project keeps the Nano's boot firmware from JetPack 4, takes JetPack 5's kernel and libraries, and puts Ubuntu 26.04 on top. The hard part is the middle: making JetPack 5's kernel drive Tegra X1 hardware it was never tested on. Later, CUDA 12.6 came from JetPack 6 and TensorRT 8.2 back from JetPack 4 (sections 8 and 9).

Two facts made this feasible. First, NVIDIA's JetPack 5 kernel source (published by NVIDIA, and conveniently mirrored by the OE4T project) still contains the Tegra X1 drivers: the GPU driver still knows the GM20B, and the display driver still has its Tegra210 code. They just aren't built or tested for the Nano. Second, JetPack 5's closed libraries also turned out to contain Tegra X1 code paths and GPU code for the Nano's sm_53 architecture, which we checked on the PC before trying them.

4. Working safely

A failed experiment on an embedded board can be expensive: write the wrong thing to the boot flash and you need recovery tools you may not have. So we set a few rules early and kept them throughout:

The converter of section 11 keeps these rules for other people's Nanos. What it writes, where each download comes from, the clocks and voltages the kernel runs the board at, and what was never tested are set out in the repository's safety page.

The boot chain and the one-boot safety net Power on, boot ROM, QSPI boot firmware, U-Boot, which reads extlinux.conf on the SD card's APP partition and loads the 5.10 kernel, device tree and initrd, then systemd 259. A one-boot entry runs a small init first that restores the previous boot menu. Boot ROMinside the chip QSPI firmwareNVIDIA, JetPack 4 U-Bootreads the SD card /boot/extlinux/extlinux.confmenu on the APP partition, 3 s timeout Linux 5.10 Image + DTB + initrdinitrd only carries the USB 3controller's firmware systemd 259 → Ubuntu 26.04desktop, CUDA, everything else Trying a new kernel: the one-boot entry 1. A new entry, default for the next boot only, adds init=/usr/local/sbin/nano-u26-kernel-once 2. As PID 1 it puts the previous extlinux.conf back (checked by SHA-256), then starts systemd 3. If the kernel is good: keep it, old one stays in the menu
The Nano's boot firmware loads whatever kernel extlinux.conf names, so a new kernel needs no flashing. The one-boot entry makes every kernel experiment reversible: the old kernel stays in the menu, and the old default comes back as soon as the new kernel reaches userspace.

5. Porting the kernel

The core problem: old programs and libraries speak to the kernel through "ioctls", numbered requests with fixed binary layouts. JetPack 4's libraries were built for JetPack 4's kernel. Wherever JetPack 5's kernel changed a request's size or meaning, or dropped it, an old library breaks, often silently. Many of the patches are small translators that accept the old layout as well as the new one.

The rest teach JetPack 5's kernel things NVIDIA only ever did for the Nano in JetPack 4: where the memory timing tables are, how to power the display's encoders, how to tell the video firmware where its microcode lives. A bug-fix patch also went into the shared IOMMU driver.

The 39 kernel trials Thirty-nine numbered trials of JetPack 5's kernel on the Nano, grouped by what each brought up: reaching init (1 to 3), the GPU and CUDA 10.2 (4 to 11), memory and CPU clocks (12 to 17), display and desktop (18 to 25), the everyday boot (26 to 31), the video engine (32 to 36), removing the last kernel warnings (37 and 38) and kernel options for systemd 259 (39). reaching init GPU and CUDA 10.2 memory and CPU clocks display … … display and desktop everyday boot: idle, fan, power, USB video engine (VIC) clean boot systemd 259 1 2 3 the card fails 4 5 6 7 8 9 10 11 CUDA passes 12 13 14 RAM at 1,600 MHz 15 16 17 18 19 20 21 22 23 desktop on HDMI 24 25 26 27 28 29 5.10 by default 30 31 32 33 34 35 36 converter runs 37 38 no kernel warning 39
Each trial was one boot of a new kernel build testing one idea, from trial 4 on right after a control boot of the old 4.9 kernel on the same card. The thick rings mark milestones.

The 27 patches, one by one

Each patch below opens to show what went wrong on the Nano, what the patch changes and a diagram of both. In every diagram the top row is JetPack 5's kernel as NVIDIA ships it and the bottom row is the same path with the patch: blue marks what the patch changes, red where it broke, and green the result. "Trial N" is the Nth numbered boot of a 5.10 build on the Nano, and every patch file in the repository opens with the same description.

GPU and CUDA

0001CUDA 10.2's address-space requeststrial 11

What went wrong. CUDA 10.2 makes 35 different requests (ioctls) of the GPU driver. Three of them, ALLOC_AS, ALLOC_SPACE and FREE_SPACE, changed size between JetPack 4 and JetPack 5, and JetPack 5's driver matches a request's number and size exactly, so it refused the old ones.

What the patch does. Serves JetPack 4's layouts beside JetPack 5's: each old request is translated field by field into the new structure, and the answer is translated back.

Patch 0001: CUDA 10.2's address-space requestsAs shipped: CUDA 10.2 asks for GPU address space (24 bytes) then The driver knows only JetPack 5's layout, a different size then Unknown request: refused. With 0001: CUDA 10.2 asks for GPU address space (24 bytes) then Recognised as JetPack 4's layout, translated both ways then CUDA runs. ALLOC_AS and FREE_SPACE (16 bytes each) go the same way. The other 32 of CUDA 10.2's 35 requests were unchanged.As shippedCUDA 10.2 asks for GPUaddress space (24bytes)The driver knows onlyJetPack 5's layout, adifferent sizeUnknown request:refusedWith 0001CUDA 10.2 asks for GPUaddress space (24bytes)Recognised as JetPack4's layout, translatedboth waysCUDA runsALLOC_AS and FREE_SPACE (16 bytes each) go the same way. The other 32 of CUDA 10.2's 35 requests wereunchanged.

0001-nvgpu-accept-cuda-10.2-address-space-requests.patch

0002Small GPU pages when there is no IOMMUtrial 11

What went wrong. The 5.10 device tree leaves out NVIDIA's own IOMMU for the GPU, which 5.10 has no driver for, so the GPU reaches memory directly. The GPU driver's big pages need contiguous addresses, which direct access can't promise.

What the patch does. Turns big pages off on the Nano's GPU when it has no IOMMU, as JetPack 5 already does for Xavier's GPU.

Patch 0002: Small GPU pages when there is no IOMMUAs shipped: No GPU IOMMU in the 5.10 device tree then The GPU reaches memory directly then Big pages need contiguous memory, which isn't promised. With 0002: No IOMMU found for the GPU then Big pages off: small pages only then Every mapping works.As shippedNo GPU IOMMU in the5.10 device treeThe GPU reaches memorydirectlyBig pages needcontiguous memory,which isn't promisedWith 0002No IOMMU found for theGPUBig pages off: smallpages onlyEvery mapping works

0002-nvgpu-gm20b-small-pages-without-iommu.patch

0003nvmap on Tegra210, with file-descriptor handlestrial 11

What went wrong. nvmap, NVIDIA's driver for sharing memory between the CPU, the GPU and the engines, refused to load on anything older than Tegra186. JetPack 4's libraries also expect its handles as file descriptors, where JetPack 5's nvmap hands out plain numbers.

What the patch does. Accepts Tegra210, and builds nvmap to return handles as file descriptors, as JetPack 4's did.

Patch 0003: nvmap on Tegra210, with file-descriptor handlesAs shipped: nvmap loads then Chip check: Tegra186 or newer then Tegra210 refused: no nvmap, no CUDA. With 0003: Chip check accepts Tegra210 then Handles returned as file descriptors then JetPack 4's libraries share memory.As shippednvmap loadsChip check: Tegra186or newerTegra210 refused: nonvmap, no CUDAWith 0003Chip check acceptsTegra210Handles returned asfile descriptorsJetPack 4's librariesshare memory

0003-nvmap-tegra210-and-fd-handles.patch

0007A GPU power-on that froze the whole boottrial 8

What went wrong. The GPU's first power-on prepares its clock. One of that clock's parents belongs to the GPU driver and was registered with the GPU device, and since Linux 4.15 the clock framework wakes a clock's device before preparing it. The GPU was still waking up, so the call waited for itself while it held the clock framework's global lock. Every other driver that touched a clock then blocked too, the SD card's among them, and the boot stopped.

What the patch does. Registers that clock without a device. That is how it behaved on 4.9, whose clock framework never wakes devices. A tracing patch (diagnostic 0006) found it.

Patch 0007: A GPU power-on that froze the whole bootAs shipped: The GPU powers on for the first time then Prepare its clock, holding the global clock lock then Wake the clock's device first: the GPU itself then Waits forever; the SD card waits for the lock. With 0007: The GPU powers on for the first time then The clock has no device to wake then Power-on completes, the boot goes on.As shippedThe GPU powerson for thefirst timePrepare itsclock, holdingthe globalclock lockWake theclock's devicefirst: the GPUitselfWaits forever;the SD cardwaits for thelockthe GPU is still waking upWith 0007The GPU powers on forthe first timeThe clock has nodevice to wakePower-on completes,the boot goes on

0007-nvgpu-gm20b-gpcclk-without-runtime-pm.patch

0008The GPU bus clock's prepare steptrial 8

What went wrong. With the freeze gone, the GPU's power-on would fail at the next step: JetPack 5 stubs out the GPU bus clock's prepare on kernels from 4.15, with a note to drop the check once voltage scaling is added.

What the patch does. Does what JetPack 4's copy of the file does: sets the GPU rail's voltage for the bus clock's rate, from the voltage tables 5.10 already has for Tegra210. Patch 0022 does the same for the video engines' bus.

Patch 0008: The GPU bus clock's prepare stepAs shipped: Prepare the GPU bus clock then Stub: 'not supported' on 4.15 and newer then The GPU power-on fails. With 0008: Prepare the GPU bus clock then Set the GPU rail's voltage for the rate then The GPU powers on.As shippedPrepare the GPU busclockStub: 'not supported'on 4.15 and newerThe GPU power-on failsWith 0008Prepare the GPU busclockSet the GPU rail'svoltage for the rateThe GPU powers on

0008-clk-tegra-gbus-prepare-sets-gpu-dvfs.patch

Memory and CPU speed

0009Memory timing tables from the device treetrials 13 and 14

What went wrong. Memory stayed at its 204 MHz boot speed, and a large CUDA test ran about nine times slower than under 4.9. The upstream memory driver takes its timing tables only from a memory region a bootloader fills, and the Nano's bootloader doesn't fill one. It writes its training results into the device tree instead, at every boot, which is where JetPack 4's kernel read them.

What the patch does. When there is no such region, reads the tables from the device tree: the set for the board's RAM, with every field JetPack 4 read. Unlike JetPack 4 it refuses a malformed table, and upstream's own checks still apply, so memory never runs faster than the table says was trained.

Patch 0009: Memory timing tables from the device treeAs shipped: The bootloader trains RAM and writes the results into the device tree then The driver looks only in a reserved memory region then None on the Nano: RAM stays at 204 MHz. With 0009: The bootloader trains RAM and writes the results into the device tree then The driver reads the device tree's tables, checking each then 1,600 MHz, trained. Tested off the board first: run in user space on the Nano's device tree, the parser matched an independent script field by field, and every kind of malformed table was refused.As shippedThe bootloader trainsRAM and writes theresults into thedevice treeThe driver looks onlyin a reserved memoryregionNone on the Nano: RAMstays at 204 MHzWith 0009The bootloader trainsRAM and writes theresults into thedevice treeThe driver reads thedevice tree's tables,checking each1,600 MHz, trainedTested off the board first: run in user space on the Nano's device tree, the parser matched anindependent script field by field, and every kind of malformed table was refused.

0009-memory-tegra210-emc-tables-from-r32-dt.patch

0010The bandwidth manager follows the memory clocktrial 13

What went wrong. JetPack 5's bandwidth manager sets the memory clock from what the GPU, SD card, USB and PCIe ask for. It read the clock's range once, while starting, and it starts before the memory driver has loaded its tables, so the range was 204 MHz alone and every later request was capped there.

What the patch does. Re-reads the range before each request, widens it once the clock offers more, and lifts limits left at the old maximum.

Patch 0010: The bandwidth manager follows the memory clockAs shipped: The bandwidth manager starts: range 204 to 204 MHz then The memory driver loads later: 204 to 1,600 MHz then Every request still capped at 204 MHz. With 0010: A request for memory bandwidth arrives then Re-read the range first: 204 to 1,600 MHz then Requests reach 1,600 MHz.As shippedThe bandwidth managerstarts: range 204 to204 MHzThe memory driverloads later: 204 to1,600 MHzEvery request stillcapped at 204 MHzWith 0010A request for memorybandwidth arrivesRe-read the rangefirst: 204 to 1,600MHzRequests reach 1,600MHz

0010-bwmgr-follow-emc-clock-range.patch

0011Memory speeds in the voltage tabletrial 14

What went wrong. Every switch to 1,600 MHz was refused as too high. The core rail's voltage table gives each clock its top rate per voltage, and JetPack 5's entry for memory is a placeholder that JetPack 4 filled in at boot from the memory tables. JetPack 5 skips that step on 5.x, with a note that the memory part isn't enabled yet.

What the patch does. Fills the entry from the board's memory tables, as JetPack 4 did: up to 204 MHz from 800 mV, and up to 1,600 MHz from 900 mV.

Patch 0011: Memory speeds in the voltage tableAs shipped: Switch memory to 1,600 MHz then The voltage table's memory entry is a placeholder then Refused: 'rate too high'. With 0011: Entry filled from the board's memory tables then 800 mV: up to 204 MHz. 900 mV: up to 1,600 MHz then Switch allowed, core rail at 900 mV. In trial 14 a CUDA test verified 53 batches in 10 seconds, as under 4.9. At 204 MHz it managed 6.As shippedSwitch memory to 1,600MHzThe voltage table'smemory entry is aplaceholderRefused: 'rate toohigh'With 0011Entry filled from theboard's memory tables800 mV: up to 204 MHz.900 mV: up to 1,600MHzSwitch allowed, corerail at 900 mVIn trial 14 a CUDA test verified 53 batches in 10 seconds, as under 4.9. At 204 MHz it managed 6.

0011-soc-tegra210-dvfs-emc-rates-from-r32-tables.patch

0012A memory floor that follows the CPUtrial 15

What went wrong. The upstream CPU frequency driver, which 5.10 uses on Tegra210, scales the CPU but never asks for memory speed. JetPack 4's driver also set a memory floor from the CPU's speed, and that floor is what keeps memory at 1,600 MHz under 4.9.

What the patch does. Adds JetPack 4's floor: on each CPU speed change, it asks the bandwidth manager for the memory speed the device tree's table gives that CPU speed, raised before the CPU speeds up and lowered after it slows down.

Patch 0012: A memory floor that follows the CPUAs shipped: The CPU changes speed then No link to memory speed then Memory can fall to 204 MHz under load. With 0012: The CPU changes speed then Look up its memory floor in the device tree's table then Ask the bandwidth manager for it then Memory held at 1,600 MHz. In trial 15 the CPU ran up to 1,479 MHz, and a CPU benchmark matched 4.9 at the same clocks.As shippedThe CPU changes speedNo link to memoryspeedMemory can fall to 204MHz under loadWith 0012The CPU changesspeedLook up itsmemory floor inthe devicetree's tableAsk thebandwidthmanager for itMemory held at1,600 MHzIn trial 15 the CPU ran up to 1,479 MHz, and a CPU benchmark matched 4.9 at the same clocks.

0012-cpufreq-tegra124-emc-floor-from-r32-table.patch

0013JetPack 4's 1.2 GHz CPU minimumtrial 17

What went wrong. 4.9 never lets the Nano's CPU drop below 1.2 GHz, and with 0012's floor that also holds memory at 1,600 MHz. Under 5.10 the CPU idled down to 204 MHz while it waited on the GPU, took memory down with it, and CUDA at the lower GPU clocks ran slower than under 4.9.

What the patch does. Sets a 1.2 GHz minimum on the CPU's frequency policy, on boards with JetPack 4's CPU frequency node. A lower maximum still wins, so pinning the CPU low still works.

Patch 0013: JetPack 4's 1.2 GHz CPU minimumAs shipped: The CPU waits on the GPU then It idles down to 204 MHz then The memory floor drops to 204 MHz then CUDA slower than under 4.9. With 0013: The CPU waits on the GPU then It stays at 1.2 GHz or more then Memory stays at 1,600 MHz then CUDA matches 4.9.As shippedThe CPU waitson the GPUIt idles downto 204 MHzThe memoryfloor drops to204 MHzCUDA slowerthan under 4.9With 0013The CPU waitson the GPUIt stays at 1.2GHz or moreMemory stays at1,600 MHzCUDA matches4.9

0013-cpufreq-tegra124-r32-cpu-minimum.patch

0016The display's bandwidth pooltrial 21

What went wrong. The display reserves guaranteed memory bandwidth from a pool sized once, at start-up, from the top memory speed. At that moment it was still the 204 MHz boot speed (see 0010), so the pool was too small and the HDMI head's reservation was refused.

What the patch does. Updates the range, as 0010 does, before sizing the pool and before each reservation, and grows the pool when the range has grown.

Patch 0016: The display's bandwidth poolAs shipped: Pool sized at start-up from 204 MHz then The HDMI head asks for its bandwidth then Pool too small: refused. With 0016: Range updated before sizing and before each request then Pool from 1,600 MHz: 11,520,000 KB, as under 4.9 then The HDMI head gets its bandwidth.As shippedPool sized at start-upfrom 204 MHzThe HDMI head asks forits bandwidthPool too small:refusedWith 0016Range updated beforesizing and before eachrequestPool from 1,600 MHz:11,520,000 KB, asunder 4.9The HDMI head gets itsbandwidth

0016-isomgr-follow-emc-clock-range.patch

0020Power modes cap memory through the bandwidth managertrials 27 and 29

What went wrong. The power modes (5W, MAXN) cap the memory clock through a file this driver creates. JetPack 5's driver asks a newer interconnect framework for a path Tegra210 doesn't have, so it failed to start, the file never appeared and the power-mode service failed. Its error path also left a call trace in every boot.

What the patch does. Uses the bandwidth manager on Tegra210, as JetPack 4 did on every chip and JetPack 5 still does for Xavier. The bandwidth manager works on Tegra210 from 0010.

Patch 0020: Power modes cap memory through the bandwidth managerAs shipped: The power-mode driver starts then It asks for an interconnect path Tegra210 lacks then Fails with a call trace; the power-mode service fails. With 0020: The power-mode driver starts then It registers with the bandwidth manager then 5W and MAXN set the same limits as under 4.9. One line in NVIDIA's Nano power-mode settings also needed correcting: it names a GPU path that exists only on Xavier.As shippedThe power-mode driverstartsIt asks for aninterconnect pathTegra210 lacksFails with a calltrace; the power-modeservice failsWith 0020The power-mode driverstartsIt registers with thebandwidth manager5W and MAXN set thesame limits as under4.9One line in NVIDIA's Nano power-mode settings also needed correcting: it names a GPU path that existsonly on Xavier.

0020-nvpmodel-tegra210-emc-cap-through-bwmgr.patch

0022Clocks for the video enginestrial 33

What went wrong. VIC, the video converter engine, never powered on (“Cannot turn on clock vic03”). The video engines' bus clock had the same stub as 0008, so every prepare of a VIC, video encoder, decoder or JPEG clock failed. The same file also skipped the voltage check when it rounded a bus rate.

What the patch does. As in JetPack 4's copy of the file: preparing a bus clock sets the core rail for its rate, unpreparing drops it, and rate rounding goes through the voltage table.

Patch 0022: Clocks for the video enginesAs shipped: Prepare VIC's clock then Bus stub: 'not supported' on 4.15 and newer then 'Cannot turn on clock vic03'. With 0022: Prepare VIC's clock then Set the core rail for the bus's rate then VIC at 192 MHz, as under 4.9.As shippedPrepare VIC's clockBus stub: 'notsupported' on 4.15 andnewer'Cannot turn on clockvic03'With 0022Prepare VIC's clockSet the core rail forthe bus's rateVIC at 192 MHz, asunder 4.9

0022-clk-tegra-cbus-dvfs-as-r32.patch

Display

0014JetPack 4's display driver starts on 5.10trial 21

What went wrong. JetPack 5's source still builds JetPack 4's display driver, tegradc, with its Tegra210 code, but nothing ran it. Its start-up had five problems here: the bandwidth managers start later on 5.10, and their “try again” became a lasting error; any error then crashed on a structure only newer chips have; a clock was released twice; a power domain was never detached after a failure; and a pointer was used before it was set.

What the patch does. Waits until the bandwidth managers and HDMI's display data channel exist, fixes the other four problems, and makes the error path free what it took.

Patch 0014: JetPack 4's display driver starts on 5.10As shipped: The display driver starts then The bandwidth managers aren't up yet: 'try again' then Treated as fatal; the error path crashes. With 0014: The display driver starts then Wait for the bandwidth managers and HDMI's DDC then Start again, the other four bugs fixed then HDMI at 1920x1080, as under 4.9.As shippedThe display driverstartsThe bandwidth managersaren't up yet: 'tryagain'Treated as fatal; theerror path crashesWith 0014The displaydriver startsWait for thebandwidthmanagers andHDMI's DDCStart again,the other fourbugs fixedHDMI at1920x1080, asunder 4.9

0014-tegradc-tegra210-probe-on-5.10.patch

0017Buffer id 0 means no buffertrials 22 and 23

What went wrong. JetPack 4's X driver passes buffer id 0 for “no buffer” on the planes it doesn't use. JetPack 5's display interface uses a negative id for that, so it looked up file descriptor 0 for each unused plane, and every page flip failed.

What the patch does. Takes 0 as “none” again, as JetPack 4 did, and says why when a buffer can't be used, where every failure used to read as out of memory.

Patch 0017: Buffer id 0 means no bufferAs shipped: X flips: one plane with a buffer, the others with id 0 then Id 0 looked up as file descriptor 0 then Not a buffer: the flip fails. With 0017: X flips: one plane with a buffer, the others with id 0 then 0 means no buffer, as in JetPack 4 then X's frames reach the screen.As shippedX flips: one planewith a buffer, theothers with id 0Id 0 looked up as filedescriptor 0Not a buffer: the flipfailsWith 0017X flips: one planewith a buffer, theothers with id 00 means no buffer, asin JetPack 4X's frames reach thescreen

0017-tegradc-ext-r32-buffer-ids.patch

0018NVIDIA's framebuffer becomes fb0trial 23

What went wrong. JetPack 4's X driver opens /dev/fb0 and pairs framebuffer N with display head N. The boot console's simple framebuffer registered first and took fb0, so X sized the screen from its single mode, 800x600.

What the patch does. Gives NVIDIA's framebuffer a claim over all of memory before it registers. 5.10 then removes the boot console's framebuffer, which it overlaps, and NVIDIA's becomes fb0 and takes over the console, as under 4.9.

Patch 0018: NVIDIA's framebuffer becomes fb0As shipped: The boot console's framebuffer registers: fb0, 800x600 then NVIDIA's framebuffer becomes fb1 then X opens fb0: an 800x600 screen. With 0018: NVIDIA's framebuffer claims all of memory then 5.10 removes the boot console's framebuffer then NVIDIA's is fb0: X at 1920x1080.As shippedThe boot console'sframebuffer registers:fb0, 800x600NVIDIA's framebufferbecomes fb1X opens fb0: an800x600 screenWith 0018NVIDIA's framebufferclaims all of memory5.10 removes the bootconsole's framebufferNVIDIA's is fb0: X at1920x1080

0018-tegra-fb-take-over-firmware-framebuffer.patch

0019The IOMMU flushes every page entrytrial 24

What went wrong. X's buffers and the boot logo are scattered in memory, so the display reads them through an IOMMU. JetPack 5's IOMMU driver for this chip wrote each page entry into the CPU's cache and left flushing to one step at the end of a mapping, which missed entries: after a scattered buffer only the last chunk was flushed, and even that lost its last page. The IOMMU then read zeros for entries still in the CPU's cache, and kept them. The display faulted tens of thousands of times.

What the patch does. Writes each entry through a helper that cleans it to memory and flushes the IOMMU's page-table cache and TLB for it at once, as mainline Linux's driver does.

Patch 0019: The IOMMU flushes every page entryAs shipped: Map a scattered buffer: entries land in the CPU's cache then One flush at the end, for the last chunk only then The IOMMU reads zeros: display faults. With 0019: Write each entry, then clean it to memory then Flush its page-table cache line and TLB at once then No display fault in the whole boot. Checked off the board first, in a model of the CPU cache and the IOMMU's caches around the driver's real code: the old driver left all 2,048 of the boot framebuffer's entries unflushed, the patched one none.As shippedMap a scatteredbuffer: entries landin the CPU's cacheOne flush at the end,for the last chunkonlyThe IOMMU reads zeros:display faultsWith 0019Write each entry, thenclean it to memoryFlush its page-tablecache line and TLB atonceNo display fault inthe whole bootChecked off the board first, in a model of the CPU cache and the IOMMU's caches around the driver's realcode: the old driver left all 2,048 of the boot framebuffer's entries unflushed, the patched one none.

0019-iommu-tegra-smmu-flush-entries-on-map.patch

0027The display's real power state, and its resetstrial 37

What went wrong. Two problems only 5.10 shows. Asked whether a display head was powered, the driver answered whether power management was enabled for it, which is always true, so after a screen blank the interrupt handler read a head that was off and timed out. And the driver held the HDMI encoder's resets for good, while 5.10 must take every reset of that power domain before switching it off, so the domain never switched off (11 errors in one boot).

What the patch does. Asks the kernel's power-domain code whether the head is really on, as 4.9 asked the power controller, and takes each reset only while it uses it, as mainline's tegra-drm driver does.

Patch 0027: The display's real power state, and its resetsAs shipped: The screen blanks: the head powers off then 'Powered?' answered with 'power management on' then Read from a head that is off: timeout. As shipped: The driver keeps the HDMI encoder's resets then Power-off needs every reset first then The domain never switches off: 11 errors. With 0027: Ask whether the domain is really on then Take each reset only while using it then Off with the blank, on again with the unblank.As shippedThe screen blanks: thehead powers off'Powered?' answeredwith 'power managementon'Read from a head thatis off: timeoutAs shippedThe driver keeps theHDMI encoder's resetsPower-off needs everyreset firstThe domain neverswitches off: 11errorsWith 0027Ask whether the domainis really onTake each reset onlywhile using itOff with the blank, onagain with the unblank

0027-tegradc-t21x-power-state-and-released-resets.patch

0028The HDMI encoder's domain is the display's parenttrial 37

What went wrong. Once 0027 let it switch off, the HDMI encoder's power domain (sor) could switch off under a running display, because the driver holds it only around short uses. JetPack 4's power code kept the order by hand: sor on before the display domains, and off after the last of them.

What the patch does. Makes sor the parent of the display heads' domains and venc's, so it stays on while any of them is on, as JetPack 5 already does for the JPEG and decoder engines.

Patch 0028: The HDMI encoder's domain is the display's parentAs shipped, sor, dis, disb and venc are four separate power domains, so sor can switch off while head A drives HDMI. With 0028, sor is the parent of dis, disb and venc, powered on before any of them and off after the last.As shippedsorHDMI encoderdisdisplay head Adisbdisplay head BvencFour separate domains: sor can switch off on its own, while display head A is still driving HDMI throughit.With 0028sorparent domaindisdisplay head Adisbdisplay head BvencThe kernel powers sor on before any child and off after the last one: the order 4.9 kept by hand.

0028-soc-tegra-pmc-tegra210-sor-parent-domain.patch

USB and PCIe

0005A two-byte stack overflowtrial 3

What went wrong. Powering on the PCIe lane for the Ethernet chip formatted prod_c_ss plus the lane's USB 3 port number into an 11-byte buffer. That lane has no USB 3 port, so the number was -22, an error code, and prod_c_ss-22 needs 13 bytes with its terminator. The stack protector caught the overflow and panicked the kernel early in the boot.

What the patch does. Looks those settings up only for lanes that have a USB 3 port, with a 16-byte buffer and a length-checked print.

Patch 0005: A two-byte stack overflowAs shipped: the PCIe lane has no USB 3 port, so its port number is -22 and the name runs past the buffer. The name prod_c_ss-22 and its terminator take 13 bytes in an 11-byte stack buffer: 2 bytes past the end. With 0005: A lane without a USB 3 port then Skip the settings lookup then Other lanes: a 16-byte buffer and snprintf then The boot gets through every driver.As shipped: the PCIe lane has no USB 3 port, so its port number is -22 and the name runs past the buffer.char name[11]p0r1o2d3_4c5_6s7s8-9210211\01211 bytes on the stack2 bytes past the endWith 0005A lane withouta USB 3 portSkip thesettings lookupOther lanes: a16-byte bufferand snprintfThe boot getsthrough everydriver

0005-phy-tegra210-ss-prod-name-overflow.patch

0021USB 3 lanes named 'xusb'trial 30

What went wrong. The USB 3 half of the onboard hub never appeared, with no error. The lane set-up runs only for lanes whose function is named usb3-ss, mainline's name, and JetPack 5 calls it xusb on Tegra210, as JetPack 4's device trees do.

What the patch does. The five checks test for the name the lanes carry. The register values are the same either way.

Patch 0021: USB 3 lanes named 'xusb'As shipped: The USB 3 lane's function: 'xusb' then Set-up runs only for 'usb3-ss' then Skipped silently: no USB 3 hub. With 0021: The USB 3 lane's function: 'xusb' then The checks accept the lane's own name then The hub's USB 3 half at SuperSpeed.As shippedThe USB 3 lane'sfunction: 'xusb'Set-up runs only for'usb3-ss'Skipped silently: noUSB 3 hubWith 0021The USB 3 lane'sfunction: 'xusb'The checks accept thelane's own nameThe hub's USB 3 halfat SuperSpeed

0021-phy-tegra210-usb3-lanes-power-on.patch

Video and JetPack 4's libraries

0004The chip id where JetPack 4's tools lookevery build

What went wrong. NVIDIA's tools (nvpmodel, jetson_clocks, tegrastats) read the chip id from /sys/module/tegra_fuse/parameters/tegra_chip_id. JetPack 5 provides that file only in an older fuse driver, which clashes with the upstream one this kernel uses.

What the patch does. The upstream fuse driver exposes the same read-only value there: 33 on the Nano.

Patch 0004: The chip id where JetPack 4's tools lookAs shipped: nvpmodel reads tegra_chip_id then Upstream fuse driver: no such file then The tool fails. With 0004: nvpmodel reads tegra_chip_id then The upstream fuse driver provides it, read-only then It reads 33: Tegra210.As shippednvpmodel readstegra_chip_idUpstream fuse driver:no such fileThe tool failsWith 0004nvpmodel readstegra_chip_idThe upstream fusedriver provides it,read-onlyIt reads 33: Tegra210

0004-fuse-expose-tegra-chip-id-for-r32-userspace.patch

0023nvmap's older read and write requesttrials 34 and 36

What went wrong. JetPack 4's video converter and camera service stopped on a memory read and write request (“Unknown NVMAP_IOC”). JetPack 4's nvmap took three layouts of it; JetPack 5's kept two and dropped the 32-byte one these libraries use.

What the patch does. Serves the 32-byte layout again, read and answered as JetPack 4 did, with a build-time check that keeps it at 32 bytes.

Patch 0023: nvmap's older read and write requestAs shipped: The converter writes to a buffer (32-byte request) then JetPack 5's nvmap knows 2 of the 3 layouts then 'Unknown NVMAP_IOC': the converter stops. With 0023: The converter writes to a buffer (32-byte request) then JetPack 4's layout served again then 305 writes and 180 reads answered.As shippedThe converter writesto a buffer (32-byterequest)JetPack 5's nvmapknows 2 of the 3layouts'Unknown NVMAP_IOC':the converter stopsWith 0023The converter writesto a buffer (32-byterequest)JetPack 4's layoutserved again305 writes and 180reads answered

0023-nvmap-r32-rw-handle-requests.patch

0024Naming a fencetrial 35

What went wrong. Fences tell a program when the hardware has finished a job. 5.10 has no Android sync framework, and JetPack 5's request to name a fence works only when that framework is built in. JetPack 4's video converter names its fences, and stopped on the refusal.

What the patch does. Without the framework, checks that the fence is made only of the host1x engine hub's sync points, the check JetPack 4 made, and returns success. The name isn't kept: JetPack 4 used it only in debug output.

Patch 0024: Naming a fenceAs shipped: The converter names its fence then The handler needs the Android sync framework then Refused: the converter stops. With 0024: The converter names its fence then Check it's a host1x fence, as JetPack 4 did then Success: the converter goes on.As shippedThe converter namesits fenceThe handler needs theAndroid sync frameworkRefused: the converterstopsWith 0024The converter namesits fenceCheck it's a host1xfence, as JetPack 4didSuccess: the convertergoes on

0024-nvhost-r32-fence-names.patch

0025Logging unknown fence requests (diagnostic)used in trial 35

What went wrong. JetPack 4's libraries were built for Android's older requests on fences. 5.10 refused them without a word, so there was nothing to go on.

What the patch does. Logs each refused request, rate limited, with its number and the program that made it. It stays in the build because 0026 is written on top of it; with 0026 applied, the converter's requests are all served and nothing is logged.

Patch 0025: Logging unknown fence requests (diagnostic)As shipped: An older request on a fence then Refused, silently. With 0025: An older request on a fence then Refused and logged: 'sync_file: unknown ioctl' then It named the two requests 0026 then served.As shippedAn older request on a fenceRefused, silentlyWith 0025An older request on afenceRefused and logged:'sync_file: unknownioctl'It named the tworequests 0026 thenserved

0025-diag-sync-file-unknown-requests.patch

0026Android's older sync requeststrial 36

What went wrong. JetPack 4's 4.9 kernel served Android's older sync requests on fences: wait, merge and fence info. 5.10 has only the newer merge and file info, so JetPack 4's video converter could neither read nor wait on its fences.

What the patch does. Serves the three older requests with JetPack 4's layouts and behaviour beside the newer ones. A fence driver can add its own details to each point, and nvhost adds JetPack 4's sync point id and threshold.

Patch 0026: Android's older sync requestsAs shipped: The converter waits on its fence (older WAIT request) then 5.10 knows only the newer MERGE and FILE_INFO then Can't read or wait: the conversion fails. With 0026: The converter waits on its fence (older WAIT request) then WAIT, MERGE and FENCE_INFO served as in JetPack 4 then 120 conversions, each fence read and waited on. Tested off the board first: in user-mode Linux built from the same tree, 41 of 41 checks of the three requests passed.As shippedThe converter waits onits fence (older WAITrequest)5.10 knows only thenewer MERGE andFILE_INFOCan't read or wait:the conversion failsWith 0026The converter waits onits fence (older WAITrequest)WAIT, MERGE andFENCE_INFO served asin JetPack 4120 conversions, eachfence read and waitedonTested off the board first: in user-mode Linux built from the same tree, 41 of 41 checks of the threerequests passed.

0026-sync-file-r32-android-sync-requests.patch

0029Telling VIC's firmware where its FCE code isbuild 35

What went wrong. Tegra210's video converter engine, VIC, carries part of its firmware, the FCE microcode, inside its image, and needs the kernel to say where it is after each power-on. JetPack 5 dropped that step, so VIC's firmware halted every job and each one timed out after 10 seconds. Earlier trials had passed only because the 4.9 control boot before them left VIC set up.

What the patch does. Reads the FCE header from the firmware image and sends its size and offset at each power-on, as JetPack 4 and mainline Linux do. Section 7 tells the whole story.

Patch 0029: Telling VIC's firmware where its FCE code isAs shipped: VIC powers on and its firmware loads then The FCE location is never sent then The firmware halts each job: 10 s timeout. With 0029: Read the FCE header in the firmware image then Send SET_FCE_UCODE_SIZE and _OFFSET then Jobs finish at once.As shippedVIC powers on and itsfirmware loadsThe FCE location isnever sentThe firmware haltseach job: 10 s timeoutWith 0029Read the FCE header inthe firmware imageSendSET_FCE_UCODE_SIZE and_OFFSETJobs finish at once

0029-nvhost-vic-tegra210-fce-ucode-setup.patch

The device tree is JetPack 4's own Nano tree, compiled for 5.10, with a handful of changes: a clock for the GPU's voltage regulator, the display behind the IOMMU, and timer interrupts listed so the CPUs can use their deepest idle state. The kernel port's notes list them all.

The method that worked best was boring: change one thing, boot once, collect the kernel log and test results to the PC automatically, compare against a control boot of the old kernel, write it down. Thirty-nine numbered trials later, the 5.10 boot has no kernel warnings and matches 4.9's clocks.

6. The new user space

Ubuntu 26.04 with its own init

systemd 259 needs Linux 5.4 or newer, which is exactly why the kernel had to move. On 5.10, Ubuntu 26.04 runs completely stock systemd, udev, network time and zram swap. The root filesystem was built on the Nano itself from Ubuntu's signed base image and archive, on real hardware rather than in emulation.

NVIDIA's libraries, repackaged

Ubuntu 26.04 knows nothing about Tegra, and NVIDIA's own L4T packages expect their own boards (JetPack 5's also try to manage the boot firmware). So a build script turns just the files the Nano needs into a few clean Debian packages (nano-l4t-core, -gl, -x11, -cuda, …) with hashed file lists and the right device permissions. The Nano first ran JetPack 4's libraries this way, then JetPack 5's R35.6 libraries once they passed every test, with NVIDIA's CUDA 11.4 runtime, cuDNN 8.6 and TensorRT 8.5.2 (with trtexec) packages alongside. The Nano-specific firmware and power tools stay from JetPack 4. CUDA 12.6 and JetPack 4's TensorRT 8.2 came later, packaged the same way (sections 8 and 9).

The desktop: an older X server on purpose

NVIDIA's X driver for Tegra was built for X.Org 1.20, and Ubuntu 26.04 ships X.Org 21.1, whose internal structures moved: the driver would write its functions into the wrong slots. So the GPU desktop runs Ubuntu 20.04's X server 1.20.13, installed in its own directory and used only for the login screen and session, next to Ubuntu 26.04's own. Unity and Xfce both run on it with OpenGL 4.6 on the GPU. The catch: that X server's free security updates ended in 2025.

Two video converter packages

JetPack 4's and JetPack 5's libraries share file names (libnvos.so, libnvrm_gpu.so…), so one program can't load both. The video converters are therefore packaged in their own folders, each with a launcher:

Two isolated video converter packages nano-r32-video runs a program with JetPack 4's converter libraries first in the library path, so that program can't use JetPack 5's CUDA. nano-r35-video runs a program with JetPack 5's converter plus the VIC fix preloaded, and that program can use CUDA 11.4 and TensorRT in the same process. nano-r32-video PROGRAM JetPack 4's converter (R32.7.6) GStreamer + nvvidconv (R32) JetPack 4 libraries, own folder no JetPack 5 CUDA in this processuse a separate program for the model nano-r35-video PROGRAM JetPack 5's converter (R35.6) + fix GStreamer + nvvidconv (R35) vic_patch.so (preloaded)corrects VIC settings per job CUDA 11.4 / TensorRT, same processuse CUDA's primary context
The JetPack 4 converter works but has to live in its own process. The JetPack 5 converter, with our fix, can sit in the same program as CUDA and TensorRT, which is what a webcam-to-object-detection pipeline wants.

7. The video engine mystery

With the new user space in place, almost everything worked, except converting video frames with NVIDIA's GStreamer element nvvidconv. Every job sent to VIC timed out after 10 seconds. It turned out to be two unrelated problems.

Part one: firmware that never started

We ruled things out one by one: JetPack 5's libraries (JetPack 4's hung too), Ubuntu 26.04's libraries (an Ubuntu 18.04 chroot hung too), permissions, the desktop, clocks, power state. Then we read VIC's own falcon processor registers directly while a job was waiting. Its firmware had stopped itself with error code 9.

The cause: VIC's firmware image contains a second piece of microcode (the FCE), and the kernel has to tell the firmware where it is after each power-on. JetPack 4's kernel did that. JetPack 5's kernel still has the definitions in its header but never sends them; upstream Linux's open VIC driver still does it for "old VIC firmware", so newer chips apparently don't need it. An early test probably passed only because VIC still held that setting from an earlier boot on the old kernel. Sending the two values by hand made the converter pass at once, and patch 0029 restored them in the kernel (build #35).

The missing FCE setup At VIC power-on, JetPack 4's kernel loads the firmware and sends SET_FCE_UCODE_SIZE and SET_FCE_UCODE_OFFSET, then jobs run. JetPack 5's kernel loads the firmware but skips the FCE setup, so the firmware halts with error 9 on the first job. Patch 0029 adds the two writes back. JetPack 4 kernel (4.9) load firmware SET_FCE_UCODE_SIZESET_FCE_UCODE_OFFSET jobs complete ✓ JetPack 5 kernel (5.10), before patch 0029 load firmware (nothing sent)header still defines both methods falcon halts, error 9job times out after 10 s patch 0029 adds the two writes back → build #35
VIC has no interrupt line in the Nano's device tree, so the kernel never heard that its firmware had stopped. It only saw jobs time out.

Part two: right engine, wrong settings

With VIC running, JetPack 4's converter produced correct pictures. JetPack 5's produced pictures that were almost right: colours off by a few levels everywhere, and scaling that skipped its smoothing filter on brightness. No converter setting changed that.

VIC receives a 1,552-byte settings block with every job. We recorded those blocks from both converters doing the same conversion and decoded them field by field, using the public description of the VIC 4.0 settings block in the open-source libdrm tests. JetPack 5 used the correct layout and the same filter, but also switched on a few options JetPack 4 leaves off:

A small preloaded library, vic_patch.so, now rewrites just those fields in each job before it reaches VIC. NVIDIA's files are untouched. We tested each group of fields on its own, and with the three groups together the results matched JetPack 4's:

Where the VIC fix sits An application calls GStreamer's nvvidconv, which calls NVIDIA's libnvvic to fill VIC's settings block. vic_patch.so intercepts the job submission, turns off gamma, skips the RGB detour for YUV-to-YUV scaling and sets the vertical chroma position to JetPack 4's value, then the job goes through host1x to VIC. your appGStreamer nvvidconv+ libnvvic (R35) vic_patch.sogamma off · no RGB detourfor YUV→YUV · chroma siting host1xkernel VIChardware Picture match against the reference (higher is better) colour conversion 34.8 dB JetPack 5 as shipped 53.1 dB with the fix = JetPack 4 bilinear scaling (luma) 25.4 dB JetPack 5 as shipped 63.2 dB = JetPack 4
The fix only touches VIC's settings block on the way out. With it, JetPack 5's converter matches JetPack 4's output: 53.1 dB for colour conversion and 63.2 dB for scaling, against the same references.

One last surprise: in a test where the same program converts frames on VIC and then checks them with CUDA, the program's own CUDA context was destroyed as soon as the video pipeline started. Starting the converter left a destroyed CUDA context current on that thread. Using CUDA's shared primary context, as the CUDA runtime (and so PyTorch and TensorRT) does, avoids it. With that, 30 out of 30 frames passed at 53.1 dB on every row.

The checks themselves needed debugging too. Our first picture check flagged JetPack 4's correct output because VIC places colour samples one pixel differently from GStreamer's software reference. A later one sampled only every eighth row, all even, and so missed the two odd rows the colour-position setting broke. Measuring how a result differs, not just whether it passes, saved a lot of time.

Decoding and encoding

VIC is one of four video engines. The other three, NVDEC for decoding, NVENC for encoding and NVJPG for JPEG, stayed switched off in our device tree at first. Switched on, they came up under JetPack 5's kernel with no new patch: the fix for the engines' shared clock (0022) already covered them, and their firmware is JetPack 4's.

With JetPack 4's GStreamer elements, the hardware decoder plays 1080p H.264 at 172 frames a second and H.265 at 194, at about 10% of a CPU core, where software decoding managed 157 and 98 at 85%. We compared its output with a software decoder's, value by value: the brightness of every pixel was identical in all 300 frames of both formats, and the colour differed only by the averaging NVIDIA's converter applies after the decoder. Both encoders and the JPEG decoder passed as well.

JetPack 5's elements decode exactly too, colour included, and its H.265 encoder and JPEG decoder work. Its H.264 encoder crashes inside NVIDIA's closed library under every setting we tried, so H.264 encoding stays with JetPack 4's set. Each set sits behind its launcher: nano-r32-video for JetPack 4's, nano-r35-video for JetPack 5's, which can decode in the same program as CUDA and TensorRT.

8. CUDA 12 without a new kernel

JetPack 5 stops at CUDA 11.4, and more and more software wants CUDA 12. NVIDIA's route there is JetPack 6, so we read its sources first. Its kernel no longer has the Tegra X1's display driver (tegradc) or its VIC driver, two of the parts that took the most work here, so porting it would have meant doing them again. Its libraries looked better: a survey on the PC found code for the Nano's GPU (sm_53) in CUDA 12.6's libraries and in cuDNN 9.3, though not in TensorRT 10.3.

The way in turned out to be a package NVIDIA made for JetPack 5: cuda-compat-12-2, an "upgrade driver" that brings CUDA 12.2's user-space driver to JetPack 5's kernel. On the Nano it reported CUDA 12.2 and passed every test, while JetPack 6's own driver didn't find the GPU at all. CUDA's minor-version compatibility then lets CUDA 12.6's runtime, cuBLAS and cuDNN 9.3 run on that 12.2 driver, and all of them gave exact results.

So the Nano got CUDA 12 with no kernel change. It's packaged as nano-cuda12 and nano-cuda12-dev and installed beside CUDA 11.4, which stays the default; a program runs with CUDA 12 when it's started through nano-cuda12. CUDA 12.6's compiler builds programs for the Nano with GCC 11 after one fix: six math functions in Ubuntu 26.04's C library headers need the noexcept that nvcc expects. One program uses one CUDA or the other, not both. And since the driver is 12.2's, programs built with CUDA 12.6 need machine code for sm_53 built in, because the driver can't compile 12.6's intermediate code (inferred, not tested).

9. A webcam that sees

One of the uses this project started from was a USB webcam with live object detection. An old Logitech webcam worked straight away through the kernel's standard uvcvideo driver: uncompressed YUYV up to 2592x1944, MJPEG at 60 frames a second at 640x480 and 30 at 1080p, and its microphone records. The first uncompressed picture had a blue cast, most likely the camera's automatic white balance still settling, so the check now streams for five seconds before it measures.

Object detection

For detection we used Ultralytics' YOLO26n, exported to ONNX on the PC and built into a TensorRT engine on the Nano. TensorRT's Python module doesn't fit Ubuntu 26.04's newer Python, so a small C library, libnano_trt.so, loads and runs the engine, and Python calls it through ctypes. A camera program reads frames, runs the model, draws the boxes and serves the result as an MJPEG stream, which the PC watches through an SSH tunnel. One piece of YOLO26's head, the step that picks the 300 best boxes, wouldn't build in TensorRT 8.5, so it runs on the CPU in NumPy instead. The first live run reached 14.6 frames a second, with 58.7 ms of every frame spent on the GPU.

Why the GPU took so long

For a model of 4.1 billion operations a picture, 58 ms was slow. A per-layer profile showed why. TensorRT 8.5's own convolution kernels are built for the Xavier and Orin GPUs (sm_72 and sm_87), not the Nano's. On the Nano it falls back to cuDNN's general algorithms, which took almost half of the time, and runs each activation and format change as a separate pass.

TensorRT 8.2, brought back from JetPack 4

JetPack 4's TensorRT 8.2 was built with the Nano's GPU in mind. It expects CUDA 10.2, but JetPack 5's newer CUDA driver still runs programs built for older CUDA versions, so 8.2 can run from its own folder with its own cuDNN 8.2, cuBLAS and CUDA 10.2 runtime. Two runs failed before one passed:

The third run built YOLO26n with the same detections, in 36.5 ms of GPU time instead of 58.0. TensorRT 8.2 runs most convolutions with its own Maxwell kernels, which work on two FP16 numbers per instruction, and leaves cuDNN just seven layers. It's now the system's default (nano-trt82), and 8.5 is still one command away (nano-trt85). Live detection went from 14.6 to 23.1 frames a second, close to the camera's 24, with 73 ms from capture to the drawn frame.

Same model, two TensorRTs GPU time per picture in FP16, lower is better. YOLO26n at 640x480: 58.0 ms with TensorRT 8.5 and 36.5 ms with TensorRT 8.2, 1.59 times faster. Depth Anything V2 Small at 336x252: 253.3 ms with TensorRT 8.5 in DINOv2's own layout and 170.4 ms with TensorRT 8.2 in the rewritten layout, 1.49 times faster. GPU time per picture, FP16 (shorter is faster) 0 50 100 150 200 250 ms YOLO26n, 640x480 object detection YOLO26n on TensorRT 8.5: 58.0 ms 58.0 ms YOLO26n on TensorRT 8.2: 36.5 ms 36.5 ms · 1.59× faster Depth Anything V2 Small 336x252, metric depth Depth Anything V2 Small on TensorRT 8.5, DINOv2's layout: 253.3 ms 253.3 ms, DINOv2's own layout Depth Anything V2 Small on TensorRT 8.2, rewritten layout: 170.4 ms 170.4 ms, rewritten · 1.49× faster TensorRT 8.5.2 (JetPack 5) TensorRT 8.2.1 (JetPack 4)
The same models on the same GPU. TensorRT 8.2 has kernels for the Nano's Maxwell GPU and 8.5 doesn't. For the depth model, 8.5 runs it as published and 8.2 runs the rewritten form from section 10, since 8.2 can't build the original.

10. Depth from one camera

The next use is an indoor robot, which maps its surroundings (SLAM) with the help of an IMU. A single camera can't measure distance by itself, but a neural network trained on many scenes can estimate it. We chose Depth Anything V2 Metric Small in its indoor version: it gives each pixel's distance in metres rather than just nearer and farther, it was fine-tuned on Hypersim's indoor scenes (up to 20 m), and its code and weights are Apache-2.0. Inside is a vision transformer, DINOv2's ViT-S with 24.8 million parameters, followed by a DPT head that turns its features back into a picture of distances.

At its usual input size, 518x392, the model needs 80.9 billion operations a picture, too much for the Nano. We export it for the webcam's 4:3 pictures at 280x210, 336x252 and 448x336, with 336x252 (28.9 billion) as the default.

Three things TensorRT 8.2 couldn't read

The export on the PC changes three spots in the graph without changing the result:

The refusal

On the Nano, TensorRT 8.2 still built no engine at all: Could not find any implementation for node {ForeignNode[...]}. A "foreign node" is a part of the graph that TensorRT hands to Myelin, its internal compiler for transformer-style blocks. To find which part, the export now also writes small probe models, one for each piece of a transformer block, and a script builds each one on the Nano. The linear layers, LayerNorm and GELU built from TensorRT's own layers. The attention didn't: Myelin took it, then failed with cuBLAS error 1 querying major version. Why Myelin can't start cuBLAS here, when TensorRT's own layers can, is still unknown.

The fix: same model, different shape

YOLO26 has an attention block too, and TensorRT 8.2 built it from its own layers. The difference is shape. DINOv2 keeps its 433 tokens (one per 14x14-pixel patch, plus one) as rows of a table, multiplies them by weight matrices, and picks query, key and value out of a five-dimensional tensor. YOLO26 keeps its features as an image, uses 1x1 convolutions where DINOv2 uses weight matrices, and only multiplies four-dimensional tensors. So the export rewrites DINOv2 in YOLO26's shape. The tokens become an image one pixel tall, every linear layer becomes a 1x1 convolution with the same weights, and LayerNorm works across the image's channels.

One attention block, two layouts Left, DINOv2's layout: a linear layer as a matrix product with weights makes q, k and v; a reshape to five dimensions and a Gather pick them out; matrix products and a softmax combine them; a linear layer makes the output. TensorRT 8.2 hands the attention to Myelin, which fails with a cuBLAS error, so no engine is built. Right, the rewritten layout: a 1x1 convolution makes q, k and v; a reshape to four dimensions splits them; four-dimensional matrix products and a softmax as in YOLO26; a 1x1 convolution makes the output. TensorRT 8.2 builds it from its own layers, 170 ms a picture at 336x252 in FP16. DINOv2's layout, as published tokens as rows: 433 tokens × 384 values Rewritten for TensorRT 8.2 tokens as an image: 384 channels × 1 × 433 Linear layer → q, k, va matrix product with a weight matrix Reshape to 5-D, then Gatherpicks q, k and v out by index q × k, softmax, × vmatrix products on that 5-D split Linear layer → outputa matrix product with a weight matrix TensorRT 8.2 hands the attention to MyelincuBLAS error 1: no engine is built 1×1 convolution → q, k, vthe same weights, as a convolution Reshape to 4-D, splitq, k and v as plain slices q × k, softmax, × v4-D products, as in YOLO26's attention 1×1 convolution → outputthe same weights, as a convolution TensorRT's own layers170 ms a picture at 336x252, FP16
Both forms do the same arithmetic with the same weights: on the PC their depth maps agree to a relative difference of 3 × 10⁻⁹. Only the shape changed. The amber steps are the ones the probes showed TensorRT 8.2 can't build from its own layers.

The probes for the new layout went into the same run as the ones that found the problem, so one round on the Nano both found the cause and tested the fix. Every probe in the new layout built from TensorRT's own layers, and so did the whole model at all three sizes:

Input size, FP16GPU per picturePictures a secondDifference from PyTorch
280x210122.2 ms8.20.7% or less
336x252 (default)170.4 ms5.91.1% or less
448x336333.6 ms3.00.5% or less

The last column is the mean relative difference from PyTorch's depth (AbsRel) on three indoor test pictures, the worst of the three. TensorRT 8.5, given the model in DINOv2's own layout, takes 253.3 ms at 336x252, so the rewrite on 8.2 is 1.49 times faster.

Live

On the webcam, the default 336x252 engine runs at 5.5 depth maps a second, with 210 ms from capture to the drawn map. The program uses 62% of one CPU core, and the GPU runs at 92% load and 45.5 °C. The map follows the scene: a person near the camera, a door, a corridor further back.

The distances aren't calibrated yet. A trouser leg close to the camera read 1.41 m when it was probably under a metre (estimated from its size in the frame), so near distances may read long. A check against a tape measure is on the list, and after that, feeding the depth to ROS 2 and RTAB-Map for mapping.

11. A converter for other Nanos

Everything so far was put together by hand, on our own Nano. Nobody else could repeat that, so the last part of the project was a converter: a program that starts from a Nano running NVIDIA's JetPack 4.6.6 and ends with the system described here. It carries no NVIDIA files. Each Nano downloads Ubuntu's packages from Ubuntu and NVIDIA's from NVIDIA, after its owner accepts NVIDIA's licence, and builds its own packages from them.

The converter's six steps, from a JetPack 4.6.6 card to Ubuntu 26.04
  1. On JetPack 4.6.6, the converter checks the board and the JetPack release, downloads everything while the old system still works, and builds the new system as an image file: Ubuntu 26.04's base, the 5.10 kernel, the downloaded packages, and the account, SSH keys, hostname and Wi-Fi settings of the running system. The card's 13 boot partitions are copied byte for byte.
  2. You write the image over the card from a computer. This is the step that replaces JetPack.
  3. The first boot grows the system to the whole card and installs Ubuntu's packages, with no network. That can't happen any earlier: Ubuntu 26.04's systemd doesn't run on JetPack 4's 4.9 kernel.
  4. The second boot repackages NVIDIA's libraries on the Nano, installs them, and checks CUDA 11.4 and 12.6, TensorRT, OpenGL ES, Vulkan and both video converters on the real GPU before it shows the desktop.

On our Nano, from a card restored to plain JetPack 4.6.6, the image took 23 minutes to build and came to 6.7 GiB. The first boot took about 10 minutes and the second about 70, of which packaging CUDA 12 took 30. Two things went wrong on the way and are now fixed in the converter. SSH hung before its password prompt: OpenSSH 10.1 and newer mark interactive traffic with a priority that our network lost between the router and the PC. And the Vulkan check crashed, because the display's device node still belonged to root when it ran.

The converter keeps the rules of section 4. It never writes the boot firmware, it refuses any board but the Nano 4GB developer kit it was tested on, and it checks every download against a signature or a pinned SHA-256. Writing to a second card instead of an image, it asks for the card by name and refuses anything mounted.

Not ready for other people yet. It has run end to end once, on the Nano it was written on, and the kernel it downloads isn't published yet; until then it needs a kernel built with the repository's build script. The steps are in the README, and what it writes and what was never tested in the safety page.

12. Where it stands

FeatureStatusNotes
Ubuntu 26.04.1, systemd 259, native bootworksDefault boot, no failed units.
CUDA 11.4, cuDNN 8.6worksThe default CUDA, with correct results on the GPU. CUDA 11.4's nvcc compiled for sm_53 with GCC 11 from a test folder; it isn't installed.
CUDA 12.6, cuBLAS 12, cuDNN 9.3worksBeside CUDA 11.4, through NVIDIA's 12.2 upgrade driver; programs opt in with nano-cuda12. CUDA 12.6's nvcc builds sm_53 programs. Larger CUDA 12 software, such as PyTorch, is untested.
TensorRT 8.2 (default) and 8.5.2works8.2 from JetPack 4, with a stand-in for the NvMedia library; 8.5 through nano-trt85. Both build FP32 and FP16 engines.
OpenGL 4.6, OpenGL ES 3.2, Vulkan 1.3 computeworksJetPack 5's drivers. Vulkan graphics and presenting are untested.
HDMI desktop (Unity, Xfce)worksX server 1.20 with NVIDIA's X driver, hardware mouse pointer.
Clocks, power modes, fanworksRAM 1,600 MHz, CPU 1,479 MHz, GPU 921.6 MHz; MAXN and 5W; the fan starts at 51 °C.
USB 2 and 3, Wi-Fi (USB adapter), serial portsworksWi-Fi was tested with one USB adapter. The serial ports appear; data over the pins is untested.
VIC video conversionworksBoth converters pass; JetPack 5's with our fix and next to CUDA. The camera programs don't use VIC yet.
JetPack 5 converter's GPU pathbrokenWrites flat frames. Not needed, because VIC does the same job.
Hardware video decode and encodeworksH.264 and H.265 decoding and encoding and JPEG decoding through JetPack 4's elements (nano-r32-video). JetPack 5's (nano-r35-video) do all but H.264 encoding, where its encoder crashes.
HDMI idle blankingworksJetPack 5's X driver left the screen dark after the blank; a small service, nano-hdmi-wake, sets the mode again so a key press brings the picture back. The kernel still sees the monitor unplug and replug every few seconds while it's blanked.
USB webcam and its microphoneworksEvery YUYV and MJPEG mode streams.
Live object detection (YOLO26n)works23.1 frames a second at 640x480 on TensorRT 8.2, 73 ms from capture to the drawn frame.
Live metric depth (Depth Anything V2 Small)works5.5 frames a second at 336x252. Its distances haven't been checked against a tape measure yet.
Converter from a JetPack 4.6.6 cardone runRan end to end once on this Nano. The kernel it downloads isn't published yet, and nobody else has run it.
ROS 2 Lyricaluntested hereRan from apt under Ubuntu 26.04 on the old 4.9 kernel. Not installed again since the move to 5.10.
EthernetuntestedThe driver binds and makes up an address at each boot. No cable was ever connected.
DisplayPort, CSI cameras, the board's own audio (HDMI included)offSwitched off in the 5.10 device tree, so they don't work yet. USB cameras and USB microphones do.
USB device mode, Vulkan graphics, 4K output, 40-pin header, over-temperature throttlinguntestedNever tried under 5.10.

13. Lessons

Credits and caveats

This builds on NVIDIA's published L4T sources and packages (among them JetPack 4's TensorRT 8.2 and JetPack 6's CUDA 12.6 libraries), the OE4T mirrors of the L4T R35.6 and R32.7.6 kernel trees, Ubuntu, and the libdrm project's documentation of VIC's settings block. The camera work uses Ultralytics' YOLO26 (AGPL-3.0) and Depth Anything V2 (Apache-2.0). The repository holds scripts, patches and notes only, with no NVIDIA binaries or model weights; its scripts download NVIDIA's packages from NVIDIA and the models from their publishers, and check them by SHA-256.

This is a hobby experiment on one Nano 4GB (module P3448-0000). It isn't supported by NVIDIA, and parts of it lean on closed libraries in ways they weren't designed for. If you try it, keep a backup of your card, and read the safety page first.