You are not logged in.

#1 2022-02-17 07:00:18

Nan123
Member
Registered: 2021-01-24
Posts: 83

[SOLVED] Unable to set persistant CPU boost settings

Hi, I have been following the wiki and enabled CPU boost on my ryzen cpu with this command: "sudo echo 1 > /sys/devices/system/cpu/cpufreq/boost" not sure if this is relevent, but even with sudo, it returns permission denied, but switching  to the root account and running: "echo 1 > /sys/devices/system/cpu/cpufreq/boost" works. That aside, echoing the file returns 1, as expected, but this isn't persistent on reboot. Am I doing something wrong? Or is this intended behavior? Thanks.

Last edited by Nan123 (2022-02-17 09:15:54)

Offline

#2 2022-02-17 08:40:32

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,292

Re: [SOLVED] Unable to set persistant CPU boost settings

this is intended and expected behaviour. /sys is a virtual file system that exposes kernel interfaces and gets recreated on every boot with the normal kernel/hardware defaults.

There are multiple ways of setting this on boot, you can either create a small systemd service or use udev rules or systemd tmpfiles, se: https://wiki.archlinux.org/title/CPU_fr … _permanent for some options specifically targeted towards changing cpu params.

PS You get permission denied with sudo because you elevate the echo 1 and not the > shell redirection which happens as your normal user, to do it without changing to a root shell you can e.g. elevate a tee or so

echo 1 | sudo tee /sys/devices/system/cpu/cpufreq/boost
sudo bash -c "echo 1 > /sys/devices/system/cpu/cpufreq/boost"

Last edited by V1del (2022-02-17 08:47:03)

Offline

#3 2022-02-17 08:41:18

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,237
Website

Re: [SOLVED] Unable to set persistant CPU boost settings

Not SysAdmin. Moving to NC.

Offline

#4 2022-02-17 08:46:27

Nan123
Member
Registered: 2021-01-24
Posts: 83

Re: [SOLVED] Unable to set persistant CPU boost settings

V1del wrote:

this is intended and expected behaviour. /sys is a virtual file system that exposes kernel interfaces and gets recreated on every boot with the normal kernel/hardware defaults.

There are multiple ways of setting this on boot, you can either create a small systemd service or use udev rules or systemd tmpfiles, se: https://wiki.archlinux.org/title/CPU_fr … _permanent for some options specifically targeted towards changing cpu params.

PS You get permission denied with sudo because you elevate the echo 1 and not the > shell redirection which happens as your normal user, to do it without changing to a root shell you can e.g. elevate a tee or so "echo 1 | sudo tee /sys/devices/system/cpu/cpufreq/boost"

you live and you learn, thanks!

Offline

#5 2022-02-17 08:51:30

Nan123
Member
Registered: 2021-01-24
Posts: 83

Re: [SOLVED] Unable to set persistant CPU boost settings

V1del wrote:

this is intended and expected behaviour. /sys is a virtual file system that exposes kernel interfaces and gets recreated on every boot with the normal kernel/hardware defaults.

There are multiple ways of setting this on boot, you can either create a small systemd service or use udev rules or systemd tmpfiles, se: https://wiki.archlinux.org/title/CPU_fr … _permanent for some options specifically targeted towards changing cpu params.

PS You get permission denied with sudo because you elevate the echo 1 and not the > shell redirection which happens as your normal user, to do it without changing to a root shell you can e.g. elevate a tee or so

echo 1 | sudo tee /sys/devices/system/cpu/cpufreq/boost
sudo bash -c "echo 1 > /sys/devices/system/cpu/cpufreq/boost"

How would you exactly set this with a udev rule? I have cpupower enabled for scaling but AFAIK you can't have that enable boost.

EDIT: Got it, Thanks.

Last edited by Nan123 (2022-02-17 09:15:25)

Offline

Board footer

Powered by FluxBB