Skip to content

Instantly share code, notes, and snippets.

@curiousercreative
Last active April 28, 2022 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curiousercreative/09aa4ccb81b45ce46f2fc063abf5b6cf to your computer and use it in GitHub Desktop.
Save curiousercreative/09aa4ccb81b45ce46f2fc063abf5b6cf to your computer and use it in GitHub Desktop.
Write a systemd service file to set profile after system76-power service starts and enable it
#!/usr/bin/env bash
# as superuser
sudo su
# write a systemd service file to set profile after system76-power service starts
cat <<EOF > /etc/systemd/system/system76-power-profile-default.service
[Unit]
Description=Set the profile profile at startup.
After=com.system76.PowerDaemon.service
[Service]
Type=simple
ExecStart=/bin/bash -c 'system76-power profile performance'
[Install]
WantedBy=default.target
EOF
# enable our new service
systemctl enable system76-power-profile-default
exit
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment