Cursor‑following auto‑zoom on Linux Wayland: reading the cursor from the GPU in Rust
Описание и применение
HyperGSR использует аппаратный слой курсора GPU, чтобы получать координаты курсора без root и реализовать авто‑зум камеры на Wayland, решая проблему отсутствия глобального курсора.
Задача
Wayland does not expose a global cursor position, making auto‑zoom screen recorders difficult to implement.
Результат
HyperGSR achieves about 56 MB RAM usage at 1080p60 while providing smooth cursor‑following auto‑zoom on native Wayland and X11 without root.
Рабочий процесс
- 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
Доказательства
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.
- Дата записи: 2026-10-17T13:41:28.422Z