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

nvidiasetp0state not working? #164

Closed
3zero2 opened this issue Aug 16, 2017 · 21 comments
Closed

nvidiasetp0state not working? #164

3zero2 opened this issue Aug 16, 2017 · 21 comments

Comments

@3zero2
Copy link

3zero2 commented Aug 16, 2017

I have the option to set the power state to P0 in NHLM 1.8.1.1pre3 enabled.

However issuing nvidia-smi -q -d PERFORMANCE still returns the state as P2.

==============NVSMI LOG==============

Timestamp                           : Wed Aug 16 23:32:46 2017
Driver Version                      : 384.94

Attached GPUs                       : 1
GPU 00000000:01:00.0
    Performance State               : P2
    Clocks Throttle Reasons
        Idle                        : Not Active
        Applications Clocks Setting : Not Active
        SW Power Cap                : Not Active
        HW Slowdown                 : Not Active
        Sync Boost                  : Not Active

I re-run nvidiasetp0state as administrator whilst mining but still no luck. Does this keep any log file which can shed some light into what's happening please?

@drkskwlkr
Copy link
Contributor

drkskwlkr commented Aug 16, 2017

Same for me, using driver version 385.28 (not 384.94 as I wrote previously)

@3zero2
Copy link
Author

3zero2 commented Aug 16, 2017

I have reports of this also happening on 382.05

@nicehashdev
Copy link

nvidiasetp0state only works for maxwell cards. For pascals, it is not possible to set cards into p0 state for mining, but you can overclock memory and get same speed as in p0 state.

@3zero2
Copy link
Author

3zero2 commented Aug 16, 2017

@nicehashdev Thank you. Didn't know that.

Let me turn this into a suggestion then: When only Pascal cards are detected the option could be disabled.

@RileyMShea
Copy link

RileyMShea commented Aug 17, 2017

@nicehashdev @3zero2 I was able to get my pascal into P0 mode while mining by following the steps from https://www.reddit.com/r/NiceHash/comments/6m68ep/dummies_guide_for_setting_up_claymore_dual_mining/
Specifically:

First of all, you want to make sure your card is mining in P0 state, not P2 state. If it is in P2 state, you are losing Memory clock, which Ethermining would love to utilize. How? Verify if your Performance State is being set correctly. http://i.imgur.com/DZ57BhZ.png - if you're stuck with P2:
reset your current OC settings . Then you have two options:

  1. nvidia profile inspector:
    https://ci.appveyor.com/project/Orbmu2k/nvidiaprofileinspector/build/artifacts
    and disable the option "CUDA - Force P2" state listed under section "5 - common"
    setting the state properly will give you an advantage mining certain algorithms that were previously suffering from the downclocked memory. Now readjust OC. Don't jump straight back to your previous setting, go through iterative testing again.
  2. nvidia-smi:
    http://cryptomining-blog.com/tag/nvidia-change-power-state/
    Be mindful of what values you put in there. The command is short, don't copy-paste it straight into your console as you may end up copying the line break and instantly have it applied before you could adjust the clock values to your needs.

I did it through the Nvidia Profile inspector option and verified it with nvidia-smi. Worked on my two 1080's

@drkskwlkr
Copy link
Contributor

@RileyMShea Thank you! This has worked for me, I switched GTX 1080 and GTX 1070 on two different machines from P2 to P0. Haven't been able to look into potential performance benefits just yet :)

