Proofer
Member
Offline
Activity: 266
Merit: 36
|
|
December 21, 2011, 12:00:37 AM |
|
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.
|
|
|
|
BkkCoins
|
|
December 21, 2011, 12:27:29 AM |
|
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
Activity: 266
Merit: 36
|
|
December 21, 2011, 12:37:14 AM |
|
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: ~$ 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
Activity: 798
Merit: 500
|
|
December 21, 2011, 03:30:55 AM |
|
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: 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
|
|
December 21, 2011, 04:10:49 AM |
|
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: 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
|
|
December 21, 2011, 07:54:26 AM |
|
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
Activity: 266
Merit: 36
|
|
December 21, 2011, 08:04:38 AM |
|
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
|
|
December 21, 2011, 08:21:09 AM |
|
? 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 lspci and post the output?
|
|
|
|
ancow
|
|
December 21, 2011, 08:31:25 AM |
|
? 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): > 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
|
|
December 21, 2011, 08:46:13 AM |
|
If he ssh's into the machine with X forwarding active,
Aaah, gotcha. But why on earth would you forward X for mining?
|
|
|
|
-ck (OP)
Legendary
Offline
Activity: 4256
Merit: 1645
Ruu \o/
|
|
December 21, 2011, 10:23:58 AM |
|
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).
|
Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel 2% Fee Solo mining at solo.ckpool.org -ck
|
|
|
BkkCoins
|
|
December 21, 2011, 10:30:01 AM |
|
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
|
|
December 21, 2011, 10:34:08 AM |
|
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
|
|
December 21, 2011, 11:15:26 AM |
|
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
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
|
|
December 21, 2011, 11:24:19 AM |
|
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.
|
|
|
|
P4man
|
|
December 21, 2011, 12:53:27 PM |
|
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 instead of just ssh.
|
|
|
|
Proofer
Member
Offline
Activity: 266
Merit: 36
|
|
December 21, 2011, 04:16:35 PM |
|
... I think the above posters problem is simply using 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
|
|
December 21, 2011, 04:24:21 PM |
|
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
|
|
December 21, 2011, 05:51:32 PM |
|
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 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) #!/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
Activity: 1218
Merit: 1079
Gerald Davis
|
|
December 21, 2011, 06:42:32 PM |
|
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 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) #!/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"?
|
|
|
|
|