1

I just installed Lubuntu 18.04.1 on an old desktop with an AMD Althon 64 x2 4800+ CPU, and while overall it's running fine, my kernel logs are getting flooded with CPU frequency errors from powernow_k8:

enter image description here

I did some Googling and found many old posts about how to fix this, but none of the commands worked (not surprising since I'm sure a lot has changed since 2008)...

Anybody have a suggestion on how I can fix this? Honestly I don't even care about dynamic frequency scaling working, I just want powernow_k8 to quit flooding my kernel log....

1 Answers1

2

powernow-k8, which used to be an external module, has been directly compiled into the kernel since 2010. To avoid the speed-stepping you can simply run the CPUs at full speed. From Stack Exchange answer: Is there a way to disable Intel SpeedStep steppings on an Ubuntu Server using a command line application?

Start by reading the current available settings for your system:

sudo cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

this will return a list of available settings you can use to regulate each core of your CPU, if you can you should then set them to max performance by selecting the performance option. This will make your CPU cores run always at max frequency.

Knowing what options you have and if the performance option is available, you can then set each core to performance mode with the command:

sudo echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

this will make cpu0 (first core) run all the time at max performance. Do it for all the logical cores in your CPU.

You can then check if the option was successfully changed with the command:

sudo cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

this will check the current set option for cpu0 (first core). Check if the change was successful for all cores and if everything was set correctly you are good to go: Intel SpeedStep will be on but all your cores will be running at max frequency speed all the time.

NOTE: Although the question and answer references Intel SpeedStep the same should hold true with AMD's PowerNow technology.


Original post based on Arch Linux information

powernow_k8 has been deprecated since kernel 3.7. You can blacklist it (How to blacklist kernel modules?) using command:

sudo -H leafpad /etc/modprobe.d/blacklist.conf

and inserting these two lines:

# powernow-k8 deprecated since kernel 3.7
blacklist powernow-k8

Save the file and exit gedit

After reboot confirm module is no longer loaded using:

lsmod | grep powernow-k8

You can also read the link above for steps to temporarily blacklist a module.

NOTE your CPU will now be running at full frequency unless the replacement module acpi-cpufreq is used.

  • Well, Lubuntu doesn't have gedit :P so I used nano instead. Anyway, unfortunately, that didn't fix it. Interestingly, it appears that the kernel module wasn't loaded to begin with (I ran the lsmod command prior to rebooting, and it did not return anything) – You'reAGitForNotUsingGit Aug 11 '18 at 18:51
  • Oh right I should have said sudo -H leafpad. It's like muscle memory to use gedit all the time in answers. Also reading: https://github.com/spotify/linux/blob/master/Documentation/cpu-freq/amd-powernow.txt I see I made a typo. It's not powernow_k8 but rather powernow-k8. I've revised the answer accordingly. PS interestingly the github branch is maintained by our "God-Father": Linus Torvalds :) – WinEunuuchs2Unix Aug 11 '18 at 18:55
  • Sadly that made no difference. Also, I tried manually unloading it with modprobe -r powernow-k8 and it came back with: modprobe: FATAL: powernow_k8 is builtin – You'reAGitForNotUsingGit Aug 11 '18 at 19:03
  • Now researching a 10 year old bug where powernow-k8 is compiled into the kernel by Ubuntu and people are complaining it shouldn't be: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/355232 – WinEunuuchs2Unix Aug 11 '18 at 19:24
  • @AndroidDev I've given it one last kick-at-the-can and revised the answer. I don't have an AMD processor so I can't test... – WinEunuuchs2Unix Aug 11 '18 at 19:54
  • Alright so that works, except for the fact that the governor is reset on reboot, so I guess I'll need to add that to a startup script or something. Also, for some reason, running the commands with sudo yielded bash: Permission denied, but doing sudo su and then running the command without prefixing it with sudo worked.... – You'reAGitForNotUsingGit Aug 13 '18 at 19:29
  • Add it to /etc/rc.local which runs as root during Boot. No need for sudo just use echo ..... glad it worked! – WinEunuuchs2Unix Aug 13 '18 at 21:51