Note: I repost the reddit link (yours doesn't work when clicked on & needs to be copy/pasted):(https://www.reddit.com/r/NiceHash/comments/6m68ep/dummies_guide_for_setting_up_claymore_dual_mining/

@nicehashdev
Copy link

The nvidia-smi way is how nvidiasetp0state works and it obviously has no effect on pascal cards. Perhaps nvidia inspector works some other way. Anyone knows how?

@juanfpina
Copy link

I use nvidia inspector, set the nvidiasetp0state to run when I start nicehash and run nicehash as admin, seems to work for me. When I run nvidia-smi I get
Timestamp : Thu Aug 17 02:14:22 2017
Driver Version : 376.53

Attached GPUs : 1
GPU 0000:01:00.0
Performance State : P0
Clocks Throttle Reasons
Idle : Not Active
Applications Clocks Setting : Active
SW Power Cap : Not Active
HW Slowdown : Not Active
Sync Boost : Not Active
Unknown : Not Active

@RileyMShea
Copy link

RileyMShea commented Aug 17, 2017

@nicehashdev If I knew more c# I'd try to find it myself but the nvidia inspector has it's github repo here https://github.com/Orbmu2k/nvidiaProfileInspector
I would think porting the NPI method to disable the option "CUDA - Force P2" state wouldn't be too hard since both NHL and NPI are both c#. Kinda new to github, not sure if it's worth opening a Feature request issue for this?

@liranscu
Copy link

how can i check my card work at P0 or P2, i m a new minner ,thank u

@DillonN
Copy link
Contributor

DillonN commented Aug 18, 2017

I've done some testing and at least with my setup (2 1080 Tis) P0 has no improvements over P2 for mining. NV changed quite a bit in regards to power usage with GPU Boost 3. From what I can tell, Pascal cards are stubborn when it comes to passing P2 but they perform very well in P2 without forgoing all power optimizations

This is of course just a result of my own testing so if others do see improvements in P0 with Pascal we can look into alternative methods for nvidiasetp0state.exe and help everyone get the best performance they can.

@3zero2
Copy link
Author

3zero2 commented Aug 18, 2017

I'll soon find some time to switch to P0 and let you know the outcome

@drkskwlkr
Copy link
Contributor

drkskwlkr commented Aug 18, 2017

@3zero2 When you do that, can you check how power limits work for you? While I played with this setting, my cards were set at 70% power limit. With P0 enabled on both 1070 and 1080, the power limit level was reported as 90% by MSI Afterburner. As soon as I restored the setting to P2, reported power limit returned to 70%.

@3zero2
Copy link
Author

3zero2 commented Aug 18, 2017

@drkskwlkr i will check. currently power limit is set to 110% on my card; and it is mostly being respected apart from ccminer Skunk which does not want to go above 100%.

@3zero2
Copy link
Author

3zero2 commented Aug 18, 2017

I have used the NVIDIA profiler in order to disable P2 and hence card is now at P0. Miner speeds increases for equihash and skunk.

@drkskwlkr My power limit is being respected at 110%. It's not going over it.

@Mystere
Copy link

Mystere commented Aug 19, 2017

The nvidia profile inspector configures the cards performance profile, which is loaded at boot time by the driver. Thus, it doesn't use the nvidia-smi method (which i believe the setp0 app uses).

@3zero2 3zero2 closed this as completed Aug 20, 2017
@ghost
Copy link

ghost commented Dec 2, 2017

Hello guyz,
i'm trying to get P0 state on my gtx 1080 but it's not working.
I've tried both solution, NV-ProfileInspector and NV-SMI.
whatever i do, when i check de state with smi it say that it's still on P2...
I've even tried to get the NvidiaP0State.exe runing alone as admin but nothing changed...
I'm using 'NiceHashMinerLegacy_v1.8.1.5' and other miners like ccminer or stak-xmr.
Nvidia GPU drivers are: 388.31

Edit (10 mins. after): I've found another way to do it ! :)
How i did it:

  1. reset my current OC settings.
  2. enable my OC settings back.
  3. run my specially created batch scripts.

The batch scripts files I've created contain this:

BATCH1:

echo setting GPU parameters + force P0 State.
nvidiaProfileInspector -setBaseClockOffset:0,0,220 -setMemoryClockOffset:0,0,450 -setPowerTarget:0,100 -setTempTarget:0,0,55 -forcepstate:0,0

BATCH2:

echo set power limit to 90 W.
nvidia-smi -i 0 -pl 90

echo check power draw.
nvidia-smi -i 0 --loop-ms=2500 --format=csv,noheader --query-gpu=power.draw

Now NV-SMI is showing P0 as it should be when i type :

nvidia-smi -i 0 -q -d PERFORMANCE

To resume. I'm now mining ETN (cryptonight) at 630 H/s for a GPU Power of 90W max with P0 State activate and max 55°C Temp.
Awesome! 😄

@ZSimon
Copy link

ZSimon commented Apr 18, 2018

Hi,
where do you get command line parameters help?
How do you know for setBaseClockOffset and what does it mean 0,0,220?

@ghost
Copy link

ghost commented Apr 18, 2018

@ZSimon you can use "nvidia-smi -h" & "nvidiaProfileInspector - h" to get the help and all commands list.
0,0,220 mean core clock gpu #0 between 0-220MHz. ;)
I would advise you to add "-acp UNRESTRICTED" to your nvidia-smi batch to give it the application clock permissions admin/root privileges.
You can get a long commands list here : - http://nvidia.custhelp.com/app/answers/detail/a_id/3751/~/useful-nvidia-smi-queries

@ghost
Copy link

ghost commented Apr 18, 2018

Since the date of my post I've also find a new and easier way to apply the P0State to all Pascal and newer gpu's.
Those are the steps:

  1. reset all your clock and power-settings via Afterburner (or your preferred OC software).
  2. Open latest update of Nvidia-ProfileInspector and disable the option "CUDA - Force P2 state" listed under section "5 - common".
  3. Launch your miner (aka NiceHash without the "force P0State" option under parameters) but with Nvidia-ProfileInspector runing.
  4. Now readjust OC via Afterburner. Don't jump straight back to your previous setting, go through iterative testing again.
  5. Voilà! :)

@ZSimon
Copy link

ZSimon commented Apr 20, 2018

Natizyskunk, thank you for your description.

I have 10 GPU and Afterburner doesn't work well, so, I thought I could use "Nvidia-ProfileInspector" instead.

There are many profiles, but not one for mining in profile-inspector.

So, I need "Nvidia-ProfileInspector" to set P0 instead P2? Is it necessary(I have 1080 TI GPU)?
I I set for base profile and apply it will be set each time when I restart computer or I need to add -forcepstate:0,0 in my script ?

At restart all I need to run in batch file for example if I have 2 GPU is:

nvidiaProfileInspector.exe -setFanSpeed:0,100 -setBaseClockOffset:0,0,220 -setMemoryClockOffset:0,0,450 -setPowerTarget:0,100 -setBaseClockOffset:1,0,220 -setMemoryClockOffset:1,0,450 -setPowerTarget:1,100 -setFanSpeed:1,100

nvidia-smi is only for info, I don't need it, I guess? Do I need to instal cuda (for mining) or it doesn't matter? If I install latest cuda it overrides GPU drivers, which are usually newer than the one inside from cuda.

If I run "nvidiaProfileInspector - h" from cmd, the app is opened and I don't see any help commands.
Any idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants