Passe __GL_MaxFramesAllowed=1 a cosmic-comp lorsque /proc/driver/nvidia
existe. Sans cela le pilote laisse grossir sa file de trames pre-rendues,
ce qui ajoute de la latence a l'affichage (smithay#1562, cosmic-comp#1179).
La variable n'est ajoutee que sur machine NVIDIA ; ailleurs l'environnement
transmis reste le seul COSMIC_SESSION_SOCK.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Nothing else is cosmic uses bash, so it's only a dependency for a single
script.
Rewrite start-cosmic as a shell script, dropping the dependency on bash.
No AI/LLM-generated code is included in this PR.
launch-pad ne relance que les processus qui sortent en erreur: une sortie propre du demon (par ex. un pkill -x cosmic-settings qui touche aussi le demon a cause de la troncature comm a 15 caracteres) laissait la session sans service varlink audio jusqu'au logout. Le demon est desormais relance par cosmic-session tant que la session n'est pas en cours d'extinction, avec une limite de 5 relances rapprochées pour éviter une boucle sur un démon cassé.
This is needed for `cosmic-settings-daemon` to be able to use Wayland.
Required for https://github.com/pop-os/cosmic-settings-daemon/pull/153.
Though passing the env vars here seems reasonable in general, and
without that change is harmless and should have no impact.
On NixOS, autologin bypasses cosmic-greeter and instead launches start-cosmic
directly. The XDG_SESSION_DESKTOP variable previously wasn't set hence, which
would break functionality like session commands ("Power Off") in the launcher.
I could not find any consistent documentation on _which_ environment
variables a DE should populate. GNOME just imports everything[0] from
the current DE-startup-session. KDE imports some DE and KDE specific
variables but again, this isn't defined anywhere (that I could find)
on places like <freedesktop.org>. So instead, lets just update
existing ones.
[0]: d14f6db15e
Move the systemctl import-environment call after keyring setup so the
SSH_AUTH_SOCK variable exists before being imported into the user
service manager. Remove the earlier duplicate import block.
Our "privileged sockets" support in cosmic comp has never been enforced
by default, and predates the Wayland security context protocol. That
should cover sandboxed clients, while we can't really secure against
non-sandboxed clients.
We also rely on the DBus socket-activated portal backend having access
to "privileged" protocols now.
So it makes sense to remove this.
The $WAYLAND_DISPLAY and $DISPLAY are prone to change between `greetd`'s
initialization and the user's login. Therefore, update these environment
variables so systemd services and/or d-bus services use the correct
values post login.