diff --git a/CLAUDE.md b/CLAUDE.md index 82268b9..324014e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -153,5 +153,16 @@ the eMMC has no audio yet (not investigated). Disk swapfile replaced by an 8GiB zstd zram device via `zram-tools` (`/etc/default/zramswap`), set up 2026-03-05. Documented in **`ZRAM.md`**. -Loose ends as of 2026-09-27: `vm.swappiness=100` was only set at runtime -(back to 60), and the unused 512MiB `/swapfile` is still on disk. +`vm.swappiness=100` is persisted in `/etc/sysctl.d/99-zram.conf`, and the +old `/swapfile` was deleted (both 2026-09-27). + +## Other neon customizations + +See **`NEON-CUSTOMIZATIONS.md`** (reconstructed 2026-09-27 from shell +history): keyd Chromebook keyboard remap (built from source, +`/etc/keyd/default.conf`, internal keyboard only), USB-C DisplayPort +via `/etc/modules-load.d/cros-video.conf` (`cros_ec_typec`, +`typec_displayport`), `linux-generic-hwe-24.04-edge` (why it's on 7.x +kernels) plus the 6.17 fallback, `/tmp` on tmpfs + localepurge to spare +the USB-card root, the removed r8152 DKMS driver, disabled tailscaled, +and third-party apt repos and hand-installed tools. diff --git a/NEON-CUSTOMIZATIONS.md b/NEON-CUSTOMIZATIONS.md new file mode 100644 index 0000000..a9dce6a --- /dev/null +++ b/NEON-CUSTOMIZATIONS.md @@ -0,0 +1,154 @@ +# Other neon customizations on hp-chell + +Reconstructed on 2026-09-27 from `~matt/.bash_history` (551 lines, +roughly early March 2026 onward), `/root/.bash_history`, and the live +system. Topics with their own docs: +[`AUDIO.md`](AUDIO.md), [`ZRAM.md`](ZRAM.md), +[`CHROMEOS-FLEX.md`](CHROMEOS-FLEX.md), and the kernel 7.x black-screen +fix in `CLAUDE.md`. + +## Keyboard: keyd remapping for the Chromebook layout + +The Chromebook keyboard has no F-keys, Delete, Home/End, PgUp/PgDn or +Caps Lock; there's a "Search" key where Caps Lock would be. **keyd** +remaps it at the evdev level, so it works everywhere (console, X, +Wayland, the login screen). + +- Built from source, not from apt (apt has no keyd for noble): + `~/github/keyd` (, `7c0aecb`, + **v2.6.0**), `make && sudo make install`, which puts the binary at + `/usr/local/bin/keyd`. Then `sudo systemctl enable --now keyd`. Neither + apt nor unattended upgrades will ever update it; rebuild from the + checkout to upgrade. +- Config: `/etc/keyd/default.conf`. Apply edits with `sudo keyd reload`; + find key names and device IDs with `sudo keyd monitor`. Summary: + - `[ids] 0001:0001`: **only the internal keyboard** (`AT Translated Set + 2 keyboard`); external USB keyboards are left alone (use `*` to + include them). + - `leftmeta = overload(meta, leftmeta)`: Search acts as Meta when held + and taps as Meta (opens the KDE launcher). + - **Search + top row gives F1 to F10** (back, forward, refresh, zoom, + scale, brightness down/up, mute, volume down/up). **Search + `-`/`=` + gives F11/F12.** + - The same top-row to F-key mapping with Alt, Ctrl or Shift held. The + `A-`/`C-`/`S-` prefixes re-apply the modifier, which keyd otherwise + strips, so e.g. Alt+F4 works as Alt+Search+Zoom. + - Search + Backspace = Delete; Search + arrows = Home/End/PgUp/PgDn. + - Alt + Backspace = Delete; **Alt + Search = Caps Lock**. + +## USB-C DisplayPort output: load the cros_ec Type-C drivers + +`/etc/modules-load.d/cros-video.conf` (2026-03-12): + +``` +cros_ec_typec +typec_displayport +``` + +These don't autoload on chell, and without them the USB-C ports don't +negotiate DisplayPort alt mode, so there's no video out over USB-C. +Both are loaded as of 2026-09-27. + +## Kernel: HWE-edge meta package + +`linux-generic-hwe-24.04-edge` is installed (alongside the plain +`linux-generic-hwe-24.04`), and it's why the machine is on 7.x kernels +(`7.0.0-34` now), not noble's regular HWE line. Also installed +deliberately as a known-good fallback: `linux-image-generic-6.17` / +`linux-headers-generic-6.17` (`6.17.0-42`), which is the fallback kernel +named in the black-screen notes in `CLAUDE.md`. Old 7.x kernels +(`7.0.0-30`, `7.0.0-14`) are still installed as well. + +`/etc/default/grub` (edited by hand several times; both `matt` and root +history show `nano /etc/default/grub` + `update-grub`): `GRUB_DEFAULT=0`, +`GRUB_TIMEOUT=5`, `GRUB_TIMEOUT_STYLE=menu`, +`GRUB_CMDLINE_LINUX_DEFAULT='splash'` (see `setup-i915-kernel7-fix.sh`). + +## Storage / wear on the USB-card root + +neon's root is an external USB/SD card, so a few changes cut down writes +and space use: +- **`/tmp` is tmpfs** (in `/etc/fstab`: + `tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0`). Not in the shell + history, so it was probably added in the same `nano /etc/fstab` edit + that disabled the swapfile. +- The swapfile was replaced by zram (see `ZRAM.md`). +- **`localepurge`** is installed and configured (via `dpkg-reconfigure + localepurge`) to keep only `en`, `en_CA.UTF-8`, `en_US.UTF-8` and + `fr_CA.UTF-8`, and delete other locales' files on every package + install (`USE_DPKG`, `MANDELETE`). If another language's translations + or man pages are ever needed, add them with + `sudo dpkg-reconfigure localepurge`. + +## Networking + +- **Realtek USB Ethernet (`enx00e04c68003e`, r8152-family 2.5G + adapter):** the out-of-tree driver from + (`~/github/realtek-r8152-dkms`) + was once installed with DKMS, together with unloading `cdc_ether` / + `cdc_ncm` / `cdc_mbim` and testing with `iperf3` against `pet630`, + MTU 9000 and `ethtool -K` offloads. It was **later removed** + (`sudo ./dkms-remove.sh`), around a kernel upgrade that it probably + broke. `dkms status` is empty now, so the adapter gets the in-kernel + driver. The MTU and offload tweaks were runtime-only and aren't + persisted anywhere. +- **Tailscale** is installed (repo in `tailscale.list`) but + `tailscaled` is **disabled** (`systemctl disable tailscaled`, around + the time the agent account was created). + +## Firmware and access + +- MrChromebox firmware utility run twice + (`curl -LOf https://mrchromebox.tech/firmware-util.sh && sudo bash + firmware-util.sh`); the second run was the 2026-09-03 update to + `MrChromebox-2606.1` (see `CLAUDE.md`). +- `agent-user` created with + `create-agent-user.sh` from + `https://gist.ergosteur.com/ergosteur/41df939a435741bfac431ac3d4b888d0` + (a copy is in `~matt`). + +## Software and third-party apt repos + +Not hardware-specific, but needed to rebuild the machine. The +repositories in `/etc/apt/sources.list.d/` beyond neon's own: + +| Source file | What | Set up via | +|---|---|---| +| `vscodium.sources` | VSCodium (`codium`) | paulcarroty key into `/usr/share/keyrings/vscodium-archive-keyring.gpg` | +| `google-chrome.sources` | Google Chrome | installing the `.deb` from Downloads; set as `x-www-browser` / `gnome-www-browser` via `update-alternatives` | +| `docker.sources` | Docker CE | Docker's official apt instructions; `matt` added to the `docker` group | +| `ansible-ubuntu-ansible-noble.sources` | `ansible-core` | `ppa:ansible/ansible` | +| `nodesource.sources` | Node.js 24 | `deb.nodesource.com/setup_24.x`; then `npm i -g @google/gemini-cli` | +| `tailscale.list` | Tailscale | (disabled, see above) | + +Other tools installed by hand: +- **`bws`** (Bitwarden Secrets Manager CLI) v2.0.0: unzipped into + `/opt/bitwarden/bws/`, symlinked to `/usr/local/bin/bws`, with + completions in `/opt/bitwarden/bws/completions.bash` sourced from + `~/.bashrc`. +- **GlobalProtect VPN** (`PanGPLinux-6.3.3-c31`, `gp_install.sh`, from + `~/Downloads`). +- `pipx`: `mkdocs` plus the injected `mkdocs-material`. +- Claude Code (`curl -fsSL https://claude.ai/install.sh | bash`). + +Notable apt packages installed on top of neon: `codium ffmpeg yt-dlp +imagemagick python3-pip python3-venv pipx python3-bs4 build-essential +ncdu bwm-ng wireshark mpv filezilla rpi-imager ntfs-3g exfatprogs +exfat-fuse hfsutils hfsprogs samba samba-vfs-modules krdc remmina ssh +iperf3 netcat-openbsd htop btop git pavucontrol-qt bash-completion +tesseract-ocr{,-eng,-fra,-kor} inxi lsscsi qrencode localepurge +zram-tools dkms`. + +Git identities: `~/.gitconfig` plus `~/.gitconfig.ergosteur` and +`~/.gitconfig.tfo`, with SSH key aliases in `~/.ssh`: +`git_ssh_id_ergosteur` → `id_rsa`, and `git_ssh_id_myip4tfo` → +`id_ed25519`. + +## Dead ends in the history (nothing left installed) + +- `~/github/chell_audio` (iofq's chell audio repo) was cloned and + `linux-modules-extra` / `snd_soc_skl` poked at, before switching to + WeirdTreeThing's scripts (see `AUDIO.md`). +- `ntfs2btrfs` / `ntfsfix` against a `/dev/sda1` of the time. That was + an external data card before this layout, not the current neon + install, whose `sda1` is its ESP. diff --git a/ZRAM.md b/ZRAM.md index 6eb0cc2..0f9336b 100644 --- a/ZRAM.md +++ b/ZRAM.md @@ -56,22 +56,17 @@ zram-related on the kernel command line. 4. **Raised `vm.swappiness` to 100**, at runtime only (`sudo sysctl vm.swappiness=100`). See the loose ends below. -## Loose ends (as of 2026-09-27) +## Loose ends (fixed 2026-09-27) -- **`vm.swappiness=100` was never made persistent.** It's back to the - default **60** now: no `swappiness` line in `/etc/sysctl.conf`, - `/etc/sysctl.d/` or `/usr/lib/sysctl.d/`. To keep it (a common choice - with zram-only swap, since swapping to zram is cheap): - ``` - echo 'vm.swappiness=100' | sudo tee /etc/sysctl.d/99-zram.conf - sudo sysctl --system - ``` - Some zram guides also set `vm.page-cluster=0` (currently `3`), because - zram has no seek cost and readahead just wastes work. -- **`/swapfile` still exists**: 512MiB, `root:root 0600`, dated - 2026-03-04. It's unused since its fstab line is commented out. Remove - it with `sudo rm /swapfile` to get the space back, or keep it as a - low-priority fallback. +- **`vm.swappiness=100` hadn't been made persistent**: it had been set + with `sysctl` at runtime only and was back to the default 60. Now + persisted in `/etc/sysctl.d/99-zram.conf` (`vm.swappiness=100`) and + applied live. Swapping to zram is cheap, so a high swappiness is the + usual choice. Not changed: `vm.page-cluster` (still `3`). Some zram + guides set it to `0`, since zram has no seek cost and readahead just + wastes work. +- **The unused `/swapfile`** (512MiB, dated 2026-03-04, fstab line + commented out) was deleted. ## Reapplying on a fresh neon install @@ -86,7 +81,7 @@ EOF sudo systemctl enable --now zramswap # comment out any /swapfile line in /etc/fstab, then: sudo swapoff /swapfile -# optional: persist swappiness +# persist swappiness echo 'vm.swappiness=100' | sudo tee /etc/sysctl.d/99-zram.conf && sudo sysctl --system ```