On systemctl enable service Unable to write kernel cpu file

  1. My laptop does not have Turbo Boost enabled by default. I need to change the value of the no_turbo file to 0 in order to enable Turbo Boost.
  2. So, i created a systemd service to modify this value.
  3. Now I am encountering a problem; set “systemctl enable my_service” and reboot. service cannot edit “no_turbo” file.
  4. Manually “systemctl start my_service” or directly writing to the file, all is normal.

‘’’

at enable my_service, This is the error message.

Nov 22 15:45:52 zedeun-hins sudo[593]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Nov 22 15:45:52 zedeun-hins sudo[595]: 0
Nov 22 15:45:52 zedeun-hins sudo[595]: tee: /sys/devices/system/cpu/intel_pstate/no_turbo: Operation not permitted
‘’’
my config


A few things:

  • Don’t post text files or output as images
  • The actual error you are receiving is being truncated so we can’t read it.
  • Remove sudo and tee. The service file runs as root you don’t need any of that.

i tryed del sudo, but still not working.
I have been try solving this problem all day today, I :sob:.
i tryed:

‘’‘’
/bin/bash -c “echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo”
‘’‘’