Norwegian TwoClock Clone v.1

I loved the TwoClock since the first time i saw it. But the prices were insain. And I thought, how difficult could it be to make it myself?

I had a couple of 8×8 RGB matrices laying around, and with help of the great Adafruit tuturials ( figured out how to address the RGB pixels.

Started the deveoping of code with the Arduion Mega 1280, for easy access to IO. When I was done, I moved on to use Arduino Pro Mini ATmega328P clones from China.

The norwegian telling of time is a bit different from english. instead of “half past one”, we say “half two”. And “twenty past two” becomes “ten to half three”. So my code is pretty much useless for the rest of the world, unless you redo the logics.

Code is here:

Cycling through possible combination, 5 minutes per second

Facebook Comments

Ubuntu Kernel 4.13.0-26 breaks AMD Drivers on mining rigs

A week ago my Ubuntu mining rigs started failing one by one. The only thing I had done was rebooting them.

LSHW shows all display cards as *-display UNCLAIMED. Googling a solution for this got no definitive solution, everywhere they say the AMD driver was broken.

CLINFO shows zero GPU’s

Starting XMR-STAK-AMD gives this error, meaning it can’t find any GPUs.

Since I had spent so many hours trying on trying to fix this issue, I came to the conclusion that the easy fix was to just reinstall Ubuntu 16.04 with new driver install. And after the install, I would prevent the kernel from updating with this command:

Show the menu choices at Grub start

Meny items starts at 0. The kernel version I want to switch to is 4.10.0-28-generic which is item number 6. Open Grub and setup this meny item.

Change this line from 0 to 6.

Update Grub and reboot




Facebook Comments

IOTA node

Create your own IOTA node.

This looks awesome.

Connect your IOTA Lightwallet to a norwegian (my) server:

Facebook Comments

Running XBIAN Kodi on SSD on Raspberry Pi 3

I have build my own little cinema room with a 109″ projector screen. Through the years I have used prettu much every media player there is. There is allways some limitations on control, display and movie handling. The latest years I have used Kodi media player, formerly known as XBMC, on a Raspberry. First on a RPi 1, this could only play 720p smoothly, then on a RPi2 that played 1080p smooth, but not including DTS sound. At last we got RPi that plays 1080p with any sound perfectly.

But still I’ve had some glitches playing movies over the network, even with 100MBit networks speed. So I though there was some buffering problems. Found the settings for buffering, and killed my MicroSD card in a week…

I have a bunch of small SSD laying around, and some I have put in a USB cover. The SSD would handle all the buffering writes much better. And maybe it would be faster.

Here is the step by step guide that worked for me.

    • Download XBIAN Kodi, there are others, but this one have worked best for me.
    • Burn to MicroSD card with Rufus (Windows), Etcher (Windows/MacOS) or Linux Live USB Creator. All these works perfect.
    • Boot up with MicroSD to check the system is running OK. Note the IP in Kodi.
    • Clone the Xbian Kodi MicroSD to SSD with this Adafruit guide. Pay attention to page 2 where you set up the Rpi to boot from SSD. The MicroSD card still have to be mounted.
    • SSH to the Rpi with defult login: xbian and password:raspberry


<cache> – When set to 0 the cache will be written to disk instead of RAM
<buffermode> – 1) Buffer all filesystems (including local)
<readfactor> – This factor determines the max readrate in terms of readfactor * avg bitrate of a video file. 

  • Starting up Xbian Kodi with this setup from SSD, and I can play 40GB Bluray rips *cough* I mean backups, over network with no problem. The menus are also much faster.

Facebook Comments

Useful Linux (Ubuntu) commands

I will collect some of the most useful Ubuntu terminal commands here, as I keep forgetting them…

  • Reconfigure timezone, and automatically set time:

  • Install OpenSSH server:

  • Show IP addresses of the network cards

  • Connect to ssh on Ubuntu:

  • Show graphics driver info

  • Fix – Unable to mount unclean NTFS disk after not correct shutdown of Windows.


  • Check GPU sensor temps in Terminal

  • Force booting in Terminal

  • Show running kernel version

  • Freeze kernel version

  • Save changes and update/rebuild grub.

CTRL+SHIFT+F1/F2/F3 to open different Terminal logins

Facebook Comments

My crypto overview


Monero: 43421mVq64BcqHos2QWsjpMmEPJLx5rmQTcrvCPeyRaEN7XzMsa2nqF9HtCTZhMY9gDrJt2CDgzBweHLPtDbDHmGRPj9rXN

Sumo: Sumoo1CvNjKB3yTWiwDowKFZCrPkf74fg2BApVy1QAYrVTEfETjfkUsdwRyvhQbhh7MXsQ4sb6rcR1NDfezcwbah72DyjWYCA4J

Masari: 5iAnLwpjUUyFFvLCKNNQds5TMnnaCHrWi2k5QS6B5t4JJhLAWRgd5SVEyqBZr5t7Ws1hrBsJv2u2VFq9ghiQSpHTCqvAp7g

Electronium: etnk3crkVJVCtP6L41KAUgDAKC6yQuCi9GAT4bAXwVsD18qhNKAut5M92L4sR6zu2oNVELmALFcppMsj7WVsZXYM5vKSrRx1Nm

