LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-10-2019, 08:53 AM   #1
marbangens
Member
 
Registered: Aug 2012
Location: sweden
Distribution: Slackware, Fedora
Posts: 116

Rep: Reputation: Disabled
Rebuilding the kernel or set cpu scaling


Hey Im a bit frustrated I cpu scaling governor is set to powersave when I want it to be on performance, when I build the kernle for the first time I had the ide of keeping the powersave governor i case I would go away from the computer and not have any heavy stuff loaded. I want to use the computer for audio production with mixbus ardour and renoise. I use jack2 and ffado.

Here is the thing I set the default scaling governor to performance in the kernel when it was configured. It is set on powersave anyway,aaaaaahhhhh. I change it with xfce cpu-frequesy panel plugin it gose back to powersave and if I do it with cpufreq-set command it also gose back to powersave. and now when I remove powersave governor from kernel configuration and recompiled and installed new kernel with this

Code:
make bzImage modules
make modules_install
cp arch/x86/boot/bzImage /boot/vmlinuz (my old was /boot/vmlinuz)
cp System.map /boot/System.map
cp .config /boot/config

recompiled nvidia-kernel and initrd

eliloconfig
What the actual fuck is wrong? Is powersave on everywhere now? Microwave and fridge and in my dreams now too?
 
Old 02-10-2019, 10:43 AM   #2
RadicalDreamer
Member
 
Registered: Jul 2016
Location: USA
Distribution: Slackware64-Current
Posts: 948

Rep: Reputation: 440Reputation: 440Reputation: 440Reputation: 440Reputation: 440
What is your CPU? What does your
Code:
/etc/rc.d/rc.cpufreq
show it being set on by default?
Code:
SCALING_GOVERNOR=performance
?
 
Old 02-10-2019, 03:22 PM   #3
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 904

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
@marbangens
In addition to RadicalDreamer's request, what Slackware version are you running now? Note that in Slackware -current there were some changes in the way the governor policy is set (whole history):
https://www.linuxquestions.org/quest...or-4175637326/

And you definitely don't need to recompile the kernel for setting up the CPU scaling.
 
Old 02-10-2019, 05:47 PM   #4
marbangens
Member
 
Registered: Aug 2012
Location: sweden
Distribution: Slackware, Fedora
Posts: 116

Original Poster
Rep: Reputation: Disabled
I use 14.1 and there is no rc.cpufreq
 
Old 02-10-2019, 06:18 PM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 current / Linux Mint / Debian / Void Linux
Posts: 7,910

Rep: Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606
most linux os i seen it is set by a different means, Slackware has a rc file to set it upon booting, I have this script I use to set it one way or the other you may find it useful in one manner or the other.

Code:
$ cat shiftgears
#!/bin/bash

whatisit="$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)"

if [[ "$whatisit" == 'performance' ]] ;
then
  echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
else
  echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
fi
 
1 members found this post helpful.
Old 02-10-2019, 06:30 PM   #6
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 904

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
@marbangens
Not sure what kernel are you using or what have you disabled/enabled during your compilation, but for a normal "stock" kernel, you can use the following hints.

Depending on the CPU in use, you forgot to mention that, the kernel will automatically choose a driver. For recent X86 systems, the main CPUs come from either AMD or Intel, acpi-cpufreq will be loaded for AMD and older Intel CPUs, and intel_pstate for Intel's newer (core series).
This table provides you with more info:
https://wiki.archlinux.org/index.php...equency_driver

You can investigate what driver is loaded on your system by:
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
And check also what governors are available (intel_pstate has fewer):
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
To activate the performance governor, you can use:
Code:
echo performance  | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor 1> /dev/null 2> /dev/null
(can put it in /etc/rc.d/rc.local)

And check if it's active:
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Lecture:
https://www.kernel.org/doc/Documenta...user-guide.txt
https://www.kernel.org/doc/Documenta.../governors.txt
 
Old 02-10-2019, 07:30 PM   #7
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 current / Linux Mint / Debian / Void Linux
Posts: 7,910

Rep: Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606Reputation: 1606
for slackware ( current ) look at your /etc/rc.d/rc.cpufreq it sets your cpu
Code:
userx@voided.net:/run/media/userx/slackware/etc/rc.d
$ ls -la rc.cpufreq
-rwxr-xr-x 1 root root 3328 Sep  4 17:22 rc.cpufreq
it should already be executable, but if not then make it so... if you do not have it because you're not running current, then go get it off the current branch and I am sure it'd work. ( I use current, so I am not really up on whatever is in 14.2). Don't forget to open it up and take a peek at it, so you can see what it is doing.

Last edited by BW-userx; 02-10-2019 at 07:31 PM.
 
Old 02-11-2019, 01:05 AM   #8
ehartman
Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 374

Rep: Reputation: 166Reputation: 166
Quote:
Originally Posted by marbangens View Post
I use 14.1 and there is no rc.cpufreq
As far as I know 14.1 is still using the 3.10 kernel and I don't think it supports CPU frequency scaling. You didn't say what CPU you're using, but it may not support it either.
 
Old 02-11-2019, 02:03 AM   #9
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 904

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
@ehartman
https://www.thinkwiki.org/wiki/How_t...ing_the_Kernel
 
Old 02-11-2019, 03:34 AM   #10
ehartman
Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 374

Rep: Reputation: 166Reputation: 166
Quote:
Originally Posted by abga View Post
I admit I never looked into the scaling capabilities as my CPU is only a Core2 Duo E7600 and IT doesn't support Intel Turbo Boost Technology etc. so frequency scaling is a no-no anyway.

But a lot of the replies were for Slackware 14.2 or -current and the OP did mention he was using 14.1 still, which by default is using a 3.10 kernel and did not have a rc.cpufreq startup script (nor a call to that in rc.M) yet.
Of course that can be adapted to (I'm actually using the -current versions of those scripts), but the OP may not have done that either.

Last edited by ehartman; 02-11-2019 at 03:36 AM. Reason: Some more explanation
 
Old 02-11-2019, 04:13 AM   #11
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 904

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
@ehartman
Your Core2 Duo E7600 has dynamic frequency scaling and is supported by the acpi-cpufreq driver, you might want to use it. The intel_pstate driver might be also already available in 3.10, I can't remember exactly, but found this confirmation:
https://github.com/RRZE-HPC/likwid/w...setFrequencies
However, your CPU is not supported and will use the older acpi-cpufreq.

As for the nonexistence of rc.cpufreq in 14.1, that's why I suggested to work directly with the /sys/devices/system/cpu/ lines and use rc.local.
 
Old 02-11-2019, 04:48 AM   #12
marbangens
Member
 
Registered: Aug 2012
Location: sweden
Distribution: Slackware, Fedora
Posts: 116

Original Poster
Rep: Reputation: Disabled
the cpu is i7 intel
Code:
root@SlackStudio:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
intel_pstate
Code:
root@SlackStudio:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
performance powersave

Last edited by marbangens; 02-11-2019 at 05:00 AM.
 
Old 02-11-2019, 05:13 AM   #13
marbangens
Member
 
Registered: Aug 2012
Location: sweden
Distribution: Slackware, Fedora
Posts: 116

Original Poster
Rep: Reputation: Disabled
I seem to be working using
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor 1> /dev/null 2> /dev/null
 
Old 02-11-2019, 03:36 PM   #14
ehartman
Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 374

Rep: Reputation: 166Reputation: 166
Quote:
Originally Posted by abga View Post
@ehartman
Your Core2 Duo E7600 has dynamic frequency scaling and is supported by the acpi-cpufreq driver, you might want to use it. The intel_pstate driver might be also already available in 3.10, I can't remember exactly, but found this confirmation:
I'm not planning to use the 3.10 kernel, it is just too old.
I was only mentioning that kernel release because it was possible the OP was using that as he mentioned he was using Slackware 14.1.

But thanks about the info about my CPU. I already knew a lot about this model as the HP xw4600 was, when I was still working, one of the standard workstations we used at the university, so the (PXE) image I created for that model had to enable the things we wanted to be usable by the (mostly Master) students.
My actual workstation is a little bit different from those as its an somehwat older model with a 3.0 GHz E7600 while the ones at the uni were 3.1 GHz (forgot the exact CPU type).
But at that time (I was using openSUSE 11.x at the time) we didn't look at cpu frequency scaling (we did look at virtualisation instructions and getting as much performance out of it as we could).
But it's been a while and I don't remember all of the things we did then (I'm talking about 2011 or so).
 
  


Reply

Tags
cpu, scaling


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Unusual CPU Temperature Increase (CPU Scaling). cwizardone Slackware 26 02-04-2016 10:43 AM
rebuilding a failed portion of a SlackBuilds build, instead of rebuilding everything Geremia Slackware 26 01-21-2015 06:56 PM
cpu frequency scaling with Pentium(R) Dual-Core CPU E5200 @ 2.50GHz tramni1980 Slackware 5 08-16-2009 09:29 AM
Which cpu family should I select when rebuilding kernel... trist007 Linux - Newbie 2 03-25-2009 01:24 PM
Kernel Upgrade seems to have killed cpu frequency scaling on a Pentium M Laptop xpromisex Linux - Laptop and Netbook 0 04-23-2006 08:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration