if I run as normal user...
#nvidia-settings -a [gpu:0]/GPUGraphicsClockOffset[3]=170
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
ERROR: The control display is undefined; please run `nvidia-settings --help`
for usage information.
THEN:
0.3.4b$ export DISPLAY=:0
0.3.4b$ nvidia-settings -a [gpu:0]/GPUGraphicsClockOffset[3]=170
Attribute 'GPUGraphicsClockOffset' (miguel-desktop:0[gpu:0]) assigned value
170.
IT WORKS!!
Ok, I have to run nvidia-settings as user (crontab -e) and nvidia-smi as root (sudo crontab -e)