Bitcoin Forum
May 27, 2024, 08:14:02 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: OpenCL doesn't work unless if I log-in on the desktop, HD7950 with CentOS 6.4  (Read 1084 times)
ReCat (OP)
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 01, 2013, 07:41:53 PM
 #1

Hi. I have a question.

When I reboot my mining PC, and SSH to it, if I attempt to use OpenCL on it's ATI HD 7950, It doesn't work until I log-in from the GUI. It can't find any OpenCL devices.

Any idea on how to correct this problem?

Ideally I'd like to be able to remove the GUI and run it as a headless server.

Thanks.

BTC: 1recatirpHBjR9sxgabB3RDtM6TgntYUW
Hold onto what you love with all your might, Because you can never know when - Oh. What you love is now gone.
turtle83
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


Supersonic


View Profile WWW
June 01, 2013, 08:05:45 PM
 #2

I had the exact same issue with Ubuntu should be similar in CentOS. The problem is that the fglrx module can only be loaded by xorg, so youd need GUI available.

Here is how i run it in "headless" mode.
Set the OS to autologin as your user in GUI. Then throw away the monitor, dont need it anymore. On reboot, your user would get logged in automatically.

Then, when running the mining program (thru ssh or whatever), prepend it with
Code:
DISPLAY=:0.0 

If you can get this to work :-
Code:
DISPLAY=:0.0 aticonfig --odgt --od-getclocks
Then the mining application (cgminer, etc) will all work with "DISPLAY=:0.0 " before it.

Technically not headless since it needs user to be logged on locally, but since its now autologged in ... for practical purposes its headless.

Thats the short version... Long version is figure out some kind of minimalistic xserver which loads the fglrx modules....

ReCat (OP)
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 01, 2013, 08:11:36 PM
 #3

I see. Thank you for the precise answer!

BTC: 1recatirpHBjR9sxgabB3RDtM6TgntYUW
Hold onto what you love with all your might, Because you can never know when - Oh. What you love is now gone.
ReCat (OP)
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 01, 2013, 10:34:19 PM
 #4

Autologin is enabled in CentOS 6.4 like this.

Open the /etc/gdm/custom.conf file as root and add the following two lines under the [daemon] tag:


[daemon]
AutomaticLoginEnable=true
AutomaticLogin=your_autologin_username

The login username is case sensitive, I was stuck on this for a while. But I figured it out now.

Then, to get CGminer to detect your card with ADL working, run this.

export DISPLAY=:0
xhost +

I have it all in a script, so it should be no problem.

Just in case if it's useful for anyone.

BTC: 1recatirpHBjR9sxgabB3RDtM6TgntYUW
Hold onto what you love with all your might, Because you can never know when - Oh. What you love is now gone.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!