I couldn't change the CPU scaling setting (i.e. switching from "Powersave" to "Performance") without providing my password each time. this started happening after I upgraded to Ubuntu 24.04.
After googling a bit, I realized it had something to do with policy kit (polkit). It was missing a .pkla file that allows the user to perform an action without requesting the users password.
I created the following file:
/etc/polkit-1/localauthority/50-local.d/50-cpufreq.pkla
with the contents:
[CPU Frequency should be allowed for everyone]
Identity=unix-user:*
Action=org.gnome.cpufreqselector;org.mate.cpufreqselector;org.kde.powerdevil.backlighthelper.set;org.kde.powerdevil.chgfreq
ResultActive=yes
I then restarted polkit:
sudo systemctl restart polkit.service
I was then able to adjust the CPU frequency setting without needing a password.