CPU_frequency_scaling
-
- Black ninja
- Posts: 71
- Joined: 30 Dec 2015, 12:11
- Distribution: Porteus 4.0 XFCE
- Location: Austria
CPU_frequency_scaling
@Ed_P
how to get info about battery level is still a little miracle for me (in sense of different machines and why which file++++)
I used for the laptop of my nissi (on my laptop with exact the same hardware Slax boots to black screen)
"battery_level=`upower -i $(upower -e | grep BAT) | grep --color=never -E percentage|xargs|cut -d' ' -f2|sed s" from the original script and it was correct - upower did not exist in Slax - so I had to find something else.
Try the command from my Slax script - it seems to be more common and maybe also more precise.....
battery_level=$(cat /sys/class/power_supply/BAT0/capacity)
@donald
"cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq" gives you only the info, how the MHz are in the moment, when you press the enter button.
watch -n 1 "grep \"cpu MHz\" /proc/cpuinfo" - watches permanet - until you kill it with strg+C
how to get info about battery level is still a little miracle for me (in sense of different machines and why which file++++)
I used for the laptop of my nissi (on my laptop with exact the same hardware Slax boots to black screen)
"battery_level=`upower -i $(upower -e | grep BAT) | grep --color=never -E percentage|xargs|cut -d' ' -f2|sed s" from the original script and it was correct - upower did not exist in Slax - so I had to find something else.
Try the command from my Slax script - it seems to be more common and maybe also more precise.....
battery_level=$(cat /sys/class/power_supply/BAT0/capacity)
@donald
"cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq" gives you only the info, how the MHz are in the moment, when you press the enter button.
watch -n 1 "grep \"cpu MHz\" /proc/cpuinfo" - watches permanet - until you kill it with strg+C
-
- Black ninja
- Posts: 71
- Joined: 30 Dec 2015, 12:11
- Distribution: Porteus 4.0 XFCE
- Location: Austria
CPU_frequency_scaling
maybe some more hints to run the test
in XFCE stop xfce4-power-manager or set all settings to nothing - with openbox version you have to do nothing
set xset to "xset dpms 0 0 100" - that only blanks the screen
ensure, that the battery is full - start the script, unplug the wire and look, that nobody touches the laptop....
in XFCE stop xfce4-power-manager or set all settings to nothing - with openbox version you have to do nothing
set xset to "xset dpms 0 0 100" - that only blanks the screen
ensure, that the battery is full - start the script, unplug the wire and look, that nobody touches the laptop....
-
- Full of knowledge
- Posts: 2104
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
CPU_frequency_scaling
@kultex
The thing is that i somehow doubt the measurements in /proc/cpuinfo are correct.
I remember that a grep -i mhz /proc/cpuinfo worked well in port 3.2.2 but not
in 4.0. -- It showed only the max value and i was told that there have been some changes
so this command doesn't show the correct values anymore.
If i compare the values shown by watch -n 1 "grep \"cpu MHz\" /proc/cpuinfo"
and what the xfce4-cpufreq-plugin shows, they are completely different.
( lowest speed step - governor ondemand)
So where does the xfce4-cpufreq-plugin get these values from?
I also do not see any increase in CPU temperature (compared to 3.2.2) that should have
happened if the scaling does not work and the CPU is always running at maximum speed.
The thing is that i somehow doubt the measurements in /proc/cpuinfo are correct.
I remember that a grep -i mhz /proc/cpuinfo worked well in port 3.2.2 but not
in 4.0. -- It showed only the max value and i was told that there have been some changes
so this command doesn't show the correct values anymore.
If i compare the values shown by watch -n 1 "grep \"cpu MHz\" /proc/cpuinfo"
and what the xfce4-cpufreq-plugin shows, they are completely different.
( lowest speed step - governor ondemand)
So where does the xfce4-cpufreq-plugin get these values from?
I also do not see any increase in CPU temperature (compared to 3.2.2) that should have
happened if the scaling does not work and the CPU is always running at maximum speed.
-
- Black ninja
- Posts: 71
- Joined: 30 Dec 2015, 12:11
- Distribution: Porteus 4.0 XFCE
- Location: Austria
CPU_frequency_scaling
@donald
if you dont trust /proc/cpuinfo, here is a script for "cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq"
Here the output of Porteus:
and here the output of Slax:
Running on ideling desktop - only the script runs - and both OS are totally unconfigured - Slax just shows 7 hours more in the timestamp
if you dont trust /proc/cpuinfo, here is a script for "cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq"
Code: Select all
#!/bin/bash
PATH=/usr/local/bin:/usr/bin:/bin
CPU_freq=/sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
logfile="/home/guest/scaling-porteus.log"
while true
do
STATUS=$(cat $CPU_freq)
echo "$(date +"%T") CPU-freq is ${STATUS}" >>$logfile
sleep 1
done
Code: Select all
12:13:10 CPU-freq is 930250
1914733
12:13:11 CPU-freq is 727879
1561647
12:13:12 CPU-freq is 963039
1541928
12:13:13 CPU-freq is 745824
1597095
12:13:14 CPU-freq is 557287
1577041
12:13:15 CPU-freq is 726464
1600008
12:13:16 CPU-freq is 673813
1600019
12:13:17 CPU-freq is 683531
1577389
12:13:18 CPU-freq is 479883
1797325
12:13:19 CPU-freq is 688915
1600011
12:13:20 CPU-freq is 862307
1548108
12:13:21 CPU-freq is 479983
1715945
12:13:22 CPU-freq is 630135
1568281
12:13:23 CPU-freq is 678023
1600008
12:13:25 CPU-freq is 606005
1600005
12:13:26 CPU-freq is 682599
1542331
12:13:27 CPU-freq is 771512
1574880
12:13:28 CPU-freq is 799027
1568022
12:13:29 CPU-freq is 838514
1548809
Code: Select all
19:18:00 CPU-freq is 479980
479980
19:18:01 CPU-freq is 479980
479980
19:18:02 CPU-freq is 479980
479980
19:18:03 CPU-freq is 479980
479980
19:18:04 CPU-freq is 479980
479980
19:18:05 CPU-freq is 479980
1125292
19:18:06 CPU-freq is 479980
479980
19:18:07 CPU-freq is 479980
479980
19:18:08 CPU-freq is 536328
479980
19:18:09 CPU-freq is 479980
479980
19:18:10 CPU-freq is 479980
479980
19:18:11 CPU-freq is 479980
479980
19:18:12 CPU-freq is 479980
479980
19:18:13 CPU-freq is 479980
479980
19:18:14 CPU-freq is 479980
479980
19:18:15 CPU-freq is 479980
479980
19:18:16 CPU-freq is 479980
479980
-
- Full of knowledge
- Posts: 2104
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
CPU_frequency_scaling
Output of port 4_64-xfce on usb thumb-drive
There is a peak.
My main OS - port 3.2.2_32-xfce on HDD - has none.
Code: Select all
03:31:43 CPU-freq is 1000000
1000000
03:31:44 CPU-freq is 1000000
1000000
03:31:45 CPU-freq is 1000000
1000000
03:31:46 CPU-freq is 1000000
1000000
03:31:47 CPU-freq is 1000000
1000000
03:31:48 CPU-freq is 1000000
1000000
03:31:49 CPU-freq is 1000000
1000000
03:31:50 CPU-freq is 1000000
1000000
03:31:51 CPU-freq is 1000000
1000000
03:31:52 CPU-freq is 1000000
1000000
03:31:53 CPU-freq is 1000000
1000000
03:31:54 CPU-freq is 2600000 <--
2600000
03:31:55 CPU-freq is 1000000
1000000
03:31:56 CPU-freq is 1000000
1000000
03:31:58 CPU-freq is 1000000
1000000
03:31:59 CPU-freq is 1000000
1000000
03:32:00 CPU-freq is 1000000
1000000
03:32:01 CPU-freq is 1000000
1000000
03:32:02 CPU-freq is 1000000
1000000
03:32:03 CPU-freq is 1000000
1000000
My main OS - port 3.2.2_32-xfce on HDD - has none.
-
- Black ninja
- Posts: 71
- Joined: 30 Dec 2015, 12:11
- Distribution: Porteus 4.0 XFCE
- Location: Austria
CPU_frequency_scaling
the peak is absolutely ok. Maybe that the problem effects only low power CPUs
whats your CPU? AMD-Athlon-X2-5200? - if so there should not be much difference with my Celeron N3050 - the only thing is, that your idle power should be round 30 - 40W and the idle power of the Celeron is around 2W
so it would be interesting to get the results of newer AMD and Intel CPUs
how to run the script?
open mousepad, copy the script in the empty file, save it as scaling.sh, open the terminal and run it with - guest@porteus:~$ bash scaling.sh
whats your CPU? AMD-Athlon-X2-5200? - if so there should not be much difference with my Celeron N3050 - the only thing is, that your idle power should be round 30 - 40W and the idle power of the Celeron is around 2W
so it would be interesting to get the results of newer AMD and Intel CPUs
how to run the script?
open mousepad, copy the script in the empty file, save it as scaling.sh, open the terminal and run it with - guest@porteus:~$ bash scaling.sh
-
- Black ninja
- Posts: 71
- Joined: 30 Dec 2015, 12:11
- Distribution: Porteus 4.0 XFCE
- Location: Austria
CPU_frequency_scaling
Here the output of Porteus openbox, which is slightly better (the first CPU stays more in the deepest powerstate - I think C3)
Code: Select all
01:54:09 CPU-freq is 784428
1643435
01:54:10 CPU-freq is 948837
1600019
01:54:11 CPU-freq is 745810
1600008
01:54:12 CPU-freq is 690189
1541985
01:54:14 CPU-freq is 652093
1548908
01:54:15 CPU-freq is 480146
1775370
01:54:16 CPU-freq is 514471
1910701
01:54:17 CPU-freq is 480000
1856630
01:54:18 CPU-freq is 480000
1760043
01:54:19 CPU-freq is 480000
1760023
01:54:20 CPU-freq is 480000
1760023
01:54:21 CPU-freq is 480000
1777387
01:54:22 CPU-freq is 480107
1911213
01:54:23 CPU-freq is 480000
1911906
-
- Full of knowledge
- Posts: 2104
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
CPU_frequency_scaling
--> whats your CPU? <--
AMD Athlon(tm) 64 X2 Dual Core Processor 5000+
--> output of Porteus openbox, which is slightly better <--
Hmm..if i'm not mistaken,the kernel- xorg- and core modules are the same,
only the DE-module is different.
I tend to say that using a "heavier" desktop does only do a bit more background work,
which forces your CPU to scale.
AMD Athlon(tm) 64 X2 Dual Core Processor 5000+
--> output of Porteus openbox, which is slightly better <--
Hmm..if i'm not mistaken,the kernel- xorg- and core modules are the same,
only the DE-module is different.
I tend to say that using a "heavier" desktop does only do a bit more background work,
which forces your CPU to scale.
-
- Black ninja
- Posts: 71
- Joined: 30 Dec 2015, 12:11
- Distribution: Porteus 4.0 XFCE
- Location: Austria
CPU_frequency_scaling
I think, that the higher CPU-frequencies are caused by errors - I think mainly by xorg errors. You see them, when you shut down. The problem is, that I dont find them in any log - so I dont see, how often they are per second.
If you have 20 or 30 errors per second, the CPU never goes to deep C states.
If my theory is right, then the open box has less errors and therefor better cpu frequencies......
Do you have any idea, where to find these errors?
If you have 20 or 30 errors per second, the CPU never goes to deep C states.
If my theory is right, then the open box has less errors and therefor better cpu frequencies......
Do you have any idea, where to find these errors?
-
- Full of knowledge
- Posts: 2104
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
CPU_frequency_scaling
Maybe the debug cheatcode will reveal some useful information.
and/or
[SOLVED] Shutdown log file.
and
Re: How to see terminal screen msgs (Post by fanthom #20762)
and/or
[SOLVED] Shutdown log file.
and
Re: How to see terminal screen msgs (Post by fanthom #20762)
-
- Black ninja
- Posts: 71
- Joined: 30 Dec 2015, 12:11
- Distribution: Porteus 4.0 XFCE
- Location: Austria
CPU_frequency_scaling
donald, thank you for the terminal screen msg link - that was exacty, what I was looking for - sorry, that I did not find it.....
strange, that this thing was six years ago a performance issue and now for me its a energy / power issue - one hour less battery live (more than 10%) is not nothing (at least for me).
so I am off until Tuesday - I have to finish a project.........
strange, that this thing was six years ago a performance issue and now for me its a energy / power issue - one hour less battery live (more than 10%) is not nothing (at least for me).
so I am off until Tuesday - I have to finish a project.........
-
- Black ninja
- Posts: 71
- Joined: 30 Dec 2015, 12:11
- Distribution: Porteus 4.0 XFCE
- Location: Austria
CPU_frequency_scaling
I did some more tests under more realistic circumstances - running the script + Chromium with Proteus Forum logged in - with the jumping Smilies - they produce quite a lot of CPU-load on my laptop (about 59% compared to about 20% when I am not logged in)
Porteus LXDE: 9 hours
Script and test started 13:05:13 - Battery level is 100%
Sleep 22:05:19 - Battery level is 5%
Porteus Openbox: 9 hours 5min - so nearly no difference
Script and test started 02:11:23 - Battery level is 100%
Sleep 11:16:29 - Battery level is 5%
SLAX: 11 hours 5min
Script and test started 12:44:30 - Battery level is 100%
Sleep 23:49:32 - Battery level is 4%
That means, that under Slax is no difference to the last tests - I will redo them and see, if I did somethinng wrong.....
Porteus LXDE: 9 hours
Script and test started 13:05:13 - Battery level is 100%
Sleep 22:05:19 - Battery level is 5%
Porteus Openbox: 9 hours 5min - so nearly no difference
Script and test started 02:11:23 - Battery level is 100%
Sleep 11:16:29 - Battery level is 5%
SLAX: 11 hours 5min
Script and test started 12:44:30 - Battery level is 100%
Sleep 23:49:32 - Battery level is 4%
That means, that under Slax is no difference to the last tests - I will redo them and see, if I did somethinng wrong.....
-
- Black ninja
- Posts: 71
- Joined: 30 Dec 2015, 12:11
- Distribution: Porteus 4.0 XFCE
- Location: Austria
CPU_frequency_scaling
I have redone all tests and all are quite the same as I wrote (only some minutes difference)
Next month no time - I will continue end of Oktober to search why .......
Next month no time - I will continue end of Oktober to search why .......