As part of auto-cpufreq (Automatic CPU speed & power optimizer for Linux), in latest changes on gnome-power branch I would like to be able to disable GNOME power savings profiles on users host machine. Outside of snap context, these changes work fine if I use the tool’s git installer, but once these changes are running as part of snap package (even in devmode) they don’t seem to have any affect (which makes sense as this service is not available as part of the snap).
Out of all the posts on this forum, this came as closest one to what I’m trying to do (different service in my case). However it still didn’t help as I’m not sure what exactly was done in the end.
Well, there is not actually a way to manage services outside of the snap space from a snap … while snapctl enables you to manage services inside the same snap and the snapd-control interface (only allowed in brand stores) gives you access to manage services of other snaps, there is currently no way to access any non-snapped services from a snapped application/service …
there is also no guarantee that your user actually has the gnome power savings stuff installed at all … it could be a manjaro system using i3wm, an arch install running KDE, or an lxQt based desktop on a debian machine …
what you could perhaps do is to show some kind of popup informing the user to please disable these bits manually …
Thank you for confirming that this is not possible with application packaged as a Snap package. Do you know if there are any plans to have one such functionality in future?
I would greatly improve detection and make sure if user is running GNOME and if power-profiles-daemon is running as a systemd service as auto-cpufreq also supports other init systems. Another option would to set it to be used as part of auto-cpufreq config file. While one such implementation might be challenging from technological point of view it’s not a problem at all.
Yes, if this is the only way forward, in case power-profiles-daemon service is detected and user installed application using a Snap they will be instructed with popup or some other way to a script in repo which will allow them to disable it.