WyvernTKC / cpuminer-gr-avx2

Optimised Version of GR miner for RTM
GNU General Public License v2.0
375 stars 195 forks source link

5800u + win10 cannot set MSR #150

Open xiedidan opened 2 years ago

xiedidan commented 2 years ago

I'm trying to mine on my hp 635g8 laptop running a 5800u and win10 home. I'm running cpuminer.bat as admin, huge pages are allocated but MSR cannot be set. No third-party anti-virus.
Binary is selected correctly:
image

[2021-12-01 17:00:31] Could not load 'tune_config' file
[2021-12-01 17:00:31] Could not find/load 'tune_config' file. Miner will perform tuning operation.
[2021-12-01 17:00:31] Default tuning process takes ~154 minutes to finish.
[2021-12-01 17:00:31] "tune-full": true, takes ~222 minutes.
[2021-12-01 17:00:31] Starting tune-full tuning (~222 minutes)
[2021-12-01 17:00:31] Add "no-tune": true, to your config to disable it.
[2021-12-01 17:00:31] Huge Pages set up successfully.
[2021-12-01 17:00:32] Cannot set MSR 0xC0011020 to 0x0000000000000000 on cpu 0
[2021-12-01 17:00:32] Failed to set MSR for the CPU. Admin/root privileges required.
[2021-12-01 17:00:32] 16 of 16 miner threads started using 'gr' algorithm
[2021-12-01 17:00:34] Testing rotation: 01.1 (0 0 X X 0 X) -> Dark + Darklite + Fast
[2021-12-01 17:00:34] Testing: Dark (1way) + Darklite (1way) + Fast (1way) - 0/2160 0.0% ~220.0 min remaining.
zenon8888 commented 2 years ago

I have it sometimes too not launching correctly, It looks like your first launch, have you tried again? for me it works.

xiedidan commented 2 years ago

I have it sometimes too not launching correctly, It looks like your first launch, have you tried again? for me it works.

I tried multiple times with no luck. Restarting computer doesn't help. :-(

Dyno1979 commented 2 years ago

Have you tried running as administrator? One thing would be to run explorer as administrator and run it from Explorer.

Also. you may consider setting the number of threads total cpu threads - 1 so it leaves one for Windows and other apps.

xiedidan commented 2 years ago

Have you tried running as administrator? One thing would be to run explorer as administrator and run it from Explorer.

Also. you may consider setting the number of threads total cpu threads - 1 so it leaves one for Windows and other apps.

I tried with admin cmd, but still no luck... However there's no need to reserve 1 thread since the miner priority seems to be very low.

ryanclarity commented 2 years ago

I have a new windows computer and I'm running into this as well. On one computer, I sometimes have to start the program, kill it and restart to get the MSR to be set, but that is not working on this computer. I have disabled the secure boot in the BIOS, but that has not resolved the issue. I'm also seeing a message that the "Software does not match CPU features" I'm running as administrator `> cpuminer.bat Detecting CPU Detected Unknown CPU - GenuineIntel Detected CPU Caption - Intel64 Family 6 Model 140 Stepping 1 Detected CPU Description - Intel64 Family 6 Model 140 Stepping 1 Detected CPU Family: 6 Detected CPU Model: 140 Detected GenuineIntel CPU Detected avx512-sha compatible binary with "Tiger Lake (C)" architecture Change line 11 if CPU was not detected properly. If file is "missing" please check if Windows Defender or AV did not block/remove it from binaries folder.

     **********  cpuminer-opt-gr 1.2.4.1  ***********
 A CPU miner with multi algo support and optimized for CPUs
 with AVX512, SHA and VAES extensions by JayDDee.
 with Ghostrider Algo by Ausminer & Delgon.
 Jay D Dee's BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT

 RTM 1.50% Fee

Prepared for Windows - NTver: 0x601 CPU: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz SW built on Nov 10 2021 with GCC 10.0.0 CPU features: AVX512 VAES SHA SW features: AVX512 AES SHA Algo features: AVX2 VAES [2021-12-09 13:05:45] Software does NOT match CPU features! [2021-12-09 13:05:45] Please check if proper binaries are being used.

[2021-12-09 13:05:45] Could not load 'tune_config' file [2021-12-09 13:05:45] Could not find/load 'tune_config' file. Miner will perform tuning operation. [2021-12-09 13:05:45] Default tuning process takes ~154 minutes to finish. [2021-12-09 13:05:45] "tune-full": true, takes ~222 minutes. [2021-12-09 13:05:45] Starting tune-full tuning (~222 minutes) [2021-12-09 13:05:45] Add "no-tune": true, to your config to disable it. [2021-12-09 13:05:45] Huge Pages set up successfully. [2021-12-09 13:05:45] Cannot set MSR 0x000001A4 to 0x000000000000000F on cpu 0 [2021-12-09 13:05:45] Failed to set MSR for the CPU. Admin/root privileges required. [2021-12-09 13:05:45] 8 of 8 miner threads started using 'gr' algorithm [2021-12-09 13:05:47] Testing rotation: 01.1 (0 0 X X 0 X) -> Dark + Darklite + Fast [2021-12-09 13:05:47] Testing: Dark (1way) + Darklite (1way) + Fast (1way) - 0/2160 0.0% ~220.0 min remaining.`

Dyno1979 commented 2 years ago

Basically the only line you need from cpuminer.bat is:

binaries\cpuminer-!CPU_INST!.exe --config=config.json

Try running all of these (one at a time) and let me know which one starts and doesn't throw the error regarding the CPU features:

binaries\cpuminer-avx512-sha-vaes.exe --config=config.json binaries\cpuminer-avx512-sha.exe --config=config.json binaries\cpuminer-avx512.exe --config=config.json binaries\cpuminer-avx2-sha-vaes.exe --config=config.json binaries\cpuminer-avx2.exe --config=config.json binaries\cpuminer-sse42.exe --config=config.json

ryanclarity commented 2 years ago

@Dyno1979 , the first one runs without the CPU message: binaries\cpuminer-avx512-sha-vaes.exe --config=config.json

Dyno1979 commented 2 years ago

The 11th Gen Intel Core i7-1165G7 is a 4 core and 8 thread processor configuration with 4.7GHz clock speed and 12MB L3 cache. The 11th Gen Intel Core i7-1165G7 is a "Tiger Lake" processor. Some of the prominent capabilities of the processor include SSE 4.2 + AVX + AVX2 + AES + VAES + Intel VT-d + FMA + RdRand + FSGSBASE + BMI2 + AVX-512 + AVX-512 VNNI / DL-BOOST

Then you can create a bat file with that line. Basically it means that the cpuminer.bat doesn't detect properly the CPU.

If you want to know what it attempts to run, you can add a line before the one that's run:

:StartMiner echo If file is "missing" please check if Windows Defender or AV did not block/remove it from binaries folder. echo binaries\cpuminer-!CPU_INST!.exe --config=config.json binaries\cpuminer-!CPU_INST!.exe --config=config.json timeout 5 > NUL goto StartMiner

Anyway, basically you can create cpuminer_run.bat with a single line: binaries\cpuminer-avx512-sha-vaes.exe --config=config.json

Also, if you still have issues with MSR, try to open whatever file explorer you use with "Run as Administrator" and then run the bat file.

Good luck!

xiedidan commented 2 years ago

'Run as Administrator' dosen't help. This looks like a windows only problem. I've built 2 5950X ubuntu boxes, they both allocated huge pages and set MSR correctly.