Cursor‑following auto‑zoom on Linux Wayland: reading the cursor from the GPU in Rust
Description and use
HyperGSR reads the GPU’s hardware cursor plane to obtain cursor coordinates without root, enabling auto‑zoom camera movement on Wayland and X11.
Problem
Wayland does not expose a global cursor position, making auto‑zoom screen recorders difficult to implement.
Outcome
HyperGSR achieves about 56 MB RAM usage at 1080p60 while providing smooth cursor‑following auto‑zoom on native Wayland and X11 without root.
Workflow
- Open /dev/dri/card* with libdrm
- Enable universal planes and atomic properties
- Find the cursor plane (e.g., plane #92)
- Read CRTC_X, CRTC_Y, and FB_ID properties
- Use these coordinates to drive a spring‑physics camera
- Record via PipeWire and encode with NVENC or VAAPI
Evidence
Wayland won’t tell an app where the cursor is.
HyperGSR reads the cursor straight from the GPU's hardware cursor plane, without root, and moves a critically damped spring camera to wherever you are working, the way Screen Studio does on macOS.
It runs on native Wayland (COSMIC, GNOME, KDE Plasma, Hyprland, Sway) and on X11.
- Record date: 2026-10-17T13:41:28.422Z