Difference between revisions of "CPU"

From FriendlyELEC WiKi
Jump to: navigation, search
(S5P4418/S5P6818 降低CPU频率)
Line 1: Line 1:
==S5P4418/S5P6818 降低CPU频率==
+
==S5P4418/S5P6818 锁定CPU的最高频率==
 
===Method 1===
 
===Method 1===
 
The following command is used to temporarily limit the maximum CPU frequency to 1GHz:  
 
The following command is used to temporarily limit the maximum CPU frequency to 1GHz:  

Revision as of 07:38, 16 November 2018

1 S5P4418/S5P6818 锁定CPU的最高频率

1.1 Method 1

The following command is used to temporarily limit the maximum CPU frequency to 1GHz: echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq


1.2 Method 2

Modify the kernel source code:

arch/arm/plat-s5p4418/nanopi2/device.c

Delete the unwanted frequencies in the following array:

static unsigned long dfs_freq_table[][2] = {
    { 1400000, 1200000, },
    { 1200000, 1120000, },
    { 1000000, 1040000, },
    {  800000, 1000000, },
    {  700000,  940000, },
    {  600000,  940000, },
    {  500000,  940000, },
    {  400000,  940000, },
};

2 获取CPU温度

读取以下文件获得当前的CPU温度:
S5P4418/S5P6818:
/sys/class/hwmon/hwmon0/device/temp_label
Allwinner H3/H5/A64:
/sys/class/thermal/thermal_zone0/temp
RK3399:
/sys/class/thermal/thermal_zone0/temp