Pages:
Author

Topic: Linux Driver for Blockchain Compute 17.30.1029 - page 3. (Read 16031 times)

newbie
Activity: 60
Merit: 0
Would love a bit of help on this.

Basically, i have a custom bios which was sorted in Windows. I also patched Windows using atikmdag tool.

In windows my cards run fine.

When i try the above, i get an error during boot that says:

Invalid PCI Rom signature.

How do i fix this? 
newbie
Activity: 8
Merit: 0
1.Download latest linux 4.12.10 from kernel.org
2.Apply patches from here: https://patchwork.freedesktop.org/project/amd-xorg-ddx/series/?ordering=-last_updated( more advanced way)
3.Compile kernel -> the ubuntu way.
4.Install kernel using dpkg
5. Download amdgpu-pro-17.30 latest, unarchive and edit amdgpu-pro-install, under the --compute function remove amdgpu-pro-dkms.
6. Exec ./amdgpu-pro-install --compute to install only opencl and libdrm
7. dpkg -x amdgpu-pro-dkms.... /out; cd out/usr/src/amdgpu-pro/lib/firmware && rm /lib/firmware/amdgpu/* && cp * /lib/firmware/amdgpu
8. add amdgpu.vm_fragment_size=9 to /etc/default/grub as stated in previous posts.
8.1. add if you are using user to video group usermod -a -G video $user
9. update-grub && update-initramfs -u
10. Reboot and mine.

Is a real reason to build new kernel such as performance or stability issues?

Since I wasn't sure what patches to apply, I used a mix of both ways:
1. Installed not whole rocm package but only kernel image and headers 4.11 from rocm repository.
2. Installed compute-only 17.30 amd driver as recommended above (without dkms).
3. Added amdgpu module option.

Still there are issues with very slow boot (known issue if VBIOS was patched). But it runs.
Is 4.12 kernel somehow better?


Thanks laik2, I built linux from the git:linux-master and it works.

--
ROCm does not work for my rig with A + N on it.
Therefore, I did laik2 way to build a new kernel for my rig.
However, I found that linux-4.12.10 even linux-4.13.x from linux.org does not support vm_fragment.
There is no vm_fragment member in ./drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c.
And I don't know which patches to be applied from patchwork.freedesktop.org.
Finally, I google "linux amdgp vm_fragment_size", github.com/torvalds comes out.

What to do is just download linux from github.com/torvalds and buid and run laik2 steps.
And everything works perfect.


Thanks~


newbie
Activity: 9
Merit: 0
This is how I proceeded...

I have a Poloris bios Editor one click patch applied on 2x 8G RX 580 sapphire and 2x 4G RX 580.

1. Install ubuntu 16.04.3

2. login and setup basics

3. shutdown, connect 1st gpu and connect to monitor

4. boot and proceed to install ROCm kernel and AMD compute drivers (I used amdgpu-pro-17.30-465504.tar and got 29MHs)

---------------------------------------------------------------
ROCm GPU Server Driver Installation Guide for Linux
https://rocm.github.io/ROCmInstall.html

1. Verify You Have ROCm Capable GPU Installed int the System

lspci | grep -i AMD

2. #Install new ROCm Kernel:

wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
sudo sh -c 'echo deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main > /etc/apt/sources.list.d/rocm.list'

sudo apt-get update
sudo apt-get install rocm

3. Download amdgpu-pro-17.30 latest, unarchive and edit amdgpu-pro-install, under the --compute function remove amdgpu-pro-dkms

4. sudo ./amdgpu-pro-install --compute "to install only opencl and libdrm"

5. find ROCm boot menuentry ID
sudo grep menuentry /boot/grub/grub.cfg

6. comment out the default boot, add ROCm kernel to grub boot and amd fragment size
sudo vi /etc/default/grub

GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 4.11.0-kfd-compute-rocm-rel-1.6-148"
#GRUB_DEFAULT=0
#2MB fragments for Ellesmere are enabled with a grub option:
GRUB_CMDLINE_LINUX="amdgpu.vm_fragment_size=9"

7. add user to video group
sudo usermod -a -G video $LOGNAME

8. sudo update-grub

9. sudo reboot

10. verify if ROCm kernel is set
sudo uname -r

11. shutdown and add one gpu at a time, test them with miner after every add

I am now hashing at 29MH and was wondering if anyone figured out how to undervolt?
newbie
Activity: 39
Merit: 0
you need to download bios data from your gpu, edit with bios editor like srbpolaris (work only on window) then flahs it back on target gpu.
Be carefull wrong data can compromise your gpu or also impossible to boot it.
If you don't know what to do you need to use window and use amd software to edit freq and voltage to find better then edit your bios with this values.

But what should I edit exactly to reduce power consumption? I am familiar with Polaris bios editing and flashing, but I have never succeeded reducing power consumption.
full member
Activity: 129
Merit: 100
All voltages were reduced via custom bios mods.

How did you do it?

you need to download bios data from your gpu, edit with bios editor like srbpolaris (work only on window) then flahs it back on target gpu.
Be carefull wrong data can compromise your gpu or also impossible to boot it.
If you don't know what to do you need to use window and use amd software to edit freq and voltage to find better then edit your bios with this values.
newbie
Activity: 39
Merit: 0
All voltages were reduced via custom bios mods.

How did you do it?
newbie
Activity: 13
Merit: 0
What about power consumption? Did you downvolt them?

Spent about 2 hours researching your solution but it was just too complicated with custom kernels, etc.

GPUs are all running cooler. Less Heat. All voltages were reduced via custom bios mods.
sr. member
Activity: 353
Merit: 251
We used the originally posted fix https://bitcointalksearch.org/topic/m.21304863. Our hash rate on a 9 GPU rig using Claymore increased from about 244.9 Mh/s to 265.3 Mh/s

What about power consumption? Did you downvolt them?
newbie
Activity: 13
Merit: 0
Used the originally posted fix https://bitcointalksearch.org/topic/m.21304863. Rig hash rate using Claymore increased from about 244.9 Mh/s to 265.3 Mh/s.

Thank you Mr @cpunkt
hero member
Activity: 630
Merit: 502
Ubuntu 17.04, RX 470 Strix 4GB, 4.11.0-kfd-compute-rocm-rel-1.6-148 kernel made no difference.
Din't you forget to add 'amdgpu.vm_fragment_size=9'? Without that module option the hashrate will be the same.

As for me, rocm kernel works as expected. Except it does not downvolt cards. I tried SMOS with original kernel and rocm. With original it can decrease power consumption, but has low hashrate. With rocm kernel the hashrate is higher, but DPM state changes do nothing, consumption is always high.


Code:
~# cat /sys/module/amdgpu/parameters/vm_fragment_size                                                                                                             
9
sr. member
Activity: 353
Merit: 251
Ubuntu 17.04, RX 470 Strix 4GB, 4.11.0-kfd-compute-rocm-rel-1.6-148 kernel made no difference.
Din't you forget to add 'amdgpu.vm_fragment_size=9'? Without that module option the hashrate will be the same.

As for me, rocm kernel works as expected. Except it does not downvolt cards. I tried SMOS with original kernel and rocm. With original it can decrease power consumption, but has low hashrate. With rocm kernel the hashrate is higher, but DPM state changes do nothing, consumption is always high.
hero member
Activity: 630
Merit: 502
Ubuntu 17.04, RX 470 Strix 4GB, 4.11.0-kfd-compute-rocm-rel-1.6-148 kernel made no difference.

Code:
Sep 05 08:10:51 ethdcrminer64[1518]:  LBC: Share accepted (144 ms)!
Sep 05 08:10:53 ethdcrminer64[1518]:  LBC: 09/05/17-08:10:53 - New job from lbry.suprnova.cc:6256
Sep 05 08:10:58 ethdcrminer64[1518]: GPU0 t=67C fan=87%, GPU1 t=54C fan=87%, GPU2 t=59C fan=87%, GPU3 t=66C fan=87%, GPU4 t=65C fan=87%, GPU5 t=62C fan=87%
Sep 05 08:11:11 ethdcrminer64[1518]:  LBC: 09/05/17-08:11:11 - SHARE FOUND - (GPU 3)
Sep 05 08:11:12 ethdcrminer64[1518]:  LBC: Share accepted (143 ms)!
Sep 05 08:11:17 ethdcrminer64[1518]:  LBC: 09/05/17-08:11:16 - SHARE FOUND - (GPU 0)
Sep 05 08:11:17 ethdcrminer64[1518]:  LBC: Share accepted (143 ms)!
Sep 05 08:11:27 ethdcrminer64[1518]: GPU0 t=67C fan=87%, GPU1 t=54C fan=87%, GPU2 t=60C fan=87%, GPU3 t=66C fan=87%, GPU4 t=65C fan=87%, GPU5 t=62C fan=87%
Sep 05 08:11:30 ethdcrminer64[1518]: ETH: 09/05/17-08:11:30 - SHARE FOUND - (GPU 3)
Sep 05 08:11:30 ethdcrminer64[1518]: ETH: Share accepted (66 ms)!
Sep 05 08:11:39 ethdcrminer64[1518]: ETH: 09/05/17-08:11:38 - SHARE FOUND - (GPU 5)
Sep 05 08:11:39 ethdcrminer64[1518]: ETH: Share accepted (66 ms)!
Sep 05 08:11:44 ethdcrminer64[1518]: ETH: 09/05/17-08:11:43 - New job from us2.ubiqpool.io:8008
Sep 05 08:11:44 ethdcrminer64[1518]: ETH - Total Speed: 122.668 Mh/s, Total Shares: 6, Rejected: 0, Time: 00:04
Sep 05 08:11:44 ethdcrminer64[1518]: ETH: GPU0 22.521 Mh/s, GPU1 17.889 Mh/s, GPU2 20.122 Mh/s, GPU3 19.981 Mh/s, GPU4 21.968 Mh/s, GPU5 20.187 Mh/s
Sep 05 08:11:44 ethdcrminer64[1518]:  LBC - Total Speed: 352.666 Mh/s, Total Shares: 17, Rejected: 0
Sep 05 08:11:44 ethdcrminer64[1518]:  LBC: GPU0 64.748 Mh/s, GPU1 51.430 Mh/s, GPU2 57.850 Mh/s, GPU3 57.444 Mh/s, GPU4 63.156 Mh/s, GPU5 58.038 Mh/s
Sep 05 08:11:48 ethdcrminer64[1518]:  LBC: 09/05/17-08:11:48 - New job from lbry.suprnova.cc:6256                                                                             
Sep 05 08:11:49 ethdcrminer64[1518]:  LBC: 09/05/17-08:11:49 - SHARE FOUND - (GPU 1)                                                                                         
Sep 05 08:11:49 ethdcrminer64[1518]:  LBC: Share accepted (143 ms)!                                                                                                           
Sep 05 08:11:52 ethdcrminer64[1518]:  LBC: 09/05/17-08:11:52 - SHARE FOUND - (GPU 5)                                                                                         
Sep 05 08:11:52 ethdcrminer64[1518]:  LBC: Share accepted (142 ms)!                                                                                                           
Sep 05 08:11:58 ethdcrminer64[1518]: GPU0 t=67C fan=87%, GPU1 t=54C fan=87%, GPU2 t=60C fan=87%, GPU3 t=66C fan=87%, GPU4 t=66C fan=87%, GPU5 t=62C fan=87%                   
Sep 05 08:12:13 ethdcrminer64[1518]:  LBC: 09/05/17-08:12:12 - SHARE FOUND - (GPU 4)                                                                                         
Sep 05 08:12:13 ethdcrminer64[1518]:  LBC: Share accepted (144 ms)!                                                                                                           
Sep 05 08:12:28 ethdcrminer64[1518]: GPU0 t=67C fan=87%, GPU1 t=54C fan=87%, GPU2 t=60C fan=87%, GPU3 t=67C fan=87%, GPU4 t=66C fan=87%, GPU5 t=62C fan=87%                   
Sep 05 08:12:37 ethdcrminer64[1518]:  LBC: 09/05/17-08:12:37 - SHARE FOUND - (GPU 4)                                                                                         
Sep 05 08:12:37 ethdcrminer64[1518]:  LBC: Share accepted (143 ms)!
Sep 05 08:12:43 ethdcrminer64[1518]:  LBC: 09/05/17-08:12:43 - New job from lbry.suprnova.cc:6256                                                                             
Sep 05 08:12:46 ethdcrminer64[1518]:  LBC: 09/05/17-08:12:45 - SHARE FOUND - (GPU 5)                                                                                         
Sep 05 08:12:46 ethdcrminer64[1518]:  LBC: Share accepted (144 ms)!                                                                                                           
Sep 05 08:12:56 ethdcrminer64[1518]: ETH: 09/05/17-08:12:56 - SHARE FOUND - (GPU 2)                                                                                           
Sep 05 08:12:56 ethdcrminer64[1518]: ETH: Share accepted (66 ms)!                                                                                                             
newbie
Activity: 7
Merit: 0
Here is the solution:
The new ROCm Kernel works great, my hashrate went from 155 > 167Mhs/s with 6*RX470 with Ubuntu 16.4

#Install new ROCm Kernel:

wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
sudo sh -c 'echo deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main > /etc/apt/sources.list.d/rocm.list'
sudo apt-get update
sudo apt-get install rocm

#edit grub
sudo nano  /etc/default/grub
#2MB fragments for Ellesmere are enabled with a grub option:
GRUB_CMDLINE_LINUX="amdgpu.vm_fragment_size=9"

sudo update-grub
sudo reboot

choose new Kernel and its done!

Thx to gstoner from ROCm Github.


Feel free to donate if you happy ;-)

ETH:0xccad3d66b29ae2924df835df1417169ca59943b5
BTC:12F7uXSpTwVhf4ppdh92uieAvrevZ4ShEf

Greetz

It's work! (ubuntu 16.04)
Thank you
newbie
Activity: 8
Merit: 0
Here is the solution:
The new ROCm Kernel works great, my hashrate went from 155 > 167Mhs/s with 6*RX470 with Ubuntu 16.4

#Install new ROCm Kernel:

wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
sudo sh -c 'echo deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main > /etc/apt/sources.list.d/rocm.list'
sudo apt-get update
sudo apt-get install rocm

#edit grub
sudo nano  /etc/default/grub
#2MB fragments for Ellesmere are enabled with a grub option:
GRUB_CMDLINE_LINUX="amdgpu.vm_fragment_size=9"

sudo update-grub
sudo reboot

choose new Kernel and its done!

Thx to gstoner from ROCm Github.


Feel free to donate if you happy ;-)

ETH:0xccad3d66b29ae2924df835df1417169ca59943b5
BTC:12F7uXSpTwVhf4ppdh92uieAvrevZ4ShEf

Greetz


There is 6 rx570 and 6 GTX1060 in my rig.
After applying ROCm kernel, if I pull out all the Nvidia cards, everything works perfectly.
If there is any Nvidia card plugged in my rig, rig is broken, hangs at miner or even cannot boot.

Any idea?

Thanks!

sr. member
Activity: 353
Merit: 251
1.Download latest linux 4.12.10 from kernel.org
2.Apply patches from here: https://patchwork.freedesktop.org/project/amd-xorg-ddx/series/?ordering=-last_updated( more advanced way)
3.Compile kernel -> the ubuntu way.
4.Install kernel using dpkg
5. Download amdgpu-pro-17.30 latest, unarchive and edit amdgpu-pro-install, under the --compute function remove amdgpu-pro-dkms.
6. Exec ./amdgpu-pro-install --compute to install only opencl and libdrm
7. dpkg -x amdgpu-pro-dkms.... /out; cd out/usr/src/amdgpu-pro/lib/firmware && rm /lib/firmware/amdgpu/* && cp * /lib/firmware/amdgpu
8. add amdgpu.vm_fragment_size=9 to /etc/default/grub as stated in previous posts.
8.1. add if you are using user to video group usermod -a -G video $user
9. update-grub && update-initramfs -u
10. Reboot and mine.

Is a real reason to build new kernel such as performance or stability issues?

Since I wasn't sure what patches to apply, I used a mix of both ways:
1. Installed not whole rocm package but only kernel image and headers 4.11 from rocm repository.
2. Installed compute-only 17.30 amd driver as recommended above (without dkms).
3. Added amdgpu module option.

Still there are issues with very slow boot (known issue if VBIOS was patched). But it runs.
Is 4.12 kernel somehow better?
full member
Activity: 129
Merit: 100

- how to check these power steps on linux console?
- how to change them?
- my power consumption at wall were too high also before change (4x rx580 @ 1150W at wall) with smos (oc 1175-2250 dpm state 2). what about yours?

Thank you in advance

If you use smos you can change them on web app, my power consume is 1090 watt at wall 8 x rx480 (1170/2200 -> 30.6mhs each)
/sys/class/drm/card(Number)/device/power_dpm_force_performance_level must be manual
/sys/class/drm/card(Number) should be number of dpm state that you choiched
sr. member
Activity: 353
Merit: 251
It works but, as I've said on SMOS thread, using roc kernel and changing boot parameter makes power consumption goes from 1150W to 1550W (on the wall, at least on my rx580 rig). Have you checked your power consumption after this change?
On Windows I had 1162W. After switch to this kernel on Linux I tried to downvolt my rx470 by changing voltage table offsets in the DPM stages (that is, set offset of stage 4 or 6, or directly 1000-1050mV, to stage 7, so power consumption is lesser). At the same time I overclock memory and downclock GPU (mostly the same as on Windows). Used ohgodatool for that in realtime.

At the moment I was unable to get the same power consumption, it went from 1162 to 1300 now.

I know that it is not the best way to downvolt. I tried to change VDDC offset in the BIOS (since realtime VDDC change tools are not publicly available, and I have too few cards to hack it myself). This way works with my Sapphire cards, but it requires many reflashes when tuning every card for a stable operation. So I hoped to use only software ways to overclock and downvolt without changing BIOS (except timings).

Probably I have to use the BIOS way anyway if I want a comparable consumption to Windows rig.

As for the hashrate: even if displayed rates are bit lower (Claymore's miner) than on Windows, actual pool rates are the same. So the consumption is only my headache yet.
full member
Activity: 129
Merit: 100
It works but, as I've said on SMOS thread, using roc kernel and changing boot parameter makes power consumption goes from 1150W to 1550W (on the wall, at least on my rx580 rig). Have you checked your power consumption after this change?

I use roc kernel on smos and consume it is the same, maybe you changed power step (consume is setup at level of bios of gpu, i have steps from 2 to 7 to my target voltage), check them on console.
sr. member
Activity: 353
Merit: 251
Much better way, does not pull whole rocm.
But which patches to apply from the link above? All?
sr. member
Activity: 652
Merit: 266
I tried 2 scenarios to install that and both had failed.
Any hints from those who has it working: your ubuntu version, amdgpu version (if not built-in), order of installation?

Success!

HowTo:
1) Install ubuntu 16.04.3.
2) Install rocm as described above.
3) Add amdgpu parameter as described above. It is the key to success, don't miss that step.
4) Install amdgpu-17.30 as told by AMD.
Kernel module build fails, but correct driver is in the rocm installation. AMD driver is necessary for libOpenCL, etc.
5) Overclock using any tool (if desired).
6) Enjoy!

ETH hashrate under linux seems to be 0.3MH/s lesser than on Windows, it is a known issue and probably just measurement difference (see Claymore's FAQ).

But I should be able to run more than 8 cards per MB, will try ASAP.

1.Download latest linux 4.12.10 from kernel.org
2.Apply patches from here: https://patchwork.freedesktop.org/project/amd-xorg-ddx/series/?ordering=-last_updated( more advanced way)
3.Compile kernel -> the ubuntu way.
4.Install kernel using dpkg
5. Download amdgpu-pro-17.30 latest, unarchive and edit amdgpu-pro-install, under the --compute function remove amdgpu-pro-dkms.
6. Exec ./amdgpu-pro-install --compute to install only opencl and libdrm
7. dpkg -x amdgpu-pro-dkms.... /out; cd out/usr/src/amdgpu-pro/lib/firmware && rm /lib/firmware/amdgpu/* && cp * /lib/firmware/amdgpu
8. add amdgpu.vm_fragment_size=9 to /etc/default/grub as stated in previous posts.
8.1. add if you are using user to video group usermod -a -G video $user
9. update-grub && update-initramfs -u
10. Reboot and mine.


Pages:
Jump to: