GPU mining with ethminer on AMD

acrosacros Member Posts: 63 ✭✭
No matter what I do, it seems that ethminer only ever picks up the integrated graphics(Radeon R5) instead of the Radeon R9, even though it's properly installed:

$ lspci | grep -i VGA
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Curacao XT [Radeon R9 270X]

$ ./ethminer -G -M --opencl-device 0
Benchmarking on platform: { "platform": "AMD Accelerated Parallel Processing", "device": "AMD A6-7400K Radeon R5, 6 Compute Cores 2C+4G", "version": "OpenCL 1.2 AMD-APP (1411.4)" }
Preparing DAG...
ℹ 02:56:12|ethminer Loading from libethash...
ℹ 02:56:12|ethminer Done loading.
ℹ 02:56:12|gpuminer0 workLoop 0 #00000000… #00000000…
Warming up...
Using platform: AMD Accelerated Parallel Processing
Using device: AMD A6-7400K Radeon R5, 6 Compute Cores 2C+4G(OpenCL 1.2 AMD-APP (1411.4))
Segmentation fault (core dumped)
[email protected]:~/git/cpp-ethereum/build/ethminer$

$ ./ethminer -G -M --opencl-device 1
Benchmarking on platform: { "platform": "AMD Accelerated Parallel Processing", "device": "AMD A6-7400K Radeon R5, 6 Compute Cores 2C+4G", "version": "OpenCL 1.2 AMD-APP (1411.4)" }
Preparing DAG...
ℹ 02:56:30|ethminer Loading from libethash...
ℹ 02:56:30|ethminer Done loading.
ℹ 02:56:30|gpuminer0 workLoop 0 #00000000… #00000000…
Warming up...
Using platform: AMD Accelerated Parallel Processing
Using device: AMD A6-7400K Radeon R5, 6 Compute Cores 2C+4G(OpenCL 1.2 AMD-APP (1411.4))
Segmentation fault (core dumped)

$ lspci | grep -i VGA
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Curacao XT [Radeon R9 270X]
[email protected]:~/git/cpp-ethereum/build/ethminer$ ./ethminer -G -M --opencl-device 10
Benchmarking on platform: { "platform": "AMD Accelerated Parallel Processing", "device": "AMD A6-7400K Radeon R5, 6 Compute Cores 2C+4G", "version": "OpenCL 1.2 AMD-APP (1411.4)" }
Preparing DAG...
ℹ 02:58:01|ethminer Loading from libethash...
ℹ 02:58:01|ethminer Done loading.
ℹ 02:58:01|gpuminer0 workLoop 0 #00000000… #00000000…
Warming up...
Using platform: AMD Accelerated Parallel Processing
Using device: AMD A6-7400K Radeon R5, 6 Compute Cores 2C+4G(OpenCL 1.2 AMD-APP (1411.4))
Segmentation fault (core dumped)
It doesn't matter which opencl device I set, it's always choosing the same... Any one knows what could be wrong?

Thanks!!

Comments

  • urubuurubu Member Posts: 19
    you could disable it in bios?
    Make sure fglrx driver is installed for gpu cards.
  • acrosacros Member Posts: 63 ✭✭
    Thanks @urubu, I believe I did actually, although my BIOS interface only allows changing the order (like PCI -> ... -> Integrated).

    I have A version of fglrx installed but it was hectic, do you have a recommended way to go about it on Ubuntu 14.04.1 (it appears 14.04.2 has different requirements).

    Thanks!
  • urubuurubu Member Posts: 19
    visit the amd driver site and download from there. It will ask you to open or save. Open with the software manager and install it. I used the minimal driver, which was the second down.
  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    V. likely improperly configured drivers. I had the same issue on 14.04.02 when trying to solve the known bug re: fglrx using a crappy workaround. Solution was full reinstall, enabling proposed-trusty, then switch video drivers to proprietary in control panel.
  • ConradJohnsonConradJohnson Member Posts: 130 ✭✭
    edited May 2015
    @StephanTual - can you elaborate on this "switch video drivers to proprietary in control panel"?

    I'm on my n^th wipe on 14.04 trying to just get 1 AMD R9 290 to talk to ./eth via OpenCL but most of my setups are just going to a black screen and I'm having to wipe again if I can't get to command prompt to purge that attempt of fglrx
  • Wil611Wil611 Member Posts: 77 ✭✭
    @ConradJohnson you may be running into this issue as well. https://github.com/ethereum/cpp-ethereum/issues/1935 I had my system configured with 1 AMD R9 280x and was mining using eth from a compiled ccp-ethereum instance. I decided to update to the latest branch to keep current after which I could no longer get eth, ethminer or AZ to display anything. After many frustrating rebuilds and recompiles I finally saw this issue posted and reverted to an older cpp-ethereum build.
  • ConradJohnsonConradJohnson Member Posts: 130 ✭✭
    @Wil611 actually mine is a hardware issue. I can't get as far as that right now. AMD radeon with catalyst driver (opencl included in there) on ubuntu. It's a mess trying to find some configuration with this hardware where opencl is properly recognized AND your machine boots.

    Thinking of switching my focus back over to the NVIDIA machine. I've actually considered running windows for the AMD machine.

  • acrosacros Member Posts: 63 ✭✭
    @StephanTual, @Wil611 and @ConradJohnson , there's this nice tool suggested by @Genoil on https://forum.ethereum.org/discussion/comment/8696/#Comment_8696, that allows you to test your OpenCl install.

    In my case though it's clear that it's not properly installed:

    $ make clean && make && ./print-devices
    rm -f cl-demo print-devices *.o
    gcc -std=gnu99 -ocl-demo cl-demo.c cl-helper.c -lrt -lOpenCL
    gcc -std=gnu99 -oprint-devices print-devices.c cl-helper.c -lrt -lOpenCL
    platform 0: vendor 'Advanced Micro Devices, Inc.'
    device 0: 'AMD A6-7400K Radeon R5, 6 Compute Cores 2C+4G'
    It only finds my integrated AMD (R5), not my actual one (R9)

    I tried pointing it to the specific locations but no dice either (neither 2.9 nor 3.0Beta):

    make clean && make OPENCL_INC=/opt/AMDAPPSDK-2.9-1/include OPENCL_LIB=/opt/AMDAPPSDK-2.9-1/lib && ./print-devices
    rm -f cl-demo print-devices *.o
    gcc -I/opt/AMDAPPSDK-2.9-1/include -L/opt/AMDAPPSDK-2.9-1/lib -std=gnu99 -ocl-demo cl-demo.c cl-helper.c -lrt -lOpenCL
    gcc -I/opt/AMDAPPSDK-2.9-1/include -L/opt/AMDAPPSDK-2.9-1/lib -std=gnu99 -oprint-devices print-devices.c cl-helper.c -lrt -lOpenCL
    platform 0: vendor 'Advanced Micro Devices, Inc.'
    device 0: 'AMD A6-7400K Radeon R5, 6 Compute Cores 2C+4G
    Basically I think eth/ethminer won't work until this shows it as detected...

    What's odd is that the R9 card seems to be fine:

    $ lspci -v | grep 'VGA controller'
    01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Curacao XT [Radeon R9 270X] (prog-if 00 [VGA controller])
  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    @ConradJohnson

    1) wipe buntu (sorry, but we have to make sure). Insure you are running 14.04.02
    2) sudo-apt get update then sudo-apt get upgrade (standard first update)
    3) click system settings in the toolbar
    4) go to 'software and updates'
    5) go to the 'updates' tab
    6) enable the 'pre released updates (trusty proposed)' option
    7) reboot
    8) go back to 'software and updates', click the 'additional drivers' tab
    9) in the list, you'll see the 'open' drivers are selected. Switch to fglrx-updates (proprietary)
    10) reboot
    11) should work :)

    If things still fail, especially manifested by a 'hung' ethminer, this is probably a build issue, not a buntu issue. Go to my mining FAQ on this forums, i posted the commit that works with that exact same setup.

    Note that any other workaround will fail (and i'm aware of the 'cheese' trick etc... - tried them all until 330am on Friday night hahah). The above is the only way for now, it's a known buntu bug: https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/1424491
  • ConradJohnsonConradJohnson Member Posts: 130 ✭✭
    Thanks @stephantual . I'll give this a go when I get back to the house on Friday. I'm not afraid of wiping the computer. I've gotten pretty good at it actually the last few weeks.

    I'll report back.
  • acrosacros Member Posts: 63 ✭✭
    Wow, thanks @StephanTual , you're on top of it! I'll try too and report back
  • luc4luc4 Member Posts: 7
    @StephanTual @ConradJohnson @acros I also had some trouble too but it should work if you follow the FAQ mining guide. Just make sure that you start the miners with ./eth respectively ./ethminer and not just eth and ethminer (that will use your PPA version if you still have installed it ;) ) I can also confirm that fglrx (without -updates) works too. For my 280x it installed the version 15.20
  • acrosacros Member Posts: 63 ✭✭
    edited May 2015
    Still no dice on my end...

    One thing I find strange is that even though I downloaded 14.04.2, I still get:

    $ uname -a
    Linux kelly 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
    And yet this is the file I used (downloaded it today):

    $ sha256sum ubuntu-14.04.2-desktop-amd64.iso
    39eeb28bdb8af630850e75e54b9864ca07640a2bb10bd10055763236b99f9b1d ubuntu-14.04.2-desktop-amd64.iso
    (EDIT: I did do the update then upgrade)

    And using @Genoil 's trick from https://forum.ethereum.org/discussion/comment/8696/#Comment_8696, it also shows that it's not picking up on it:

    $ ./print-devices
    Error: No root privilege. Please check with the system-admin.
    platform 0: vendor 'Advanced Micro Devices, Inc.'
    device 0: 'AMD A6-7400K Radeon R5, 6 Compute Cores 2C+4G'
    Still in spite of:

    $ lspci -v | grep 'VGA controller'
    01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Curacao XT [Radeon R9 270X] (prog-if 00 [VGA controller])
    I believed I followed all instructions above to the letter, including the commits :-/ Maybe it's a problem with my card specifically... But I'll do it once more to be safe
  • zeelzebubzeelzebub Member Posts: 13
    I've been tinkering to get OpenCL mining working on ubuntu 14.04.2 for about a week now - I tried every configuration and every version of drivers I could think of... In the end, I ended up cloning the one installation tha did work because I couldn't replicate the build regardless of what I tried. I say this to point out that mining on ubuntu isn't quite as easy as cloning and compiling.. we need to identify the correct environment and distribute a script to replicate it. Did any of you mine DarkCoin? Someone released pretty neat multipart tool that set up the opencl drivers from scratch.. i found it pretty helpful... and honestly a good starting point for what we're doing here.
  • acrosacros Member Posts: 63 ✭✭
    @zeelzebub out of curiosity, what GPU do you have? Maybe it's something to do with our video cards model specifically (mine is Asus' Radeon R9 270X)
  • zeelzebubzeelzebub Member Posts: 13
    edited May 2015
    @across - The cloned drive worked well on R9 290 (XFX) and R9 270x (Sapphire). It turns out my working image is running fglrx 2:14.200-0ubuntu1 and kernel version 3.13.0-52-generic.

    I'm currently attempting a fresh build based on @StephanTual 's May 20 suggestion to use fglrx-updates from the app repository rather than the direct-from-AMD drivers, which I had been trying to get to work (unsuccessfully) for days. My only problem is that I'm not about to stop successful mining to run tests.

    I'm actually in a good position - my stuff works (based on a cloned drive). It does drive me a bit nuts that I can't explain it or replicate it.
  • acrosacros Member Posts: 63 ✭✭
    Looks like my latest comment didn't make it...
  • acrosacros Member Posts: 63 ✭✭
    Bottom line was: run another software update after having switched to fglrx-updates, that did the trick for me
  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    Another solution: just use 15.04 and don't bother with the eternally buggy 14.02.02. I've wiped and reinstalled this newer version and all my gfx drivers problems went away :)
  • acrosacros Member Posts: 63 ✭✭
    Thanks @StephanTual , that's what I ended up doing too :) I'm very happy with 15.04 in general actually! Qui l'eût cru...
  • keokeo Member Posts: 21
    Somehow 15.04 doesn't install properly for me:( will get back here as it's working.
  • Wil611Wil611 Member Posts: 77 ✭✭
    edited June 2015
    @StephanTual I've been mining successfully on Ubuntu with two AMD GPUs using eth and ethminer I want to start using geth instead of eth, is it possible to import my eth account into geth?
  • acrosacros Member Posts: 63 ✭✭
    @Wil611, you could just create another account via geth (after renaming your ~/.ethereum folder though), and keep both accounts around for the reward at Frontier. I wouldn't risk a cpp --> geth account transfer personnally...
  • Wil611Wil611 Member Posts: 77 ✭✭
    @acros thanks that's what I ended up doing.
Sign In or Register to comment.