A 256 MiB Window and a Two-Second Timeout: Stabilising llama.cpp on Two Old AMD GPUs
The box is an Intel NUC 8 “Hades Canyon” called nuc-rog. Its i7-8809G is the odd Kaby Lake-G part that carries an AMD Radeon RX Vega M GH and 4 GiB of HBM2 on the same package as the CPU, and its Thunderbolt 3 port feeds a Razer Core X with an MSI RX 580 8 GB inside. Two AMD GPUs, then, from 2018 and 2017. The plan was three local models behind one OpenAI-compatible endpoint: a small Gemma 4 for quick answers, a bigger one for most things, and gpt-oss-20b split across both cards when I want something heavier.
The first version came out of a couple of evenings with Claude Desktop and ended in a handoff note, and it mostly worked. The mid-sized tier ran at 23 tokens a second through llama-swap against about 30 in llama-bench, a gap the note called “unexplained”. Some of its processes crawled at a third of that, which the note said had “cleared by itself”, and the RX 580 reset four times in one afternoon. None of it was random; each symptom had a cause sitting on the box in fdinfo or sysfs. This post is about finding those causes, fixing them and writing the result down in Ansible, so that a rebuild can’t quietly undo any of it. This round ran in Claude Code from a written plan: eight phases, each with an acceptance test it had to pass and a commit when it did.
Why it isn’t ROCm
Both GPUs are gfx803. Whatever its name says, the Vega M GH is a Polaris chip (Mesa’s RADV driver calls it VEGAM), and the RX 580 enumerates as POLARIS10. ROCm stopped shipping kernels for gfx803 years ago, and the community builds that patch support back in are one more moving part to keep alive across every ROCm release. llama.cpp’s Vulkan backend on RADV runs both cards from a single build with no vendor stack at all. On this hardware it isn’t a close call, so everything below is Vulkan.
Measure where the memory is, not just how fast it runs
I wanted numbers I could trust before changing anything, so the first thing written was a harness. llm-bench goes through llama-swap the way a real request does. For each instance it unloads, waits until the old process has gone and the RX 580’s VRAM is back to its baseline, starts the model and sends two 300-token requests, keeping the second. While that runs it samples both GPUs’ clocks every half second, and afterwards it reads the server’s fdinfo, RAPL and both cards’ power. Each result line also records whatever could have skewed it: load average, temperatures, any other GPU tenant, and whether the model file was already in page cache. In hot mode it reloads the config and fires requests at once, to reproduce the reload race the handoff suspected.
Why not llama-bench? It doesn’t go through the server, so it can’t see what the server does differently, which was the whole question; and running it on the RX 580 while llama-swap had a model loaded there caused resets of its own. The harness had a bug too. It split environment lists on commas, so GGML_VK_VISIBLE_DEVICES=0,1 became =0 plus a stray 1, and my first oss comparison ran almost entirely on the CPU at 3.8 t/s before I worked out why. It takes ;-separated lists now.
The fdinfo reading turned out to be the one that mattered. Here’s a healthy smart process today, from /proc/<pid>/fdinfo:
drm-pdev: 0000:40:00.0
drm-resident-vram: 3496652 KiB
amd-requested-vram: 3496652 KiB
Requested equals resident, so every byte the process asked to keep in VRAM is there. The 16K-context smart from the handoff’s setup asked for 3,217,996 KiB and held 2,955,852, while its GTT residency (system RAM mapped for the GPU) ran 262,144 KiB over its own request. That’s exactly 256 MiB, and it’s the whole story.
The 256 MiB window
llama.cpp’s Vulkan backend allocates every device buffer as DeviceLocal plus HostVisible first, with a comment in the source explaining it as using ReBAR where available. On a card with Resizable BAR that memory type covers all of VRAM. The RX 580 in the Core X has no Resizable BAR, so the type means its 256 MiB CPU-visible window (mem_info_vis_vram_total), and llama.cpp fills it first come, first served. Buffers of 256 MiB or less go in, in allocation order, until one doesn’t fit; that one lands in system RAM on the far side of the Thunderbolt link. Bigger buffers fail the first allocation outright and fall back to plain VRAM, which is why the weights were never in danger. The Vega M’s window spans all 4 GiB of its HBM2, so fast never showed any of this.
With GGML_VK_MEMORY_LOGGER=1, llama.cpp names its buffers. At 16K the weights load as three device buffers of 1,019.5, 1,013.5 and 663.0 MiB. Then comes the KV cache for the four global-attention layers at exactly 256.00 MiB, followed by 40 MiB of sliding-window cache and a 140 MiB compute buffer. Which buffer misses the window decides the damage. At 16K it’s that KV cache, which every token reads; at 8K, or with flash attention off, it’s the compute buffer, which every operation touches. At 4K everything fits, and at 32K the KV cache is big enough to skip the window and go straight to VRAM.
smart on the RX 580, mean of the second 300-token reply:
smart configuration |
Default placement | Not in VRAM | With the fix |
|---|---|---|---|
| 4K context | 32.4 t/s | 0 | 30.2 t/s |
| 8K context | 11.6 t/s | 132 MiB | not run |
| 16K context | 23.9 t/s | 256 MiB | 30.2 t/s |
| 32K context | 32.3 t/s | 0 | 30.4 t/s |
| 16K, ~7,500 tokens deep | 3.3 t/s | 256 MiB | 28.8 t/s |
| 4K, flash attention off | 10.8 t/s | 181 MiB | not run |
The handoff’s “one-third speed” processes, at 10.8, 10.8 and 11.6 t/s, reproduce here to within 0.01 t/s from configuration alone. There was no race. The config had changed between runs, and with it the buffer that missed the window.
The fix already exists in llama.cpp. GGML_VK_DISABLE_HOST_VISIBLE_VIDMEM=1 turns the host-visible preference off, so every buffer lives in ordinary VRAM and uploads go through staging copies, which is the normal path for a discrete GPU without Resizable BAR. Wherever default placement happens to work it costs 5 to 7%, about 2.2 ms per token of extra transfers. Default placement at 32K is the fastest row in that table, and I still didn’t pick it: a different context, a flash-attention change, a new model or a new llama.cpp, or a second process holding part of the window, would silently drop it to 11 t/s, or to 3 deep into a conversation. I’ll take a tier that’s always 6% slower over one that’s fastest until the next config edit. The variable goes on smart and on oss, whose RX 580 share had almost certainly been caught the same way; with it, oss went from the handoff’s 18.8 t/s to 29.4 in llama-bench.
Flash attention, which the bench said didn’t matter
The handoff had turned flash attention off on two tiers, on the strength of llama-bench showing no benefit. The server’s log disagreed at every start: the V embeddings have different sizes across layers and FA is not enabled - padding V cache to 1024. Even with placement fixed, FA off costs Gemma 4 9% (27.5 against 30.3 t/s), and turning it on took oss from 29.4 to 33.0 in llama-bench. Every tier runs -fa on.
Four resets and a two-second default
On kernel 7.0, modinfo amdgpu gives lockup_timeout a default of 2,000 ms on every ring. Three of the four resets that afternoon came exactly two seconds after a “soft recovered” timeout on a compute ring. A compute submission that runs slowly, as every one did with buffers stranded behind Thunderbolt, gets declared hung; the card resets and loses its VRAM. An earlier workaround, -ub 128 on a Granite model, had “fixed” it only by making each submission shorter.
The fix raises the compute timeout and leaves the rest alone:
# /etc/modprobe.d/amdgpu-llm.conf, comments trimmed
options amdgpu lockup_timeout=2000,10000,2000,2000
options amdgpu pcie_gen_cap=0x00070007
The four values are GFX, compute, SDMA and video, in milliseconds, so compute jobs get 10 s and the display path keeps its quick 2 s recovery. amdgpu isn’t in either installed kernel’s initramfs on this box, which means the file is read from the root filesystem at the next boot and nothing needs rebuilding. There hasn’t been a reset since, through two boots, a soak and a lot of model swaps. The second line is the next problem.
A Gen3 link running at Gen1
current_link_speed on the RX 580 said 2.5 GT/s. The physical link from the Core X’s downstream port is Gen3 x4 and had trained at Gen3 (EqualizationComplete+ in lspci -vv), but amdgpu offered the card only 2.5 GT/s power states, because it takes its PCIe cap from the Thunderbolt virtual bridges upstream and those always report 2.5 GT/s. Host-to-GPU traffic was running near 0.8 GB/s where Thunderbolt 3 can tunnel about 2.7, and every staging copy the placement fix had just added paid for it.
pcie_gen_cap=0x00070007 allows Gen1 to Gen3 for both the ASIC (bits 0 to 2) and the platform (bits 16 to 18). After the reboot pp_dpm_pcie offered an 8.0 GT/s level, and the link held 8.0 GT/s x4 idle and under load:
| Measurement | Gen1 | Gen3 |
|---|---|---|
smart cold load, model in page cache |
7.41 s | 4.40 s |
smart generation, short prompt |
30.7 t/s | 32.8 t/s |
smart prompt processing, ~7,500 tokens |
445 t/s | 470 t/s |
smart generation at that depth |
28.2 t/s | 29.7 t/s |
oss cold load |
18.6 to 23.8 s | 10.6 to 15.6 s |
oss generation |
32.7 t/s | 33.3 t/s |
That bought back most of what the placement fix cost; smart now generates faster than default placement ever managed at Gen1, without the trap. Before keeping it I soaked it for 30 minutes: 49 iterations, each a 4,153-token smart prompt followed by an oss reply, so every switch reloaded a model and roughly 650 GB of uploads crossed the link. All 49 link checks read 8.0 GT/s, and the kernel logged no ring timeouts, resets, AER reports or pcieport messages.
The reboot that didn’t come back
Getting there cost an outage. The reboot into Gen3 stopped at POST with a BIOS device-detection error, and the box stayed down for 26 minutes until I power-cycled it from the KVM. It wasn’t the new option: the journal runs from a clean shutdown straight into the next good boot, so the kernel never ran during the failed attempts, and pcie_gen_cap does nothing until amdgpu loads.
The likeliest suspect is the JetKVM’s USB composite device, with four HID interfaces, two audio interfaces and a mass-storage one for virtual media. Linux has reset it twice on every boot since late September, 20 seconds of timeout each, and that’s the 42-second stall in systemd-modules-load that every one of those boots has carried. Behind it come the two DRAM-less Kingston A2000 SSDs, because the boot before the failure was the first ever to log DMAR faults from both of them, a DMA read the IOMMU blocked after a warm reset. The BIOS dates from 2019. A Linux reboot here goes through the ACPI reset register, so the rails stay up and whatever state those devices are in carries straight into POST; a power cycle clears it, which is presumably why one recovered the box.
That outage shaped the Ansible design more than anything else in this post: Ansible never reboots this box.
Which GPU is GPU 1?
The tiers picked their GPUs by Vulkan index, and “index 1 is the RX 580” only held by position. On every boot I checked, amdgpu bound the RX 580 about 48 seconds in, while llama-swap started at 51 and preloaded smart immediately, three seconds of margin that a slow Thunderbolt handshake could eat. Ollama, still installed then, probed for GPUs at that same moment and found no AMD GPU at all on two of those boots. When the eGPU is late, index 1 is whatever enumerates next, which on this chip is the Intel HD 630 sharing the package, and smart runs there without a word of complaint.
Every tier now sets VK_DRIVER_FILES=/usr/share/vulkan/icd.d/radeon_icd.json, so only RADV devices enumerate. Index 0 is always the Vega M and 1 the RX 580, and a missing eGPU leaves index 1 pointing at nothing, which llama.cpp reports as Invalid Vulkan device index rather than quietly running on the iGPU. The unit also gained a start gate, llm-wait-gpus: an ExecStartPre that holds llama-swap until vulkaninfo, run with the models’ own environment, lists both AMD GPUs, for up to 90 seconds. systemd’s default start timeout is also 90 seconds and would have failed the whole unit on a slow eGPU, hence TimeoutStartSec=150. If the RX 580 never turns up, the gate says so and lets llama-swap start anyway, so fast works and smart fails where you can see it. On the latest boot:
llm-wait-gpus: all GPUs visible after 5 s (RADV VEGAM,RADV POLARIS10)
Ollama went while I was in there: 26 GB of models nothing had loaded in days, 4.5 GB of bundled GPU libraries, and a service that probed both AMD cards at every boot.
Pin the clock while it works, not while it’s loaded
The Vega M needs its power level forced to high for oss to be quick. Left on auto it sat at 400 MHz in every sample, and oss fell from 32 to 20 t/s. The handoff’s wrapper, vega-pin, held high for as long as a model stayed loaded, though, and at 1190 MHz the Vega M draws 22.3 W doing nothing. With fast and smart loaded and idle, the box drew 32.0 W against 14.8 W with the Vega M on auto.
gpu-pin replaces it. It starts a monitor in the background and then execs the server, so the server keeps the wrapper’s PID and llama-swap can’t tell the difference. The monitor watches the server’s CPU time: a rise of at least three ticks (30 ms) inside one 50 ms poll pins the Vega M high, and 15 seconds without one puts it back on auto. A marker named after the server’s PID makes the pin reference-counted, so one server letting go can’t unpin the card under another.
The first version left the card pinned after an unload. llama-swap stops a model by signalling its whole process group, which killed the monitor before it could release, and the Vega M sat at 22.3 W until the next model start swept the stale marker. The monitor traps SIGTERM and HUP now and is back on auto within half a second of an unload. It also used to fork sleep ten times a second; on bash 4 and later it waits on a timed read from a FIFO it holds open itself, and costs about 1.2% of one core.
Tuning the trigger took four runs and mostly taught me I was measuring against the wrong thing. Comparing a reply after a minute idle with one repeated straight away, the run-to-run noise was as large as the differences between settings. The fair reference is the old behaviour, the Vega M held high throughout, and against that, gpu-pin’s reaction adds about 40 ms to the first reply after an idle spell: 4 to 8% on a 32-token reply, under 1% on a 300-token one. One tick per 100 ms pinned the card on its own for 15 seconds of a quiet minute, so the shipped trigger is three ticks per 50 ms, which produced no false pins in five idle minutes. With both everyday models loaded and doing nothing, the box now draws what it draws with nothing loaded: 16.2 W, measured both ways in the same session. The RX 580 holds its top clocks by itself while generating, and forcing it high bought 1.6%, so it has no pin at all.
Where it landed
flowchart TB
C["<b>API clients</b><br/>port 8080"]:::external
subgraph Router["Routing"]
LS["<b>llama-swap v270</b><br/>matrix sets · watches its config"]:::trigger
end
subgraph Tiers["Model tiers"]
F["<b>fast</b><br/>Gemma 4 E2B · 4K context"]:::compute
O["<b>oss</b><br/>gpt-oss-20b · 16K context"]:::compute
S["<b>smart</b><br/>Gemma 4 E4B · 32K context"]:::compute
end
subgraph GPUs["GPUs · Vulkan · RADV"]
V["<b>Vega M GH</b><br/>4 GiB HBM2 · internal Gen3 x8"]:::compute
R["<b>RX 580</b><br/>8 GiB · Razer Core X · TB3 at Gen3 x4"]:::compute
end
subgraph Persistence
M[("<b>Models</b><br/>/home/jean/models · nvme0")]:::store
B[("<b>Builds</b><br/>/opt/llama.cpp · /opt/llama-swap · nvme1")]:::store
end
subgraph Helpers["Helpers"]
P["<b>gpu-pin</b><br/>Vega M high only while working"]:::compute
G["<b>llm-wait-gpus</b><br/>start gate · both GPUs visible"]:::compute
end
C -->|sends requests| LS
LS -->|routes| F
LS -->|routes| O
LS -->|routes| S
F -->|runs on| V
O -->|runs a third of the layers| V
O -->|runs two thirds| R
S -->|runs on| R
Tiers -.->|load weights| M
Tiers -.->|run from| B
F -.->|runs under| P
O -.->|runs under| P
LS -.->|waits on| G
classDef trigger fill:#fff3cd,stroke:#f0ad4e,color:#000
classDef compute fill:#cfe2ff,stroke:#0d6efd,color:#000
classDef store fill:#d1e7dd,stroke:#198754,color:#000
classDef queue fill:#e2d9f3,stroke:#6f42c1,color:#000
classDef external fill:#fde2e4,stroke:#d6336c,color:#000
classDef analytics fill:#d3f0f4,stroke:#0aa2c0,color:#000
classDef alarm fill:#f8d7da,stroke:#dc3545,color:#000
| Tier | Model | Runs on | Context | 300-token reply | verify.yml floor |
|---|---|---|---|---|---|
fast |
Gemma 4 E2B, QAT Q4_0 | Vega M GH | 4K | 55.2 t/s | 53.5 t/s |
smart |
Gemma 4 E4B, QAT Q4_0 | RX 580 | 32K | 33.2 t/s | 31.0 t/s |
oss |
gpt-oss-20b, MXFP4 | both; a third of the layers on the Vega M, the experts of four layers on the CPU | 16K | 34.0 t/s | 31.5 t/s |
smart went from 23.9 t/s at 16K, and 3.3 deep into a long conversation, to 33.2 with twice the context and no placement trap behind it. oss went from the 18.8 t/s the handoff measured to 34.0. fast was always quick; what changed is that it now stays loaded for free. llama-swap’s matrix routing keeps fast and smart loaded together so both answer at once, while a request for oss evicts the pair, and oss unloads itself after 15 idle minutes. Every tier holds all the VRAM it asked for. The floors are about 95% of the measured speeds and sit in the same variables file as the tiers, so a llama.cpp upgrade that costs more than 5% fails verify.yml --tags perf instead of going unnoticed.
Writing it down in Ansible
By the end, the working state was spread across /etc/modprobe.d, /etc/udev/rules.d, /etc/systemd/system, /usr/local, /opt and a config file in my home directory, and nearly every piece of it existed because of one measured fault. Rebuilt from memory, the box would get almost all of it right and quietly lose the one environment variable that matters. So it’s a role, llm_stack, in the repository that already holds the box’s Ansible, and it has two rules: a re-run never undoes a tuning, and the box can always tell me whether it still matches.
flowchart TB
OP["<b>Workstation</b><br/>Ansible over SSH"]:::trigger
subgraph Repo["NUC-Rog repository"]
GV["<b>group_vars/llm_hosts.yml</b><br/>tiers · PCI addresses · pinned versions"]:::compute
RL["<b>roles/llm_stack</b><br/>tasks · templates · files · handlers"]:::compute
VF["<b>verify.yml</b><br/>read-only checks · perf floors"]:::analytics
end
subgraph Box["nuc-rog"]
KO["<b>Kernel and udev</b><br/>amdgpu options<br/>Vega M power permission"]:::compute
SV["<b>llama-swap</b><br/>systemd unit · start gate<br/>gpu-pin wrapper"]:::compute
subgraph Disk["Persistence"]
CF[("<b>config.yaml</b><br/>rendered from the tier list")]:::store
OB[("<b>/opt</b><br/>llama.cpp per commit<br/>llama-swap per release")]:::store
end
end
GH["<b>GitHub</b><br/>llama.cpp source<br/>llama-swap releases"]:::external
OP -->|runs site.yml| RL
GV -->|configures| RL
RL -->|installs| KO
RL -->|installs · restarts| SV
RL -->|renders| CF
RL -->|builds into| OB
SV -->|reads| CF
SV -->|runs from| OB
RL -.->|clones · fetches by sha256| GH
OP -->|runs| VF
VF -.->|reads back · never writes| Box
classDef trigger fill:#fff3cd,stroke:#f0ad4e,color:#000
classDef compute fill:#cfe2ff,stroke:#0d6efd,color:#000
classDef store fill:#d1e7dd,stroke:#198754,color:#000
classDef queue fill:#e2d9f3,stroke:#6f42c1,color:#000
classDef external fill:#fde2e4,stroke:#d6336c,color:#000
classDef analytics fill:#d3f0f4,stroke:#0aa2c0,color:#000
classDef alarm fill:#f8d7da,stroke:#dc3545,color:#000
One file holds the decisions
group_vars/llm_hosts.yml is the only place a tier is defined. This is smart:
- name: smart
note: "RX 580: Gemma 4 E4B (QAT Q4_0)"
cmd: "${server} -m ${modeldir}/gemma-4-E4B_q4_0-it.gguf -c 32768 --parallel 1 -fa on"
devices: "1"
# Keep every device buffer out of the RX 580's 256 MiB CPU-visible window,
# where overflow lands in system RAM behind Thunderbolt (Phase 2).
extra_env: [GGML_VK_DISABLE_HOST_VISIBLE_VIDMEM=1]
aliases: [gemma-4-e4b]
and this is what the template renders from it into llama-swap’s config:
smart: # RX 580: Gemma 4 E4B (QAT Q4_0)
cmd: ${server} -m ${modeldir}/gemma-4-E4B_q4_0-it.gguf -c 32768 --parallel 1 -fa on
env: ["GGML_VK_VISIBLE_DEVICES=1", "VK_DRIVER_FILES=/usr/share/vulkan/icd.d/radeon_icd.json", "GGML_VK_DISABLE_HOST_VISIBLE_VIDMEM=1"]
aliases: ["gemma-4-e4b"]
The template builds env from the device list, the shared driver pin and the tier’s extras, so nobody can add a tier and forget VK_DRIVER_FILES. ${server} is a llama-swap macro pointing at /opt/llama.cpp/current/bin/llama-server, and ${vega} wraps the same command in gpu-pin. The file also holds the two GPUs’ PCI addresses, because DRM card numbers move between boots and PCI addresses don’t, along with the pinned versions and what verify.yml should expect the kernel to report. The rendered config opens with a header saying Ansible owns it and edits belong in the variables file.
Pinned builds, one directory per version
llama.cpp is cloned into /opt/llama.cpp/src at a full commit SHA and built into /opt/llama.cpp/builds/<sha>, with the same CMake options as the hand build every measurement used, minus the test suite. The build task only runs when that directory has no llama-server yet. It runs async, because a cold build takes several minutes, and at nice 19 with idle I/O priority so the compile doesn’t starve the box’s other work. A current symlink points at the live build, which makes an upgrade a change of SHA and a rollback the same change in reverse, with the old build still on disk. llama-swap comes from its v270 release tarball, checked against a sha256 in the variables file, unpacked into /opt/llama-swap/270 and symlinked onto the PATH. /opt is the second SSD, so the unit carries RequiresMountsFor for both trees.
Restart only what changed
llama-swap runs with --watch-config, which restarts only the models whose entries changed, so the config template notifies nothing. Three things restart the service through a handler: the unit, the llama-swap binary, and the current symlink. The symlink is the subtle one. Switching builds doesn’t change a byte of config, so the watcher would never notice.
Kernel options, never a reboot
The role copies amdgpu-llm.conf and notifies two handlers. One rebuilds the initramfs, but only if an initramfs actually carries amdgpu, and none does here. The other prints that a reboot is due and stops there. After that POST failure, when this box reboots is a person’s decision, made in a quiet window with a hand on the KVM.
Things that must stay gone
vega-pin is declared absent. So is Ollama, in full: the unit, the binary, the 4.5 GB of libraries, the 26 GB model store, the user and the group. A role that only ever adds things has no way to say “and this must not come back”.
Check mode that tells the truth
Ansible’s check mode skips command and shell tasks, so a probe written as one registers nothing under --check, and any assertion built on it proves nothing. Every read-only probe in the role sets check_mode: false. The first --check --diff against the live box still failed twice, in ways only a first run hits: the build task chdired into a directory that check mode only pretends to create, and the llama-swap download targeted a directory that didn’t exist yet. The build now uses absolute paths, and the download is skipped in check mode when its directory is simulated. After that the diff showed what I expected and nothing else: the /opt builds and the paths pointing at them, the managed headers, and vega-pin going away. The first real run took 6 minutes 17 seconds, compile included, with changed=14. The second reported changed=0, which is the test that matters.
The box checks itself
verify.yml is read-only and safe to run any time. For this stack it asserts that:
- llama-swap is active and enabled;
- the config, the unit and the udev rule match what the role would render, which it checks with the template module in check mode so it can only ever compare;
- amdgpu’s live
lockup_timeoutandpcie_gen_capmatch the file, and the RX 580 links at 8.0 GT/s; - Vulkan sees exactly two GPUs, the Vega M first;
- both GPUs rest on
autounless a model is working, and thevideogroup can still set the Vega M’s level; - no running model has any of its VRAM request outside VRAM, which is the 256 MiB trap caught in the act;
vega-pinand Ollama are gone, and this boot’s kernel log holds no ring timeout, GPU reset, AER report or Thunderbolt drop.
Before the kernel-log pattern went in, I ran it against every boot in the journal: 27 matching lines in the boot with the four resets, none in the other eleven. A fault stays in that log until the next reboot, and reboots are their own risk here, so -e verify_kernel_since='YYYY-MM-DD HH:MM' narrows the window once a fault has been dealt with. --tags perf adds the benchmark: two 300-token replies per tier through llm-bench, each asserted against its floor, then the warm pair loaded again.
Rebuilding from nothing
After a fresh Ubuntu install, this is the procedure:
ansible-galaxy install -r requirements.yml
ansible-playbook site.yml --check --diff # read it before believing it
ansible-playbook site.yml
# power-cycle once from the KVM, so the amdgpu options load
ansible-playbook verify.yml
ansible-playbook verify.yml --tags perf
Two things sit outside it. The three models, about 19 GiB of GGUF files, have to go back into ~/models first; the role pins the software, not the weights. The Core X also needs enrolling with Thunderbolt again. The security level is user, boltd’s store doesn’t survive a reinstall, and until boltctl enroll --policy auto runs, the RX 580 never appears: the start gate waits out its 90 seconds, fast runs alone, and verify.yml fails on its device check.
What’s still open
USB boot is still enabled in the BIOS, and until it isn’t, any reboot can end at POST the way that one did; that’s the next job, with a hand on the KVM. Gen3 has one 30-minute soak behind it, which is why the kernel-log check exists. A Thunderbolt hot-unplug takes smart down until the first request after the Core X comes back, and every config deploy restarts the tier it changes, so that tier is briefly unavailable while Ansible runs. The Thunderbolt enrolment belongs in the role too. It just isn’t there yet.
If I keep one habit from this, it’s asking where a slow GPU process keeps its buffers before asking anything else. Both of the handoff’s mysteries were sitting in fdinfo the whole time, one grep away.