Lubuntu 16.04 with AMDGPU-PRO Beta Mining Driver 17.40 (October 16th, 2017) installed.
Sapphire Nitro Plus RX 580 8GB. With mining bios mods it was hashing around 29-30Mh/s on Eth for several days (using ethminer from github.com/ethereum-mining/ethminer ). Also XMR at 840-850h/s (using xmr-stak from github.com/fireice-uk/xmr-stak ).
After the security updates for the Meltdown/Spectre/etc vulnerabilities were installed today, the Eth hashrate dropped to 21 Mh/s. XMR at 350h/s. It looks like the mining driver is incompatible with the patched kernel.
What do?
Microsoft has mentioned that the patches would slow down operating systems depending on what type of tasks it is doing.
This new ZDNET article goes into details about how slow the PC Performance will be depending on hardware and other factors:
How much slower will your PC feel after patching for Spectre-Meltdown? | ZDNet
Spent 10 hours+ figuring this out. Here you go
EDIT: Consider this is a temporary fix, until AMD starts supporting new kernels (if that ever is the case)
https://www.reddit.com/r/EtherMining/comments/7pqn98/ubuntu_410_kernel/
So tonight I tried something to see if it was possible to avoid the HWE kernel while still getting security updates, by installing 16.04.1 and then updating. (16.04 and 16.04.1 stay on 4.4 kernel long-term while still getting security updates)
NOPE!
Boots to black screen stuck on fsck saying /dev/sda clean
Saw exactly the same this morning - GMT.
The kernel automatically updated.
Turned off auto updates and reconfigured grub to use previous kernel - all fine.
Faulty kernel: vmlinuz-4.13.0-26-generic
Reverted to previous: vmlinuz-4.10.0-42-generic
Sure this is creating havoc out there!!
I've booted the older kernel and the hashrates came back up, but running an unpatched kernel is kind of unsafe and will become increasingly dangerous over time as more exploits are developed and refined/automated. Also, when newer vulnerabilities are disclosed and patched you could be exposed to them too.
I'm putting together a test rig to reproduce the issue and try and get more details. Gonna try setting up in different ways starting from a clean install. Should have some test results by tomorrow or Monday.
Finally, if you are also impacted by this issue, please consider drawing attention to it by:
- Clicking "I have the same question" above ^^
- Filling out the AMD Issue Reporting Form at:
www.amdsurveys.com/se.ashx?s=5A1E27D23A3DE979
- Filling out the Online Service Request Form at:
Adding nopti kernel parameter at boot will disable KPTI in the Linux kernel.
I don't think PTI is the direct cause of the performance issues. The GPU is performing most of the work and should be largely unaffected.
Rather, the AMDGPU-PRO driver is failing to install on the updated kernel, resulting in it reverting to the default driver which is not optimized for mining.
I tried reinstalling the driver manually but got errors with amdgpu-pro-dkms. It said to refer to a log file in /var/lib/dkms/amdgpu/17.40-483984/build/make.log (contains a massive wall of text of compile errors)
Yes, the AMD's GPUs do not use speculative execution and so are completely unaffected by these cpu vulnerabilities.
DETAILED STEPS TO REPRODUCE:
Here's the specs of my test rig:
Sapphire Nitro+ RX850 8GB
Sceptre 1680x1050 60Hz DVI-D
Asus Sabertooth 990FX R2.0
FX-8350
8GB RAM
EVGA Supernova G2 850W
Start with a fresh install of Ubuntu 16.04.3 that hasn't installed any updates.
Installed from ubuntu-16.04.3-desktop-amd64.iso (1,587,609,600 bytes) SHA-256: 1384ac8f2c2a6479ba2a9cbe90a585618834560c477a699a4a7ebe7b5345ddc1
Terminal:
uname -a
Linux testrig8350 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Extract and install the driver from amdgpu-pro-17.40-483984.tar.xz (363,011,476 bytes) SHA-256: b9cfd203adc19d54f2a3e1120e7a541cb5732ca0354b5b860096ba5bd3451778
Terminal:
cd '/home/testrig8350/Desktop/amdgpu-pro-17.40-483984'
sudo apt-get update
sudo ./amdgpu-pro-install
Using ethminer-0.12.0-Linux.tar.gz (2,693,252 bytes) SHA-256: be060bd78f9f0386b7a52f97d0c8b0bdc49941b2865e8ff77a0169bfd0b0b8af
Extract ethminer and benchmark with DAG as of block # 4,906,500 (today)
Terminal:
cd '/home/testrig8350/Desktop/bin'
./ethminer --opencl --benchmark 4906500
Got 21MH/s so that means our setup is not optimized yet.
Edit the file /etc/default/grub with line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amdgpu.vm_fragment_size=9"
Terminal:
sudo update-grub
Then reboot...
Terminal:
cd '/home/testrig8350/Desktop/bin'
./ethminer --opencl --benchmark 4906500
We got up to 29MH/s, yay!
Now we bring our OS up to date with important security patches by opening the Software Updater and installing all the updates.
During the installation of updates, a window appears saying, "System Program Problem Detected"
Errors are logged to:
/var/crash/amdgpu-pro-dkms.0.crash
/var/lib/dkms/amdgpu/17.40-483984/build/make.log
Eventually updating is finished and we restart the computer.
Terminal:
uname -a
Linux testrig8350 4.13.0-26-generic #29~16.04.2-Ubuntu SMP Tue Jan 9 22:00:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
cd '/home/testrig8350/Desktop/bin'
./ethminer --opencl --benchmark 4906500
21MH/s Oh noes!!!!
It gets worse: 20-30% performance loss in Cryptonight on FX 8 core cpu. Adding "nopti" kernel parameter in grub doesn't help at all. I thought AMD cpu's were supposed to be unaffected!?
Exact same problem here. Thanks for the info, as I have already reinstalled an entire system before having this happen again. I hope someone pays attention to this issue soon.
Hey guys, I release a dev userland. Basicly its like pimpos or ethos, except I can manage what takes most 4-5 years to do in one night lol, comes with the stock linux kernel, ati flash, ethminer and folding at home plus the latest non fubared kernel and all the latest amd pro drivers/r0cm installed. Im getting 31.5 on my rx 570's . you might want to check it out burn in to a 16 gig flash and you have 9 gig remaining space Here is the prebuilt userland/dev system with everything prebuilt and ohh when I find zed tested.. P...