# overclocking nvidia card for cryptocurrency mining

## skunk

hello,

my desktop has and intel igp which i'm using with xorg and an nvidia card which i use exclusively for mining cryptocurrency and it works good enough.

since nvidia-drivers-337.12 linux users have the possibility to over/underclock newer cards (yay!) so i thought to try squeezing some more hashes from my card.

the desktop bios has an option for choosing from which gpu you want to boot and it's set to the igp.

now, in order to overclock the nvidia card i understand that i need to run an xorg instance on it with coolbits option enabled and then fire up nvidia-settings and do the overclocking there because nvidia-settings doesn't work from vt or from a xorg session not running on the nvida drivers...

the problem is i cannot start up the xorg server with the nvidia card, the error i get is "(EE) No devices detected."

the same xorg configuration file works fine when booting with the nvida card as primary display adapter, i even tried to add "BusID PCI:1:0:1" into the device section but no dice  :Sad: 

any hint is welcome, thank you!

----------

## eccerr0r

- Which card?

- Sure it's supported by your particular version of nvidia-drivers?

- all kernel options enabled for pci, etc.?

- Would be interesting to see more of your Xorg.0.log as it tends to also say why it can't find your card...

----------

## skunk

 *eccerr0r wrote:*   

> - Which card?

 

gtx660

```
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)

01:00.0 VGA compatible controller: NVIDIA Corporation Device 1185 (rev a1)
```

 *eccerr0r wrote:*   

> - Sure it's supported by your particular version of nvidia-drivers?

 

yes

 *eccerr0r wrote:*   

> - all kernel options enabled for pci, etc.?

 

as i said, it works fine when booting with it as primary display adapter

 *eccerr0r wrote:*   

> - Would be interesting to see more of your Xorg.0.log as it tends to also say why it can't find your card...

 

i don't see any other relevant messages in there, however here it goes:

