# Firefox Optimization Reference: NVIDIA 610 + Wayland

## Timeline of this session's issue

- User: CachyOS, KDE Plasma 6.6.5, Wayland, RTX 3070, Firefox 151.0.4
- **June 1 batch update:** NVIDIA 595.71.05 → 610.43.02, Firefox 150→151, KWin 6.6.5-2→3, Mesa 26.1.0→1
- **Result:** All page rendering lag + YouTube video lag
- **Root cause:** `layers.acceleration.force-enabled=true` + NVIDIA 610 Wayland = software fallback (0 MiB GPU memory)

## Mozilla source verification (StaticPrefList.yaml)

Key findings from `raw.githubusercontent.com/mozilla/gecko-dev/master/modules/libpref/init/StaticPrefList.yaml`:

| Pref | Default | Platform | Notes |
|------|---------|----------|-------|
| `gfx.webrender.force-angle` | `true` | `#ifdef XP_WIN` | **Windows-only** — no-op on Linux |
| `gfx.webrender.all` | `false` | All | Enables WR + extra features |
| `gfx.webrender.compositor` | `false` | Linux | Default off on Linux |
| `gfx.webrender.compositor.force-enabled` | `false` | All | Must explicitly enable |
| `layers.acceleration.force-enabled` | `false` | All | `do_not_use_directly: true` — Mozilla warns against use |
| `layers.acceleration.disabled` | `false` | All | `do_not_use_directly: true` |

## Applied user.js (106 prefs)

Sections and pref counts:
- NVIDIA Wayland fixes: 6
- WebRender GPU: 4
- Network speed: 8
- Memory/cache: 11
- Content processes: 2
- Startup/tabs: 5
- Telemetry kill: 21
- Promos removed: 13
- Smooth scrolling: 7
- Security: 5
- Privacy: 7
- URL bar: 11
- Unneeded features: 5

## Environment setup

```bash
# ~/.config/plasma-workspace/env/moz-wayland.sh
#!/bin/bash
export MOZ_ENABLE_WAYLAND=1

# ~/.config/environment.d/moz-fix.conf
MOZ_ENABLE_WAYLAND=1
```

## Verification commands

```bash
# Check Firefox GPU usage
nvidia-smi | grep firefox

# Check WebRender status
# Open about:support — look for Compositing, GPU row, VAAPI

# Check GPU rendering from process
grep -i "nvidia\|egl\|render\|dri" /proc/$(pgrep firefox | head -1)/maps 2>/dev/null
```
