[GH-ISSUE #1552] finding: boot.ps1 keyboard pad reads unfocused keystrokes; NVIDIA ucode.elf lands in the repo root #31

Closed
opened 2026-11-26 20:14:03 +01:00 by 4ld0 · 2 comments
Owner

Originally created by @QemmHD on GitHub (Nov 25, 2026).
Original GitHub issue: https://github.com/ubiquitarianism/leonida/issues/1552

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).

Originally created by @QemmHD on GitHub (Nov 25, 2026). Original GitHub issue: https://github.com/ubiquitarianism/leonida/issues/1552 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).
4ld0 closed this issue 2026-11-26 20:14:03 +01:00
Author
Owner

@lixonik commented on GitHub (Nov 25, 2026):

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?

<!-- gh-comment-id:7154634597 --> @lixonik commented on GitHub (Nov 25, 2026): 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?
Author
Owner

@QemmHD commented on GitHub (Nov 25, 2026):

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).

<!-- gh-comment-id:7154729929 --> @QemmHD commented on GitHub (Nov 25, 2026): 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 labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#31
No description provided.