Category Archives: Operating Systems

Scanning the disk and testing the memory on Windows 10 PC.

My Windows 10 PC started to glitch a little bit and I scanned its disks with the following commands:

chkdsk C: /f /r /x
The type of the file system is NTFS.
Cannot lock current drive.

Chkdsk cannot run because the volume is in use by another
process.  Would you like to schedule this volume to be
checked the next time the system restarts? (Y/N) y

This volume will be checked the next time the system restarts.
(more…)

Adding interstitial ads to a QT application on Android platform

I keep working on my Lines Game and probably I try to make it the best Lines Game in the world, but there is some disappointing incident that prevents it from being the best and makes it a usual game that glitches a bit. To see the glitch in action download the beta version of the game.

Adding Interstitial Ads to a QT application on Android platform is an interesting and relatively exciting job. I learned the following facts while doing it:

  1. To build my app with Google Play Services I add com.google.android.gms:play-services-ads:18.1.1 dependency to build.gradle and add com.google.android.gms.version and com.google.android.gms.ads.APPLICATION_ID to the manifest.
  2. I do not specify additional permissions (uses-permission attributes INTERNET, WRITE_EXTERNAL_STORAGE, ACCESS_NETWORK_STATE) required by ads, but they are detected automatically when I upload the app to Google Play store and the used is not prompted to allow them when the app starts.
  3. QT main thread (on which QML UI is run) is not Android UI thread. So I cannot call Java advertising API from QML or C++ directly, but all the calls should be queued with runOnUiThread method.
  4. To access Context required by Java advertising API I replace QtActivity with my own custom activity that implements all the advertising logic and forwards all the lifecycle events to original QtActivity.
  5. When the interstitial ad is open my activity is paused and stopped (onPaused / onStopped event handlers are called in Java and onApplicationStateChanged with Qt::ApplicationInactive / Qt::ApplicationSuspended respectively ) and when the interstitial ad is closed my activity is resumed but in different ways either with onRestart.
(more…)

Timed out waiting for device dev-disk-by/… while booting Ubuntu 18.04 up.

My Ubuntu 18.04 installed in Windows 10 HyperV virtual machine stopped booting up with the following errors:

(more…)

Mining BEAM with GeForce GTX 1060 3GB on HiveOS

It is still possible to mine BEAM with GeForce GTX 1060 3GB and GMiner on HiveOS. GMiner takes 2862MB on GPU0 and 2850MiB on GPU1-7:

(more…)

Setting up time synchronization on Ubuntu

I followed the official Ubuntu time synchronization guide and installed chrony:

sudo apt update
sudo apt install chrony
cat /etc/chrony/chrony.conf
chronyc sources
chronyc sourcestats
sudo systemctl restart chrony.service
apt remove --autoremove chrony

(more…)

Setting up Ethereum node on Windows 10 and Ubuntu.

After a few attempts I was able to start Ethereum Mist 0.11.1 in ‘fast’ mode on Windows 10:

it downloaded ‘geth’, connected to {“path”:”\\\\.\\pipe\\geth.ipc”} and started to sync, but when sync finished I was unable to send transactions (they were ‘denied’ for some reason).

(more…)

How I built QT 5.11.1 for Android on Windows

I tried to build QT 5.11.1 for Android on Windows, and “configure.bat” completed successfully, but “mingw32-make” failed with with the following error:

No rule to make target 'vulkan/qvulkanfunctions_p.h', needed by '.obj\qvulkaninstance.obj'.

It is the bug fixed in QT 5.11.2 that is planned on August/September 2018.

When I build the master branch and copied the following files from it to \qtbase\src\gui\vulkan manually:

qvulkanfunctions.h
qvulkanfunctions_p.cpp
qvulkanfunctions_p.h

and started “mingw32-make” again I got another error:

(more…)

Mining Ethereum on Ubuntu 18.04 with GeForce GTX 1060 3GB

I am not a Linux expert, so it took me some time to configure my mining rig on Ubuntu 18.04 with NVIDIA GeForce GTX 1060 3GB, and I wrote down all the steps I did:

First I installed NVIDIA driver, but OpenCL did not install automatically with it and I installed it manually with the following command:

sudo apt install -y ocl-icd-libopencl1

Then I installed CURL:

sudo apt install -y libcurl3

not ‘curl’ and not ‘libcurl4’ packages, otherwise the miner will fail to start reporting the following error message:

./ethdcrminer64: /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by ./ethdcrminer64)

(more…)

PHP script that saves client IP address to a file.

Below I wrote down a simple PHP script that saves client IP address to a file. If the IP address of your home machine periodically changes, you can store it on a web server once a minute by scheduling a task like this:

sudo crontab -u <user> -e
* * * * * wget -q -O /dev/null -o /dev/null "https://yourwebsite.com/ip.php?rig=rig1&password=XXXXX"

where ip.php is the following PHP script:
(more…)

Multiple versions of Microsoft.Web.Administration.dll in IIS 10

On some Windows 10 machine with IIS 10 installed I have three Microsoft.Web.Administration.dll:

Two versions 7.0.0.0 and 7.9.0.0 in GAC (C:\Windows\assembly\GAC_MSIL\Microsoft.Web.Administration\) in 7.0.0.0__31bf3856ad364e35 and 7.9.0.0__31bf3856ad364e35 folders respectively and one version 7.0.0.0 in C:\Windows\System32\inetsrv\.

The following XML element in a Visual Studio project file adds a reference to version 7.0.0.0 of Microsoft.Web.Administration.dll:

<Reference Include="Microsoft.Web.Administration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
    <HintPath>%WINDIR%\System32\inetsrv\Microsoft.Web.Administration.dll</HintPath>
    <Private>True</Private>
</Reference>

The same XML element with SpecificVersion=False will automatically reference the highest available version on this machine that is 7.9.0.0.

(more…)