```
[472664.750] _XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6

[472664.750] _XSERVTransOpen: transport open failed for inet6/mescalito:5

[472664.750] _XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

[472664.750] 

X.Org X Server 1.14.3

Release Date: 2013-09-12

[472664.750] X Protocol Version 11, Revision 0

[472664.750] Build Operating System: Linux 3.10.25-gentoo x86_64 Gentoo

[472664.750] Current Operating System: Linux mescalito 3.12.13-gentoo #3 SMP PREEMPT Tue Apr 1 16:35:58 CEST 2014 x86_64

[472664.750] Kernel command line: auto BOOT_IMAGE=old ro root=802 video=vesafb:mtrr,ywrap

[472664.751] Build Date: 24 January 2014  04:22:18PM

[472664.751]  

[472664.751] Current version of pixman: 0.32.4

[472664.751]    Before reporting problems, check http://wiki.x.org

        to make sure that you have the latest version.

[472664.751] Markers: (--) probed, (**) from config file, (==) default setting,

        (++) from command line, (!!) notice, (II) informational,

        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

[472664.751] (==) Log file: "/var/log/Xorg.5.log", Time: Fri Apr 18 11:55:45 2014

[472664.751] (==) Using config directory: "/etc/X11/xorg.conf.d"

[472664.751] (==) Using system config directory "/usr/share/X11/xorg.conf.d"

[472664.751] (==) ServerLayout "Layout0"

[472664.751] (**) |-->Screen "Screen0" (0)

[472664.751] (**) |   |-->Monitor "Monitor0"

[472664.751] (**) |   |-->Device "Device0"

[472664.751] (==) Automatically adding devices

[472664.751] (==) Automatically enabling devices

[472664.751] (==) Automatically adding GPU devices

[472664.751] (==) FontPath set to:

        /usr/share/fonts/misc/,

        /usr/share/fonts/TTF/,

        /usr/share/fonts/OTF/,

        /usr/share/fonts/Type1/,

        /usr/share/fonts/100dpi/,

        /usr/share/fonts/75dpi/

[472664.751] (==) ModulePath set to "/usr/lib64/xorg/modules"

[472664.751] (II) The server relies on udev to provide the list of input devices.

        If no devices become available, reconfigure udev or disable AutoAddDevices.

[472664.751] (II) Loader magic: 0x7fcb80

[472664.751] (II) Module ABI versions:

[472664.751]    X.Org ANSI C Emulation: 0.4

[472664.751]    X.Org Video Driver: 14.1

[472664.751]    X.Org XInput driver : 19.1

[472664.751]    X.Org Server Extension : 7.0

[472664.751] (II) xfree86: Adding drm device (/dev/dri/card1)

[472664.751] (II) xfree86: Adding drm device (/dev/dri/card0)

[472664.751] setversion 1.4 failed

[472664.752] (--) PCI:*(0:0:2:0) 8086:0162:1028:0527 rev 9, Mem @ 0xf7400000/4194304, 0xd0000000/268435456, I/O @ 0x0000f000/64

[472664.752] (--) PCI: (0:1:0:0) 10de:1185:10de:098a rev 161, Mem @ 0xf6000000/16777216, 0xe0000000/134217728, 0xe8000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288

[472664.753] Initializing built-in extension Generic Event Extension

[472664.753] Initializing built-in extension SHAPE

[472664.753] Initializing built-in extension MIT-SHM

[472664.753] Initializing built-in extension XInputExtension

[472664.753] Initializing built-in extension XTEST

[472664.753] Initializing built-in extension BIG-REQUESTS

[472664.753] Initializing built-in extension SYNC

[472664.753] Initializing built-in extension XKEYBOARD

[472664.753] Initializing built-in extension XC-MISC

[472664.753] Initializing built-in extension XINERAMA

[472664.753] Initializing built-in extension XFIXES

[472664.753] Initializing built-in extension RENDER

[472664.753] Initializing built-in extension RANDR

[472664.753] Initializing built-in extension COMPOSITE

[472664.753] Initializing built-in extension DAMAGE

[472664.753] Initializing built-in extension MIT-SCREEN-SAVER

[472664.753] Initializing built-in extension DOUBLE-BUFFER

[472664.753] Initializing built-in extension RECORD

[472664.753] Initializing built-in extension DPMS

[472664.753] Initializing built-in extension X-Resource

[472664.753] Initializing built-in extension XVideo

[472664.753] Initializing built-in extension XVideo-MotionCompensation

[472664.753] Initializing built-in extension XFree86-VidModeExtension

[472664.753] Initializing built-in extension XFree86-DGA

[472664.753] Initializing built-in extension XFree86-DRI

[472664.753] Initializing built-in extension DRI2

[472664.753] (II) LoadModule: "glx"

[472664.753] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so

[472664.763] (II) Module glx: vendor="NVIDIA Corporation"

[472664.763]    compiled for 4.0.2, module version = 1.0.0

[472664.763]    Module class: X.Org Server Extension

[472664.763] (II) NVIDIA GLX Module  334.21  Thu Feb 27 13:54:04 PST 2014

[472664.763] Loading extension GLX

[472664.763] (II) LoadModule: "nvidia"

[472664.763] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so

[472664.764] (II) Module nvidia: vendor="NVIDIA Corporation"

[472664.764]    compiled for 4.0.2, module version = 1.0.0

[472664.764]    Module class: X.Org Video Driver

[472664.764] (II) NVIDIA dlloader X Driver  334.21  Thu Feb 27 13:34:35 PST 2014

[472664.764] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs

[472664.764] (--) using VT number 9

[472664.905] (EE) No devices detected.

[472664.905] (EE) 

Fatal server error:

[472664.905] (EE) no screens found(EE) 

[472664.905] (EE) 

Please consult the The X.Org Foundation support 

         at http://wiki.x.org

 for help. 

[472664.905] (EE) Please also check the log file at "/var/log/Xorg.5.log" for additional information.

[472664.905] (EE) 
```

and yes, opengl is set to "nvidia" (/usr/lib64/xorg/modules/extensions/libglx.so -> ../../../opengl/nvidia/extensions/libglx.so.334.21)

i post also my xorg.conf just in case:

```
Section "ServerLayout"

    Identifier     "Layout0"

    Screen      0  "Screen0"

EndSection

Section "Monitor"

    Identifier     "Monitor0"

    VendorName     "Unknown"

    ModelName      "Unknown"

    HorizSync       28.0 - 33.0

    VertRefresh     43.0 - 72.0

    Option         "DPMS"

    Option "DPI" "96x96"

EndSection

Section "Device"

    Identifier     "Device0"

    Driver         "nvidia"

    VendorName     "NVIDIA Corporation"

    BusID          "PCI:1:0:0"

EndSection

Section "Screen"

    Identifier     "Screen0"

    Device         "Device0"

    Monitor        "Monitor0"

    DefaultDepth    24

    SubSection     "Display"

        Depth       24

    EndSubSection

EndSection
```

----------

## skunk

today suddenly i've got a xorg session on my nvidia card without changes (maybe a reboot was nedded?) and incrementing the gpu frequency by 200mhz i've squeezed extra 30kh/s (yay!)  :Smile: 

btw, if somebody wonders why overclocking parameters aren't working when introduced into nvidia-settings gui, you have to hit enter after writing the value (not immediately obvious because there's no apply button in the powermixer section).

----------

