Skip to content

headless: no window and a serial console on every machine - #895

Open
jamesbraid wants to merge 2 commits into
techomancer:mainfrom
jamesbraid:headless
Open

jamesbraid wants to merge 2 commits into
techomancer:mainfrom
jamesbraid:headless

Conversation

@jamesbraid

@jamesbraid jamesbraid commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Part 1 of 3: headless, then input devices, then one control path.

headless meant something different on every machine. It dropped the Indy's and Indigo2's Newport, unplugged the O2's keyboard and did nothing for the Octane. A headless Octane with a graphics board therefore sent its PROM output to a screen nobody was looking at.

After this, headless means no window and no keyboard, on every machine, and nothing else changes. The graphics board stays. A PROM that finds no keyboard falls back to its serial console by itself, so nothing is written into the guest's NVRAM and a later windowed run is unaffected.

The keyboard goes through the same placement as the other devices. Every machine that has a keyboard (all but the Origin 200, Origin 2000 and Onyx2) has a keyboard slot with a default keyboard in it (--list-slots shows it). headless leaves the slot empty unless a [[devices]] entry of type keyboard fills it. The PS/2 controller then ignores keyboard commands, including the self-test's keyboard byte, and drops the host's keys. On the machines whose keyboard is USB (Origin 3200, Onyx 3000, Tezro, and a Fuel with usb_input) the USB keyboard is not attached. The mouse stays.

Two commits:

  1. headless unplugs the keyboard on every machine. iris-gui keeps its Headless checkbox and opens its serial console when a headless machine starts. A none entry at keyboard leaves the slot empty too, as it does at graphics.
  2. headless stops dropping the Newport. The bench, cpu-test, snapshot-fixture and test configs that used it to get no graphics now place none at graphics.

A third commit, accepting board = "none" on the Indy and Indigo2, is gone: the graphics-board entries change already lets the Indy and Indigo2 take none at graphics.

Scrutinize

  • With no keyboard, each PROM falls back to serial only because of how the PROM behaves, not because iris tells it to. I booted the built-in PROMs headless with a board fitted and with the keyboard placed back, and compared the serial output:
    • Indy, Indigo2 IP22, Indigo2 IP28 (SolidImpact) and O2: the maintenance menu on serial without a keyboard, nothing on serial with one.
    • Octane (SolidImpact): the PROM finds no keyboard and its console goes to serial, but it first prints "Diagnostics failed. [Press any key to continue.]" and waits there. With blank NVRAM it stayed at that prompt for 400 s; a single byte sent to serial1 released it to the maintenance menu and Option? within 60 s. The PROM probed the keyboard four times and read the receive register clear on every poll, so the model reads as an empty port; the same build with the keyboard placed passes the diagnostics and reaches its autoboot. Whether a real Octane stops at that prompt with no keyboard is not known. docs/octane-ip30.md and the first commit say the same. A test pins that an unplugged IOC3 keyboard port reads with bits 31:29 clear and answers nothing to 0xf2, 0xff or 0xf4. No special case in code.
    • Origin 200, Origin 2000, Onyx2, Origin 3200, Onyx 3000, Fuel and Tezro: serial either way.
  • The Origin 200, Origin 2000 and Origin 3200 take no graphics board, so those runs had none fitted.
  • Headless now fits a Newport where it used to drop it, so a headless Indy or Indigo2 does what a Newport machine does on exit, including saving its REX3 draw-shape corpus under ~/.iris. headless adds no writes of its own, but scripts that used --headless as a cheap run now get that file.
  • iris-gui: a headless machine opens the serial console. The display is still drawn, on purpose: on the Octane it is the only place the stalled diagnostics are visible, and a "show screen" toggle would be a GUI preference, not a machine setting.
  • The Indigo2 GR2 snapshot test now builds its board-less machine with no graphics entry: a Newport gives a different error for that load.

Tested

  • Rebased onto main at 548543a, which carries ports: network, camera and audio as devices at their ports #926 and jitv2: tell an empty code page by a flag, not by the stub's address #941 (the Ethernet, video and audio slots show in --list-slots beside the keyboard). No conflicts.
  • cargo check --all-targets on each commit.
  • cargo nextest run (dev profile) at the head (6f84923): 5289 passed on default features; at 08e91f0, 6017 passed with --features jitv2 --features rex-jit --features gputrace. -p iris-gui-core: 184 passed.
  • Built-in Indy PROM, headless, blank NVRAM, release build: the maintenance menu prints on serial and stops at Option? after 6 s.
  • The PROM comparisons in Scrutinize were taken on an earlier base and not repeated on the other machines. No IRIX boot: no installed disk was at hand, so the iris-ci boot test was not run.

@jamesbraid
jamesbraid marked this pull request as ready for review November 28, 2026 04:02
@jamesbraid
jamesbraid force-pushed the headless branch 3 times, most recently from 6aebba6 to f3f5439 Compare November 29, 2026 11:30
@jamesbraid
jamesbraid marked this pull request as draft November 29, 2026 17:47
headless meant something different on each machine. It dropped the
Indy's and Indigo2's Newport, unplugged the O2's keyboard and did
nothing for the rest. A PROM that finds no keyboard can fall back to its
serial console, which is what a run with no window wants, but only the
O2 could be put in that state.

Every machine with a keyboard now has a keyboard slot and a default
keyboard device placed in it, the way the default serial listeners are
placed. The Origin 200, Origin 2000 and Onyx2 have no keyboard and no
slot. headless leaves the slot empty unless an entry places a keyboard,
and --list-slots shows it. The PS/2 controller drops the host's keys and
leaves keyboard commands, and the self-test's keyboard byte, unanswered
once unplugged, which is what an empty port does. The mouse stays. On
the machines whose keyboard is USB (the Origin 3200, Onyx 3000, Tezro
and a Fuel with usb_input) the USB keyboard is not attached.
workstation::build applies this to every machine's controller. The O2
builds its MACE ports empty as before, from the same placement instead
of from headless. A none entry at keyboard leaves the slot empty too,
as it does at graphics.

With the keyboard left out and a board fitted, the built-in Indy,
Indigo2 (IP22 and IP28) and O2 PROMs print their maintenance menu on
serial. The same PROMs with a keyboard placed print nothing there. The
IP27 and IP35 PROMs use serial either way. The Octane's PROM sends its
console to serial itself. A power-on with blank NVRAM stops at
"Diagnostics failed. [Press any key to continue.]" until one key arrives
on serial1. Whether real hardware stops there too is unknown.

The unplugged IOC3 keyboard port reads with bits 31:29 of its receive
register clear and answers nothing to 0xf2, 0xff or 0xf4, which is what
the PROM's absent-device check looks for; a test pins that.

iris-gui opens its serial console when a headless machine starts, since
that machine has no keyboard to type at the screen with.

Production lines: +96 -29
headless was the only way to a machine with no graphics board, so it
also removed the Newport, and a few callers used it for that and nothing
else. A run that only wants no window, and so no keyboard, got a
different machine from a windowed run: the PROM saw no graphics board
and the guest's hinv recorded none.

headless now changes the window and the keyboard and nothing else. The
Indy and Indigo2 keep their Newport, and a second head stays at gio0
where its entry put it. The callers that wanted no graphics say so with
a none entry at graphics: the bench and cpu-test machines, the snapshot
fixtures, the monitor readiness test and the GUI's storage tests. The
bare-metal suites' helper appends its serial entries as [[devices]] tables,
since an inline `devices = [...]` now duplicates the machine file's own
key. The windowed Newport tests set the board they use, since the bench
configuration no longer reaches them with one. The O2 chime test sets
headless, which is what it relied on to lose its keyboard. The GR2
snapshot test builds its machine with no GR2 from a board of none,
because a Newport answers that load with another error.

iris-gui's overview no longer reports a headless machine as having no
graphics, and the resolution picker no longer hides for one. HELP.md's
headless example no longer calls it the lightest server mode.

Production lines: +22 -27
@jamesbraid
jamesbraid marked this pull request as ready for review November 29, 2026 21:08
@jamesbraid
jamesbraid marked this pull request as draft November 29, 2026 22:16
@jamesbraid
jamesbraid force-pushed the headless branch 5 times, most recently from ba794f2 to 08e91f0 Compare November 30, 2026 10:22
@jamesbraid
jamesbraid marked this pull request as ready for review November 30, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant