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

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
  • 104,528