Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Free Script / NVIDIA OC Profile Linux #1205

Closed
ArSd-g opened this issue Oct 7, 2020 · 14 comments
Closed

Free Script / NVIDIA OC Profile Linux #1205

ArSd-g opened this issue Oct 7, 2020 · 14 comments
Assignees
Labels
enhancement New feature or request implemented an enhancement has been implemented

Comments

@ArSd-g
Copy link

ArSd-g commented Oct 7, 2020

#976 #1137
Tired to beg for this....

@RainbowMiner
Copy link
Owner

Yea, you are right. It is about time. I'll add pre and post commands to ocprofiles today.

@RainbowMiner RainbowMiner self-assigned this Oct 7, 2020
RainbowMiner added a commit that referenced this issue Oct 7, 2020
- add pre and post commands to ocprofiles.config.txt (issue #1205 #976 #1137)
  - "PreCmd"/"PreCmdArguments": define a command to be executed before the miner starts. PreCmd is the path to the binary, PreCmdArguments are optional arguments for that command.
  - "PostCmd"/"PostCmdArguments": define a command to be executed after the miner has finished. PostCmd is the path to the binary, PostCmdArguments are optional arguments for that command.
@RainbowMiner
Copy link
Owner

Ok, I have added pre and post commands to ocprofiles.config.txt - that should help a lot. The next step will be to integrate full overclocking features for AMD on Linux and Windows.

  • "PreCmd"/"PreCmdArguments": define a command to be executed before the miner starts. PreCmd is the path to the binary, PreCmdArguments are optional arguments for that command.
  • "PostCmd"/"PostCmdArguments": define a command to be executed after the miner has finished. PostCmd is the path to the binary, PostCmdArguments are optional arguments for that command.

Please be aware, that if you use backslashes in these config files, you will need to escape them with another backslash (don't c:\a\b, instead do c:\\a\\b). Otherwise the JSON parser will fail. This is especially important for paths to binaries, when using Windows.

Example for calling a Windows batch file

  "PreCmd": "cmd",
  "PreCmdArguments": "/c C:\\RainbowMiner\\sometest.bat",

Example for running some Linux tool

  "PreCmd": "/home/root/myownocshellcmd",
  "PreCmdArguments": "--gpu 0,1,2 --profile 2",

@RainbowMiner RainbowMiner added enhancement New feature or request implemented an enhancement has been implemented labels Oct 7, 2020
@ArSd-g
Copy link
Author

ArSd-g commented Oct 13, 2020

oK GREAT! Thank you! i'll test that soon.
If you need any assistance to set amdgpu-oc-linux up, i'm on discord!
Kernels evolves, and i'm not at home for a while...i use to do it with github.com/sibradzic/amdgpu-clocks
but i'm checking for new tools to do this and there is new ones that i need to learn!
i'll be back home next week...easier to work without remote desktop/cmd tools

@ArSd-g
Copy link
Author

ArSd-g commented Apr 28, 2023

I still not finding a way to run a f*** *.sh f file....and it drives me crazy!!!!!!!!!
we dont need to run arguments or complicated lines just a "sudo *.sh"
Or fix the memory clock oc setting....This what is ACTUALLY WORKING in a .sh file:

sudo nvidia-smi -pm 1
sudo nvidia-smi -pl 141
sudo nvidia-settings -c :0 -a '[gpu:0]/GPUPowerMizerMode=1'
sudo nvidia-settings -c :0 -a '[gpu:0]/GPUGraphicsClockOffset[4]=-300'
sudo nvidia-settings -c :0 -a '[gpu:0]/GPUMemoryTransferRateOffsetAllPerformanceLevels=2200'

@RainbowMiner
Copy link
Owner

Which GPUs is that .sh for?

@ArSd-g
Copy link
Author

ArSd-g commented Apr 28, 2023

Which GPUs is that .sh for?

Nvidia (of course) RTX 3060ti, memory OC still does not work !!!! provide a comprehensive way to make it works, or simply allow an *.sh script to be run as root. dont complicate things when it is simple

@RainbowMiner
Copy link
Owner

Could you please run the following command for me an report back the exact result?

sudo nvidia-settings --query GPUPerfModes

@ArSd-g ArSd-g changed the title Free Script / AMD OC Profile Linux ¡!!!!!!!¡ Free Script / NVIDIA OC Profile Linux Apr 29, 2023
@ArSd-g
Copy link
Author

ArSd-g commented Apr 29, 2023

Attribute 'GPUPerfModes' (ArScl:0.1): perf=0, nvclock=210, nvclockmin=210, nvclockmax=420, nvclockeditable=1, memclock=405, memclockmin=405, memclockmax=405,
memclockeditable=1, memTransferRate=810, memTransferRatemin=810, memTransferRatemax=810, memTransferRateeditable=1 ; perf=1, nvclock=210, nvclockmin=210,
nvclockmax=2100, nvclockeditable=149, memclock=810, memclockmin=810, memclockmax=810, memclockeditable=1, memTransferRate=1620, memTransferRatemin=1620,
memTransferRatemax=1620, memTransferRateeditable=1 ; perf=2, nvclock=210, nvclockmin=210, nvclockmax=2100, nvclockeditable=42, memclock=5001, memclockmin=5001,
memclockmax=5001, memclockeditable=1, memTransferRate=10002, memTransferRatemin=10002, memTransferRatemax=10002, memTransferRateeditable=1 ; perf=3, nvclock=210,
nvclockmin=210, nvclockmax=2100, nvclockeditable=137, memclock=7901, memclockmin=7901, memclockmax=7901, memclockeditable=1, memTransferRate=15802,
memTransferRatemin=15802, memTransferRatemax=15802, memTransferRateeditable=1 ; perf=4, nvclock=210, nvclockmin=210, nvclockmax=2100, nvclockeditable=221, memclock=8101,
memclockmin=8101, memclockmax=8101, memclockeditable=1, memTransferRate=16202, memTransferRatemin=16202, memTransferRatemax=16202, memTransferRateeditable=1
Attribute 'GPUPerfModes' (ArScl:0[gpu:0]): perf=0, nvclock=210, nvclockmin=210, nvclockmax=420, nvclockeditable=1, memclock=405, memclockmin=405, memclockmax=405,
memclockeditable=1, memTransferRate=810, memTransferRatemin=810, memTransferRatemax=810, memTransferRateeditable=1 ; perf=1, nvclock=210, nvclockmin=210,
nvclockmax=2100, nvclockeditable=149, memclock=810, memclockmin=810, memclockmax=810, memclockeditable=1, memTransferRate=1620, memTransferRatemin=1620,
memTransferRatemax=1620, memTransferRateeditable=1 ; perf=2, nvclock=210, nvclockmin=210, nvclockmax=2100, nvclockeditable=42, memclock=5001, memclockmin=5001,
memclockmax=5001, memclockeditable=1, memTransferRate=10002, memTransferRatemin=10002, memTransferRatemax=10002, memTransferRateeditable=1 ; perf=3, nvclock=210,
nvclockmin=210, nvclockmax=2100, nvclockeditable=137, memclock=7901, memclockmin=7901, memclockmax=7901, memclockeditable=1, memTransferRate=15802,
memTransferRatemin=15802, memTransferRatemax=15802, memTransferRateeditable=1 ; perf=4, nvclock=210, nvclockmin=210, nvclockmax=2100, nvclockeditable=221, memclock=8101,
memclockmin=8101, memclockmax=8101, memclockeditable=1, memTransferRate=16202, memTransferRatemin=16202, memTransferRatemax=16202, memTransferRateeditable=1

@RainbowMiner
Copy link
Owner

Awesome, thank you! It'll make it easy to detect the number of performance mode on each GPU.

@ArSd-g
Copy link
Author

ArSd-g commented May 2, 2023

NP, keep us in touch when you upload changes to your build

@ArSd-g
Copy link
Author

ArSd-g commented Mar 24, 2024

no update still! your "chmod" fuck everything WE NEED TO RUN PRE CMD with "sudo" prefix:

`setPPT.sh 0 .../V56PPT965950850-Ethash'
cat .../V56PPT965950850-Ethash > /sys/class/drm/card0/device/pp_table
/usr/bin/setPPT.sh: ligne 45: /sys/class/drm/card0/device/pp_table: permission denied'

with "sudo" in terminal adding "setPPT.sh" to sudoer WORKS!
but when RB start with PreCmd: "sudo .... setPPT.sh" your chmod fuck everything!!!!!

@RainbowMiner
Copy link
Owner

Hi, correct me, if I am wrong, you put "sudo setPPT.sh" into the "PreCmd" parameter? Did you try "setPPT.sh" in this parameter, without the sudo in front of it?

I would be very interested in the RainbowMiner log files when the PreCmd hits. Could you send me a Debug file (or a zip of the Logs folder) to info@rbminer.net?

Sidemark: have you ever tried the build-in OCProfiles with parameter "EnableOCLinuxSetAllPStates" set to "1" in config.txt? This could work.

@ArSd-g
Copy link
Author

ArSd-g commented Apr 1, 2024

"setPPT.sh" without "sudo" = "permission denied: /sys/class/drm/device....
also

AMD

I ended up to Oc like this for AMD to hack this code mess in "PreCmd":
"PreCmd": "/home/laarsn/Outils/Mining/OC/setPPT.sh",
"PreCmdArguments": "/home/laarsn/Outils/Mining/OC/V56PPT965950850-Ethash"

Remove "cat" (permission denied) in setPPT.sh and replaced by "cp", adding "cp" to /etc/sudoers.
"setPPT.sh":

if [ $# != 1 ];
then
  echo "$0 gpunumber PPTFile"
  echo "Example: For 1 gpu at slot 0"
  echo "$0 0 PPTFile1"
  exit;
fi

MSG="sudo cp -R $1 /sys/devices/pci0000:00/0000:00:1c.1/0000:04:00.0/0000:05:00.0/0000:06:00.0/pp_table"
echo $MSG
sudo cp -R $1 /sys/devices/pci0000:00/0000:00:1c.1/0000:04:00.0/0000:05:00.0/0000:06:00.0/pp_table

AMDMEMTWEAK

Cannot also being triggered by this f***** faschist of PreCmd Scripting. So it force me to aplly memory timing using kde boot script instead:

#! /bin/bash
wmctrl -s 1
cmd1="zsh /home/laarsn/Outils/Mining/RainbowMiner/start.sh"
cmd2="sudo /usr/bin/cp -R /home/laarsn/Outils/Mining/OC/V56PPT965950850-Ethash /sys/devices/pci0000:00/0000:00:1c.1/0000:04:00.0/0000:05:00.0/0000:06:00.0/pp_table && sudo amdmemtweak -i 1 --CL 20 --RC 36 --RP 11 --WR 14 --CWL 8 --FAW 12 --RAS 20 --REF 65535 --RFC 248 --RTP 5 --RRDL 6 --RRDS 3 --WTRL 9 --WTRS 4 --RCDRD 12 --RCDWR 12 && /home/laarsn/Outils/Mining/OC/nvml-tune -i 0 -t 135 -m 1200 -g -300 && zsh /home/laarsn/Outils/Mining/RainbowMiner/minerlog.sh"

echo '{
  "Orientation": "Horizontal",
  "Widgets": [
    {
      "SessionRestoreId": 0
    },
    {
      "SessionRestoreId": 0
    }
  ]
}' > /tmp/Konsole1x1layout.json
konsole --layout /tmp/Konsole1x1layout.json &
sleep 2

service="$(qdbus6 | grep -B1 konsole | grep -v -- -- | sort -t"." -k2 -n | tail -n 1)"

qdbus6 $service /Sessions/1 org.kde.konsole.Session.runCommand "${cmd1}"
qdbus6 $service /Sessions/2 org.kde.konsole.Session.runCommand "${cmd2}"
wmctrl -s 0

Nvidia

running nvml-tune does nothing under RBM PreCmd script!

But working great in terminal:
Copie d'écran_20240401_154353
Direct setting cclk/mclk in ocprofiles.config not working too (RTX 3060ti) and never did, "PreCmd scripts" also this is not a script command "runner" it can run nothing without an error !

SO PLEASE! OC is the most important thing and it's been 3 years i'm begging for a built in support for AMD and Nvidia Linux and/or A WORKING (NOT F FASHIST script/command runner! Not a one that ACCEPT NOTHING OR CAN'T GET REQUIRED PERMISSIONS, OR TRY TO APPLY PERMISSIONS WHEN IT'S NOT NEEDED (chmod error!)!

Correct Tools to implement OC:
Nvidia: https://github.com/flippette/nvml-tune (coolbits in xorg not NEEDED!)

AMD: https://github.com/sibradzic/upp
https://github.com/onweer/tool

@ArSd-g
Copy link
Author

ArSd-g commented Apr 2, 2024

I ended up to make it work with approriates sudoers settings like this:

"PreCmd": "/usr/bin/env",
"PreCmdArguments": "--chdir=/home/laarsn/Outils/Mining/OC ./nvml-tune -i 0 -t 135 -m 1200 -g -300",

But RBM still show me an error "/usr/bin/chmod: modification of the rights of '/usr/bin/env': Operation not permitted"

Please fix this error or make it dissapear!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request implemented an enhancement has been implemented
Projects
None yet
Development

No branches or pull requests

2 participants