← Part 3: Reliable Remote Access  ·  AI Lab Portal Home

Part 3 diagnosed the problem: after roughly four hours of idle, Lab PC 2 (ai-lab-b) drops off the Tailscale tailnet, and no amount of remote knocking brings it back — only local physical activity does. powercfg /a revealed why: the Beelink SER9 only supports Modern Standby (S0 Low Power Idle), a client-oriented power model that suspends network availability during deep idle. Part 4 applies the fix and proves it with the same test methodology that caught the failure.

Core distinction

Part 3 = diagnosing why remote access fails after idle.

Part 4 = removing the failure state and proving it stays removed.

The standard of proof is the same protocol that produced Test 14's failure: leave the machine completely untouched for hours, then attempt access from the iPhone. If the fix is real, the exact scenario that failed before must now succeed.

Goal #

Configure Lab PC 2 so it never enters the idle state that takes ai-lab-b off the tailnet — the display may sleep, but the computer must stay reachable — and verify the change with repeatable idle tests.

BEFORE (Test 14) AFTER (target) 4+ hours idle 4+ hours idle │ │ ▼ ▼ S0 Low Power Idle Display off, system awake │ │ ▼ ▼ ai-lab-b OFFLINE ai-lab-b ONLINE │ │ ▼ ▼ iPhone request fails iPhone request succeeds

Starting Point #

ServerLab PC 2 / Beelink SER9, Windows 11
Tailscale nodeai-lab-b — 100.115.162.13
Open WebUIPort 8080, started via Start AI Lab script
Test clientiPhone (iphone171, 100.110.16.81) on cellular, Wi-Fi off
Test modelqwen3:8b
Known failure modeNode goes gray/offline after ~4 hours of no local activity (Test 14)
Available sleep statesS0 Low Power Idle only — no S1/S2/S3 (powercfg /a, Part 3)

Step 1 — Capture the Baseline SleepStudy #

Before changing anything, generate the SleepStudy report so the pre-fix idle behavior is documented rather than assumed. From an elevated PowerShell or Command Prompt:

powercfg /sleepstudy

The report is written to:

C:\WINDOWS\system32\sleepstudy-report.html

Copy it somewhere safe before it gets overwritten by later runs. The report should show the Modern Standby sessions from the Test 14 window — when the machine entered low-power idle, how long it stayed there, and which components were active or suspended during the session.

Baseline report capturedJuly 7, 2026 — covers March 24 through July 7
Modern Standby sessions in window77 sessions, 122.6 total hours; longest single session 18.0 hours (July 4–5)
Exit reasons across all 77 sessionsInput Keyboard (34), Input Mouse (14), scheduled maintenance tasks (28). Zero network wakes.
Display-sleep to standby delayMedian 17 seconds — on this hardware, display off effectively means system asleep

What the baseline proves

Across months of standby sessions, the machine was never once woken by network traffic — only by local input or Windows' own maintenance scheduler. The Test 14 failure wasn't bad luck or a Tailscale bug: at the OS level, an inbound request was never a wake candidate at all.

The maintenance scheduler does briefly wake the machine on its own timetable (it ended the 18-hour session), but those wakes are momentary — the box drops straight back into standby, so the node still reads offline whenever a human actually tests it.

Step 2 — Apply the Power Settings Fix #

The fix has two halves: the system must never sleep, and the display should still turn itself off. Both are one-line powercfg commands (elevated prompt, AC settings — the mini PC is always on wall power):

# Never enter standby while plugged in powercfg /change standby-timeout-ac 0 # Display may still sleep after 10 minutes powercfg /change monitor-timeout-ac 10

Verify the active plan picked up both values:

powercfg /query SCHEME_CURRENT SUB_SLEEP STANDBYIDLE powercfg /query SCHEME_CURRENT SUB_VIDEO VIDEOIDLE

A standby timeout of 0 means "never." This directly removes the state Test 14 caught the machine in: with no standby transition, there is no S0 Low Power Idle session for Tailscale to disappear into.

Settings appliedJuly 7, 2026 — elevated Command Prompt, Balanced power scheme
Verified via powercfg /querySTANDBYIDLE AC = 0x00000000 (never sleep) · VIDEOIDLE AC = 0x00000258 (display off after 600 s = 10 min)
Baseline report archivedAI-Lab\docs\sleepstudy-report.html (pre-fix evidence)

Test 16 — Remote Access After Extended Idle, Retested #

This is the Test 14 protocol, repeated exactly, with only the power settings changed:

  1. Confirm the stack is up (Start AI Lab script, ai-lab-b green in Tailscale).
  2. Leave Lab PC 2 completely untouched — no keyboard, mouse, or monitor-switch activity — for at least 4 hours.
  3. On the iPhone, turn Wi-Fi off so the test runs over cellular.
  4. Check the Tailscale app: is ai-lab-b green or gray?
  5. Browse to http://100.115.162.13:8080.
  6. Run the standard prompt: "Answer in one sentence only: why do cats purr?"
Hands-off beganJuly 7, 2026, ~11:30 PM (after the informal 20-minute spot check)
Idle duration before test6 hours 2 minutes — half again longer than the ~4 hours that produced the Test 14 failure
First accessJuly 8, 5:32 AM, iPhone on cellular (Wi-Fi off). Open WebUI loaded and answered a query immediately (18 seconds of thinking) — Tailscale app not separately checked, but a rendering, responding page is itself proof the node was online.
Documented query (7:43 AM)"Could purring cats have won World War II? Answer in one sentence." — completed in 55 seconds, 40 seconds of thinking, model already warm from the earlier queries
Timeline noteFirst access was initially recalled as 6:55 AM; the 5:32 AM timestamp on the first morning response corrected the record. Documented times follow the evidence.
Test 16 Result: Remote access succeeded after 6 hours of untouched idle — the Test 14 failure scenario is fixed

Test 17 — Overnight Endurance #

Four hours proves the fix; a full night proves it's infrastructure. Same protocol as Test 16, but with 12+ hours of untouched idle — ideally overnight, ending with a morning access attempt from the iPhone on cellular before anyone has touched the lab.

Progress notes:

Idle durationPENDING (target: 12+ hours)
ai-lab-b status in Tailscale appPENDING
Open WebUI page loadPENDING
Prompt completion timePENDING
Test 17 Result: PENDING

Test 18 — Reboot Resilience #

The idle fix covers the common case, but a Windows Update reboot at 3 a.m. is the other way a "server" silently becomes unreachable. This test checks what survives a restart with nobody at the keyboard.

First, enable Tailscale's unattended mode so the tailnet connection comes up before anyone logs in: Tailscale tray icon → Settings → Run unattended. Then:

  1. Restart Lab PC 2.
  2. Do not log in. Walk away.
  3. From the iPhone, check whether ai-lab-b comes back green in Tailscale.
  4. Attempt to load http://100.115.162.13:8080.

Expected split result: Tailscale should return (unattended mode runs as a system service), but Open WebUI and Ollama likely will not — the Start AI Lab script is a manual double-click, not a boot task. If so, that's not a failed test; it's the next finding, and the fix (a Task Scheduler at-startup job for the Start AI Lab script) becomes its own documented step.

Unattended mode enabledPENDING
ai-lab-b reachable after reboot, pre-loginPENDING
Open WebUI reachable after reboot, pre-loginPENDING
Follow-up neededPENDING
Test 18 Result: PENDING

Test 19 — Name-Based Access (MagicDNS) #

With IP-based access proven, this test replaces the memorized Tailscale IP with the machine's name, using Tailscale's MagicDNS (enabled by default on the tailnet).

Date / clientJuly 8, 2026, 8:41 AM — iPhone on cellular
URL testedhttp://ai-lab-b:8080 — the bare short name, no IP, no FQDN
ResultOpen WebUI login page loaded immediately; standard prompt completed in 2:01 with 31 seconds of thinking
Fully qualified alternativehttp://ai-lab-b.tail20d877.ts.net:8080/ — same destination; useful if a client ever fumbles the bare hostname
Warm comparison (8:57 AM)Same prompt repeated after a short gap: 44 seconds total, 17 seconds thinking — versus 2:01 on the run an hour earlier.
Interpretation at the timeThe ~77-second gap was attributed to Ollama reloading the model from SSD. Test 20 later measured that reload at 4.5 seconds and showed the attribution was wrong. See Test 20.

Two footnotes for readers. The browser shows "Not Secure" because Open WebUI serves plain HTTP — but all traffic between the phone and ai-lab-b travels inside Tailscale's WireGuard tunnel, encrypted end to end; the browser just can't see that. (A future tailscale cert upgrade would serve real HTTPS at the ts.net name and retire the warning.) And publishing the tailnet name here gives an outsider nothing: only devices authenticated into this tailnet can resolve or reach these names.

Test 19 Result: MagicDNS short-name access works from cellular — no IP required

Escalation Path (If Test 16 Fails) #

If the node still drops off the tailnet with standby disabled, the next suspects in order:

  1. Wi-Fi adapter power management. Device Manager → network adapter → Power Management tab → uncheck "Allow the computer to turn off this device to save power." Also set the power plan's Wireless Adapter Settings → Power Saving Mode → Maximum Performance.
  2. Disable Modern Standby entirely via registry — the known workaround for mini PCs whose firmware misbehaves in S0:
    reg add "HKLM\SYSTEM\CurrentControlSet\Control\Power" /v PlatformAoAcOverride /t REG_DWORD /d 0 # then reboot
    This is reversible (delete the value and reboot) but is a bigger hammer — try it only after the simpler fixes are ruled out, and re-run powercfg /a afterward to confirm the change.
  3. Wired Ethernet. Already on the long-term list from Part 3 — removes Wi-Fi power saving from the equation entirely.

Each escalation step, if used, gets its own test number and its own before/after entry here.

Test 20 — Measuring Where the Seconds Actually Go #

By July 10 the pattern was familiar: a query through Open WebUI took roughly a minute, while the model reported only ~30 seconds of thinking. The missing time was assumed to be Ollama reloading qwen3:8b from SSD after its keep-alive eviction. That assumption shaped Tests 17a and 19 and the keep-alive plan below. It had never been measured.

Ollama's API already reports the breakdown — load_duration, prompt_eval_duration, eval_duration — but Open WebUI does not surface it. So a small single-file diagnostic page (ollama-timing-bench.html) was written to call /api/generate directly from the iPhone over Tailscale, bypassing Open WebUI entirely, and display the timing fields. It includes a button that unloads the model on demand (keep_alive: 0), so a true cold start can be produced deliberately rather than waited for.

Three runs of the standard prompt, from the iPhone, July 10 at 8:54 AM. Run 1 immediately followed a forced unload:

RunWallModel loadPrompt evalGenerationNetworkTok/s
1 — cold21.8 s4.5 s0.2 s16.9 s0.0 s14.5
2 — warm16.6 s0.2 s0.1 s16.3 s0.1 s14.5
3 — warm17.2 s0.2 s0.1 s16.8 s0.1 s14.5

The assumption was wrong

Cold model load costs 4.5 seconds — not the 77 to 90 seconds attributed to it in Tests 17a and 19. Generation is identical cold or warm (16.3–16.9 s), and throughput is pinned at 14.5 tokens/sec on every run. Network transit across Tailscale, from an iPhone on cellular, costs about a tenth of a second.

Ollama's total work on this prompt is roughly 17 seconds warm, 22 seconds cold. Yet the same prompt through Open WebUI took 44 seconds warm and 121 seconds cold. The overhead is Open WebUI's, not Ollama's, and not Tailscale's.

The likely mechanism: Open WebUI fires additional model calls per exchange — chat title generation, tag generation, follow-up suggestions — each a full inference request that never appears in the "thought for N seconds" label. That also explains the "Load failed" timeout in Test 17a: the first request waits behind a queue of them, not behind an SSD read.

Test 20 Result: Reload measured at 4.5 s — the latency lives in Open WebUI, not model loading

What This Changes #

Two conclusions from earlier in this page survive intact, because they rest on the connectivity evidence rather than the latency theory:

What changes is the diagnosis of slowness. OLLAMA_KEEP_ALIVE=2h is still worth setting — it eliminates a real, if modest, 4.5-second penalty — but it was never going to recover 77 seconds, and it is not the fix for the "Load failed" timeout. The next experiment is to disable Open WebUI's automatic title, tag, and follow-up generation (Admin Settings → Interface) and re-run the standard prompt through the chat UI. If the total drops from ~44 seconds toward the bench's ~17, the mechanism is confirmed.

Configuration Applied — Model Keep-Alive #

Applied July 10 on Lab PC 2, along with the two variables the timing bench requires:

setx OLLAMA_KEEP_ALIVE "2h" setx OLLAMA_HOST "0.0.0.0" setx OLLAMA_ORIGINS "*" # then restart Ollama; setx affects only newly launched processes

A caution learned the hard way: setx writes to the user environment but does not touch running processes. The Start AI Lab script had already launched Ollama, which kept the old five-minute keep-alive until the stack was restarted. ollama ps shows the truth — its UNTIL column reads "2 hours from now" once the setting is live.

OLLAMA_HOST=0.0.0.0 widens what Ollama listens on. It remains unreachable from the public internet: the API is behind Windows Firewall and only addressable through the tailnet.

Lessons Learned

  1. A SleepStudy baseline turns a hunch into evidence: 77 standby sessions, 122.6 hours, and zero network wakes proved that inbound requests were never a wake candidate at the OS level.
  2. On Modern Standby hardware, display sleep and system sleep are separate settings, and the machine followed the display down within a median of 17 seconds. Decoupling them (standby-timeout-ac 0 plus monitor-timeout-ac 10) is the whole fix.
  3. Repeating the exact protocol that produced a failure is the only convincing proof of a fix. Test 16 was Test 14 with one variable changed.
  4. A page that renders but will not answer is a different failure from a page that will not load. Test 17a's "Load failed" looked like a relapse and was not — the connectivity fix had held.
  5. Timestamps beat recollection. The first morning access was remembered as 6:55 AM; the chat timestamp said 5:32 AM, and the log follows the timestamp.
  6. An unmeasured cause is a guess, however confident. For three days the cold/warm gap was attributed to model reload. Measured directly, reload costs 4.5 seconds; the missing 77 belonged to Open WebUI. The instrument that settled it took less time to build than the theory took to become received wisdom.
  7. Measure at the layer you suspect. Ollama had been reporting load_duration all along — the number was one API call away, hidden only because the front end never displayed it.
  8. setx does not change running processes. A restart is part of the configuration change, not an afterthought.

What's Next

Back to Part 3

Reliable Remote Access — the Test 14/15 investigation that diagnosed the Modern Standby failure this page fixes.

Read →

Continue to Part 5

Where the Seconds Go — isolating why chat responses felt slow even after reachability was fixed, and the measurement that corrected the theory.

Read →

← Part 3: Reliable Remote Access  ·  Part 5: Where the Seconds Go →  ·  Test Log  ·  AI Lab Portal Home

Always-On Server Conversion: Modern Standby fixed and verified · Latency root cause reassigned to Open WebUI · Tests 17 (12 h) and 18 (reboot) still open