Code Monkey home page Code Monkey logo

Comments (7)

ademlabs avatar ademlabs commented on July 28, 2024 1

I cannot delete this symlink, as the entire directory is symlinked and is by default. On Arch, the /bin, /sbin and /usr/sbin folders are all symlinked to /usr/bin.

$ ls -al /usr/sbin
lrwxrwxrwx 1 root root 3 Nov 27 22:29 /usr/sbin -> bin
$ ls -al /
...
lrwxrwxrwx   1 root root     7 Nov 27 22:29 bin -> usr/bin
lrwxrwxrwx   1 root root     7 Nov 27 22:29 sbin -> usr/bin
...

I found out that my PATH environment variable is set to look in the following path order: /usr/sbin:/sbin:/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/bin

If I remove /usr/sbin:/sbin:/bin from my path and then running which cpufreqctl it returns the correct path to /usr/bin/cpufreqctl! My path looks like it had been modified by some other application. I'll need to fix that and restore the policy file.

from cpufreq.

konkor avatar konkor commented on July 28, 2024

@Arvind-D looks like some policy issue.
So default extension policy has permissions to all operations in the cpufreqctl helper and some operations require not just power permissions. Actually, new versions of the extension don't use cpupower/cpufreq tools at all and doing all operations directly through the cpufreqctl script for root operations or extension's modules.
I suggest you to reinstall extension to restore default policy and update policy file and script helper manually.
try to run this command once after reinstalling and restart gnome-shell session

sudo ~/.local/share/gnome-shell/extensions/cpufreq@konkor/cpufreqctl install

This command is available in the extension menu on the 1st boot or an updating ('Install/Update Extension') but if you modified it without changing the version number the extension does not detect it.
Can you tell me what the distribution do you use?
Thank you for the report.

from cpufreq.

konkor avatar konkor commented on July 28, 2024

@Arvind-D I noticed you copied cpufreqctl to wrong directory ("pkexec **/usr/sbin/**cpufreqctl irqbalance")
It should be /usr/bin not /usr/sbin!!! You have to remove it from /usr/sbin folder!

from cpufreq.

ademlabs avatar ademlabs commented on July 28, 2024

I'm currently running Manjaro (Arch) and my /usr/sbin is a symlink to /usr/bin, therefore cpufreqctl is indeed stored in /usr/bin.
If I run which cpufreqctl however I get /usr/sbin/cpufreqctl! The extension also tries to call /usr/sbin/cpufreqctl instead of /usr/bin/cpufreqctl. I guess the distribution is sending the wrong path somehow.
For the time being I fixed it by modifying the konkor.cpufreq.policy file and specified sbin instead of bin in there while I figure out why my distro is running like that. I'm very new to polkit and spent a few hours tonight learning about how it works.

Anyways, thanks a lot for your kind help, much appreciated!

from cpufreq.

konkor avatar konkor commented on July 28, 2024

@Arvind-D PolicyKit is for user space apps to up some permissions. It doesn't work with root apps directly. You have to delete this symlink and restore policy.
Regards.

from cpufreq.

konkor avatar konkor commented on July 28, 2024

@Arvind-D I am glad you found out. Actually, the extension works well on Arch I have the Arch user/contributor @terencode (see #57 (comment)). So there is even aur repo for the extension but i don't know the maintainer.

from cpufreq.

ademlabs avatar ademlabs commented on July 28, 2024

@konkor Yes, the extension works excellent and I love it! Thanks for all your hard work on that! I am currently using the aur repo extension and it is fairly well up to date actually.

from cpufreq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.