0

I'm trying to change content of system file, buy without success. chown by me. i m able to open and save file, but once o open again, it resets.

echo 5>/sys/class/drm/card0/device/pp_sclk_od 

gives no error, but file stays the same. as far as i get file used by the system.

Please advice how to change it. thanks.

I want to build script to change couple files from same directory.

thanks

aleXela
  • 111
  • 2

1 Answers1

0

First, do not change ownership or permissions of system files, doing so can break ubuntu. Most are owned by root and keep them that way.

Second, if you have not already, read up on permissions and sudo

https://help.ubuntu.com/community/FilePermissions

https://help.ubuntu.com/community/RootSudo

These are important for security issues.

Third, rather than editing these files you can usually edit a configuration file somewhere.

Fourth run from a root shell:

sudo -i
echo 5>/sys/class/drm/card0/device/pp_sclk_od 

And fifth, if you want to redirect with sudo use tee or similar

echo 5 | sudo tee >/sys/class/drm/card0/device/pp_sclk_od

See When using sudo with redirection, I get 'permission denied' for details

Panther
  • 102,067
  • i played around to get it working. ill get back permissions. TEE option didnt helped. tried already. i need to change these files, there is no configuration for it. – aleXela Sep 16 '17 at 15:21
  • If it is not working you need to post the command you ran. Also we need more details – Panther Sep 16 '17 at 15:23
  • both options not working. used exactly as you wrote: sudo -i echo 5>/sys/class/drm/card0/device/pp_sclk_od same result. file not changed – aleXela Sep 16 '17 at 15:24
  • files are from amd video driver. holding setting values i need to change. i found that some people did managed to change it with ease. i cant – aleXela Sep 16 '17 at 15:26
  • is there some mode that will not use those files so i could change them? – aleXela Sep 16 '17 at 15:27
  • So identify your card and explain what you are trying to do. The redirect methods I gave you work, but may not be the way to change your settings. – Panther Sep 16 '17 at 15:28
  • rx570 amd trying to change memory and cpu clock values (and i know that's possible) – aleXela Sep 16 '17 at 15:40