All posts by phobic

Installing xmr-stak-cpu on Ubuntu

I have an “old” computer I also wanted to setup for Montero mining.  It’s really unstable on a Windows install, so I wanted to install Linux on it. It’s nice to have different computers with all kinds of OS’s on them.

I downloaded Ubuntu 16.04.3 LTS, put on an USB stick with LinuxLive USB Creator , installed and booted up.

Quick and dirty commands:

This gives you something like this:

Add/replace the above to the config file:

Also add this, maybe change to your wallet address:

CTRL+X , YES – to exit and save

Start the mining:

if you get this error,

you need to configure large page support:

Add these lines at the bottom of the file:

Try mining again:

If you get this error:

Then you need to run mining with sudo.

If everything is OK, you will get an output like this:

After some minutes, you can press ‘h’. This is the results if using 4 cores on a Intel Core i7-4770K 3.5GHz


sudo apt install linuxbrew-wrapper


cd Downloads/
git clone
cd xmr-stak-nvidia
cmake .

CMake Error at /usr/share/cmake-3.5/Modules/FindCUDA.cmake:617 (message):

Browse to:
In my case go to Linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network)


sudo sh

CTRL+C for skipping 200 pages of EULA

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 375.26?
(y)es/(n)o/(q)uit: n

Install the CUDA 8.0 Toolkit?
(y)es/(n)o/(q)uit: y

karstein@phobic-ubuntu:~/Downloads$ lspci | grep -i nvidia01:00.0 VGA compatible controller: NVIDIA Corporation G92 [GeForce 8800 GT] (rev a2)
karstein@phobic-ubuntu:~/Downloads$ cd xmr-stak-nvidia
karstein@phobic-ubuntu:~/Downloads/xmr-stak-nvidia$ cmake .

— Configuring done
— Generating done
— Build files have been written to: /home/karstein/Downloads/xmr-stak-nvidia

make install -Wno-deprecated-gpu-targets

karstein@phobic-ubuntu:~/Downloads/xmr-stak-nvidia$ make install
[ 4%] Building NVCC (Device) object CMakeFiles/xmr-stak-nvidiaCuda.dir/nvcc_code/
nvcc warning : The ‘compute_20’, ‘sm_20’, and ‘sm_21’ architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The ‘compute_20’, ‘sm_20’, and ‘sm_21’ architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
[ 9%] Building NVCC (Device) object CMakeFiles/xmr-stak-nvidiaCuda.dir/nvcc_code/
nvcc warning : The ‘compute_20’, ‘sm_20’, and ‘sm_21’ architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The ‘compute_20’, ‘sm_20’, and ‘sm_21’ architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
Scanning dependencies of target xmr-stak-nvidiaCuda
[ 14%] Linking CXX static library libxmr-stak-nvidiaCuda.a
[ 14%] Built target xmr-stak-nvidiaCuda
Scanning dependencies of target xmr-stak-nvidiaCrypto
[ 19%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_groestl.c.o
[ 23%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_skein.c.o
[ 28%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_keccak.c.o
[ 33%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_blake256.c.o
[ 38%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/soft_aes.c.o
[ 42%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_jh.c.o
[ 47%] Linking C static library libxmr-stak-nvidiaCrypto.a
[ 47%] Built target xmr-stak-nvidiaCrypto
Scanning dependencies of target xmr-stak-nvidia
[ 52%] Building CXX object CMakeFiles/xmr-stak-nvidia.dir/webdesign.cpp.o
[ 57%] Building CXX object CMakeFiles/xmr-stak-nvidia.dir/console.cpp.o
[ 61%] Building CXX object CMakeFiles/xmr-stak-nvidia.dir/socket.cpp.o
[ 66%] Building CXX object CMakeFiles/xmr-stak-nvidia.dir/jpsock.cpp.o
[ 71%] Building CXX object CMakeFiles/xmr-stak-nvidia.dir/jconf.cpp.o
[ 76%] Building CXX object CMakeFiles/xmr-stak-nvidia.dir/executor.cpp.o
[ 80%] Building CXX object CMakeFiles/xmr-stak-nvidia.dir/minethd.cpp.o
[ 85%] Building CXX object CMakeFiles/xmr-stak-nvidia.dir/httpd.cpp.o
[ 90%] Building CXX object CMakeFiles/xmr-stak-nvidia.dir/cli-miner.cpp.o
[ 95%] Building CXX object CMakeFiles/xmr-stak-nvidia.dir/crypto/cryptonight_common.cpp.o
[100%] Linking CXX executable bin/xmr-stak-nvidia
[100%] Built target xmr-stak-nvidia

cd bin

sudo ./xmr-stak-nvidia config.txt

No CUDA device found!


A modprobe blacklist file has been created at /etc/modprobe.d to prevent Nouveau from loading. This can be reverted by deleting /etc/modprobe.d/nvidia-graphics-drivers.conf.
A new initrd image has also been created. To revert, please replace /boot/initrd-4.10.0-35-generic with /boot/initrd-$(uname -r)-backup.

*** Reboot your computer and verify that the NVIDIA graphics driver can ***
*** be loaded. ***


No CUDA device found!

Monero Mining

I have started a attempt to mine some cryptocurrency. Mostly for fun. This is I good tutorial for installing on Windows 10.

For my Macbook I used this page, where they have compiled xmr-stak-cpu for MacOS.

Following this tutorial, opening (from Finder) the Unix executable xmr-stak-cpu – I get this error.

I can’t find any solutions by googling, so I tried some different stuff myself. The easy fix is to drag and drop the xmr-stak-cpu file, then the config.txt file to Terminal. Somehow using the full path on both files, makes it work.

Now xmr-stak-cpu suggests the correct settings for the CPU. Copy and paste into config.txt, add your pool address/ wallet.

Run program again. Your will se something like this.

The hash rate of my Macbook.

The hash rate of my NVIDIA GeForce GTX 3GB.

The hash rate of my Intel Corei5-74003 Ghz (using 3 cores)



Wordbrain Solver – 6×6 – With filtering v.3

I have shortened down some of the code, added clearing of screen before printout and added support for 6×6 puzzles. I have not got this far yet, so I have no idea on the runtime. But I’ll guess it is exponential from 5×5. This means I need to add the check of two first and last letters, maybe also another one for the three first and last letters. I wanted to add some more sexiness to the printout, so I made an old school percentage bar. When I start the program in Terminal, it looks like this.

The new code is here:



Wordbrain solver – letter permutations

When you are stuck after partly solving a puzzle, there is a chance that the puzzle is solved in the wrong order. Using my path seeking algorithm might not work, since the letter are in the wrong place in the matrix. The remaining letters are however correct. This is why I made a simple program for finding all possible permutations of the remaining letter, disregarding the location. The program also compares against the Norwegian dictionary. You type in the letters and choose length of the word.

The program uses a library for permutations:

Norwegian dictionary as Python dict format: wordDict.txt

Terminal output:

Wordbrain Solver – 5×5 – Brute-Force with filtering v.2

Second attempt for this. The previous 5×5 code was estimated to use 12.5 days to get all possible words. Going through the code, I found some weak spots:

  • No control of word length. The program was traversing through words of lengths up to 25. This means extremely long paths with extremely many different variations. Reduced this to maximum traversing 9 letter words.
  • Checking all possible paths, even some that was unnecessary. I made a new dictionary containing all existing first-and-last letters  in a Norwegian dictionary. This way, instead of checking all possible paths between example ‘z’ to ‘ø’, I can skip all these paths immediately, as no words starts and ends with these letters. This would skip 1/600th of the total time.

This reduced the solution time from 22500 minutes to around 7 minutes (!!!). The 4×4 puzzles was also reduced from 10 minutes to 40 seconds.

Implementations for next version:

  • Create a wordlist for all two-first and two-last characters existing from Norwegian dictionary words. This will skip even more unnecessary paths for finding words.
  • Add a filter for the words lengths necessary, the puzzles will show example three-letter, five-letter and nine-letter word.
  • Move all found words to separate dicts and make a function that deletes all words containing one letter, in cases when a word found contains the last letter of one type. This is a quick way to “thin out” the possible words.