Bitcoin Forum
August 17, 2018, 12:32:42 AM *
News: Latest stable version of Bitcoin Core: 0.16.2  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 ... 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 [118] 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 ... 847 »
  Print  
Author Topic: OFFICIAL CGMINER mining software thread for linux/win/osx/mips/arm/r-pi 4.11.1  (Read 5761121 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
Proofer
Member
**
Offline Offline

Activity: 257
Merit: 10


View Profile
December 21, 2011, 12:00:37 AM
 #2341

Wait what?  What login screen?

Also just curious what happens if you try "cgminer -n"?

The Ubuntu 11.10 (Gnome?) login screen with a bar across the top containing the system name, the time, a short control ("gear") menu; a form for entering password, places to click for Other or Guest, and an Ubuntu 11.10 "logo" at the bottom left.  In other words, the first screen after boot that takes user interaction.

~$ cgminer -n
[2011-12-20 15:56:35] Error: Getting Device IDs (num)
[2011-12-20 15:56:35] clDevicesNum returned error, none usable
0 GPU devices detected

See also my next post.
BOUNTY PORTALS
BLOG
WHERE BOUNTY MANAGEMENT
MEETS AUTOMATION
SIGNATURE CAMPAIGNS
TWITTER
FACEBOOK
MEDIA CAMPAIGNS
AND MORE!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1534465962
Hero Member
*
Offline Offline

Posts: 1534465962

View Profile Personal Message (Offline)

Ignore
1534465962
Reply with quote  #2

1534465962
Report to moderator
1534465962
Hero Member
*
Offline Offline

Posts: 1534465962

View Profile Personal Message (Offline)

Ignore
1534465962
Reply with quote  #2

1534465962
Report to moderator
1534465962
Hero Member
*
Offline Offline

Posts: 1534465962

View Profile Personal Message (Offline)

Ignore
1534465962
Reply with quote  #2

1534465962
Report to moderator
BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000


firstbits:1MinerQ


View Profile WWW
December 21, 2011, 12:27:29 AM
 #2342

BTW I usually don't login thru graphical mode either. I find it does affect how the system behaves and my intention was always to use ssh to come in "the backdoor" from my notebook and do admin work. But when using ssh you have to be more fussy about DISPLAY=0: to make sure commands work. Best to add to .bashrc so it gets added to environment. Also, I have found the atitweak tool (discussed in another thread here) behaves better from ssh but is rarely needed when using cgminer since better control is available on screen now.

Proofer
Member
**
Offline Offline

Activity: 257
Merit: 10


View Profile
December 21, 2011, 12:37:14 AM
 #2343


Make sure you don't skip these commands any time you change GPU slots/combinations:

sudo aticonfig -f --initial --adapter=all
sudo reboot

Make sure cards are recognized correctly and listed with,

DISPLAY=:0 sudo fglrxinfo

Also see what you get listed from the SDK utility "clinfo". It should list any cards and CPU. If not then some initialization hasn't occurred.


The aticonfig -f --initial ... was done.

When logged in at the Ubuntu machine and using its monitor/keyboard, fglrxinfo lists six cards, aticonfig will show me the six 5970 cores' temperatures, cgminer -n will report 6; and clinfo will report on six GPUs and a CPU; for none do I need DISPLAY=:0 (it's already 0).

When logged in at the Ubunto machine and logged in via ssh from my Mac, all the preceding work OK if I prefix the commands with DISPLAY=:0.

When NOT logged in at the Ubunto machine and logged in via ssh from my Mac:
Code:
~$ echo $DISPLAY
localhost:10.0
~$ fglrxinfo
display: localhost:10.0  screen: 0
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GT 330M OpenGL Engine
OpenGL version string: 1.4 (2.1 NVIDIA-1.6.26)

~$ cgminer -n
[2011-12-20 16:33:08] Error: Getting Device IDs (num)
[2011-12-20 16:33:08] clDevicesNum returned error, none usable
0 GPU devices detected
~$ export DISPLAY=:0
~$ fglrxinfo
No protocol specified
Error: unable to open display (null)
~$ cgminer -n
No protocol specified
[2011-12-20 16:33:33] Error: Getting Device IDs (num)
[2011-12-20 16:33:33] clDevicesNum returned error, none usable
0 GPU devices detected



gnar1ta$
Donator
Hero Member
*
Offline Offline

Activity: 784
Merit: 500


View Profile
December 21, 2011, 03:30:55 AM
 #2344

When NOT logged in at the Ubunto machine and logged in via ssh from my Mac:

When I log into headless Ubuntu rigs from my Mac, I need to run the following to get cgminer to work:
Code:
export DISPLAY=:0
xhost +

I don't know why, I just know it works.  Something about access control???

Losing hundreds of Bitcoins with the best scammers in the business - BFL, Avalon, KNC, HashFast.
ancow
Full Member
***
Offline Offline

Activity: 373
Merit: 100


View Profile WWW
December 21, 2011, 04:10:49 AM
 #2345

When NOT logged in at the Ubunto machine and logged in via ssh from my Mac:

When I log into headless Ubuntu rigs from my Mac, I need to run the following to get cgminer to work:
Code:
export DISPLAY=:0
xhost +

I don't know why, I just know it works.  Something about access control???

If you don't log in, the X server is owned by root.

@Proofer: You can try "DISPLAY=:0 sudo xhost +", but don't be surprised if the behaviour goes right back to whatever it is when you log in graphically.

BTC: 1GAHTMdBN4Yw3PU66sAmUBKSXy2qaq2SF4
P4man
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500



View Profile
December 21, 2011, 07:54:26 AM
 #2346

Looks like everyone is overseeing this:
OpenGL renderer string: NVIDIA GeForce GT 330M OpenGL Engine

Proofer, is that the card you want to mine on? Its not like aticonfig will help with that card. You will need the nvidia restricted drivers for a start.

If thats the IGP and you also have AMD gpu's in the that machine, then you may have a problem. Ive not gotten a mix of nv and amd cards to work on ubuntu yet with restricted drivers. See if you can disable the nvidia igp in the bios, then try reinstalling the amd drivers.

Proofer
Member
**
Offline Offline

Activity: 257
Merit: 10


View Profile
December 21, 2011, 08:04:38 AM
 #2347

Looks like everyone is overseeing this:
OpenGL renderer string: NVIDIA GeForce GT 330M OpenGL Engine

Proofer, is that the card you want to mine on? Its not like aticonfig will help with that card. You will need the nvidia restricted drivers for a start.

If thats the IGP and you also have AMD gpu's in the that machine, then you may have a problem. Ive not gotten a mix of nv and amd cards to work on ubuntu yet with restricted drivers. See if you can disable the nvidia igp in the bios, then try reinstalling the amd drivers.

Nah, that's the display on my Mac from which I'm ssh'ing to the Ubuntu system.  The DISPLAY variable had that "display" in it, so that's what fglrxinfo reported on.
P4man
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500



View Profile
December 21, 2011, 08:21:09 AM
 #2348

? If you ssh in to the machine, that output is from the ubuntu rig, not your mac.
 
Just to make sure, can you ssh in to the ubuntu machine and run

Quote
lspci

and post the output?

ancow
Full Member
***
Offline Offline

Activity: 373
Merit: 100


View Profile WWW
December 21, 2011, 08:31:25 AM
 #2349

? If you ssh in to the machine, that output is from the ubuntu rig, not your mac.

If he ssh's into the machine with X forwarding active, the output will be from the machine he ssh's in from. The glxinfo command may be less confusing (local: ATI on debian; remote: NVidia on Ubuntu):

Code:
> glxinfo
name of display: localhost:11.0
display: localhost:11  screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
server glx vendor string: ATI
server glx version string: 1.4
server glx extensions:
[...]
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
[...]
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: AMD Radeon HD 6500M/5600/5700 Series
OpenGL version string: 2.1 (4.1.11251 Compatibility Profile Context)
OpenGL shading language version string: (null)
OpenGL extensions:
[...]

As you can see the "OpenGL ..." strings come from the local machine, not the one I ssh'd into.

BTC: 1GAHTMdBN4Yw3PU66sAmUBKSXy2qaq2SF4
P4man
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500



View Profile
December 21, 2011, 08:46:13 AM
 #2350


If he ssh's into the machine with X forwarding active,

Aaah, gotcha. But why on earth would you forward X for mining?

-ck
Moderator
Legendary
*
Offline Offline

Activity: 2618
Merit: 1123


Ruu \o/


View Profile WWW
December 21, 2011, 10:23:58 AM
 #2351


If he ssh's into the machine with X forwarding active,

Aaah, gotcha. But why on earth would you forward X for mining?
Because the GPU driver through X does the mining. i.e. you must use X and the GPU driver to mine with. They are absolutely essential (at this stage).

Primary developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org 1% Fee Solo mining at solo.ckpool.org
-ck
BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000


firstbits:1MinerQ


View Profile WWW
December 21, 2011, 10:30:01 AM
 #2352


If he ssh's into the machine with X forwarding active,

Aaah, gotcha. But why on earth would you forward X for mining?
Because the GPU driver through X does the mining. i.e. you must use X and the GPU driver to mine with. They are absolutely essential (at this stage).
I never forward X. I just ssh in and use Screen to view the cgminer status info. This has always worked fine for me. Screen allows me to detach and do other things on the miner while cgminer still runs, and also exit and come back later. While X needs to be running on the miner machine I don't think it needs to be forwarded. I've also noticed on the miner machine that when I logged in thru the gui the GPUs behaved differently and sometimes there was problems. Since I don't even have displays connected nowadays I never do that. Just ssh.

BTW is there some reason cgminer would have higher reject rates? I used to use phoenix and always got around 0.5-0.7% rejects but ever since using cgminer it's been between 4-8% typically. Not sure if it counts differently or what, but that's a pretty big difference. Seems to not matter which pool as I've tried ArsBitcoin, MtRed, Eclipse and get roughly the same.

The00Dustin
Hero Member
*****
Offline Offline

Activity: 807
Merit: 500


View Profile
December 21, 2011, 10:34:08 AM
 #2353

If he ssh's into the machine with X forwarding active,

Aaah, gotcha. But why on earth would you forward X for mining?
Because the GPU driver through X does the mining. i.e. you must use X and the GPU driver to mine with. They are absolutely essential (at this stage).
You don't forward X to use the GPU in Fedora, I wouldn't think it would be necessary in Ubuntu either, especially since I sounds like P4Man doesn't.  DISPLAY=:0 is how you access the GPU.  Proofer has mentioned that he's using X to do other things.  I don't understand why he can't make a separate SSH (or even VNC) session for those things, but if he's using screen or running cgminer in the background and keeping that SSH session open anyway, I don't think it's relevant that he's forwarding X since the same problem happens when he logs into the mining machine locally (even if he isn't running cgminer in screen or the background I don't think X forwarding is relevant, I assume he is still using DISPLAY=:0 to access the GPU).

EDIT:  BkkCoins beat me to the response regarding X, however, I've been wondering this for a while:
Proofer:  Can you remove overclocking from your GPUs just to test and see if this takes away (or delays) the lockup behavior?  It seems awfully quick to be a GPU lockup, but I don't really know what else it could be and it sounds an awful lot like a GPU lockup to me (maybe your PS is going bad or one of your GPUs is getting hot too fast for airflow/fan reasons).

EDIT2:  I don't remember if you said you were using --auto-gpu and auto-fan or not, but for the record, --auto-gpu locks up my single GPU eventually (--auto-fan may as well, I don't remember now), and I assume it's a GPU problem since so many people have success with those options.
P4man
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500



View Profile
December 21, 2011, 11:15:26 AM
 #2354

Because the GPU driver through X does the mining. i.e. you must use X and the GPU driver to mine with. They are absolutely essential (at this stage).

Im probably missing something here; but I just log in to my mining rigs using ssh without X forwarding and I run cgminer or any other miner just fine. If I were to forward X, it would try to use the GPU of my local (non mining) machine, which AFAICS is not what youd ever want. Why would you run cgminer executable on the machine that doesnt have the mining GPUs? Perhaps its theoretically possible, but why?

kano
Legendary
*
Offline Offline

Activity: 2548
Merit: 1052


Linux since 1997 RedHat 4


View Profile
December 21, 2011, 11:24:19 AM
 #2355

You're not forwarding X.
You are accessing X (by having DISPLAY set correctly)
That is required for ADL.
If you don't see Temp/Fan info that means DISPLAY is not set correctly or X isn't running.

Pool: https://kano.is Here on Bitcointalk: Forum BTC: 1KanoPb8cKYqNrswjaA8cRDk4FAS9eDMLU
FreeNode IRC: irc.freenode.net channel #kano.is Majority developer of the ckpool code
Help keep Bitcoin secure by mining on pools with full block verification on all blocks - and NO empty blocks!
P4man
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500



View Profile
December 21, 2011, 12:53:27 PM
 #2356

You're not forwarding X.
You are accessing X (by having DISPLAY set correctly)
That is required for ADL.
If you don't see Temp/Fan info that means DISPLAY is not set correctly or X isn't running.

This is quite true of course. I think the above posters problem is simply using
Code:
ssh -X
instead of just ssh.

Proofer
Member
**
Offline Offline

Activity: 257
Merit: 10


View Profile
December 21, 2011, 04:16:35 PM
 #2357

... I think the above posters problem is simply using
Code:
ssh -X
instead of just ssh.

I could use plain ssh for mining.  I've been using -X because almost all of my access to the gonna-be-miner system is remote and during setup and configuration it's occasionally useful to open a GUI app.  Remote: home office Macbook Pro; local: homebrew mining rig in laundry room due to power and noise considerations.

More generally, the relation between X Windows and non-display use of GPUs is on my list of things to understand better.  I reason abstractly that it's basically a kludge deriving from the original and still hugely primary use of GPUs for display.
P4man
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500



View Profile
December 21, 2011, 04:24:21 PM
 #2358

I could use plain ssh for mining.  I've been using -X because almost all of my access to the gonna-be-miner system is remote and during setup and configuration it's occasionally useful to open a GUI app.  Remote: home office Macbook Pro; local: homebrew mining rig in laundry room due to power and noise considerations.

So what happens if you start one ssh session without x forwarding to run the miner, and another with X forwarding for everything else? Assuming that works, try using 'screen' to detach the miner session  and you might even be able to reattach it in the ssh -X session. Alternatively just start cgminer from a startup script on the mining rig using screen and then reattach the session whenever you want.

BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1000


firstbits:1MinerQ


View Profile WWW
December 21, 2011, 05:51:32 PM
 #2359

As an example of how it may be done. Here's the upstart init script I use on Ubuntu for cgminer. It will start the miner upon booting regardless of any ssh session/login (user name here was "ubuntu" since this install came from a livecd, change to suit).

/etc/init/miner.conf
Code:
description     "Start BTC Mining"

start on runlevel [2345]
stop on runlevel [016]
kill timeout 30
script
  sleep 15
  cd /home/ubuntu
  exec /usr/bin/screen -dmS Miner su -c /usr/local/bin/startcg ubuntu
end script

And my simple startcg script handles environment and starting cgminer.
/usr/local/bin/startcg  (remember to chmod +x)
Code:
#!/bin/bash

export AMDAPPSDKROOT=/home/ubuntu/AMD-APP-SDK-v2.4-lnx32/
export LD_LIBRARY_PATH=${AMDAPPSDKROOT}lib/x86:${LD_LIBRARY_PATH}
export DISPLAY=:0

cgminer 2>>/var/log/cgminer.log
(you'll note I rely on the cgminer.conf for all options)

When you login with ssh you can type,

sudo screen -r

to re-attach to the cgminer screen. And Ctrl-A Ctrl-D to detach again.
I make an alias so I have less to type. eg.

alias mm='sudo screen -r'

put that in my .bashrc file so it gets loaded at login.

Now just mm attaches me to the cgminer screen.

DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1005


Gerald Davis


View Profile
December 21, 2011, 06:42:32 PM
 #2360

As an example of how it may be done. Here's the upstart init script I use on Ubuntu for cgminer. It will start the miner upon booting regardless of any ssh session/login (user name here was "ubuntu" since this install came from a livecd, change to suit).

/etc/init/miner.conf
Code:
description     "Start BTC Mining"

start on runlevel [2345]
stop on runlevel [016]
kill timeout 30
script
  sleep 15
  cd /home/ubuntu
  exec /usr/bin/screen -dmS Miner su -c /usr/local/bin/startcg ubuntu
end script

And my simple startcg script handles environment and starting cgminer.
/usr/local/bin/startcg  (remember to chmod +x)
Code:
#!/bin/bash

export AMDAPPSDKROOT=/home/ubuntu/AMD-APP-SDK-v2.4-lnx32/
export LD_LIBRARY_PATH=${AMDAPPSDKROOT}lib/x86:${LD_LIBRARY_PATH}
export DISPLAY=:0

cgminer 2>>/var/log/cgminer.log
(you'll note I rely on the cgminer.conf for all options)

When you login with ssh you can type,

sudo screen -r

to re-attach to the cgminer screen. And Ctrl-A Ctrl-D to detach again.
I make an alias so I have less to type. eg.

alias mm='sudo screen -r'

put that in my .bashrc file so it gets loaded at login.

Now just mm attaches me to the cgminer screen.

Interesting setup.  A couple questions
1) What starts miner.conf on boot.
2) You say you use cgminer.conf to handle configuration but I don't see where you reference it (or the -c parameter).  What am I missing?
3) What does the "-c" do in the line "exec /usr/bin/screen -dmS Miner su -c /usr/local/bin/startcg ubuntu"?
Pages: « 1 ... 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 [118] 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 ... 847 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!