Skip to content

Instantly share code, notes, and snippets.

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/f4cf3c1b3f67de4cb35a271db1ef8699 to your computer and use it in GitHub Desktop.
Save curiousercreative/f4cf3c1b3f67de4cb35a271db1ef8699 to your computer and use it in GitHub Desktop.
write a systemd service file to set graphics power off when integrated graphics mode after system76-power service starts
[Unit]
Description=Set the graphics power to off for integrated graphics during startup.
After=com.system76.PowerDaemon.service
[Service]
Type=simple
ExecStart=/bin/bash -c '[[ $(system76-power graphics) == 'integrated' ]] && system76-power graphics power off'
[Install]
WantedBy=default.target
#!/usr/bin/env bash
# as superuser
sudo su
# write a systemd service file to set graphics power after system76-power service starts
vi /etc/systemd/system/system76-power-graphics-power-default.service
# enable our new service
systemctl enable system76-power-graphics-power-default
exit
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment