Monorepo for Aesthetic.Computer aesthetic.computer

docs: update NixOS analysis — deprecate for production, use bare-metal

After ~20 build iterations, NixOS DRM-direct runs at 27fps vs 60fps
bare-metal on ThinkPad 11e. The generic kernel's i915 page flip takes
27ms vs 16ms. Falling back to ac-os build for @oskie's USB.

NixOS path preserved in git for future investigation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+100 -3
+14 -3
reports/2026-04-06-ac-native-nix-vs-baremetal-pipeline-analysis.md
··· 90 90 **Pros:** Simplest path. Proven. Fast. 91 91 **Cons:** Loses reproducibility narrative. Build depends on host state. 92 92 93 - ## Verdict 93 + ## Verdict (Updated 2026-04-07) 94 + 95 + **Option D confirmed after extensive testing.** We implemented Option B (DRM-direct, no cage) across ~20 build iterations. Results: 96 + 97 + - Cage/Wayland bugs were fixed (cursor, double input, shutdown) 98 + - DRM-direct mode works but runs at **27fps** (vs 60fps bare-metal) 99 + - `present_us` consistently 24-28ms despite: removing frame_sync, disabling mitigations, disabling WiFi, disabling logind 100 + - The NixOS generic kernel's DRM/i915 stack simply performs worse than the custom kernel 101 + - Input required MAX_INPUT_DEVICES bump from 8→24 (ThinkPad has 18 evdev nodes) 94 102 95 - **Option B is likely the sweet spot.** The Wayland compositor is the single biggest source of bugs and performance loss. Removing cage while keeping NixOS for the system layer would eliminate 80% of the issues encountered in this session while retaining reproducibility. 103 + **For @oskie and production: use `ac-os build` (bare-metal).** NixOS path is preserved in git for future work but not suitable for shipping today. 96 104 97 - However, **for @oskie's USB today, Option A is correct** — ship the bare-metal build that works, and iterate on NixOS in parallel. 105 + ### What would fix NixOS performance 106 + 1. Custom kernel config matching the bare-metal build's `.config` 107 + 2. Or identify why the NixOS i915 DRM page flip takes 27ms vs 16ms (kernel config diff) 108 + 3. Or render directly into DRM buffer instead of fb_copy_scaled 98 109 99 110 ## Open Questions 100 111
+86
reports/2026-04-07-thinkpad-11e-hardware-profile.md
··· 1 + # ThinkPad 11e Yoga Hardware Profile (for initrd optimization) 2 + 3 + **Date:** 2026-04-07 4 + **Machine:** Lenovo ThinkPad 11e Yoga (5th Gen) 5 + **Build:** NixOS DRM-direct (no cage/Wayland) 6 + 7 + ## Hardware Summary 8 + 9 + | Component | Details | Kernel Module | 10 + |-----------|---------|---------------| 11 + | **CPU** | Intel Core m3-8100Y @ 1.10GHz (4 cores) | - | 12 + | **GPU** | Intel UHD Graphics 615 [8086:591c] | i915 | 13 + | **RAM** | 8 GB | - | 14 + | **WiFi** | Intel Wireless-AC 9260 [8086:2526] | iwlwifi, iwlmvm | 15 + | **NVMe** | KIOXIA BG4 256GB [1e0f:0001] | nvme | 16 + | **Audio** | Sunrise Point-LP HD Audio [8086:9d71] | snd_hda_intel | 17 + | **USB** | Sunrise Point-LP USB 3.0 xHCI [8086:9d2f] | xhci_pci | 18 + | **Touchpad** | Elan i2c [04f3:2a40] | elan_i2c, hid_multitouch | 19 + | **Touchscreen** | ELAN901C i2c [04f3:2a40] | i2c_hid_acpi | 20 + | **Bluetooth** | Intel (on WiFi card) | btusb, btintel | 21 + | **Card Reader** | Realtek RTS522A [10ec:522a] | rtsx_pci | 22 + | **DRM device** | /dev/dri/card1 (not card0!) | i915 | 23 + 24 + ## Input Devices (18 evdev nodes) 25 + 26 + - event0: Lid Switch 27 + - event1: Power Button 28 + - event2: Sleep Button 29 + - event3: Power Button 30 + - event4: **AT Translated Set 2 keyboard** (main keyboard) 31 + - event5-9: HDA audio jacks 32 + - event10-12: ThinkPad Extra Buttons, sensor hub 33 + - event13-14: ELAN touchpad (SMBus + i2c) 34 + - event15-17: ELAN touchscreen (multitouch + stylus) 35 + 36 + **Critical:** MAX_INPUT_DEVICES was 8, missing event4 (keyboard). Fixed to 24. 37 + 38 + ## Performance Profile (NixOS DRM-direct) 39 + 40 + | Metric | Value | Target | 41 + |--------|-------|--------| 42 + | **Avg frame time** | 35-52ms (19-28 fps) | 16.7ms (60 fps) | 43 + | **Max frame time** | 65ms | <20ms | 44 + | **Paint time** | 9-16ms | OK | 45 + | **Present (page flip)** | 24-28ms | 16ms (1 vblank) | 46 + | **Slow frames** | 300/300 (100%) | <5% | 47 + | **Boot time** | ~90s | <10s | 48 + 49 + **Root cause of low FPS:** DRM page flip (`present_us`) takes 24-28ms instead of 16ms. Suggests vsync contention or double-sync with `frame_sync_60fps`. The old bare-metal build hit 60fps on the same hardware. 50 + 51 + ## Modules Needed for Slim Initrd 52 + 53 + Based on this hardware profile, a targeted initrd would need: 54 + 55 + ```nix 56 + boot.initrd.includeDefaultModules = false; 57 + boot.initrd.availableKernelModules = [ 58 + # Storage (USB boot) 59 + "xhci_pci" "usb_storage" "uas" "sd_mod" 60 + # NVMe (internal disk) 61 + "nvme" 62 + # GPU (i915 KMS) 63 + "i915" 64 + # Filesystems 65 + "ext4" "vfat" "nls_cp437" "nls_iso8859_1" 66 + ]; 67 + 68 + boot.kernelModules = [ 69 + # WiFi 70 + "iwlwifi" "iwlmvm" 71 + # Audio 72 + "snd_hda_intel" "snd_hda_codec_realtek" 73 + # Input 74 + "elan_i2c" "i2c_hid_acpi" "hid_multitouch" 75 + # Bluetooth 76 + "btusb" "btintel" 77 + ]; 78 + ``` 79 + 80 + This would reduce initrd from ~1.4GB to ~50MB, cutting boot from 55s to ~5s. 81 + 82 + ## Open Issues 83 + 84 + 1. **FPS**: present_us too high — investigate double vsync or page flip contention 85 + 2. **WiFi scan**: still running despite creds check — `/mnt` mount may differ 86 + 3. **card1 not card0**: ThinkPad 11e uses card1 for i915, needs wildcard in DRM wait