AMD locks lowest cpu frequency

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
ozsouth
Posts: 1426
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 221 times
Been thanked: 624 times

AMD locks lowest cpu frequency

Post by ozsouth »

I have an HP E2-9000e AMD & I have tried various install types, bootloaders, kernels, filesystems, frequency scaling governors & settings.
The first time I boot up, normal frequency variation occurs, but on subsequent boots, cpu is locked to lowest frequency (798).
Ondemand, Performance - ignored. Even usb sticks have the same result. If I reformat a partition or usb stick - works - once only.
Used various ScPup64 versions which WORK PERFECTLY on any intel pc. Tried with win10 (fastboot on then off) & without win 10.
This seems to be an AMD problem (never have issues with Intel other than Spectre).
Several internet solutions tried without success. Anyone else had this issue & if so, what did you do?

EDIT: - seems to be a power policy issue - see below.

Last edited by ozsouth on Wed Jan 13, 2021 12:30 pm, edited 1 time in total.
williams2
Posts: 1037
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 298 times

Re: AMD locks lowest cpu frequency

Post by williams2 »

There is a cpu speed configuration program in the menu.
Or you can type wcpufreq in a text terminal (console.)

Assuming you have configured the cpu speed, and that the configuration has been saved in the save file or save folder, you could look in /sys/ to see what the kernel is actually using as configuration options.

For example, you could type (copy/paste) in a text terminal:

Code: Select all

# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_driver
acpi-cpufreq
# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors
ondemand performance 
# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
ondemand
# echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
# cat /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 
95
# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies
# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
#

Does everything look reasonable?

If setting the configuration manually works, you can put the commands in /etc/rc.d/rc.local or in a script in /root/Startup.

policy0 is the first cpu core, policy1 is the second cpu core, etc.

An up_threshold of 95 means it will run at low speed if the cpu load is less than 95%

Usually, laptop/notebooks are set to ondemand and desktops are set to performance.
Ondemand and performance should run about the same, ondemand should run a little cooler and use a little less power than performance.

ozsouth
Posts: 1426
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 221 times
Been thanked: 624 times

Re: AMD locks lowest cpu frequency

Post by ozsouth »

@williams2 - thanks, but already done that. It is ignored on bootup. :(
Have also tried various bios settings to no avail.

williams2
Posts: 1037
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 298 times

Re: AMD locks lowest cpu frequency

Post by williams2 »

You can change the configuration options at any time, not just at boot. If you can manually change the options, you can put the commands in a script so the options are set the way you like, automatically, when Puppy boots.

What scaling_driver is being used, if any?

Are the option values reasonable?

What scaling governor does it say it is using?

Do those /sys/ values exist or not? If they do not exist there is probably not a scaling cpu freq driver running.

User avatar
bigpup
Moderator
Posts: 6543
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 796 times
Been thanked: 1361 times

Re: AMD locks lowest cpu frequency

Post by bigpup »

The CPU frequency Scaling Tool has more governor options that can actually be used.
The governors available depends on the driver being used.
But the drop down selection lists them all.
Example:
intel_pstate can only use performance and powersave govermor.

When you first start the CPU frequency Scaling Tool.
What scaling driver is it trying to use?

Foissapup64 9.5 has a governor called AMD_frequecy_sensativity.

Last edited by bigpup on Wed Jan 13, 2021 8:53 am, edited 1 time in total.

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

ozsouth
Posts: 1426
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 221 times
Been thanked: 624 times

Re: AMD locks lowest cpu frequency

Post by ozsouth »

@williams2 - I had run your suggestions, but I attach a screeny below to show how insane this situation is.

@bigpup - starts with ondemand, but I've tried that, as well as performance. Also schedutil when I tried kernel 5.8.

Note: is specific to this AMD cpu - all my Intels do not have this issue. Currently replaced hdd containing win10 with blank ssd. Seems to work so long as I do full-shutdowns & not reboots, but I've at times had 4 bootups ok in a row, then slowdowns thereafter. Unpredictable.
Seems something detects a 'foreigner' & chokes the cpu to lower than listed frequency. Just tried Fossapup64 - same issue as in ScPup64.

Attachments
amd_output.jpg
amd_output.jpg (38.15 KiB) Viewed 283 times
User avatar
bigpup
Moderator
Posts: 6543
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 796 times
Been thanked: 1361 times

Re: AMD locks lowest cpu frequency

Post by bigpup »

@bigpup - starts with ondemand, but I've tried that, as well as performance. Also schedutil when I tried kernel 5.8.

That is not the driver that is the governor.

When you start CPU Frequency Scalling Tool
The first window tells what driver is being used.
What is it?

Screenshot.jpg
Screenshot.jpg (32.76 KiB) Viewed 275 times

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

ozsouth
Posts: 1426
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 221 times
Been thanked: 624 times

Re: AMD locks lowest cpu frequency

Post by ozsouth »

@bigpup - sorry - this has got me flustered - driver is standard acpi-cpufreq. Pity AMD has no pstate equivalent. AMD frequency-sensivity shows but not accepted.

And it just got weirder - booted up ScPup64 with ondemand set - Freq 798 showed. Surfed for a while - no change. THEN pulled out ac charger & cpu sped up to 1500, as expected on ondemand. Plugged charger back in - kept up ondemand behaviour. Shutdown & restarted 3 times - same behaviour. Some cpu power policy?

ozsouth
Posts: 1426
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 221 times
Been thanked: 624 times

AMD locks min cpu freq - power?

Post by ozsouth »

OK - I've pinned problem down. It IS a cpu power policy issue, specific to (at least) AMD E2-9000e cpu.
With ondemand set, if I boot up with ac-charger connected, speed locked at 798 until I unplug charger even for a second.
If I boot up without ac-charger plugged in, locked at 798 until I plug in charger, again even if for a second.
Now, how to stop this behaviour?

williams2
Posts: 1037
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 298 times

Re: AMD locks lowest cpu frequency

Post by williams2 »

As a workaround, maybe setting the governor to performance then to ondemand would reset the governor? Or not?
Something like:

Code: Select all

cd /sys/devices/system/cpu/cpufreq/ || exit 1
for core in policy*
do
echo performance >  $core/scaling_governor
echo ondemand >  $core/scaling_governor
max=$(cat $core/cpuinfo_max_freq)
echo $max > $core/scaling_max_freq
done
ozsouth
Posts: 1426
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 221 times
Been thanked: 624 times

AMD locks min cpu freq - fix

Post by ozsouth »

@williams2 - thanks for your thoughtful reply. Didn't work but got me thinking, how to cause temporary power interrupt?
SUSPEND! But then how to automatically wakeup & where to place that script?

Recent puppies have rtcwake, allowing flexible suspend & auto-awakening.
I made an executable script zzz (ran chmod 755 on it in terminal) with sleeps & put it in /root/Startup so as not to cause bootup issues:

Code: Select all

#!/bin/sh
sleep 3
rtcwake -d /dev/rtc0 -m mem -s 1
sleep 1

Crude but effectively fixes issue.

williams2
Posts: 1037
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 298 times

Re: AMD locks lowest cpu frequency

Post by williams2 »

rmmod the cpufreq module then modprobe to reinstall it would reset cpufreq, but I think it would just startup exactly the same as booting.

There are other cpufreq governors in /lib/modules/4.19.23/kernel/drivers/cpufreq/ (in BionicPup's zdrv).
cpufreq_conservative.ko should do about the same thing as pcc-cpufreq.ko.
cpufreq_userspace.ko is very configurable, but you need to install the configuration programs, and run the daemon.

This causes my machine to briefly suspend, for about a second:
xset dpms force suspend

You can suspend by running (again, in BionicPup):
/etc/acpi/actions/suspend.sh

Post Reply

Return to “Users”