> ## Documentation Index
> Fetch the complete documentation index at: https://book.bios.plus/llms.txt
> Use this file to discover all available pages before exploring further.

# Desktop

> Primary desktop machine: hardware, OS, and config.

<Note>
  Specs pulled directly from the machine via Claude Code — not hand-written. Last updated: 2026-06-14. Hostname: **Unit2**.
</Note>

## Overview

Primary workstation running CachyOS (an Arch-based, performance-tuned rolling release distro with a custom kernel build). Used for development, homelab management, and general compute.

## Hardware

<CardGroup cols={2}>
  <Card title="CPU" icon="microchip">
    AMD Ryzen 7 7800X3D — 8 cores / 16 threads, up to 5.05 GHz boost. 96 MB L3 cache (3D V-Cache). AMD-V virtualisation enabled.
  </Card>

  <Card title="GPU" icon="display">
    NVIDIA GeForce RTX 4070 — 12 GB GDDR6X VRAM. Driver 610.43.02.
  </Card>

  <Card title="Memory" icon="server">
    64 GB RAM. 62 GB zram swap (compressed, in-memory).
  </Card>

  <Card title="Motherboard" icon="circuit-board">
    ASUS ROG STRIX X670E-I GAMING WIFI — AM5, mini-ITX form factor.
  </Card>
</CardGroup>

### Storage

| Device    | Size | Model           | Role              |
| --------- | ---- | --------------- | ----------------- |
| `nvme0n1` | 2 TB | Samsung 980 PRO | OS + home (btrfs) |
| `nvme1n1` | 2 TB | Samsung 980 PRO | Secondary / data  |

Partition layout on `nvme0n1`:

* `nvme0n1p1` — 4 GB, FAT32, `/boot` (EFI)
* `nvme0n1p2` — \~1.8 TB, btrfs, root + home (single volume, multiple subvolumes)

### Network interfaces

| Interface | Status | Notes                    |
| --------- | ------ | ------------------------ |
| `eno1`    | UP     | Primary onboard ethernet |
| `eth0`    | DOWN   | Secondary / USB ethernet |
| `wlan0`   | DOWN   | Onboard WiFi (ROG board) |

## Why this setup

* **7800X3D**: 3D V-Cache makes it the best gaming and workload CPU at its tier; the cache depth also benefits compilation and simulation workloads.
* **X670E-I (mini-ITX)**: High-end chipset in a small form factor — full PCIe 5.0, USB 3.2, and Wi-Fi without needing a full ATX board.
* **Dual 980 PRO**: One drive for the OS, one for data/VMs/scratch — simple hardware separation without a RAID controller.
* **CachyOS**: Arch base with BORE scheduler, LTO-compiled packages, and kernel configs tuned for desktop responsiveness. Rolling release keeps tooling current.
* **KDE Plasma (Wayland)**: Highly configurable desktop with first-class Wayland support, good HiDPI/VRR handling, and the KWin compositor that shows up in the GPU bus-drop logs below.
* **`chaotic-aur`**: Prebuilt AUR binaries for packages that update constantly or are needed too rarely to be worth compiling locally. CachyOS repos still take precedence, so this only saves build time on the long tail without overriding the tuned builds.
* **zram swap**: 62 GB compressed swap in RAM — avoids disk thrash under heavy load without needing a dedicated swap partition.

## Configuration

* **OS**: CachyOS (rolling), kernel `7.0.12-1-cachyos`
* **Desktop**: KDE Plasma on Wayland (KWin compositor)
* **Filesystem**: btrfs on the root NVMe (compression + snapshots available)
* **Init**: systemd
* **Shell**: zsh
* **Package sources**: CachyOS repos (priority), then `chaotic-aur`, then the AUR

Dotfiles and system config live in a separate repo — link TBD.

### Package repos and precedence

Repos are layered so the fastest, most-tuned build of a package wins, while still keeping access to everything else without compiling locally:

1. **CachyOS repos** take precedence. These ship the LTO/x86-64-v3/v4 optimised builds and the custom kernels, so anything CachyOS packages itself comes from here first.
2. **`chaotic-aur`** sits below CachyOS in `/etc/pacman.conf`. It carries prebuilt binaries for AUR packages that either update too often or are used too rarely to justify building on the machine. CachyOS still wins for any overlapping package; `chaotic-aur` just fills the gaps.
3. **AUR** (built locally) is the fallback for anything neither repo provides.

Precedence is purely the repo order in `/etc/pacman.conf`: whichever `[repo]` block appears first owns a package name. Confirm where a given package would actually resolve from with:

```bash theme={null}
pacman -Sii <package> | grep Repository
```

## Known issues

### Display freezes (GPU falls off the PCIe bus)

The display locks up completely while everything in the background keeps running, needing a hard reboot to recover. Journal logs showed `Xid 79` "GPU has fallen off the bus" followed by KWin Wayland pageflip timeouts, which points at a PCIe link drop rather than a driver bug. The cause is PCIe ASPM dropping the GPU's link into a low-power state and failing to bring it back. The 4070 sits on the CPU PCIe lanes (root port `00:01.1`), and the `pcie_aspm=off` kernel parameter on the Limine cmdline was being overridden by firmware, so the link kept sleeping.

The kernel flag and a runtime `setpci` clear both failed to hold, since the OS or NVIDIA driver reasserted ASPM mid-session. Attempted fix: disabled ASPM in the BIOS under `Advanced > Platform Misc Configuration` (ASUS X670E labelling):

* `CPU PCIE ASPM Mode Control` to `Disabled`. Forces the link off, and is the AMD/ASUS equivalent of PEG-ASPM that governs the CPU-attached lanes the GPU sits on.
* `Native ASPM` to `Disabled`. Hands ASPM control to the BIOS so the OS and driver cannot turn it back on mid-session.

Both are needed. Setting one without the other lands you back where you started. Confirm it held at the firmware level:

```bash theme={null}
sudo lspci -vv -s 01:00.0 | grep -i lnkctl
```

You want `ASPM Disabled`. Status: under investigation.

### vconsole boot error (invalid keymap)

A non-blocking but noisy boot error from Virtual Console Setup. `/etc/vconsole.conf` held `KEYMAP=au`, which is not a real keymap file, so `loadkeys` failed with `Unable to open file: au: No such file or directory`. Fixed by setting a valid keymap and rebuilding the initramfs:

```bash theme={null}
sudo localectl set-keymap us
sudo mkinitcpio -P
```

This only changes the TTY keymap and does not affect the X11/Wayland desktop layout. Status: resolved.
