# Invariant OS — Installer DVD Changelog
Release history for the Invariant OS Desktop Installer DVD track. The documented baseline begins at `0.3.42`, followed by subsequent installer, update, recovery, hardware, and usability changes.

---

## Installed-System Patch Archives

Patch archives are for **installed Invariant OS systems from the Install DVD track**, not the Live ISO. They serve two testing/update purposes:

1. Test patch discovery and application from the Update Center after booting the installed system.
2. Apply bug-fix patches to an installed system as fixes are released, without replacing the full installer ISO.

Available patch archives:

- `invariant-patch-0.3.44.tar.gz`
- `invariant-patch-0.3.45.tar.gz`
- `invariant-patch-0.3.46.tar.gz`
- `invariant-patch-0.3.47.tar.gz`
- `invariant-patch-0.3.48.tar.gz`
- `invariant-patch-0.3.49.tar.gz`
- `invariant-patch-0.3.50.tar.gz` — **newest patch**

The patch distribution system was introduced in 0.3.44. Patch embedding and Update Center scanning were expanded in 0.3.45. Build-specific changes remain documented below.

---

## 0.3.50

### Plymouth — splash not showing on ThinkPad (Intel i915) fixed
Root cause: `add_drivers` in dracut puts a driver into the initrd but does not force it to bind to the hardware before userspace starts. Plymouth initialises before i915 has bound to the display, falls back to text mode, and only the three green progress dots are visible on a raw VGA/EFI framebuffer (light blue background). Changed `i915` and `amdgpu` from `add_drivers` to `force_drivers` in both `kiwi/root/etc/dracut.conf.d/10-invariant-plymouth.conf` and `kiwi-installer/root/etc/dracut.conf.d/10-invariant-plymouth.conf`. `force_drivers` forces early binding during initrd init — Plymouth gets a KMS framebuffer and renders the full graphical theme on all Intel and AMD hardware.

### Installer — screen blanking/sleep during install fixed
On laptops with short DPMS timeouts (ThinkPads in particular), the display would go blank partway through installation and the install-complete screen was never seen. Added `xset s off` and `xset -dpms` to `kiwi-installer/root/usr/bin/invariant-installer-session` immediately after DISPLAY is exported, disabling screen blanking for the duration of the installer session.

### Steam — 100% CPU/memory usage fixed
Multiple documented Linux Steam fixes implemented:

**vm.max_map_count** — Created `/etc/sysctl.d/99-steam-gaming.conf` setting `vm.max_map_count = 2147483642`. The kernel default (65530) is too low for games that map many files simultaneously (Proton/DXVK shaders, large assets); Steam and Proton silently stall or crash without this.

**zram compressed swap** — Added `zram-generator` package and created `/etc/systemd/zram-generator.conf` (zram0, half of RAM, lz4 compression). Provides a compressed in-RAM swap device so Steam's CEF web helpers cannot exhaust physical RAM and trigger the OOM killer.

**Steam CEF GPU fix** — Created `/usr/share/applications/steam.desktop` override adding `--disable-gpu` to the Exec line. Steam's embedded Chromium (CEF) web interface runs a GPU compositor thread that spins at 100% on older Intel i915 hardware. `--disable-gpu` disables the GPU compositor in CEF, falling back to software compositing — normal for a 2D web UI, negligible performance cost.

**Performance environment variables** — Created `/etc/profile.d/steam-performance.sh` setting:
- `STEAM_MULTIPLE_INSTANCES=1` — suppresses "already running" false-positive after a crash
- `STEAM_CEF_GPU_DISABLED=1` — disables GPU compositor in CEF (reinforces `--disable-gpu`)
- `SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0` — prevents game window minimizing on alt-tab (freezes appearance)
- `DXVK_ASYNC=1` — async shader compilation, reduces per-frame stutter on first play
- `STEAM_DISABLE_GPU_DRIVER_WORKAROUNDS=1` — suppresses DXVK workarounds that cause hangs on mesa/radv

**libvulkan_intel-32bit** — Added to `kiwi/config.xml`; required for 32-bit Proton games using Intel ANV Vulkan driver.

### Version bump
`kiwi/config.xml`, `kiwi-installer/config.xml`, `build-kiwi-installer.sh` updated to `0.3.50`.

---

## 0.3.49

### Update tool — Secure Boot violation fixed
`invariant-update-install` had the same `grub2-install --target=x86_64-efi` block that was removed from the repair tool in 0.3.47. Running "Update Invariant OS" from the live ISO GRUB menu overwrote the Calamares-installed Secure Boot EFI binaries with an unsigned binary, causing "Invalid Signature detected" on next boot. `grub2-install` removed; EFI binaries are now left intact.

