Author

Topic: Nvidia overclock from crontab Xubuntu (Read 352 times)

jr. member
Activity: 76
Merit: 1
September 10, 2017, 06:14:45 AM
#3
Run nvidia-settings as your user instead of root.

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)
hero member
Activity: 630
Merit: 502
September 10, 2017, 06:06:32 AM
#2
Run nvidia-settings as your user instead of root.
jr. member
Activity: 76
Merit: 1
September 10, 2017, 05:54:40 AM
#1
Hello,

My electricity price is variable, 23 to 13 h is cheap and 13 to 23 h is expensive. First try is oc on boot:

sudo crontab -e
@reboot /home/miguel/Desktop/0.3.4b/zeff

Script zeff:
sleep 60
export DISPLAY=:0
nvidia-smi -i 0 -pl 80
nvidia-smi -i 1 -pl 79
nvidia-smi -i 2 -pl 138
nvidia-settings -a [gpu:0]/GPUGraphicsClockOffset[3]=170
nvidia-settings -a [gpu:0]/GPUMemoryTransferRateOffset[3]=380
nvidia-settings -a [gpu:1]/GPUGraphicsClockOffset[3]=170
nvidia-settings -a [gpu:1]/GPUMemoryTransferRateOffset[3]=380
nvidia-settings -a [gpu:2]/GPUGraphicsClockOffset[3]=190
nvidia-settings -a [gpu:2]/GPUMemoryTransferRateOffset[3]=-200
/home/miguel/Desktop/0.3.4b/miner --config /home/miguel/Desktop/0.3.4b/miner.cfg

nvidia-smi WORKS!
nvidia-settings DON'T

If I run directly from ssh or in a terminal it works very nice.

Any idea how can I overclock from crontab?

I am really interested in run ./oc-cheap from 13 to 23 and ./oc-max from 23 to 13 h.

Thank you.
Jump to: