Bitcoin Forum

Other => CPU/GPU Bitcoin mining hardware => Topic started by: ReCat on June 01, 2013, 07:41:53 PM



Title: OpenCL doesn't work unless if I log-in on the desktop, HD7950 with CentOS 6.4
Post by: ReCat on June 01, 2013, 07:41:53 PM
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.


Title: Re: OpenCL doesn't work unless if I log-in on the desktop, HD7950 with CentOS 6.4
Post by: turtle83 on June 01, 2013, 08:05:45 PM
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....


Title: Re: OpenCL doesn't work unless if I log-in on the desktop, HD7950 with CentOS 6.4
Post by: ReCat on June 01, 2013, 08:11:36 PM
I see. Thank you for the precise answer!


Title: Re: OpenCL doesn't work unless if I log-in on the desktop, HD7950 with CentOS 6.4
Post by: ReCat on June 01, 2013, 10:34:19 PM
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.