Bitcoin Forum
April 27, 2024, 02:19:23 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Nvidia overclock from crontab Xubuntu  (Read 335 times)
patinencomun (OP)
Jr. Member
*
Offline Offline

Activity: 76
Merit: 1


View Profile
September 10, 2017, 10: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.
Even if you use Bitcoin through Tor, the way transactions are handled by the network makes anonymity difficult to achieve. Do not expect your transactions to be anonymous unless you really know what you're doing.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714184363
Hero Member
*
Offline Offline

Posts: 1714184363

View Profile Personal Message (Offline)

Ignore
1714184363
Reply with quote  #2

1714184363
Report to moderator
NameTaken
Hero Member
*****
Offline Offline

Activity: 630
Merit: 502


View Profile
September 10, 2017, 11:06:32 AM
 #2

Run nvidia-settings as your user instead of root.
patinencomun (OP)
Jr. Member
*
Offline Offline

Activity: 76
Merit: 1


View Profile
September 10, 2017, 11: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)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!