Nvm, I’ve installed the snap and can observe the problem. FWIW, I think the problem lies with the application and the sandbox correctly stops it from accessing locations it does not have permissions to access.
Specifically, the Python code appears to run somethin in a shell, which attempts to inherit the current directory. That is, if I’m inside my $HOME, and run sudo autocpu-freq, the current working directory is still my $HOME. SInce the snap does not plug home interface (nor it should afact), the sandbox will stop it from accessing that directory.
Try running snap list --all auto-cpufreq, if it shows more than one revision then you can run snap revert auto-cpufreq which should restore the previous revision.
No, I’m saying auto-cpufreq tries to open the current working directory, which it does not necessarily have access to. I’ve tried a couple of locations and got these denials.
This is an attempt where cwd is /tmp (snap gets a private /tmp):
The first one suggests it tries to run a shell. I don’t know why why there’s a need to run a shell, but it clearly indicates that trying to run something in cwd is a problem.
I looked at the code and there’s a couple of code paths that I believe would unconditionally attempt to run shell at startup, eg:
snap_check = os.system("snap list | grep auto-cpufreq >/dev/null 2>&1")
@mborzecki of course makes sense. In meantime I made changes in snap_detect_improve branch, which handles >/dev/null 2>&1 in a more graceful manner.
I just pushed v1.9.3 which is in development to Snap beta channel which should address this problem.
It can be installed by running: sudo snap install auto-cpufreq --beta, since it all works fine for me could you try it @meetdilip (@mborzecki you’re free to give it a try as well) and let me know if this fixes the issue.
Options:
–monitor Monitor and see suggestions for CPU optimizations
–live Monitor and make (temp.) suggested CPU optimizations
–install / --remove Install/remove daemon for (permanent) automatic CPU
optimizations
–stats View live stats of CPU optimizations made by daemon
–config TEXT Use config file at defined path
–debug Show debug info (include when submitting bugs)
–version Show currently installed version
–donate Support the project
–help Show this message and exit.
Unable to detect if you are using a TLP service!
This daemon might interfere with auto-cpufreq which can lead to unexpected results.
We strongly encourage you not to use TLP unless you really know what you are doing.