### Update tool — os-prober boot-to-installer bug fixed
`invariant-update-install` was writing `GRUB_DISABLE_OS_PROBER=false` to the installed system's `/etc/default/grub`. During `grub2-mkconfig`, os-prober detected the live ISO and injected installer boot entries into the HDD's grub.cfg. After removing the USB, the installed system booted back into the installer. Fixed: `GRUB_DISABLE_OS_PROBER=true`. (This was fixed in the GUI update tool in 0.3.46 but the terminal tool was missed.)

### Update Center — Apply failures now show a visible error dialog
Previously, when `pkexec zypper dup` failed (e.g. auth dismissed, polkit not running, zypper error), the failure was only logged in the small Output Log at the bottom of the window — the main status area and buttons gave no clear indication anything went wrong. Now:
- Status label turns red and shows the exit code
- A QMessageBox pops up with a plain-English explanation:
  - Exit 126: authentication was cancelled — tells user to try again and enter password
  - Exit 127: pkexec not found
  - Other: suggests running `sudo zypper dup` in a terminal as a fallback
- Success message changed to "Updates applied — restart recommended."

### Version bump
`kiwi/config.xml`, `kiwi-installer/config.xml`, `build-kiwi-installer.sh` updated to `0.3.49`.

---

## 0.3.48

### Steam — silent launch failure fixed
Steam would launch but show nothing, with `top` reporting no Steam process, and a second click saying "already running". Root cause: KIWI builds with `onlyRequired`, so Steam's 32-bit library dependencies (declared as `Recommends` in the RPM, not `Requires`) were never installed. Steam's bootstrapper is a 32-bit binary and needs 32-bit Mesa/X11/Vulkan/Pulse libs to start. Without them it exits immediately, leaving a stale socket/pid behind.

Added explicit 32-bit packages to `kiwi/config.xml`:
`libGL1-32bit`, `libX11-6-32bit`, `libXcomposite1-32bit`, `libXdamage1-32bit`, `libXext6-32bit`, `libXfixes3-32bit`, `libXi6-32bit`, `libXrandr2-32bit`, `libXrender1-32bit`, `libXtst6-32bit`, `libXxf86vm1-32bit`, `libpulse0-32bit`, `libudev1-32bit`, `libgcc_s1-32bit`, `libstdc++6-32bit`, `libvulkan1-32bit`, `libcurl4-32bit`

### Version bump
`kiwi/config.xml`, `kiwi-installer/config.xml`, `build-kiwi-installer.sh` updated to `0.3.48`.

---

## 0.3.47

### Repair — Secure Boot violation fixed
`invariant-repair-install` Fix 5 previously ran `grub2-install --target=x86_64-efi`, which overwrote the Calamares-installed Secure Boot chain (shim → grubx64.efi) with an unsigned GRUB binary, causing "Invalid Signature detected" on next boot. The `grub2-install` block has been removed entirely. EFI binaries are now left intact; only `/etc/default/grub` is rewritten and `grub2-mkconfig` is run to regenerate `grub.cfg`.

### Repair — Snapper failure no longer counted as an error
In `invariant-repair-install` Fix 6, a snapper `create-config` failure previously incremented the `ERRORS` counter, causing the repair summary to report "X warning(s)" even when everything else succeeded. Snapper failure is now logged as a warning only, matching the intent of the existing `warn` call.

### WiFi — Power management disabled system-wide
Random WiFi reconnects on real hardware traced to kernel power management (NetworkManager enables `wifi.powersave = 3` by default since kernel 4.19).

- **`kiwi/root/etc/NetworkManager/conf.d/wifi-powersave-off.conf`** — created; sets `wifi.powersave = 2` (disabled)
- **`kiwi/root/etc/modprobe.d/wifi-powersave.conf`** — created; disables power save for iwlwifi (Intel), ath9k (Qualcomm/Atheros) at driver level

### Installed system — "Update Invariant OS" desktop icon removed
The "Update Invariant OS" shortcut was being copied from skel to every installed user's Desktop during install and after the update tool ran. It only works from the live environment and is useless (and misleading) on the installed system.

- **`invariant-postinstall/main.py`** — now removes both `Install Invariant OS.desktop` and `Update Invariant OS.desktop` from skel and all user Desktops during Calamares install
- **`invariant-update-install`** — now also removes `Update Invariant OS.desktop` from the installed system's skel on update

### App drawer — "Invariant Apps" section
All Invariant app `.desktop` files now carry `X-InvariantApps;` as the first entry in `Categories=`. A matching XDG menu group and directory file have been added so KDE Plasma's app launcher shows all Invariant apps together under "Invariant Apps" instead of scattering them across System, Settings, and other generic categories.

Applied to both `kiwi/root/usr/share/applications/` and `kiwi-installer/root/usr/share/applications/`:
`ExeCenter`, `MigrationCenter`, `GamingSetup`, `UpdateCenter`, `HelpCenter`, `PrivacyCenter`, `RecoveryCenter`, `SoftwareCenter`, `Welcome`, `HardwareSetup`, `LivePartitionEditor`, `DiskManager`

New files:
- `kiwi/root/usr/share/desktop-directories/invariant-apps.directory`
- `kiwi/root/etc/xdg/menus/applications-merged/invariant-apps.menu`
- (same in `kiwi-installer/root/`)

### GRUB rename — snapper stub fix (carried from 0.3.46 post-build patch)
`kiwi-fix-rufus.sh` rename section now uses `find_first_boot_menuentry` which requires a `linux`/`linuxefi` line in the entry body. This prevents it from matching `menuentry "If OK, run snapper rollback and reboot." { true; }` (a trivial stub KIWI inserts inside a submenu before the real boot entries) and renaming that instead of the actual installer entry.

### Version bump
`kiwi/config.xml`, `kiwi-installer/config.xml`, `build-kiwi-installer.sh` updated to `0.3.47`.

---

## 0.3.46 (post-build patch applied)

### Bug Fix — Installed system booted into installer after "Update Invariant OS"
- **Root cause:** `invariant-update-gui` had `GRUB_DISABLE_OS_PROBER=false` in the grub config it wrote to the installed system. During `grub2-mkconfig` inside the chroot, `os-prober` detected the live ISO on the loop device and injected its installer boot entries (including `invariant_update=1`) into the installed system's `grub.cfg`. After the ISO was removed, those stale entries caused the HDD to boot into installer mode.
- **Fix:** `GRUB_DISABLE_OS_PROBER=false` → `true` in `invariant-update-gui`. (`invariant-repair-gui` already had this set correctly.)

### GRUB Menu — Renamed, reordered, and cleaned up
All Python sections in `kiwi-fix-rufus.sh` rebuilt. Previous menu had inconsistent names and wrong entry ordering.

| Slot | Label | Change |
|------|-------|--------|
| 1 | Install Invariant OS | Unchanged |
| 2 | Install Invariant OS VM Mode | Renamed from "Virtual Machine Mode -- Invariant OS Installer" |
| 3 | Update Invariant OS | Renamed from "Update Installed Invariant OS"; section order corrected |
| 4 | Repair Invariant OS | Renamed from "Repair Installed Invariant OS" |
| 5 | Install Invariant OS - Debug (Verbose Boot) | Restored after Repair slot; `rd.debug rd.info loglevel=7 rd.plymouth=0 systemd.show_status=true` |
| 6 | Boot from Hard Drive | New entry; chainloads `(hd0)+1` so users can boot the installed OS without removing the disc |
| 7 | Invariant OS Failsafe | Renamed from "Failsafe -- Invariant OS" |

- "NVIDIA Safe Graphics" removed as a separate entry (replaced by the blacklist below)
- EFI/BOOT/grub.cfg heredoc updated to match

### NVIDIA nouveau blacklist — applied to all live entries
`modprobe.blacklist=nouveau rd.driver.blacklist=nouveau` appended to every live kernel line **except** VM Mode (already has `nomodeset`) and Failsafe. Prevents instant poweroff on NVIDIA hardware without disabling KMS for AMD/Intel. Implemented as a post-processing Python section in `kiwi-fix-rufus.sh`.

### Branding — Installer OS name corrected
- `kiwi/root/etc/os-release` — corrected `PRETTY_NAME`, `NAME`, `VERSION`, `VERSION_ID`, `ID` to `Invariant OS 0.3.46`
- `kiwi-installer/root/etc/os-release` — **created** (was missing entirely). Without this the installer squashfs used the RPM-provided openSUSE os-release, causing "About This System" to show "openSUSE Tumbleweed 0.3.xx"

### Update tool — Snapper chroot fix
`invariant-update-gui` previously only bind-mounted `/proc` before running snapper in chroot. Now also bind-mounts `/dev` and `/sys`. Failure is now non-fatal (does not increment the error counter).

### Update tool — View Log button on completion screen
- "View Log" button added to the done page; only visible when errors > 0
- Clicking it navigates back to the progress/log page
- Completion text corrected — no longer says "Check the output on the previous screen" with no way to get there

### dracut — `--no-hostonly` added to installer initrd rebuild
`kiwi-installer/config.sh` was calling `dracut --force` without `--no-hostonly`. Dracut used host-only mode on the WSL2 build host and pruned drivers not present on the build machine, causing the installed system to fail to boot on target hardware.

### dracut — Expanded driver list for universal hardware support
`10-invariant-plymouth.conf` previously listed only the three main GPU families. Updated:

**GPU drivers added:** `simpledrm` (UEFI firmware framebuffer — universal Plymouth fallback on any hardware), `hyperv_drm`, `qxl`, `bochs-drm`, `mgag200`, `ast`

**Storage drivers added:** `ahci`, `nvme`, `sd_mod`, `sr_mod`

Synced to `kiwi-installer/root/etc/dracut.conf.d/10-invariant-plymouth.conf`.

### Version bump
`kiwi/config.xml`, `kiwi-installer/config.xml`, `build-kiwi-installer.sh`, and both `applied-patches` seed files updated to `0.3.46`.

---

## 0.3.45

### Recovery Center — polkit "No Permissions" fix
`pkexec` was calling the Recovery Center binary directly, which modern Tumbleweed polkit rejects. Fixed by:
- New `/usr/bin/invariant-recovery-exec` passthrough wrapper
- New polkit action `org.invariant.recovery.exec` with `auth_self`
- `patches/scripts/02` updated to also `chmod` `recovery-exec` and `apply-patch`

### Patch tarball embedded in ISO
In 0.3.44 the patch tarball was built *after* the ISO and therefore not inside the squashfs. Moved patch build to run **before** `kiwi-ng` so the tarball is embedded at `/opt/invariant/patches/` inside the ISO. Fresh installs carry their own patch automatically. Standalone copy still written to the output directory for older installs upgrading via USB.

### `applied-patches` pre-seeded
`/var/lib/invariant/applied-patches` seeded with `0.3.45` so fresh installs show the embedded patch as already applied and don't try to re-apply it.

### Update Center / update-install / update-gui — scan embedded patches
All three tools updated to scan `/opt/invariant/patches/` for embedded tarballs in addition to USB drives.

### dracut — USB host controller drivers
Added to `10-invariant-plymouth.conf`:
```
xhci_hcd xhci_pci ehci_hcd ehci_pci ohci_hcd uhci_hcd usb_storage uas
```
Fixes live boot stalling on AMD and older Intel USB controllers due to slow enumeration timing.

### GRUB — live boot reliability args
All live kernel lines now include `rootdelay=15 rd.retry=10 usbcore.autosuspend=-1`.

### GRUB — NVIDIA Safe Graphics entry
Dedicated boot entry with `modprobe.blacklist=nouveau modprobe.blacklist=nvidia` for systems where the open-source GPU driver caused a poweroff. *(Replaced in 0.3.46 by applying the blacklist globally to all entries instead.)*

### GRUB — Debug entry
Boot entry with `rd.debug rd.info loglevel=7 systemd.show_status=true rd.plymouth=0` for tester diagnostics on hardware that hangs at boot.

### Version display fix
`config.xml` version fields were still showing `0.3.42` in both KIWI descriptors. Bumped to `0.3.45`.

---

## 0.3.44

### Patch file system — initial implementation
Designed and built the compressed patch distribution system:

- **`patches/scripts/01-snapper-init.sh`** — idempotent snapper create-config; works booted or in chroot
- **`patches/scripts/02-recovery-center.sh`** — sets file permissions after binary replacement
- **`invariant-apply-patch`** — new pkexec-callable helper that extracts a patch tarball, copies `files/`, runs `scripts/`, records version in `/var/lib/invariant/applied-patches`
- **`build-kiwi-installer.sh`** — generates `invariant-patch-0.3.44.tar.gz` alongside the ISO
- **`invariant-update-center`** — "Invariant OS Patches" section replaces the snapper banner; scans mounted drives for patch tarballs and applies them
- **`invariant-update-gui`** — added Step 6 (Snapper) and Step 7 (Patches) to the update flow
- **`invariant-update-install`** — added patch detection and application after snapper section

Note: The patch tarball was built after the ISO in this version and was therefore not embedded in the squashfs — fixed in 0.3.45.

---

## 0.3.43

### Recovery Center — backup exit 1 fix
`tar` exits 1 when a file changes while being read (log files, sockets). The backup was treating this as a fatal error. Fixed:
- `_run_pkexec_cmd` now accepts an `ok_codes` parameter (default `{0}`)
- Backup passes `ok_codes={0, 1}` — tar exit 1 is now treated as success
- Added `--warning=no-file-changed` to suppress those lines in the log output

### Recovery Center / snapper — snapshot option grayed out
Snapper was not being configured during installation so the snapshot restore option was always unavailable. Fixed across all four paths an install or update can take:

- **Fresh install** (`invariant-postinstall/main.py`): `snapper -c root create-config /` now runs inside the chroot before enabling snapper timers
- **Repair tool** (`invariant-repair-install` + `invariant-repair-gui`): Fix 6 added — runs snapper create-config if not already present
- **GRUB Update path** (`invariant-update-install`): snapper init runs while VFS bind-mounts are still active
- **Update Center** (`invariant-update-center`): startup check shows a "Configure Now" button if snapper is not set up; runs `pkexec snapper -c root create-config /` on click
