# Kwin\_screencast est très bavard quand je capture l'écran

**URL:** <https://www.debian-fr.org/t/kwin-screencast-est-tres-bavard-quand-je-capture-lecran/89333>\
**Category:** Support Debian\
**Created:** [Décembre 18, 2023, 8:22 UTC](https://www.debian-fr.org/t/kwin-screencast-est-tres-bavard-quand-je-capture-lecran/89333 "2023-12-18T08:22:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Almtesh](https://www.debian-fr.org/user_avatar/www.debian-fr.org/almtesh/32/10312_2.png) [@Almtesh](https://www.debian-fr.org/u/Almtesh)\
**Post date:** [Décembre 18, 2023, 8:22 UTC](https://www.debian-fr.org/t/kwin-screencast-est-tres-bavard-quand-je-capture-lecran/89333/1 "2023-12-18T08:22:21Z")

</div>

Bonjour,

Quand je capture l’écran (avec OBS ou Discord dans Firefox), j’ai de TRÈS nombreux messages (plus d’une dizaine par seconde) qui apparaissent dans les journaux :

```nohighlight
kwin_screencast: Dropping a screencast frame because the compositor is slow

```

et, de temps en temps, j’ai ceux-là :

```nohighlight
kwin_screencast: Dropping a screencast cursor update because the compositor is slow

```

J’ai caché les messages pour éviter le remplissage du stockage sur lequel sont les journaux avec un fichier `/etc/rsyslog.d/40-screencast-slow-composer.conf` :

```bash
# massive flood when screencasting with Wayland
:msg,contains,"kwin_screencast: Dropping a screencast frame because the compositor is slow" /dev/null
& stop

:msg,contains,"kwin_screencast: Dropping a screencast cursor update because the compositor is slow" /dev/null
& stop

```

mais ça ne fait que cacher le problème.  
Ce que je ne comprends pas, c’est que cette erreur ne provoque pas de lenteur ou de coupure dans le programme qui capture l’écran, ni de ralentissement général du système.

Est-ce qu’il y a autre chose à faire que de juste cacher les messages ?

---

<div class="post-metadata">

**Author:** ![Clochette](https://www.debian-fr.org/user_avatar/www.debian-fr.org/clochette/32/8757_2.png) [@Clochette](https://www.debian-fr.org/u/Clochette)\
**Post date:** [Décembre 18, 2023, 8:51 UTC](https://www.debian-fr.org/t/kwin-screencast-est-tres-bavard-quand-je-capture-lecran/89333/2 "2023-12-18T08:51:33Z")

</div>

Il y a du monde qui ont rencontré ce genre de souci (sur nixos aussi donc pas réduit à Debian à mons avis c’est plus côté KDE qu’il faudra chercher) :

> <https://github.com/NixOS/nixpkgs/issues/262976>
>
> \### Describe the bug
> When running kwin under wayland with screensharing, the sy…slog gets spammed with the message "kwin\_screencast: Dropping a screencast frame because the compositor is slow". See https://bugs.kde.org/show\_bug.cgi?id=467574; upstream bug says 20 to 30 times a second, I' ve had certain seconds where the same entry is repeated about 2000 times (see attached \[log extract\](https://github.com/NixOS/nixpkgs/files/13073426/screencast.log)). 
> 
> This from my point of view is both a nuisance and a security issue because it just drowns your log in bogus messages under the right or wrong circumstances and also blows up the log, which can lead to too early rotation and vacuuming.
> 
> \### Steps To Reproduce
> Steps to reproduce the behavior:
> 1. Start Plasma (Wayland) from your login screen.
> 2. Share a window, e.g. using OBS or a video call solution, or whatever, it can happen in more situations though less spammy.
> 3. syslog gets spammed
> 
> \### Expected behavior
> Syslog should not get spammed with the messages
> 
> \### Mitigation
> A patch exists at https://github.com/FireBurn/PortageStuff/blob/53f540ce02d32c1e8e9f13f23e0fcd3b9205e96b/patches/kde-plasma/kwin/spam.patch that completely disables the log entry for this particular issue as a workaround until the bug is properly fixed upstream. If you have enabled plasma via \`services.xserver.desktopManager.plasma5.enable\`, add the following to your overlays (adjust for patch location, maybe even via prev.fetchPatch):
> 
> libsForQt5 = prev.libsForQt5.overrideScope' (lfqt5final: lfqt5prev: {
> plasma5 = lfqt5prev.plasma5.overrideScope' (p5final: p5prev: {
> kwin = p5prev.kwin.overrideAttrs (old: {
> patches = (old.patches or \[\]) ++ \[
> ./patches/spam.patch
> \];
> });
> });
> });
> 
> 
> \### Notify maintainers
> @ttuegel @nyanloutre 
> 
> \### Metadata
> Please run \`nix-shell -p nix-info --run "nix-info -m"\` and paste the result.
> 
> \`\`\`console
> laser@powerbox ~\> nix-shell -p nix-info --run "nix-info -m"
> - system: \`"x86\_64-linux"\`
> - host os: \`Linux 6.1.58, NixOS, 23.11 (Tapir), 23.11.20231019.7c9cc5a\`
> - multi-user?: \`yes\`
> - sandbox: \`yes\`
> - version: \`nix-env (Nix) 2.17.1\`
> - channels(root): \`"nixos, nur"\`
> - nixpkgs: \`/nix/var/nix/profiles/per-user/root/channels/nixos\`
> \`\`\`

---

<div class="post-metadata">

**Author:** ![Almtesh](https://www.debian-fr.org/user_avatar/www.debian-fr.org/almtesh/32/10312_2.png) [@Almtesh](https://www.debian-fr.org/u/Almtesh)\
**Post date:** [Décembre 18, 2023, 10:38 UTC](https://www.debian-fr.org/t/kwin-screencast-est-tres-bavard-quand-je-capture-lecran/89333/3 "2023-12-18T10:38:00Z")

</div>

Ah, du coup, si j’ai bien compris, le problème sera réglé dans une prochaine version de Plasma, du coup, je laisse comme ça en attendant.

---

<div class="post-metadata">

**Author:** ![Clochette](https://www.debian-fr.org/user_avatar/www.debian-fr.org/clochette/32/8757_2.png) [@Clochette](https://www.debian-fr.org/u/Clochette)\
**Post date:** [Décembre 18, 2023, 10:45 UTC](https://www.debian-fr.org/t/kwin-screencast-est-tres-bavard-quand-je-capture-lecran/89333/4 "2023-12-18T10:45:09Z")

</div>

J’en sais fichtre rien, ils ont l’air d’avoir corrigé ça sur une version plus récente chez nixos, mais le problème est-il déjà réglé sur une version plus récentes chez Debian ?

Tu peux à la limite tester sur une sid pour voir 😉
