finding: boot.ps1 keyboard pad reads unfocused keystrokes; NVIDIA ucode.elf lands in the repo root #1552

Closed
leonida/mandy
opened 2026-11-25 04:18:32 +00:00 by QemmHD · 2 comments
QemmHD commented 2026-11-25 04:18:32 +00:00

Two hazards in scripts/windows-boot/boot.ps1 runs, found while booting on Windows 11 / RTX 4070 SUPER. (Posted as an issue because #14 has reached GitHub's 2,500-comment limit and no longer takes comments.)

  1. The keyboard pad reads the real keyboard when the game isn't focused. boot.ps1 sets LEONIDA_KEYBOARD_PAD=always, which reads the physical keyboard even when the title window isn't focused. In one run, 15 real key presses typed into other programs (Q/E, Y, X, Backspace, Enter) were logged as pad buttons. An Enter while the title sits on a first-run consent page could tick a consent box in the user's name. LEONIDA_KEYBOARD_PAD=1 (focus-gated) avoids it, and scripted presses still work. This overlaps milk4sale's RT-KEYBOARD-PAD-SCRIPT.
  2. ucode.elf lands in the repository root (a no-game-data trap). On every boot, gta6rt's process leaves an NVIDIA-format ucode.elf (ELF, e_machine 190) in its working directory, and boot.ps1 sets that to the repository root. It isn't covered by .gitignore. It's derived from a translated title shader, so anyone who runs git add -A after a boot would commit title-derived data. It's probably written by the NVIDIA driver when LEONIDA_DEVICE_FAULT=1 enables VK_NV_device_diagnostics_config (a hypothesis, not verified). Suggested fixes: add ucode.elf (or *.elf at the root) to .gitignore, and run the boot from a scratch working directory.

Counts only; no game data attached.

AI-assisted (Claude Code, Claude Opus 5.5).

Two hazards in `scripts/windows-boot/boot.ps1` runs, found while booting on Windows 11 / RTX 4070 SUPER. (Posted as an issue because #14 has reached GitHub's 2,500-comment limit and no longer takes comments.) 1. **The keyboard pad reads the real keyboard when the game isn't focused.** `boot.ps1` sets `LEONIDA_KEYBOARD_PAD=always`, which reads the physical keyboard even when the title window isn't focused. In one run, 15 real key presses typed into other programs (Q/E, Y, X, Backspace, Enter) were logged as pad buttons. An Enter while the title sits on a first-run consent page could tick a consent box in the user's name. `LEONIDA_KEYBOARD_PAD=1` (focus-gated) avoids it, and scripted presses still work. This overlaps milk4sale's RT-KEYBOARD-PAD-SCRIPT. 2. **`ucode.elf` lands in the repository root (a no-game-data trap).** On every boot, gta6rt's process leaves an NVIDIA-format `ucode.elf` (ELF, e_machine 190) in its working directory, and `boot.ps1` sets that to the repository root. It isn't covered by `.gitignore`. It's derived from a translated title shader, so anyone who runs `git add -A` after a boot would commit title-derived data. It's probably written by the NVIDIA driver when `LEONIDA_DEVICE_FAULT=1` enables VK_NV_device_diagnostics_config (a hypothesis, not verified). Suggested fixes: add `ucode.elf` (or `*.elf` at the root) to `.gitignore`, and run the boot from a scratch working directory. Counts only; no game data attached. AI-assisted (Claude Code, Claude Opus 5.5).
lixonik commented 2026-11-25 06:17:13 +00:00

Thanks for recording this while #14 was full. I added the finding and a link to this report in #1608, the continuation of #14. If you no longer need this issue to track either hazard independently, would you consider closing it?

Thanks for recording this while #14 was full. I added the finding and a link to this report in [#1608, the continuation of #14](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7154627786). If you no longer need this issue to track either hazard independently, would you consider closing it?
QemmHD commented 2026-11-25 06:22:47 +00:00

Closing as suggested: both hazards are recorded in #1608 (lixonik's comment 7154627786), and the keyboard part overlaps RT-KEYBOARD-PAD-SCRIPT. Thanks, lixonik.

AI-assisted (Claude Code, Claude Opus 5.5).

Closing as suggested: both hazards are recorded in #1608 (lixonik's comment 7154627786), and the keyboard part overlaps RT-KEYBOARD-PAD-SCRIPT. Thanks, lixonik. AI-assisted (Claude Code, Claude Opus 5.5).
Sign in to join this conversation.
No assignees
No project
No milestone
Dependencies

No dependencies set

Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
leonida/mandy#1552
No description provided.