Workstation optimization: Chrome cleanup, package purge, PCIe audit, service tuning

- Chrome/Chromium cleanup (ADR 0006): removed 10GB chromium profile, broken PWA
  shortcuts, dead BROWSER_CDP_URL from .bashrc, restored Wayland chrome-flags.conf
- Package cleanup (ADR 0007): Tier 1-4 executed, 40 packages removed (KDE Plasma,
  ruby, love, xorg-server, kscreen/kscreenlocker), 45 cascade orphans purged
- Waybar USB module: auto-mount via udisks2, yazi integration, hover details
- Service tuning: disabled bluetooth.service, NetworkManager-wait-online.service
- hypridle fix: upgraded sdbus-cpp 2.3.0->2.3.1-1 (SEGV crash loop resolved)
- PCIe audit: GPU in wrong slot (PCIEX4 vs PCIEX16), 8x bandwidth loss documented
- D-Bus cleanup: removed stale org.kde.kwalletd6.service stub
- Ansible: all changes reflected in vars/main.yml and task files
This commit is contained in:
ja
2026-05-22 16:24:18 +02:00
parent 2487aa5749
commit b0af3dcf12
11 changed files with 698 additions and 16 deletions
+120
View File
@@ -0,0 +1,120 @@
# ADR 0006: Chrome/Chromium Normalization and Cleanup
**Date:** 2026-05-22
**Status:** Accepted
**Deciders:** Michael Wegener
## Context
The workstation had accumulated significant Chrome/Chromium configuration drift over time:
- **Dual installation**: Both `google-chrome-stable` (148.0.7778.178) and orphaned `chromium` configs
- **Dead data directories**:
- `~/.config/chromium/` (1.4 GB of stale profile data)
- `~/.local/chrome-cdp/` (8.6 GB Chrome DevTools Protocol debug profile, no longer used)
- **Broken PWA desktop entries**: 13 non-functional `.desktop` files in `~/.local/share/applications/`
- **Orphaned packages**: `chromium-widevine` (DRM codec plugin for non-existent Chromium)
- **Dead shell integrations**: `BROWSER_CDP_URL` environment variable auto-population in `~/.bashrc`
- **Wayland compatibility**: `chrome-flags.conf` needed Wayland-specific flags for native Wayland rendering
This drift made it difficult to:
1. Understand which browser is authoritative
2. Maintain clean Ansible playbooks
3. Ensure consistent Wayland behavior
4. Avoid confusion from broken PWA shortcuts
## Decision
Standardize on **`google-chrome-stable`** as the sole browser and remove all Chromium-related artifacts:
### 1. Remove Dead Data Directories
- ✅ Delete `~/.config/chromium/` entirely (1.4 GB freed)
- ✅ Delete `~/.local/chrome-cdp/` entirely (8.6 GB freed)
### 2. Uninstall Orphaned Packages
-`pacman -R chromium-widevine` (17.41 MiB freed)
### 3. Delete Broken PWA Desktop Entries
- ✅ Removed 13 non-functional `.desktop` files from `~/.local/share/applications/`
- ✅ Deleted 4 PWA manifest directories from `~/.config/google-chrome/Default/Web Applications/Manifest Resources/`
### 4. Clean Shell Environment
- ✅ Removed `BROWSER_CDP_URL` auto-population (lines 140-141) from `~/.bashrc`
- Bash startup improved from ~60ms to ~3ms
### 5. Restore Wayland Configuration
- ✅ Ansible role `dev-tools` already manages `~/.config/chrome-flags.conf` with Wayland flags
- ✅ Playbook re-applied to restore `--ozone-platform=auto` and other Wayland optimizations
### 6. Update Ansible for Future Maintenance
- ✅ Added `cleanup` tasks to `dev-tools` role to remove known-dead packages/directories
- ✅ Documented cleanup procedures in CHANGELOG
## Consequences
### Positive
- **10 GB disk space recovered** on root filesystem
- **Clear browser choice**: Only `google-chrome-stable` is installed and managed
- **Faster shell startup**: Removed unnecessary `curl` call to `localhost:9222`
- **Clean desktop**: PWA shortcuts now only show functional applications
- **Wayland-native rendering**: Chrome uses `--ozone-platform=auto` for native Wayland
- **Maintainable configuration**: Ansible now includes cleanup tasks for future orphan removal
### Negative
- None significant. Google Chrome is the sole browser, reducing cognitive load.
### Neutral
- AWDI (A Web Developer Interface) tools that required CDP connections must now launch Chrome with `--remote-debugging-port=9222` manually if needed.
## Technical Details
### Current Browser Installation
```
google-chrome-stable 148.0.7778.178-1 (AUR: paru)
```
### Ansible Management
- **Package installation**: `ansible/roles/dev-tools/tasks/main.yml` (lines 112-120)
- **Chrome flags**: `ansible/roles/dev-tools/tasks/main.yml` (lines 122-135) with `--tags chrome`
- **Cleanup tasks**: `ansible/roles/dev-tools/tasks/main.yml` (lines 137-158) with `--tags cleanup`
### Files Affected
- **Deleted**:
- `~/.config/chromium/` (1.4 GB)
- `~/.local/chrome-cdp/` (8.6 GB)
- 13 `.desktop` files in `~/.local/share/applications/`
- 4 PWA manifest dirs in `~/.config/google-chrome/Default/Web Applications/Manifest Resources/`
- **Modified**:
- `~/.bashrc` (removed CDP_URL lines)
- `~/.config/chrome-flags.conf` (restored via Ansible)
- **Uninstalled**:
- `chromium-widevine` (17.41 MiB)
### Hyprland Integration
- `SUPER+B` binds to `uwsm app -- google-chrome-stable` (unchanged)
- Waybar CDP module removed (no longer needed without debug profile)
- Cheatsheet references updated to reflect Chrome-only workflow
## Alternatives Considered
### Keep Chromium Installed
- **Pros**: Open-source browser, no Google telemetry
- **Cons**: Two browsers to maintain, orphaned packages, confusing shortcuts
- **Decision**: Rejected. Google Chrome provides better Wayland support and is already the daily driver.
### Preserve `chrome-cdp` Profile
- **Pros**: Could be reactivated for debugging, Playwright/Puppeteer testing
- **Cons**: 8.6 GB wasted space, not used in 3+ months, on-demand launch is trivial
- **Decision**: Rejected. AWDI tools can start Chrome with `--remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug` if needed.
### Automated PWA Scrubbing
- **Pros**: Could remove all PWA configs via Ansible
- **Cons**: Risk of removing actively-used PWAs (OnlyOffice, JetBrains Toolbox, etc.)
- **Decision**: Rejected. Manually scrubbed dead PWAs, left functional ones intact.
## References
- [ADR 0004: Start-Hyprland Override](0004-start-hyprland-override.md) — Wayland session management
- `ansible/roles/dev-tools/tasks/main.yml` — Chrome package and flags management
- `CHANGELOG.md` — 2026-05-22 cleanup entry
- `docs/tech/stack.md` — Current software audit (updated)
@@ -0,0 +1,141 @@
# ADR 0007: Workstation Package Cleanup — Remove X11/KDE Legacy Stack
**Date**: 2026-05-22
**Status**: Accepted (Tier 1+2+3+4 executed 2026-05-22)
**Decision Maker**: Michael Wegener
## Context
The workstation runs Hyprland (Wayland) with greetd+tuigreet. Despite this, 466 explicitly installed packages include ~40 that serve only X11 or KDE Plasma environments — neither of which are in active use. These packages waste disk space, increase update surface, and confuse package inventory.
### Current State
| Domain | Packages | Status |
|--------|----------|--------|
| X11 Display Managers | lightdm, lightdm-slick-greeter, sddm, sddm-kcm | Disabled; greetd is active DM |
| X11 Video Drivers | xf86-video-amdgpu, -ati, -intel, -nouveau, -vesa | Not used; Xwayland renders via Mesa |
| X11 Input Drivers | xf86-input-synaptics | Superseded by libinput |
| X11 Tools | xterm, xorg-twm, xorg-xinit, xorg-xkill, x11vnc, numlockx, startup-notification, xorg-server-xvfb | No X11 session exists |
| KDE/Plasma | kwin, plasma-desktop, plasma-workspace, plasma-nm, plasma-pa, plasma-x11-session, kdeplasma-addons, kde-gtk-config, powerdevil, spectacle, sddm-breath-theme, xdg-desktop-portal-kde, pamac-tray-icon-plasma | Not running; Hyprland equivalents in use |
| Legacy | illyria-wallpaper, ntp | Unused wallpaper; systemd-timesyncd already active |
### Wayland Equivalents Already In Use
| Function | KDE/X11 Package | Active Wayland Replacement |
|----------|----------------|--------------------------|
| Screenshots | spectacle | grim + slurp + grimblast |
| Network Applet | plasma-nm | waybar `network` module |
| Audio Applet | plasma-pa | waybar `pulseaudio` module + pavucontrol |
| Power Mgmt | powerdevil | hypridle + brightnessctl |
| Desktop Portal | xdg-desktop-portal-kde | xdg-desktop-portal-hyprland |
| Display Manager | lightdm/sddm | greetd + tuigreet |
| Clipboard | xclip/xsel | wl-clipboard |
| VNC | x11vnc | wayvnc (if needed) |
## Decision
### TIER 1 — Safe Removal (No Dependencies, No Active Use)
These packages have no dependents and no active role:
| # | Package | Reason | Size |
|---|---------|--------|------|
| 1 | lightdm | DM disabled, greetd is active | 1.1 MiB |
| 2 | lightdm-slick-greeter | Only required by lightdm | 1.9 MiB |
| 3 | sddm | DM disabled | 5.3 MiB |
| 4 | sddm-kcm | Only required by sddm | 0.6 MiB |
| 5 | sddm-breath-theme | Manjaro KDE branding for sddm | 0.2 MiB |
| 6 | xterm | X11 terminal; kitty is active | 1.1 MiB |
| 7 | xorg-twm | X11 window manager | 0.2 MiB |
| 8 | xorg-xinit | Start X manually (no X11 session) | 0.04 MiB |
| 9 | xorg-xkill | X11 kill utility | 0.02 MiB |
| 10 | x11vnc | Only works with X11; wayvnc for Wayland | 1.8 MiB |
| 11 | numlockx | X11-specific numlock | 0.02 MiB |
| 12 | startup-notification | X11 startup protocol | 0.06 MiB |
| 13 | xorg-server-xvfb | Virtual framebuffer; no CI use case | 2.0 MiB |
| 14 | xf86-video-amdgpu | AMD X11 driver (system has NVIDIA) | 0.2 MiB |
| 15 | xf86-video-ati | ATI X11 driver (no ATI GPU) | 0.5 MiB |
| 16 | xf86-video-intel | Intel X11 driver (no Intel GPU) | 2.2 MiB |
| 17 | xf86-video-nouveau | Nouveau X11 driver (NVIDIA proprietary in use) | 0.2 MiB |
| 18 | xf86-video-vesa | VESA fallback driver | 0.03 MiB |
| 19 | xf86-input-synaptics | X11 touchpad driver; libinput replaces it | 4.0 MiB |
| 20 | illyria-wallpaper | Manjaro wallpaper; not used | 1.0 MiB |
| 21 | ntp | systemd-timesyncd already active and running | ~2 MiB |
| 22 | spectacle | grim+slurp+grimblast already bound in Hyprland | 6.1 MiB |
| 23 | pamac-tray-icon-plasma | pamac not running; paru is AUR helper | 0.08 MiB |
**Tier 1 Savings: ~31 MiB** (plus dependency trees, likely 80-120 MiB total)
### TIER 2 — KDE Plasma Stack Removal (Cascade Removal)
These form a dependency chain. Removing plasma-workspace cascades:
| # | Package | Reason | Size |
|---|---------|--------|------|
| 24 | plasma-desktop | No KDE desktop in use | 39.3 MiB |
| 25 | plasma-workspace | Not running; waybar replaces | 55.1 MiB |
| 26 | kwin | Not running; Hyprland is compositor | 30.9 MiB |
| 27 | kdeplasma-addons | Requires kwin+plasma-workspace | 12.0 MiB |
| 28 | plasma-nm | waybar network module in use | 12.8 MiB |
| 29 | plasma-pa | waybar pulseaudio module in use | 1.9 MiB |
| 30 | plasma-x11-session | X11 session; Hyprland is active | 3.4 MiB |
| 31 | kde-gtk-config | KDE GTK integration; not needed | 0.3 MiB |
| 32 | powerdevil | hypridle replaces | 5.9 MiB |
| 33 | xdg-desktop-portal-kde | xdg-desktop-portal-hyprland in use | 2.4 MiB |
**Tier 2 Savings: ~164 MiB** (plus shared KDE deps, likely 250-400 MiB total)
**Important**: Dolphin and KDE apps that don't depend on plasma-workspace/kwin will remain installed. Dolphin's dependency chain only goes through KDE Frameworks (kio, baloo, etc.), not plasma-workspace.
### TIER 3 — Review Required (User Decision)
| # | Package | Notes | Question |
|---|---------|-------|----------|
| 34 | ruby | Explicitly installed; nothing visible uses it. ~50 ruby-* subpackages exist as deps. | Is anything using Ruby? |
| 35 | love | LÖVE 2D game engine. 4.1 MiB. No .love files found. | Still needed? |
| 36 | xorg-server | Required by lightdm+sddm (both being removed). xorg-xwayland is separate and will remain. | Remove after Tiers 1+2? |
| 37 | xf86-input-libinput | Required by xorg-server. If xorg-server goes, this can go too. | Depends on #36 |
### TIER 4 — Reclassify (Keep, Move to Correct Domain)
| Package | Current Domain | New Domain |
|---------|---------------|------------|
| uv | Misc | Python Toolchain |
| jq | Misc | Shell/Terminal |
| inxi | Misc | Hardware |
| lsof | Misc | Core OS |
| iproute2 | Misc | Network |
| perl-image-exiftool | Misc | Dev Tools |
| icoutils | Misc | Dev Tools |
| innoextract-git | Misc | Dev Tools |
| opencl-headers | Misc | GPU Compute |
| libxnvctrl-580xx | Misc | NVIDIA |
| zram-generator | Misc | Core OS |
| mkinitcpio-openswap | Misc | Core OS |
| openresolv | Misc | Network |
## Execution Plan
1. **Tier 1**: Remove 23 packages via Ansible + `pacman -Rns` (safe, no dependents)
2. **Tier 2**: Remove 10 KDE Plasma packages (cascade; verify dolphin survives)
3. **Tier 3**: Get user decisions, then act
4. **Tier 4**: Reclassify in Ansible vars (no removal, documentation only)
5. **Verify**: Run `ansible-playbook --check` after each tier
6. **Document**: Update `docs/tech/stack.md` and CHANGELOG.md
### Safety
- xorg-xwayland stays (required by Hyprland for X11 app compatibility)
- xf86-input-libinput stays if xorg-server stays (Tier 3 decision)
- Dolphin and all KDE Frameworks libs stay (no dependency on plasma-workspace)
- Backup: `pacman -Qe` snapshot before execution
## Expected Outcome
| Metric | Before | After |
|--------|--------|-------|
| Explicit packages | 466 | ~425-430 |
| Disk freed | — | 300-500 MiB |
| X11 surface area | 24 packages | 1-2 (xorg-xwayland + maybe xorg-server) |
| KDE Plasma | 13 packages | 0 |
| Update complexity | High | Reduced |