Need to launch a command at boot-up as root


I’m trying to find a way to launch this command at start-up as root.

echo "1" | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo 

I’ve tried Kcron (from the kde settings menu) but I don’t see any way to specify that it must be run as root.

Thanks !

Create a systemd service in /etc/system/systemd and enable…

# /etc/systemd/system/intel_turbo.service

Description=Disable intel pstate turbo

ExecStart=/bin/sh -c "echo '1' > /sys/devices/system/cpu/intel_pstate/no_turbo"


Thanks, that’s perfect :smiley:

Although the recommendation may work,
I’d think that type of command which is actually to set a CPU parameter would likely have been better executed as a boot parameter…


Maybe, it’s not modular, but if it doesn’t work then sysfs is the way… intel_pstate=no_turbo or intel_pstate.no_turbo=1 should work as a boot option…