xmrig / xmrig

RandomX, KawPow, CryptoNight and GhostRider unified CPU/GPU miner and RandomX benchmark
https://xmrig.com/
GNU General Public License v3.0
8.83k stars 3.47k forks source link

macOS Kawpow Errors [Or mistake in setup] #2345

Open Sammed98 opened 3 years ago

Sammed98 commented 3 years ago

Describe the bug I want to mine using Kawpow algorithm on my GPU. I have also noted that Kawpow does not run on CPU and I am fine with it. I have modified the config.json file where I have changed the algo value, the pool address, coin and my address. But when I execute xmrig the get the following set of errors. I don't know if they are error but since they are getting consoled with red color I think they are. The error image is as follows:

Screenshot 2021-05-05 at 9 07 24 AM

The config file is as follows: { "api": { "id": null, "worker-id": null }, "http": { "enabled": false, "host": "127.0.0.1", "port": 0, "access-token": null, "restricted": true }, "autosave": true, "background": false, "colors": true, "title": true, "randomx": { "init": -1, "init-avx2": -1, "mode": "auto", "1gb-pages": false, "rdmsr": true, "wrmsr": false, "cache_qos": false, "numa": true, "scratchpad_prefetch_mode": 1 }, "cpu": { "enabled": false, "huge-pages": true, "huge-pages-jit": false, "hw-aes": null, "priority": null, "memory-pool": false, "yield": true, "asm": true, "argon2-impl": null, "astrobwt-max-size": 550, "astrobwt-avx2": false, "argon2": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "astrobwt": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "cn": [ [1, 0], [1, 2], [1, 4], [1, 6], [1, 8], [1, 10] ], "cn-heavy": [ [1, 0], [1, 2], [1, 4] ], "cn-lite": [ [1, 0], [1, 1], [1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10], [1, 11] ], "cn-pico": [ [2, 0], [2, 1], [2, 2], [2, 3], [2, 4], [2, 5], [2, 6], [2, 7], [2, 8], [2, 9], [2, 10], [2, 11] ], "cn/upx2": [ [2, 0], [2, 1], [2, 2], [2, 3], [2, 4], [2, 5], [2, 6], [2, 7], [2, 8], [2, 9], [2, 10], [2, 11] ], "rx": [0, 2, 4, 6, 8, 10], "rx/wow": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "cn/0": false, "cn-lite/0": false, "rx/arq": "rx/wow", "rx/keva": "rx/wow" }, "opencl": { "enabled": true, "cache": true, "loader": null, "astrobwt": [ { "index": 0, "intensity": 64, "threads": [-1, -1] }, { "index": 1, "intensity": 192, "threads": [-1, -1] } ], "cn": [ { "index": 1, "intensity": 320, "worksize": 8, "strided_index": [1, 2], "threads": [-1, -1], "unroll": 8 } ], "cn-heavy": [ { "index": 1, "intensity": 160, "worksize": 8, "strided_index": [1, 2], "threads": [-1, -1], "unroll": 8 } ], "cn-lite": [ { "index": 0, "intensity": 192, "worksize": 8, "strided_index": [0, 2], "threads": [-1], "unroll": 8 }, { "index": 1, "intensity": 800, "worksize": 8, "strided_index": [1, 2], "threads": [-1, -1], "unroll": 8 } ], "cn-pico": [ { "index": 0, "intensity": 384, "worksize": 8, "strided_index": [0, 2], "threads": [-1], "unroll": 8 }, { "index": 1, "intensity": 1920, "worksize": 8, "strided_index": [2, 2], "threads": [-1, -1], "unroll": 8 } ], "cn/2": [ { "index": 1, "intensity": 320, "worksize": 8, "strided_index": [2, 2], "threads": [-1, -1], "unroll": 8 } ], "cn/upx2": [ { "index": 0, "intensity": 384, "worksize": 8, "strided_index": [0, 2], "threads": [-1], "unroll": 8 }, { "index": 1, "intensity": 1920, "worksize": 8, "strided_index": [2, 2], "threads": [-1, -1], "unroll": 8 } ], "kawpow": [ { "index": 0, "intensity": 6291456, "worksize": 256, "threads": [-1] }, { "index": 1, "intensity": 5242880, "worksize": 256, "threads": [-1] } ], "rx": [ { "index": 0, "intensity": 320, "worksize": 8, "threads": [-1], "bfactor": 6, "gcn_asm": false, "dataset_host": true }, { "index": 1, "intensity": 320, "worksize": 8, "threads": [-1, -1], "bfactor": 6, "gcn_asm": false, "dataset_host": false } ], "rx/arq": [ { "index": 0, "intensity": 384, "worksize": 8, "threads": [-1], "bfactor": 6, "gcn_asm": false, "dataset_host": true }, { "index": 1, "intensity": 320, "worksize": 8, "threads": [-1, -1], "bfactor": 6, "gcn_asm": false, "dataset_host": false } ], "rx/wow": [ { "index": 0, "intensity": 384, "worksize": 8, "threads": [-1], "bfactor": 6, "gcn_asm": false, "dataset_host": true }, { "index": 1, "intensity": 320, "worksize": 8, "threads": [-1, -1], "bfactor": 6, "gcn_asm": false, "dataset_host": false } ], "cn/0": false, "cn-lite/0": false }, "cuda": { "enabled": false, "loader": null, "cn/0": false, "cn-lite/0": false }, "log-file": null, "donate-level": 0, "donate-over-proxy": 0, "pools": [ { "algo": "kawpow", "coin": null, "url": "poolAddress", "user": "CoinName:Address.workerName", "pass": "x", "rig-id": null, "nicehash": false, "keepalive": false, "enabled": true, "tls": false, "tls-fingerprint": null, "daemon": false, "socks5": null, "self-select": null, "submit-to-origin": false } ], "retries": 5, "retry-pause": 5, "print-time": 60, "dmi": true, "syslog": false, "tls": { "enabled": false, "protocols": null, "cert": null, "cert_key": null, "ciphers": null, "ciphersuites": null, "dhparam": null }, "dns": { "ipv6": false, "ttl": 30 }, "user-agent": null, "verbose": 0, "watch": true, "pause-on-battery": false, "pause-on-active": false }