Facebook Comments

XMR-STAK-AMD on Ubuntu Server 16.04 and AMD HD 7870

I bough an old desktop, since one of my other test desktops died. Of course I wanted to set it up for XMR mining. I spend countless hour trying to install some OS one it, but they all failed. Googled my ass off. Tested the memory – all red… Why didn´t I start with that. Anyway, this setup worked.

Since Ubuntu Server comes with no GUI, I used my Macbook with SSH, so I could copy+paste stuff. At Mac Terminal

Accept crypt key and enter password. (Change IP and username).

Of all the tutorials I tried, the one from AMD got me the furthest. All the reboots are important. Updating the system.

Download AMDGPU-PRO Driver Version 17.30 for Ubuntu 16.04.3

For some reason wget did not work for me on this file, so I downloaded the file to my Macbook and copied to Ubunty with scp. From Mac Terminal, in download folder:

Back to Ubuntu.

Check if you are member of the video group.

If you are not in the group, add with this command (karstein = your username)

Log off and on again to make the change.

The AMDGPU-Pro driver package incorporates the ROCm component that can be optionally installed for running Compute/OpenCL applications.  Not entirely sure if I need it for mining, but this step made stuff work.


Install the opencl headers.

Now for the XMR-STAK-AMD compile. Normally it works with just cmake, but I got so many errors – and again hours of googling. Cmake needs all the parameters. It is possible to make symlinks for the libraries, but for me that didn’t work.

The last line creates a needed script file. Add the lines below. CTRL+X, Y + Enter for saving.

If you don´t start XMR-STAK-AMD with this export script you will get the following error, which sent me on a wild goose chase for some hours.

Open the config file for editing.

Change these lines.

There are lots of other settings to set, but these are the ones that makes it work. Intensity can probably go up to 7-800, but then the GPU got unstable and crashed. Some sites can use pool_password as identifier for your computers.

Make the startup script executable.

Finally, start XMR-STAK-AMD with

You should get a nice printout like this. will give you nice stats for each pc.

Facebook Comments

Installing xmr-stak-nvidia on Ubuntu 16.04


EDIT: If you are REALLY lazy, download this script. Do a chmod on the file:

Be sure to read the text below, as you have to input some text while in nano.

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 everything is OK, you will get an output like this:

After some minutes, you can press ‘h’. This is the results if using Nvidia Geforce 1080


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

Facebook Comments


I have spent countless hours trying to install CUDA on my old computer with Geforce 8800 GT with Ubuntu 16.04 – and according the matching google hits, several others also have problems.

But my main conclusion is, for NVIDIA Geforce 8800 GT:

  • Only works with the Nvidia 340 driver
  • Does not work with higher CUDA version than 6.5
  • Do NOT install OPENGL drivers on Ubunty, it will destroy your graphical boot up, and it is so much hazzle getting it to work, that you’d rather install Ubuntu again. Which I have done – like 15 times…

Of all the tutorials and forum posts I have found, this is the only one actually working:

But I had to modifiy it for my use, and that is the tutorial below.

Installing CUDA 8.0 on clean install Ubuntu 16.04 with NVIDIA Geforce 8800GT

Install build essentials and do an update.

Download 64-bit Ubuntu driver from NVIDIA.

Open up a terminal (CTRL+SHIFT+T) and check if the downloaded file is executable, it should be green.

If it is white, it’s not executable, and you have to run:

You can now extract the separate installers via:

Download NVIDIA-Linux-x86_64-340.104 instead of the default nvidia-304.29 that comes with the toolkit from here:

Completely uninstall anything in the Ubuntu repositories with nvidia-* A purge will completely uninstall programs and configuration.

No need to create an xorg.conf file. If you have one, remove it (assuming you have a fresh OS install).

Create theblacklist-nouveau.conf file

Add these two lines:

Then do:

Reboot computer. Nothing should have changed in loading up menu. You should be taken to the login screen. Once there type: Ctrl + Alt + F1, and login to your user. Keep the next commands handy in another machine since now you are in tty.

In tty:

The top line is a necessary step for installing the driver. Then do

Direct quote from Abhijeet Kislay, and this is what makes the differense from ALL other tutorials and forum posts I have seen!

I cannot stress how important is the opengl flag in the above command. If you miss that, either you will get stuck in “login loop” or your computer would boot with a black screen at all times.

If you get a problem with the driver saying X is running, do this, and try again:

Install the toolkit

Set Environment path variables in .bashrc

Verify the driver version

Answer will be something like this

Check CUDA driver version:


At this point you can switch the lightdm back on again by doing:

Fix/break the header file that doesn’t want to let us use gcc > 4.8. All we are going to do is comment out (//) the error line that drops you out of a build.

In nano press CTRL+SHIFT+_ to enter line number.

Line: 82 – comment out error //#error — unsupported GNU version! gcc 4.9 and up are not supported!

To see if we are properly done with the installation, we need to run a sample.

Something like this should show up

And now everything works perfect.



Sjekk ut:


Facebook Comments