I tried one more time. Tried your oc.sh - the same errors.
I can't set clock or fan speed. The same errors.
Via Nvidia X Server Settings I also can't to set clocks or fans speed. Just read, or set PowerMizer profile. Is it ok?
Maybe special configuration of MB bios? Maybe I must disable internal GPU and use NVIDIA?
I tried to view available clocks via nvidia-smi and see that it is N/A. Is it normal?
I am using MSI GTX1070 8G Gaming X. Maybe I need to flash some "unlocked bios" to change clocks?