The modifications that I have made in the config file are I changed cpu enabled to false, openCL enabled to true, change the algo name to kawpow. The pool address , hashname and workername have the appropriate values. The coin I want to mine is dogecoin. The type of GPU I have can be found in the error image.

I would like to know what mistake I have done and how to rectify the same.

To Reproduce Utilize the above config.json, add the pool address, wallet address and workername and execute the executable.

Expected behavior Mine coin on the GPU without utlizing CPU

Required data

Additional context Add any other context about the problem here.

Spudz76 commented 3 years ago

But that one says "Pro 5300M" which I had already put in the code earlier.

Problem is Apple doesn't pass through any "gfx#" or anything that normally maps to a Chip Type. Only the product names which really sucks.

Spudz76 commented 3 years ago

Added patch which includes every Apple AMD GPU listed here

The 580 is actually an Ellesmere not Polaris.

d9beuD commented 3 years ago

@Spudz76 in the list you provided, aren't some 6XXX gen missing? There isn't Mac with RDNA2 GPU yet, but drivers are included in macOS. And people like me building their hackintosh already installed GPUs like 6900xt

ganzocrypt commented 3 years ago

@d9beuD can you try the last xmrig that I posted to see if it works on your hackintosh? I have too an hackintosh with dual xeon and rx580, just wanted to verify that everything works fine on other systems. thx

empiresun1 commented 3 years ago

So i had pretty much the same issues... using your compiled zip and config i was able to get my Vega64 egpu to finally start mining but i still have 2 issues

First even though its now using the gpu it doesnt seem to be submitting and the work isnt being accepted for some reason? and second it looks like im only using 1/4 of my GPU to mine Kawpow and my hashrate seems pretty low? and ideas as to why? Screen Shot 2021-05-25 at 1 37 27 PM

empiresun1 commented 3 years ago

oh and another side note: it seems like my hashrate is pretty low? only about .64 ... shouldnt it be higher?

ganzocrypt commented 3 years ago

ok I had the same issue, if your hashrate is low, the pool does not record it or it takes very long time. You are mining at ~ 600k h/s. So on my RX 580 I found the following settings to work and I have 6 Mh/s and on the pool oscillate between 6 and 12 Mh/s, GPU load is at 85%. I run my screen too, so I do not want to go over the intensity I set since screen will freeze and relogin! Try the following settings in your KaPow config

Now since you have a Vega you might want to increase intensity when everything is working. I did that by adding 1024 or 2048 or 4096 to the previous intensity, so that I did not load the GPU too much, check with Acitivity Monitor your xmrig GPU usage. Let me know if it works, and great that the xmrig that I compiled works.

empiresun1 commented 3 years ago

ok I had the same issue, if your hashrate is low, the pool does not record it or it takes very long time. You are mining at ~ 600k h/s. So on my RX 580 I found the following settings to work and I have 6 Mh/s and on the pool oscillate between 6 and 12 Mh/s, GPU load is at 85%. I run my screen too, so I do not want to go over the intensity I set since screen will freeze and relogin! Try the following settings in your KaPow config

  • "intensity": 36864
  • "worksize": 256

Now since you have a Vega you might want to increase intensity when everything is working. I did that by adding 1024 or 2048 or 4096 to the previous intensity, so that I did not load the GPU too much, check with Acitivity Monitor your xmrig GPU usage. Let me know if it works, and great that the xmrig that I compiled works.

I'll totally try these changes... but any idea why its not being accepted on unminable? i ran it as a test for about 30 mins with 0 results

ganzocrypt commented 3 years ago

your hashrate at 600kh/s might be too low, try the new changes and see if it works

empiresun1 commented 3 years ago

so ran it for about 10 mins ... GPU usage hovering around 80% ... hash rate came up to about 5.5KH, but its still not submitting acceptance? Screen Shot 2021-05-25 at 2 10 09 PM

Screen Shot 2021-05-25 at 2 10 28 PM

ganzocrypt commented 3 years ago

first time it took sometime, but it should work.

brianmcfadden commented 3 years ago

I see the difficulty in your log is set at 4295M, which seems excessively high. If that's what the pool is returning to you, I'd try another pool. If there's a config setting for that, I'd try lowering it by alot.

empiresun1 commented 3 years ago

ok, ill run it for a few hours and see what it does... also does it matter that im also randomx mining the same coin to the same address? maybe thats the issue?

empiresun1 commented 3 years ago

I see the difficulty in your log is set at 4295M, which seems excessively high. If that's what the pool is returning to you, I'd try another pool. If there's a config setting for that, I'd try lowering it by alot.

im using the unminable pool for BTT, not sure what a better option would be

peme14k commented 3 years ago

กำหนดสิ่งอื่นแล้วลดลงไห้พอดีขอบคุณ

empiresun1 commented 3 years ago

first time it took sometime, but it should work.

ok so i shut down my CPU miner xmrig and restarted the GPU miner and its now accepting! is there anyway to run both GPU on KAWPOW and CPU on RandomX at the same time for the samecoin?

ganzocrypt commented 3 years ago

ok cool ! yes just enable CPU mine to true. Or you can actually run 2 instances of xmrig, one for CPU and one for GPUs on 2 different coins using 2 different configs: xmrig -c config.json

In any case you can run CPU and GPU on the same coin, just go to the CPU section and set it to true: "cpu": { "enabled": true

also for the algo you want to mine you need to set the number of threads, so you have 4 cores/ 8 threads, which means you need to set [0] to [7] in the second []

"cn": [ [1, 0], .... .... [1, 7]

if you want less threads, just remove the ones you do not want.

empiresun1 commented 3 years ago

if i enable CPU on just the one instance of Xmrig wont it just try to cpu mine KAWPOW? running two instances would be better but from my previous issue IDK if it will stop one or both of them from accepting?

ganzocrypt commented 3 years ago

if you mine the same coin the algo must be the same, else you need two instances wit 2 different algos.

empiresun1 commented 3 years ago

if you mine the same coin the also must be the same, else you need two instances wit 2 different algos.

thats what i thought... ill try it with 2 instances and see what happens! oh and for changing my threads:

"cn": [ [1, 0], [1, 2], [1, 4], [1, 6]

above is my current config file ... so would i change it to:

"cn": [ [1, 0], [1, 7], [1, 4], [1, 6]

?

empiresun1 commented 3 years ago

sorry for all the questions lol .... im very new to all this and im trying to learn

ef651100 commented 3 years ago

I had good performance with intensity 51200 and work size 256 with GPU utilization around 90% which gives me around 6MH/s. The ridiculous number on my screenshot was auto-generated... and yes, my computer was quite unusable...

empiresun1 commented 3 years ago

I had good performance with intensity 51200 and work size 256 with GPU utilization around 90% which gives me around 6MH/s. The ridiculous number on my screenshot was auto-generated... and yes, my computer was quite unusable...

happy that i have my EGPU since i can use that as a standalone to mine when i dont need it and use my internal gpu for running my computer ... currently averaging 10 MH/S at about 80% gpu load

ganzocrypt commented 3 years ago

no problem, sorry I was eating ! :) so if you want to run 4 threads those settings are correct. "cn": [ [1, 0], [1, 1], [1, 2], [1, 3] this runs the first 4 threads!

by the way does the xmrig that I uploaded still works? I am asking because I was not sure if it would work on other macs!

I will give you an example: I ran one xmrig instance for CPU for UPX2 and one instance for GPU with KaPow so I can mine 2 coins with 2 different algos. Or you can run one instance with CPU and GPU but the algo needs to be the same because you cannot split the pools on the config!

empiresun1 commented 3 years ago

no problem, sorry I was eating ! :) so if you want to run 4 threads those settings are correct. "cn": [ [1, 0], [1, 1], [1, 2], [1, 3] this runs the first 4 threads!

by the way does the xmrig that I uploaded still works? I am asking because I was not sure if it would work on other macs!

I will give you an example: I ran one xmrig instance for CPU for UPX2 and one instance for GPU with KaPow so I can mine 2 coins with 2 different algos. Or you can run one instance with CPU and GPU but the algo needs to be the same because you cannot split the pools on the config!

no worries! we all gotta eat ... my wife is making me a burrito now lol .. and yea im using your build for this on my macbook with my egpu and its working great... bouncing between 7-10 mh/s :)

ganzocrypt commented 3 years ago

with my settings I get around 6.7 Mh/s on the xmrig and at the pool varies between 6 and 13 Mh/s!

empiresun1 commented 3 years ago

and let's say i wanna run 6 threads instead of my 4... .still want 2 threads to have some usability what would that config be ... im trying to understand how the config file works

ganzocrypt commented 3 years ago

"cn": [ [1, 0], [1, 1], [1, 2], [1, 3], [1,4], [1,5]

is zero based the numbering, or pick the thread that you want

empiresun1 commented 3 years ago

so i changed the config for that but its still only loading 4 threads for randomx. ideas? Screen Shot 2021-05-25 at 3 17 31 PM Screen Shot 2021-05-25 at 3 17 45 PM

ganzocrypt commented 3 years ago

RandomX on the algo you need to set: "pools": [ { "algo": "rx/0",

and for the CPU is "rx": [0, 1, 2, 3, 4, 5]

empiresun1 commented 3 years ago

RandomX on the algo you need to set: "pools": [ { "algo": "rx/0",

and for the CPU is "rx": [0, 1, 2, 3, 4, 5]

cool ill try that... i can keep my "cn" settings the same?

ganzocrypt commented 3 years ago

if you set the "algo": "rx/0", everything else is ignored

empiresun1 commented 3 years ago

if you set the "algo": "rx/0", everything else is ignored

yup! running 6 threads now! that should increase my hashrate right?

ganzocrypt commented 3 years ago

basically the steps are:

  1. Enabled CPU mining
  2. set the # of thread for the algo you want to mine
  3. set the algo in the pool section you want to mine
ganzocrypt commented 3 years ago

by the way with eGPU you have? I mean the box

empiresun1 commented 3 years ago

yup that part i now understand ... every algo has its own parameters to what it will do based on the config

by the way with eGPU you have? I mean the box

Razer Core ... i was about to ask if it will be better to take the GPU out of the box to allow better cooling lol

ganzocrypt commented 3 years ago

better cooling is always good ! :)

empiresun1 commented 3 years ago

for sure .. especially since i live in a warm climate and we dont use AC lol

empiresun1 commented 3 years ago

ill run the rigs and report back with info! let me know if i can do anything to help develop and refine this more for every one! :)

ganzocrypt commented 3 years ago

will do more testing too and recompile it tomorrow, might do a fork and create some binaries since compile on mac is a freaking nightmare !

empiresun1 commented 3 years ago

Kick ass! ill happily be your crash test dummy for this lol.. btw idk why but it seems like running 6 threads as opposed to 4 has dropped my hashrate somewhat... running 4 i would hash about 11-1200 h/s and now im around 800 ish Screen Shot 2021-05-25 at 3 34 10 PM 800?

ganzocrypt commented 3 years ago

mac misteries ! my guess is CPU throttling to keep it alive ! run 4 !

Spudz76 commented 3 years ago

@empiresun1 Your CPU had 8MB of cache, optimal is 2MB per thread, therefore 4 threads is correct and fastest. (as you found)

Sammed98 commented 3 years ago

Added patch which includes every Apple AMD GPU listed here

The 580 is actually an Ellesmere not Polaris.

@ganzocrypt Your last zip still gave the error on my system. Can you compile the above mentioned patch with static files and link the zip here. I will test it out.

Sammed98 commented 3 years ago
Screenshot 2021-05-26 at 9 43 32 AM

@ganzocrypt with your settings I also am not getting any acceptance. Though the rate is pretty good. Any chances you want to suggest?

ganzocrypt commented 3 years ago

will recompile it today. about the other issue, try to restart the xmrig and see, but from what I tested unminenable wants higher hashrate since the do the conversion of coins. Check your GPU % and see if you can increase the intensity to get more hashrate.

ganzocrypt commented 3 years ago

I created a branch for the macos fork

All work credit for adding AMD support goes to @Spudz76.

Please test the release and if there are any issues for the xmrig binary post them on the issue section.

ganzocrypt commented 3 years ago

@Spudz76 I found an issue while compiling the changes you did. In the file OclDevice.h is missing Ellesmere, in the enum, which was added to the OclDevice.cpp.

ganzocrypt commented 3 years ago

@Sammed98 @empiresun1 @ef651100 @brianmcfadden could you please test the release to see if everything is working? thx

SChernykh commented 3 years ago

@Spudz76 your branch is missing OclDevice::Ellesmere in OclDevice.h. Can you fix it and make a PR? I don't have any Mac device to test it though otherwise I'd do it myself.