mirror of
https://github.com/deunix-educ/sourizz.git
synced 2026-11-25 04:39:43 +01:00
Correct the KWin Wayland stall note: it happens with any drawing, not only the trail
A controlled rerun showed the freeze with the classic ring alone, so the earlier "trail only" conclusion was wrong. It does not occur with all effects off, without Sourizz, or when dragging a window. Cause still unknown; the README now recommends the X11 session instead of turning the trail off. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,7 @@ Adding a config option touches: `config.rs` (struct, `Default`, `sanitize`), `i1
|
||||
- **egui ids must be unique on screen.** Two `ComboBox`es sharing an id (e.g. both labelled "Style") act as one control and their popups close each other, so the lists could not be opened. `combo()` in `settings.rs` takes an explicit id — never derive it from the label. `examples/click_at.rs` drives the real settings window through XTEST for such checks (it refuses to click unless the pointer is over our own window).
|
||||
- **Raising an already-open settings window does not work under KWin.** Focus-stealing prevention turns another process's activation request (`ViewportCommand::Focus` after a `SIGUSR1`) into a blinking taskbar entry (`_NET_WM_STATE_DEMANDS_ATTENTION`), so a window buried under others stays buried. `Core::open_settings` therefore kills the old child and spawns a new one, which always maps on top. It is safe because the settings save as they change.
|
||||
- Process name `sourizz-settings` is truncated to 15 chars by the kernel: use `pgrep -x sourizz-setting`, and never `pgrep -f` from a shell whose own command line contains the pattern.
|
||||
- **KWin Wayland stalls with a trail (real hardware, Intel + NVIDIA laptop, KWin 6.3.6).** The pointer freezes ~0.5 s every 2-3 s while a trail is drawn; ring alone and idle daemon are fine. Measured and ruled out: our loop blocking (no iteration over 40 ms), buffer allocation (reusing buffers changed nothing), damage size (40-380 kpx per commit, stalls unrelated to it), the D-Bus pointer feed (75-140 positions/s, harmless), waiting for frame callbacks (committing after 20 ms changed nothing), the trail style (`dots` and `rainbow` both stall), pointer speed (slow motion stalls too), the frame rate (`general.fps = 30` still stalls), and continuous commits as such (the ring pulse already commits at 30/s with the pointer still, without stalls). Not tried: KWin on the Intel GPU only (`KWIN_DRM_DEVICES`), position extrapolation for the ring lag. Documented as a known limitation in both READMEs.
|
||||
- **KWin Wayland stalls whenever we draw (real hardware, Intel + NVIDIA laptop, KWin 6.3.6).** The pointer freezes ~0.5 s every 2-3 s as soon as anything is drawn, even the classic ring alone with `ring.pulse_speed = 0`. It does not happen with `enabled = off` (script and D-Bus feed still running), without Sourizz, or when dragging a window. An earlier "ring alone is fine" result was wrong: the config had changed between tests, so record the config md5 with each run. Measured and ruled out: our loop blocking (no iteration over 40 ms), buffer allocation (reusing buffers changed nothing), damage size (40-380 kpx per commit, unrelated to the stalls), the D-Bus pointer feed, waiting for frame callbacks (committing after 20 ms changed nothing), trail style (`dots`, `rainbow`), pointer speed, frame rate (`general.fps = 30`), continuous commits as such, NVIDIA runtime PM (stays `suspended`). KWin's main thread is not saturated (11-32 % of a core, never in `D` state) and its script kept delivering 100+ positions/s during the stalls, so the wait is probably on the GPU / page flip, with frame callbacks arriving 500-600 ms late. Not tried: a probe client with a variable surface size and rate (would show whether the 1920x1080 shm buffer matters), `KWIN_DRM_DEVICES`, position extrapolation for the ring lag. Documented as a known limitation in both READMEs.
|
||||
|
||||
## Testing Wayland without a Wayland session
|
||||
|
||||
|
||||
+1
-1
@@ -185,7 +185,7 @@ La session elle-même se choisit sur l'écran de connexion (par exemple « Plasm
|
||||
|
||||
Limite connue : sur les sorties HiDPI avec un facteur d'échelle supérieur à 1, la surcouche est dessinée en 1× puis agrandie par le compositeur, ce qui la rend légèrement floue (les positions restent correctes).
|
||||
|
||||
Limite connue : sous KDE Plasma Wayland (KWin 6.3.6, portable à GPU hybride Intel UHD 630 + NVIDIA MX250), le pointeur se fige environ une demi-seconde toutes les deux à trois secondes tant qu'une **traînée** est dessinée. L'anneau seul ne le provoque pas, ni Sourizz avec tous les effets coupés. Sourizz lui-même n'est pas bloqué pendant ces gels et la zone qu'il redessine est petite : la cause se trouve dans la façon dont KWin traite ces mises à jour continues sur ce matériel, et elle n'est pas encore comprise. Sur une telle configuration, désactivez la traînée (`sourizz set trail.enabled false`) ou utilisez la session X11. L'anneau peut aussi traîner légèrement derrière un pointeur rapide sous Wayland, car sa position suit un chemin plus long (script KWin puis D-Bus) que les événements bruts XInput2 utilisés sous X11.
|
||||
Limite connue : sous KDE Plasma Wayland (KWin 6.3.6, portable à GPU hybride Intel UHD 630 + NVIDIA MX250), le pointeur se fige environ une demi-seconde toutes les deux à trois secondes dès que Sourizz dessine quoi que ce soit, l'anneau seul compris. Cela n'arrive pas avec tous les effets coupés, ni sans Sourizz, ni en déplaçant une fenêtre. Sourizz lui-même n'est pas bloqué pendant ces gels, la zone qu'il redessine est petite et le thread principal de KWin n'est pas saturé : la cause n'est pas encore comprise, et couper la traînée n'y change rien. Sur une telle configuration, utilisez la session X11. L'anneau peut aussi traîner légèrement derrière un pointeur rapide sous Wayland, car sa position suit un chemin plus long (script KWin puis D-Bus) que les événements bruts XInput2 utilisés sous X11.
|
||||
|
||||
## Ce qui a été testé
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ The session itself is chosen at the login screen (for example "Plasma (X11)" or
|
||||
|
||||
Known limitation: on HiDPI outputs with a scale above 1 the overlay is drawn at 1× and upscaled by the compositor, so it looks slightly soft (positions are correct).
|
||||
|
||||
Known limitation: on KDE Plasma Wayland (KWin 6.3.6, laptop with an Intel UHD 630 + NVIDIA MX250 hybrid GPU) the pointer freezes for about half a second every two to three seconds while a **trail** is drawn. The ring alone does not trigger it, and neither does Sourizz with all effects off. Sourizz itself is not blocked during these stalls and the area it redraws is small, so the cause lies in how KWin handles the continuous updates on this hardware; it is not understood yet. On such a setup, turn the trail off (`sourizz set trail.enabled false`) or use the X11 session. The ring can also lag slightly behind a fast-moving pointer on Wayland, because its position takes a longer path (KWin script, then D-Bus) than the raw XInput2 events used on X11.
|
||||
Known limitation: on KDE Plasma Wayland (KWin 6.3.6, laptop with an Intel UHD 630 + NVIDIA MX250 hybrid GPU) the pointer freezes for about half a second every two to three seconds as soon as Sourizz draws anything, the ring alone included. It does not happen with every effect switched off, nor without Sourizz, nor when dragging a window around. Sourizz itself is not blocked during these stalls, the area it redraws is small, and KWin's main thread is not saturated, so the cause is not understood yet; turning the trail off does not help. On such a setup, use the X11 session. The ring can also lag slightly behind a fast-moving pointer on Wayland, because its position takes a longer path (KWin script, then D-Bus) than the raw XInput2 events used on X11.
|
||||
|
||||
## What was tested
|
||||
|
||||
|
||||
Reference in New Issue
Block a user