cgminer doesn't detect GPU in ssh session

3

1

I have AMD Radeon HD 6450 card and Ubuntu is my OS. If I log in normally and start cgminer it works properly and detect my graphic card. Now my monitor is turned off and I connect to my computer by ssh. In this scenario cgminer does not detect my graphic card:

[2013-12-22 13:35:09] Started cgminer 3.7.2
 [2013-12-22 13:35:09] clDevicesNum returned error, no GPUs usable
 [2013-12-22 13:35:09] No devices detected!
 [2013-12-22 13:35:09] Waiting for USB hotplug devices or press q to quit
 [2013-12-22 13:35:09] Probing for an alive pool
 [2013-12-22 13:35:09] Pool 0 difficulty changed to 256
 [2013-12-22 13:35:10] Network diff set to 3.23K

I suspect that the card is idle because monitor is turned off. To solve this I enabled X11 forwarding in my ssh session but It did not help.

sudo aticonfig --lsa
* 0. 01:00.0 AMD Radeon HD 6450

* - Default adapter

What can be cause of that situation? Is possible that card is idle? How to check that and how to force card to starts?

EDIT

My cgminer start script:

#!/bin/sh
export DISPLAY=:0
export GPU_MAX_ALLOC_PERCENT=100
export GPU_USE_SYNC_OBJECTS=1
cd /mypath/cgminer-3.7.2-x86_64-built
./cgminer [parameters]

EDIT

sudo aticonfig --adapter=all --odgt
No protocol specified
No protocol specified
ERROR - X needs to be running to perform AMD Overdrive(TM) commands

Mariusz

Posted 2013-12-22T12:42:44.690

Reputation: 131

also remember after version 3.7.2 he doesn't support gpu, well it say no devices found in the latest build. but in the bitcoin talk forums the final build was 3.7.2 that had gpu support... https://github.com/ckolivas/cgminer Q: What happened to CPU and GPU mining? A: Their efficiency makes them irrelevant in the bitcoin mining world today and the author has no interest in supporting alternative coins that are better mined by these devices. sooooo, just grab from here the 3.7.2 precompiled http://ck.kolivas.org/apps/cgminer/3.7/ ALSO, i usually have to use cgminer first to find my ati, then fir

– None – 2013-12-29T15:34:40.077

Answers

1

The reason for this is that the X-Server that is handling the GPUs is not available in the SSH session. Try prefixing all commands with DISPLAY=:0. This tells cgminer which X-Server instance to use. The cgminer command then simply becomes:

DISPLAY=:0 ./cgminer -u ...

You can also fix this for the current session with the following

export DISPLAY=:0

this defines the variable in a bash shell (see your shell's documentation for details if you're using another shell). Putting this into your .bashrc file might be a good idea if you intend to use it only over SSH .

cdecker

Posted 2013-12-22T12:42:44.690

Reputation: 8 234

I have export DISPLAY=:0 in my script which starts cgminer. I added my start script to my question. – Mariusz – 2013-12-22T13:51:13.250

1

Make sure you have a X session launched.

Either have it auto-login or manually walk over and login in. Then try your mining script again. This messed with me for a couple hours.

pro547

Posted 2013-12-22T12:42:44.690

Reputation: 111

How to start X session? I spent many hours on this and I don't know how to start X session. If you mean X11 forwarding in ssh session then X11 forwarding does not solve issue. – Mariusz – 2014-01-14T12:56:03.860

1

You may get better help from this guide (talked about cgm 3.7.2, etc).

http://silverlinux.blogspot.com/2013/10/minimal-headless-opencl-cgminer-on.html

mark

Posted 2013-12-22T12:42:44.690

Reputation: 11

Blog is now offline an can be found in the archives: https://web.archive.org/web/20190624023359/http://silverlinux.blogspot.com/2013/10/minimal-headless-opencl-cgminer-on.html

– Daywalker – 2021-02-05T12:12:55.413