I have 2 graphics cards on my laptop. One is IGP and another discrete.
I've written a shell script to to turn off the discrete graphics card.
How can I convert it to systemd script to run it at start-up?
|
I have 2 graphics cards on my laptop. One is IGP and another discrete. I've written a shell script to to turn off the discrete graphics card. How can I convert it to systemd script to run it at start-up? |
||||
|
|
|
There are mainly two approaches to do that:
Therefore you need two files: the script and the
Now, edit the unit file. Its content depends on how your script works: If
then the content of
If
then the content of
To power off:
To power off & on:
Once you're done with the files, enable the service:
It should start automatically after rebooting the machine. For more details see |
|||||||||||||||||||||
|
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?