NVIDIA Drivers
#1
Summary:  
When I run any nvidia-settings command (such as nvidia-settings -a GPUPowerMizerMode=1 -a GPUFanControlState=1 -a GPUCurrentFanSpeed=90 -a GPUGraphicsClockOffset[3]=100) I get errors:

Code:
# sudo nvidia-settings -q GPUCurrentClockFreqs

** (nvidia-settings:18807): WARNING **: Could not open X display


Full Details:
Per other postings, I performed an "OpenSSH Server" install of Ubuntu 14.04.1.

I then d/l'ed the latest NVIDIA Drivers straight from the NVIDIA site:   NVIDIA-Linux-x86_64-367.35.run

I Ran:

Code:
apt-get install -y build-essential p7zip unrar unzip
bash NVIDIA-Linux-x86_64-367.35.run 
apt-get install linux-headers-4.4.0-31-generic build-essential libx11* libxnvctrl-dev

dpkg --remove-architecture i386
aptitude update && aptitude full-upgrade
sync && reboot

Then, I found a few posts about some nvidia-settings commands for headless systems:

Code:
nvidia-xconfig -s -a --force-generate --allow-empty-initial-configuration \
    --cool-bits=12 --registry-dwords="PerfLevelSrc=0x2222" \
    --no-sli --connected-monitor="DFP-0"

sed -i '/BusID.*/a \ \ \ \ Option         "Interactive" "False"' /etc/X11/xorg.conf

...and lastly...

Code:
nvidia-settings -a GPUPowerMizerMode=1 \
                -a GPUFanControlState=1 \
                -a GPUCurrentFanSpeed=90 \
                -a GPUGraphicsClockOffset[3]=100

However, anything I do with the nvidia-settings command results in errors:

Code:
# sudo nvidia-settings -q GPUCurrentClockFreqs

** (nvidia-settings:18807): WARNING **: Could not open X display

ERROR: The control display is undefined; please run `nvidia-settings --help` for usage information.

...or...

Code:
$ sudo nvidia-settings -a GPUPowerMizerMode=1 -a GPUFanControlState=1 -a GPUCurrentFanSpeed=90 -a GPUGraphicsClockOffset[3]=100

error: XDG_RUNTIME_DIR not set in the environment.

ERROR: The control display is undefined; please run `nvidia-settings --help` for usage information.

Any suggestions what I could have done wrong or what I could do to correct this?

Thank you for any feedback, your assistance is appreciated.
#2
What about /etc/X11/xdm/Xsetup? Does it contain this:
Code:
export PATH=/bin:/usr/bin:/sbin
export HOME=/root
export DISPLAY=:0
xset -dpms
xset s off
xhost +

And: ~/.bashrc and /etc/skel/.bashrc?
Code:
export DISPLAY=:0

Then run:
Code:
update-rc.d xdm defaults
sync && reboot

To be found here.

By the way: I finally installed to 14.04, because I did't get it running properly on ubuntu 16.04.
#3
So, I do not even have a /etc/X11/xdm directory.  I have a /etc/X11 directory that contains:

-rw-r--r-- 1 root root 17394 Dec  3  2009 rgb.txt
-rw-r--r-- 1 root root  1494 Aug 14 12:46 XF86Config
-rw-r--r-- 1 root root     0 Aug 14 12:46 XF86Config.nvidia-xconfig-original
drwxr-xr-x 2 root root  4096 Aug 15 22:36 xinit
drwxr-xr-x 2 root root  4096 Jan 15  2014 xkb
-rw-r--r-- 1 root root  3474 Aug 15 22:47 xorg.conf
-rw-r--r-- 1 root root  1538 Aug 15 22:47 xorg.conf.backup
-rw-r--r-- 1 root root  1538 Aug 15 22:47 xorg.conf.nvidia-xconfig-original
-rwxr-xr-x 1 root root   709 Apr  1  2010 Xreset
drwxr-xr-x 2 root root  4096 Aug 14 12:18 Xreset.d
drwxr-xr-x 2 root root  4096 Aug 14 12:18 Xresources
-rwxr-xr-x 1 root root  3730 Oct  8  2014 Xsession
drwxr-xr-x 2 root root  4096 Aug 15 22:36 Xsession.d
-rw-r--r-- 1 root root   265 Jul  1  2008 Xsession.options
-rw-r--r-- 1 root root   601 Aug 14 12:18 Xwrapper.config


It would appear maybe I overlooked or missing installing something?  But the /etc/X11 dir is there, just not the Xsetup you mentioned.

Obviously, I could create that directory, but I am curious if I missed installing a package.  Any thoughts?
#4
I know I did not perform this step from the link you provided: https://hashcat.net/wiki/doku.php?id=linux_server_howto


Code:
aptitude install build-essential dkms xserver-xorg xserver-xorg-core \

xserver-xorg-input-evdev xserver-xorg-video-dummy x11-xserver-utils fglrx xdm


However, from reading I was under the impression that step was only for AMD cards.  Maybe I'll try that step on my rig and see if that helps.
#5
I ran into the same mistake, but nvidia-settings seem to need that.

EDIT: Maybe we don't need fglrx for nvidia cards, right?
#6
You should not install fgrlx for nvidia cards, but the rest is all the same for both amd and nvidia.
#7
Thank you!  Installing those packages corrected my issues.