sibradzic / amdgpu-clocks

Simple script to control power states of amdgpu driven GPUs
GNU General Public License v2.0
394 stars 44 forks source link

Persistence in Fedora Silverblue #47

Open ghost opened 1 year ago

ghost commented 1 year ago

Hello, thanks for the great script! Worked just fine in Fedora Workstation. However, as expected I'm having issues adding the persistent service to /lib/systemd/system/ or /usr/lib/systemd/system-sleep in Fedora Silverblue as these folders are read-only. Would you have some pointers as to how to make the script persistent in Silverblue? Many thanks.

edit: It seems the service works when placed in /etc/systemd/system/ but I'm having no luck with the resume script so far. Would you say rewriting the service file to something like this would work to avoid having to add the suspend script?

sibradzic commented 1 year ago

Hi @mystrdat, thanks for the report.

The systemd files you can find in this repo are just a best effort examples, they are by no means limited to being placed into any particular directory, feel free to place them wherever your distro deems acceptable.

Regarding resume script, this seem to be yet another consequence of systemd design choices, and distros like Silverblue are only making it more difficult for some reason. Since amdgpu-clocks-resume was a contribution by a community in the first place, I do not feel confident to mess up with that (I am by no means systemd expert, quite the contrary), but further contributions are more than welcome.