Autostart
Systemd service¶
For simplicity, a Systemd user service running either uvx for the latest releases (in case of driver updates), or a prebuilt binary directly should cover most users, and integrates well with dotfiles.
Create a file at ~/.config/systemd/user/nvibrant.service with the content:
[Unit]
Description=Apply nvibrant
After=graphical.target
[Service]
Type=oneshot
ExecStartPre=/bin/sleep 5
ExecStart=uvx nvibrant 1023 1023
[Install]
WantedBy=default.target
Change values, enable the service with systemctl --user enable --now nvibrant.service
Tips
- You can pin it to a specific version with
uvx nvibrant==1.2.1 (args)to have more control/security - Local binary at
~/.local/bin/nvibrantand useExecStart=%h/.local/bin/nvibrant (args) - Sleeping for a few seconds can prevent racing conditions with the display server starting up
Environment variables¶
For autostarting dithering or multigpus, which are done via environment variables, systemd syntax does not run commands in a shell - a few options are:
You may add two ExecStart to the service, a combined setup may look like: