Recommended way to change CPU governor (MX23)

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
retroD0d0
Posts: 74
Joined: Sat Aug 17, 2024 4:36 pm

Recommended way to change CPU governor (MX23)

#1 Post by retroD0d0 »

Hey Everyone, I wanted to know if there was a recommended way to change (and persist) CPU Governor mode. I remember using cpufrequtils in the past. Ideally a GUI utility to be able to change easily when needed. Didn't MX have something like this once in MX Tweak?

Code: Select all

Snapshot created on: 20250530_0142
System:
  Kernel: 5.10.230-antix.1-amd64-smp arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.10.230-antix.1-amd64-smp root=UUID=<filter> ro quiet
    splash
  Desktop: Xfce v: 4.20.0 tk: Gtk v: 3.24.38 info: xfce4-panel wm: xfwm v: 4.20.0 vt: 7
    dm: LightDM v: 1.32.0 Distro: MX-23.6_x64 Libretto May 19  2024 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Desktop Mobo: ASUSTeK model: M4A78-VM v: Rev X.0x serial: <superuser required>
    BIOS: American Megatrends v: 0601 date: 04/08/2009
CPU:
  Info: model: AMD Phenom II X2 545 bits: 64 type: MCP arch: K10 level: v1 built: 2009-13
    process: AMD 45nm family: 0x10 (16) model-id: 4 stepping: 2 microcode: 0x10000DB
  Topology: cpus: 1x cores: 2 smt: <unsupported> cache: L1: 256 KiB desc: d-2x64 KiB; i-2x64 KiB
    L2: 1024 KiB desc: 2x512 KiB L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 800 min/max: 800/3000 boost: disabled scaling: driver: acpi-cpufreq
    governor: ondemand cores: 1: 800 2: 800 bogomips: 12032
  Flags: ht lm nx pae sse sse2 sse3 sse4a svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass status: Not affected
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, STIBP: disabled, RSB filling, PBRSB-eIBRS: Not
    affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Caicos PRO [Radeon HD 7450] vendor: PC Partner / Sapphire driver: radeon v: kernel
    arch: TeraScale-2 code: Evergreen process: TSMC 32-40nm built: 2009-15 pcie: gen: 2 speed: 5 GT/s
    lanes: 16 ports: active: HDMI-A-1 empty: DVI-D-1,VGA-1 bus-ID: 01:00.0 chip-ID: 1002:677b
    class-ID: 0300 temp: 34.5 C
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.20.0 driver: X: loaded: radeon
    unloaded: fbdev,modesetting,vesa dri: r600 gpu: radeon display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 509x286mm (20.04x11.26") s-diag: 584mm (22.99")
  Monitor-1: HDMI-A-1 mapped: HDMI-0 model: FPDAS---J1 serial: <filter> built: 2011
    res: 1920x1080 hz: 60 dpi: 305 gamma: 1.2 size: 160x90mm (6.3x3.54") diag: 184mm (7.2")
    ratio: 16:9 modes: max: 1920x1080i min: 720x400
  API: OpenGL v: 4.5 Mesa 22.3.6 renderer: AMD CAICOS (DRM 2.50.0 / 5.10.230-antix.1-amd64-smp
    LLVM 15.0.6) direct-render: Yes
Audio:
  Device-1: AMD SBx00 Azalia vendor: ASUSTeK driver: snd_hda_intel v: kernel bus-ID: 00:14.2
    chip-ID: 1002:4383 class-ID: 0403
  Device-2: AMD Caicos HDMI Audio [Radeon HD 6450 / 7450/8450/8490 OEM R5 230/235/235X OEM]
    vendor: PC Partner / Sapphire driver: snd_hda_intel v: kernel pcie: gen: 2 speed: 5 GT/s
    lanes: 16 bus-ID: 01:00.1 chip-ID: 1002:aa98 class-ID: 0403
  API: ALSA v: k5.10.230-antix.1-amd64-smp status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK driver: r8169
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: e800 bus-ID: 03:00.0 chip-ID: 10ec:8168
    class-ID: 0200
  IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter>
  Device-2: Qualcomm Atheros AR922X Wireless Network Adapter driver: ath9k v: kernel modules: wl
    bus-ID: 04:07.0 chip-ID: 168c:0029 class-ID: 0280
  IF: wlan0 state: down mac: <filter>
Drives:
  Local Storage: total: 223.57 GiB used: 90.59 GiB (40.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Toshiba model: Q300. size: 223.57 GiB block-size:
    physical: 512 B logical: 512 B speed: 3.0 Gb/s type: SSD serial: <filter> rev: 12.3 scheme: MBR
Partition:
  ID-1: / raw-size: 223.57 GiB size: 219 GiB (97.96%) used: 90.59 GiB (41.4%) fs: ext4
    dev: /dev/sda1 maj-min: 8:1
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 3 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
  System Temperatures: cpu: 39.0 C mobo: 33.0 C gpu: radeon temp: 34.0 C
  Fan Speeds (RPM): cpu: 1054 psu: 0 case-1: 1413
  Power: 12v: 12.08 5v: N/A 3.3v: 3.18 vbat: N/A
Repos:
  Packages: 2125 pm: dpkg pkgs: 2108 libs: 1031 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 17
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list
    1: deb [arch=amd64 signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/megasync.list
    1: deb [signed-by=/usr/share/keyrings/meganz-archive-keyring.gpg] https://mega.nz/linux/repo/Debian_12/ ./
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb https://mxlinux.mirror.liquidtelecom.com/packages/mx/repo/ bookworm main non-free
  Active apt repos in: /etc/apt/sources.list.d/onlyoffice.list
    1: deb https://download.onlyoffice.com/repo/debian/ squeeze main
  No active apt repos in: /etc/apt/sources.list.d/vscodium.list
Info:
  Processes: 192 Uptime: 10m wakeups: 1 Memory: 7.76 GiB used: 1.55 GiB (19.9%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)
Last edited by retroD0d0 on Thu Jun 12, 2025 1:46 am, edited 1 time in total.

Nokkaelaein
Posts: 279
Joined: Fri Jul 17, 2020 10:32 am

Re: Recommended way to change CPU governor (MX23)

#2 Post by Nokkaelaein »

My roundabout answer :) (don't worry, it does arrive at a useful point, haha) : I still use a tool(set) called Cadence for managing the audio backends in my system, at least when preferring a nice consolidated GUI tool for the job. It's not being developed further, but at the moment is still exceptionally usable for this task in a system configuration such as my own (as I use direct ALSA and JACK for professional audio applications - and, when needed, PulseAudio bridged to JACK for consumer grade software - instead of PipeWire). Among the settings one can access through this tool, Cadence has a nice no-frills dropdown menu for selecting the CPU Scaling Governor, as that is quite a central piece of an audio workstation configuration. I usually always control the governor just by using that convenient menu, and from nowhere else. Why am I mentioning this, as it's not realistic or even usable to install Cadence on a PipeWire system, or to expect someone to install this just for the governor setting alone, anyway?

Behind the scenes, the setting in Cadence is actually interfacing with indicator-cpufreq, which you can install separately for example using the MX Package Installer. To my recollection, when installed separately like this, and used by itself, it will give you a simple, to-the-point systray icon which you can use to configure the CPU speed/governor. It's been a while since I checked this (as I, like described above, always use the selection in Cadence instead), but I reckon it's well worth trying out if you want a straightforward GUI tool like this! YMMV, if it doesn't work as expected, then my bad. But it's nice if it works =). Other than that, check cpupower-gui.

User avatar
AVLinux
Posts: 2998
Joined: Wed Jul 15, 2020 1:15 am

Re: Recommended way to change CPU governor (MX23)

#3 Post by AVLinux »

Hi,
Future note, it seems cpufrequtils has been pulled from Debian Trixie so you might as well figure out the new way now. In AV Linux cpufrequtils and a simple frontend for it was used so I'm sad to see it go but it seems indicator-cpufreq or cpupower are the best candidates now.

BitterTruth
Posts: 620
Joined: Tue Sep 22, 2020 7:36 pm

Re: Recommended way to change CPU governor (MX23)

#4 Post by BitterTruth »

I use cpupower to set it at login time.

1. Create a script using the following:

Code: Select all

#!/bin/bash

#change the governor to performance using cpupower (needs to be installed: linux-cpupower)

cpupower frequency-set --governor performance
2. save it anywhere and make it executable.
3. add it to 'session and startup' so that it runs on login
4. add the following to the sudoers file so that the script can run the command with elevated privileges without having you type the sudo password

Code: Select all

%sudo  ALL=(root)  NOPASSWD: /path/to/script.sh

https://wiki.debian.org/CpuFrequencySca ... h_cpupower

retroD0d0
Posts: 74
Joined: Sat Aug 17, 2024 4:36 pm

Re: Recommended way to change CPU governor (MX23)

#5 Post by retroD0d0 »

Thanks to you all @Nokkaelaein @AVLinux @BitterTruth for the suggestions. I am still tinkering, trying to find the cleanest solution. I think the main challenge is to have the Governor easy to change (ideally by GUI) and persisted across sessions/reboots.


indicator-cpu is the kind of system tray applet I am looking for, easy to change, but the settings don't persist across sessions. @Nokkaelaein was suggesting Cadence but it means using a third party repo, which is always a last resort for me. Is there another simple,clean way to get the indicator-cpu configs to persist across reboots?


Thanks again folks, I'll report back when I have got everything working as intended hopefully.

Nokkaelaein
Posts: 279
Joined: Fri Jul 17, 2020 10:32 am

Re: Recommended way to change CPU governor (MX23)

#6 Post by Nokkaelaein »

retroD0d0 wrote: Sun Jun 15, 2025 9:58 am @Nokkaelaein was suggesting Cadence but it means using a third party repo, which is always a last resort for me.
No no no, I was not suggesting Cadence :). Like I wrote, it is "not realistic or even usable to install Cadence on a PipeWire system, or to expect someone to install this just for the governor setting alone" ; I wrote that as background information on how I personally have come to use indicator-cpufreq. If anything, I would advise against installing Cadence from outside sources unless you know exactly what it does, how it does it, and that you have a matching use case on a customized media workstation that benefits from having a tool like that installed.

retroD0d0
Posts: 74
Joined: Sat Aug 17, 2024 4:36 pm

Re: Recommended way to change CPU governor (MX23)

#7 Post by retroD0d0 »

Nokkaelaein wrote: Sun Jun 15, 2025 10:09 am
retroD0d0 wrote: Sun Jun 15, 2025 9:58 am @Nokkaelaein was suggesting Cadence but it means using a third party repo, which is always a last resort for me.
No no no, I was not suggesting Cadence :).
Sorry @Nokkaelaein (I got caught on the roundabout with that answer ;) ) I got confused and thought you meant that Cadence augmented indicator-cpu in some way and it was wise to install both. So, actually when you mentioned indicator-cpu, I was curious, and went and installed it straightaway. You're right, it does do pretty much what I need (By an MX dev - so what do you expect!). However, I would like if it persisted the setting across reboots.

Regarding cpupower-gui, it isn't in the bookworm repos and I hesitate to install anything that hasn't passed the strict debian regimen. I'll see - I'll see. As AVLinux suggests, it is one for the future, for sure, from trixie onwards.

Post Reply

Return to “MX Help”