How to compile xmr-stak (2.4.5) under Fedora 28 for CPU mining cryptocurrencies

Thanks to xmr-stak we can have one application capable of mining many different cryptocurrencies based on different algorithms. XMR-STAK is GPU and CPU miner, here we present only the CPU ability under Fedora 28, not all setups have a good video GPU, but you can have a decent CPU, which could be used to mine! For example AMD Ryzen Threadripper 1950X has a good performance on my crypto algorithms, even a better performance than the GPU mining.
Here we use AMD Ryzen Threadripper 1950X, which has 12 cores and 32 threads. Our setup is ASUS ROG ZENITH EXTREME (X399 Chipset) motherboard with 32G (4x8G CROSSHAIR VI HERO) DIMM DDR4 Synchronous Unbuffered (Unregistered) 2133 MHz (0.5 ns) and AMD Ryzen Threadripper 1950X. It can do 1253.5 cryptonight_v7 hashes per second.
Here are the steps you should do to install (in fact install dependencies and compile the miner) and to begin CPU mining:

Update your system and install the needed dependencies

[myuser@localhost ~]$ sudo dnf -y update
[sudo] password for myuser: 
Fedora 28 - x86_64 - Updates                                                                                                        9.5 MB/s |  18 MB     00:01    
Last metadata expiration check: 0:00:04 ago on  2.07.2018 (Mon) 16:52:23 UTC.
Dependencies resolved.                                                    
....
....
Complete!
[myuser@localhost ~]$ sudo reboot
[myuser@localhost ~]$ sudo dnf -y install gcc gcc-c++ hwloc-devel libmicrohttpd-devel libstdc++-static make openssl-devel cmake git screen
....
....
Installed:
  cmake.x86_64 3.11.2-1.fc28            gcc-c++.x86_64 8.1.1-1.fc28           hwloc-devel.x86_64 1.11.9-1.fc28         libmicrohttpd-devel.x86_64 1:0.9.59-2.fc28
  libstdc++-static.x86_64 8.1.1-1.fc28  openssl-devel.x86_64 1:1.1.0h-3.fc28  screen.x86_64 4.6.2-3.fc28               cmake-data.noarch 3.11.2-1.fc28           
  cmake-filesystem.x86_64 3.11.2-1.fc28 cmake-rpm-macros.noarch 3.11.2-1.fc28 gmp-c++.x86_64 1:6.1.2-7.fc28            gmp-devel.x86_64 1:6.1.2-7.fc28           
  gnutls-c++.x86_64 3.6.2-3.fc28        gnutls-dane.x86_64 3.6.2-3.fc28       gnutls-devel.x86_64 3.6.2-3.fc28         hwloc-libs.x86_64 1.11.9-1.fc28           
  ibacm.x86_64 16.2-3.fc28              jsoncpp.x86_64 1.8.4-3.fc28           keyutils-libs-devel.x86_64 1.5.10-6.fc28 krb5-devel.x86_64 1.16.1-7.fc28           
  libcom_err-devel.x86_64 1.43.8-2.fc28 libibcm.x86_64 16.2-3.fc28            libibumad.x86_64 16.2-3.fc28             libkadm5.x86_64 1.16.1-7.fc28             
  libmicrohttpd.x86_64 1:0.9.59-2.fc28  libselinux-devel.x86_64 2.8-1.fc28    libsepol-devel.x86_64 2.8-1.fc28         libstdc++-devel.x86_64 8.1.1-1.fc28       
  libtasn1-devel.x86_64 4.13-2.fc28     libuv.x86_64 1:1.20.3-1.fc28          libverto-devel.x86_64 0.3.0-5.fc28       nettle-devel.x86_64 3.4-2.fc28            
  p11-kit-devel.x86_64 0.23.12-1.fc28   pcre2-devel.x86_64 10.31-4.fc28       pcre2-utf32.x86_64 10.31-4.fc28          rdma-core-devel.x86_64 16.2-3.fc28        
  rhash.x86_64 1.3.5-2.fc28             unbound-libs.x86_64 1.7.3-1.fc28      zlib-devel.x86_64 1.2.11-8.fc28

STEP 2) Compile the mining program xmr-stak

[myuser@localhost ~]$ git clone https://github.com/fireice-uk/xmr-stak.git
Cloning into 'xmr-stak'...
remote: Counting objects: 4931, done.
remote: Total 4931 (delta 0), reused 0 (delta 0), pack-reused 4930
Receiving objects: 100% (4931/4931), 1.45 MiB | 2.07 MiB/s, done.
Resolving deltas: 100% (3515/3515), done.
[myuser@localhost ~]$ mkdir xmr-stak/build
[myuser@localhost ~]$ cd xmr-stak/build
[myuser@localhost build]$ export CFLAGS="-O2 -march=native -msse3 -fomit-frame-pointer -pipe"
[myuser@localhost build]$ export CHOST="x86_64-pc-linux-gnu"
[myuser@localhost build]$ export CXXFLAGS="${CFLAGS}"
[myuser@localhost build]$ export LDFLAGS="-Wl,-O1"
[myuser@localhost build]$ cmake .. -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF
-- The C compiler identification is GNU 8.1.1
-- The CXX compiler identification is GNU 8.1.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.1.0h") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/myuser/xmr-stak/build
[myuser@localhost build]$ make -j 16
Scanning dependencies of target xmr-stak-c
[  3%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_blake256.c.o
[  7%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_groestl.c.o
[ 11%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_skein.c.o
[ 15%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_keccak.c.o
[ 19%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_jh.c.o
[ 23%] Linking C static library bin/libxmr-stak-c.a
[ 23%] Built target xmr-stak-c
Scanning dependencies of target xmr-stak-backend
[ 26%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/version.cpp.o
[ 34%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/hwlocMemory.cpp.o
[ 34%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/globalStates.cpp.o
[ 42%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/jconf.cpp.o
[ 42%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/minethd.cpp.o
[ 46%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/backendConnector.cpp.o
[ 57%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o
[ 57%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_common.cpp.o
[ 57%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/jconf.cpp.o
[ 61%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/webdesign.cpp.o
[ 65%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/executor.cpp.o
[ 69%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/console.cpp.o
[ 73%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/uac.cpp.o
[ 76%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/utility.cpp.o
[ 80%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/jpsock.cpp.o
[ 84%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/telemetry.cpp.o
[ 88%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/socket.cpp.o
[ 92%] Linking CXX static library bin/libxmr-stak-backend.a
[ 92%] Built target xmr-stak-backend
Scanning dependencies of target xmr-stak
[ 96%] Building CXX object CMakeFiles/xmr-stak.dir/xmrstak/cli/cli-miner.cpp.o
[100%] Linking CXX executable bin/xmr-stak
[100%] Built target xmr-stak

Execute the program to see if everything is OK. With the help output you can see how many algorithms are supported as of version 2.4.5 of xmr-stak.

[myuser@localhost build]$ cd bin
[myuser@localhost bin]$ ./xmr-stak --help
Usage: xmr-stak [OPTION]...
 
  -h, --help                 show this help
  -v, --version              show version number
  -V, --version-long         show long version number
  -c, --config FILE          common miner configuration file
  -C, --poolconf FILE        pool configuration file
  --benchmark BLOCKVERSION   ONLY do a benchmark and exit
  --benchwait WAIT_SEC             ... benchmark wait time
  --benchwork WORK_SEC             ... benchmark work time
  --noCPU                    disable the CPU miner backend
  --cpu FILE                 CPU backend miner config file
  -i --httpd HTTP_PORT       HTTP interface port
 
The following options can be used for automatic start without a guided config,
If config exists then this pool will be top priority.
  -o, --url URL              pool url and port, e.g. pool.usxmrpool.com:3333
  -O, --tls-url URL          TLS pool url and port, e.g. pool.usxmrpool.com:10443
  -u, --user USERNAME        pool user name or wallet address
  -r, --rigid RIGID          rig identifier for pool-side statistics (needs pool support)
  -p, --pass PASSWD          pool password, in the most cases x or empty ""
  --use-nicehash             the pool should run in nicehash mode
  --currency NAME            currency to mine

Supported coin options: 
        - aeon7
        - bbscoin
        - croat
        - cryptonight
        - cryptonight_masari
        - cryptonight_haven
        - cryptonight_heavy
        - cryptonight_lite
        - cryptonight_lite_v7
        - cryptonight_lite_v7_xor
        - cryptonight_v7
        - cryptonight_v7_stellite
        - edollar
        - electroneum
        - graft
        - haven
        - intense
        - ipbc
        - karbo
        - masari
        - monero7
        - stellite
        - sumokoin
        - turtlecoin

Version: xmr-stak 2.4.5 b3f79de
Brought to by fireice_uk and psychocrypt under GPLv3.

Electroneum CPU mining with XMR-STAK

Using Cryptonote V7 Variant 1 (aka. “monerov7″/”cryptonight_v7”) algorithm. First run.
Couple of important questions to answer:

  • Please enter the currency that you want to mine: cryptonight_v7
  • Username (wallet address or pool login): etnk111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 – this is your address, put here your real public wallet address, DO NOT PUT THIS FALSE ADDRESS
  • Pool address: pool.etn.spacepools.org:3333 – the pool address to use, we use etn.spacepools.org pool
  • Username (wallet address or pool login): your email address
[myuser@localhost bin]$ screen -R mining
[myuser@srv bin]# sudo sysctl -w vm.nr_hugepages=128
[sudo] password for myuser: 
vm.nr_hugepages = 128
[myuser@localhost bin]$ ./xmr-stak 
Please enter:
- Do you want to use the HTTP interface?
Unlike the screen display, browser interface is not affected by the GPU lag.
If you don't want to use it, please enter 0, otherwise enter port number that the miner should listen on
0
Configuration stored in file 'config.txt'
Please enter:
- Please enter the currency that you want to mine: 
        - aeon7
        - bbscoin
        - croat
        - cryptonight
        - cryptonight_masari
        - cryptonight_haven
        - cryptonight_heavy
        - cryptonight_lite
        - cryptonight_lite_v7
        - cryptonight_lite_v7_xor
        - cryptonight_v7
        - cryptonight_v7_stellite
        - edollar
        - electroneum
        - graft
        - haven
        - intense
        - ipbc
        - karbo
        - masari
        - monero7
        - stellite
        - sumokoin
        - turtlecoin

cryptonight_v7
- Pool address: e.g. pool.example.com:3333
pool.etn.spacepools.org:3333
- Username (wallet address or pool login):
etnk111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
- Password (mostly empty or x):
myuser@example.com
- Rig identifier for pool-side statistics (needs pool support). Can be empty:

- Does this pool port support TLS/SSL? Use no if unknown. (y/N)
N
- Do you want to use nicehash on this pool? (y/n)
n
- Do you want to use multiple pools? (y/n)
n
Pool configuration stored in file 'pools.txt'
-------------------------------------------------------------------
xmr-stak 2.4.5 b3f79de

Brought to you by fireice_uk and psychocrypt under GPLv3.
Based on CPU mining code by wolf9466 (heavily optimized by fireice_uk).

Configurable dev donation level is set to 2.0%

You can use following keys to display reports:
'h' - hashrate
'r' - results
'c' - connection
-------------------------------------------------------------------
[2018-07-02 17:19:11] : Mining coin: cryptonight_v7
[2018-07-02 17:19:11] : CPU configuration stored in file 'cpu.txt'
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 0.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 1.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 2.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 3.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 4.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 5.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 6.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 7.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 8.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 9.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 10.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 11.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 12.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 13.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 14.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Starting 1x thread, affinity: 15.
[2018-07-02 17:19:11] : hwloc: memory pinned
[2018-07-02 17:19:11] : Fast-connecting to pool.etn.spacepools.org:3333 pool ...
[2018-07-02 17:19:11] : Pool pool.etn.spacepools.org:3333 connected. Logging in...
[2018-07-02 17:19:11] : Difficulty changed. Now: 50000.
[2018-07-02 17:19:11] : Pool logged in.
RESULT REPORT
Difficulty       : 18840
Good results     : 141 / 141 (100.0 %)
Avg result time  : 15.5 sec
Pool-side hashes : 2908063

Top 10 best results found:
|  0 |         16095047 |  1 |          1495311 |
|  2 |          1054682 |  3 |           405522 |
|  4 |           347343 |  5 |           313062 |
|  6 |           311532 |  7 |           298945 |
|  8 |           181473 |  9 |           158732 |

Error details:
Yay! No errors.
HASHRATE REPORT - CPU
| ID |    10s |    60s |    15m | ID |    10s |    60s |    15m |
|  0 |   77.3 |   77.1 |   77.2 |  1 |   77.7 |   77.6 |   77.7 |
|  2 |   77.5 |   77.4 |   77.5 |  3 |   77.6 |   77.6 |   77.7 |
|  4 |   78.5 |   78.5 |   78.4 |  5 |   78.5 |   78.5 |   78.4 |
|  6 |   78.5 |   78.5 |   78.4 |  7 |   78.5 |   78.4 |   78.4 |
|  8 |   78.5 |   78.5 |   78.5 |  9 |   78.5 |   78.5 |   78.5 |
| 10 |   78.6 |   78.5 |   78.5 | 11 |   78.6 |   78.5 |   78.5 |
| 12 |   78.5 |   78.5 |   78.5 | 13 |   78.6 |   78.5 |   78.5 |
| 14 |   78.5 |   78.5 |   78.5 | 15 |   78.5 |   78.5 |   78.5 |
Totals (CPU):  1252.5 1251.7 1252.0 H/s
-----------------------------------------------------------------
Totals (ALL):   1252.5 1251.7 1252.0 H/s
Highest:  1253.5 H/s
-----------------------------------------------------------------

Here is the all and only the commands to execute (in a script):

sudo dnf -y update
sudo reboot
sudo dnf -y install gcc gcc-c++ hwloc-devel libmicrohttpd-devel libstdc++-static make openssl-devel cmake git screen
git clone https://github.com/fireice-uk/xmr-stak.git
mkdir xmr-stak/build
cd xmr-stak/build
export CFLAGS="-O2 -march=native -msse3 -fomit-frame-pointer -pipe"
export CHOST="x86_64-pc-linux-gnu"
export CXXFLAGS="${CFLAGS}"
export LDFLAGS="-Wl,-O1"
cmake .. -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF
make -j 16
cd bin
./xmr-stak

Install NVIDIA official drivers on Fedora 28 (x86_64)

Fedora 28 comes with open source driver for NVIDIA cards, so you’ll get a decent and stable driver for your video, but without hardware acceleration and a machine not good for gaming like Steam, not good for scientific usage or crypt mining! In fact in recent open source versions (called nouveau) of the NVIDIA driver some cards got partial hardware acceleration, but most of the latest cards out there still need the proprietary driver!
Our test system is equipped with ASUS ROG Poseidon GeForce® GTX 1080 TI 11GB Platinum Edition by default here is the linux kernel output:

[myuser@localhost ~]$ lspci |grep -i nvidia
0a:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
0a:00.1 Audio device: NVIDIA Corporation GP102 HDMI Audio Controller (rev a1)
[myuser@localhost ~]$ dmesg|grep -i nvidia
[    4.606404] nouveau 0000:0a:00.0: NVIDIA GP102 (132000a1)
[    7.776389] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.1/0000:0a:00.1/sound/card0/input14
[    7.776487] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:03.1/0000:0a:00.1/sound/card0/input15
[    7.776548] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:03.1/0000:0a:00.1/sound/card0/input16
[    7.776608] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:03.1/0000:0a:00.1/sound/card0/input17
[myuser@localhost ~]$ cat /proc/modules |grep nouveau
nouveau 2019328 21 - Live 0x0000000000000000
video 45056 2 asus_wmi,nouveau, Live 0x0000000000000000
drm_kms_helper 200704 1 nouveau, Live 0x0000000000000000
mxm_wmi 16384 1 nouveau, Live 0x0000000000000000
ttm 126976 1 nouveau, Live 0x0000000000000000
drm 454656 24 nouveau,drm_kms_helper,ttm, Live 0x0000000000000000
i2c_algo_bit 16384 2 nouveau,igb, Live 0x0000000000000000
wmi 28672 4 asus_wmi,wmi_bmof,nouveau,mxm_wmi, Live 0x0000000000000000

Here are the steps to install NVIDIA proprietary driver on Fedora 28:

STEP 1) Disable UEFI Secure Boot

Check in your BIOS if this feature is enabled. You should disabled it or after a successful installation of the kernel module you must sign it, which is not the goal of this howto. It is probably disabled if you use Linux, but it could be enabled if you use signed kernel, so it is good to check this settings because your driver won’t run if this feature is enabled.

STEP 2) Update your system and reboot. Then install the dependencies for the NVIDIA driver

DKMS is used for building the NVIDIA kernel module when a new kernel is installed. So you do not have to worry if you update your kernel. At first best way is to become root with sudo.

[myuser@localhost ~]$ sudo su
[root@localhost ~]$ dnf -y update
[root@localhost ~]$ reboot
[root@localhost ~]$ dnf -y install kernel-devel kernel-headers gcc dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig

STEP 3) Download the official NVIDIA installer application

Here is the NVIDIA search driver page – https://www.nvidia.com/Download/Find.aspx, just find the card you own and download the driver. Here are the steps we’d past:
So at the end you get a file NVIDIA-Linux-x86_64-390.67.run

[myuser@localhost ~]$ ls -al NVIDIA-Linux-x86_64-390.67.run 
-rw-r--r--. 1 myuser myuser 82272406  2 Jul  2,37 NVIDIA-Linux-x86_64-390.67.run

Select your video card and click on “Search”, we selected GeForce GTX 1080 Ti.

main menu
Select your video card

Click on the top driver, which is not “beta”.
main menu
Click on the driver to download

Infromation for the NVIDIA display driver. The most recent is version 390.67. Click on “Download”.
main menu
Click on download

Click on download again to begin downloading the installation file. You can download NVIDIA End User License Agreement, too.
main menu
Click on download again to begin downloading the installation file.

STEP 4) Disable the open source nouveau.

The driver must be blacklisted on two places, when the initramfs loads and during the fedora 28 systemd booting. So first put the following in

/etc/modprobe.d/blacklist.conf

[root@localhost ~]$ echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf

and in file

/etc/sysconfig/grub

add at the end of the line starting with GRUB_CMDLINE_LINUX the following:

rd.driver.blacklist=nouveau

so in our case we have:

GRUB_CMDLINE_LINUX="resume=/dev/mapper/fedora_localhost--live-swap rd.lvm.lv=fedora_localhost-live/root rd.lvm.lv=fedora_localhost-live/swap rhgb quiet rd.driver.blacklist=nouveau"

This is just an example, do not copy the whole line, just add at the end before the ending quotes rd.driver.blacklist=nouveau

STEP 5) Update grub configuration and remove the open source driver from x11 and initram

[root@localhost ~]# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.17.3-200.fc28.x86_64
Found initrd image: /boot/initramfs-4.17.3-200.fc28.x86_64.img
Found linux image: /boot/vmlinuz-4.16.3-301.fc28.x86_64
Found initrd image: /boot/initramfs-4.16.3-301.fc28.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-d11e97619bd242a39cd53700ce473c6c
Found initrd image: /boot/initramfs-0-rescue-d11e97619bd242a39cd53700ce473c6c.img
Found Windows Boot Manager on /dev/nvme0n1p2@/EFI/Microsoft/Boot/bootmgfw.efi
Found Ubuntu 16.04.4 LTS (16.04) on /dev/sda2
done
[root@localhost ~]# #commeted, use only if your BIOS is not in UEFI mode!!!
[root@localhost ~]# #grub2-mkconfig -o /boot/grub2/grub.cfg
[root@localhost ~]# dnf remove xorg-x11-drv-nouveau
Dependencies resolved.
=======================================================================================================================================================================
 Package                                        Arch                             Version                                     Repository                           Size
=======================================================================================================================================================================
Removing:
 xorg-x11-drv-nouveau                           x86_64                           1:1.0.15-4.fc28                             @anaconda                           229 k

Transaction Summary
=======================================================================================================================================================================
Remove  1 Package

Freed space: 229 k
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                               1/1 
  Erasing          : xorg-x11-drv-nouveau-1:1.0.15-4.fc28.x86_64                                                                                                   1/1 
  Running scriptlet: xorg-x11-drv-nouveau-1:1.0.15-4.fc28.x86_64                                                                                                   1/1 
  Verifying        : xorg-x11-drv-nouveau-1:1.0.15-4.fc28.x86_64                                                                                                   1/1 

Removed:
  xorg-x11-drv-nouveau.x86_64 1:1.0.15-4.fc28                                                                                                                          

Complete!
[root@localhost ~]# mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
[root@localhost ~]# dracut /boot/initramfs-$(uname -r).img $(uname -r)
[root@localhost ~]# systemctl set-default multi-user.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/multi-user.target.
[root@localhost ~]# reboot

As you can see the grub configuration tool found two more operating systems Microsoft Windows 10 and Ubuntu 16 and they are saved in the new configuration, so it is safe to make the new configuration it will preserve the other grub configuration and you’ll be able to boot them if you choose it from the grub menu.
We removed the unnecessary package xorg-x11-drv-nouveau.x86_64, regenerated the initramfs for our kernel and instructed the system to set the default console login – you do not need GUI and you won’t have it (you’ve just removed the GPU driver!) the next time you boot your machine.

STEP 6) Run the NVIDIA installation file from root user

After the restart your system won’t boot in GUI, there will be the login console prompt:

main menu
Console login

Login with your user and then become root, the installation need to be executed by the root user. Then execute NVIDIA-Linux-x86_64-390.67.run, but before you must change the permissions to executable.

[myuser@localhost myuser]# chmod 755 ./NVIDIA-Linux-x86_64-390.67.run
[myuser@localhost myuser]# sudo su
[root@localhost myuser]# ./NVIDIA-Linux-x86_64-390.67.run 
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 390.67.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Select “Yes” using tab key and hit enter.

                        NVIDIA Accelerated Graphics Driver for Linux-x86_64 (390.67)
 
  Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build 
  a new module, if you install a different kernel later.

                                    Yes                                 No   

  NVIDIA Software Installer for Unix/Linux                                                     www.nvidia.com
main menu
This will allow DKMS to automatically build a new module, if you install a different kernel later.

Select “Yes” using tab key and hit enter.

                        NVIDIA Accelerated Graphics Driver for Linux-x86_64 (390.67)

  Install NVIDIA's 32-bit compatibility libraries?
                                                                                                              
                                    Yes                                 No   
 
  NVIDIA Software Installer for Unix/Linux                                                     www.nvidia.com 
main menu
Install NVIDIA’s 32-bit compatibility libraries

Select “Yes” using tab key and hit enter.

                       NVIDIA Accelerated Graphics Driver for Linux-x86_64 (390.67)

  Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that
  the NVIDIA X driver will be used when you restart X?  Any pre-existing X configuration file will be backed  
  up.     
                                                                                                              
                                    Yes                                 No   


  NVIDIA Software Installer for Unix/Linux                                                     www.nvidia.com
main menu
Would you like to run the nvidia-xconfig utility to automatically update your X configuration file.

Hit enter to continue. Your NVIDIA driver is isntalled successfully.

                        NVIDIA Accelerated Graphics Driver for Linux-x86_64 (390.67)
 
  Your X configuration file has been successfully updated.  Installation of the NVIDIA Accelerated Graphics   
  Driver for Linux-x86_64 (version: 390.67) is now complete.

                                                      OK  

  NVIDIA Software Installer for Unix/Linux                                                     www.nvidia.com 
main menu
Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86_64 (version: 390.67) is now complete.

STEP 7) Return the default login to be GUI and reboot your machine.

Do not forget you must be root user or execute the commands with sudo.

[root@localhost myuser]# systemctl set-default graphical.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/graphical.target.
[root@localhost myuser]# reboot

You should be back in GNOME login after the reboot.
Here is the NVIDIA driver loaded successfully:

[myuser@localhost ~]$ dmesg|grep -i nvidia
[    8.806266] nvidia: loading out-of-tree module taints kernel.
[    8.806277] nvidia: module license 'NVIDIA' taints kernel.
[    8.812252] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    8.821344] nvidia-nvlink: Nvlink Core is being initialized, major device number 234
[    8.821805] nvidia 0000:0a:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
[    8.821994] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  390.67  Fri Jun  1 04:04:27 PDT 2018 (using threaded interrupts)
[    8.833388] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  390.67  Fri Jun  1 03:15:43 PDT 2018
[    8.856187] [drm] [nvidia-drm] [GPU ID 0x00000a00] Loading driver
[    8.856190] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:0a:00.0 on minor 0
[    8.860227] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.1/0000:0a:00.1/sound/card0/input14
[    8.860404] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:03.1/0000:0a:00.1/sound/card0/input15
[    8.860665] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:03.1/0000:0a:00.1/sound/card0/input16
[    8.861126] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:03.1/0000:0a:00.1/sound/card0/input17
[   14.388205] caller _nv001169rm+0xe3/0x1d0 [nvidia] mapping multiple BARs
[   14.821065] nvidia-modeset: Allocated GPU:0 (GPU-3bad60bf-8ff7-4cba-8b51-a931299a56d8) @ PCI:0000:0a:00.0
[myuser@localhost ~]$ cat /proc/modules |grep -i nvidia
nvidia_drm 45056 2 - Live 0x0000000000000000 (POE)
nvidia_modeset 1110016 11 nvidia_drm, Live 0x0000000000000000 (POE)
nvidia 14389248 480 nvidia_modeset, Live 0x0000000000000000 (POE)
drm_kms_helper 196608 1 nvidia_drm, Live 0x0000000000000000
drm 458752 5 nvidia_drm,drm_kms_helper, Live 0x0000000000000000
ipmi_msghandler 57344 2 nvidia,ipmi_devintf, Live 0x0000000000000000

STEP 8) Enable video acceleration support

[myuser@localhost ~]$ sudo dnf -y install vdpauinfo libva-vdpau-driver libva-utils

nvidia settings and nvidia-smi

NVIDIA X server settings – X Server Information.

main menu
NVIDIA X server settings

NVIDIA X server settings – GPU 0 – (GeForce GTX 1080 Ti) infromation tab. You can see the BIOS version, CUDA cores of 3584, Total Memory 11264 MB, current GPU utilization and more.
main menu

[myuser@localhost ~]$ nvidia-smi 
Mon Jul  2 03:43:33 2018       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.67                 Driver Version: 390.67                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 108...  Off  | 00000000:0A:00.0  On |                  N/A |
|  0%   51C    P8    14W / 275W |    244MiB / 11175MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1843      G   /usr/libexec/Xorg                             12MiB |
|    0      2110      G   /usr/bin/gnome-shell                          49MiB |
|    0      2400      G   /usr/libexec/Xorg                             61MiB |
|    0      2489      G   /usr/bin/gnome-shell                         118MiB |
+-----------------------------------------------------------------------------+

vainfo – VA-API driver, the video acceleration API driver

Here is the nouveau – as you can see no acceleration supported:

[myuser@localhost ~]$ vainfo 
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/nouveau_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: mesa gallium vaapi
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc

And here is after installing the NVIDIA proprietary driver, you get video acceleration for your video player!

[myuser@localhost ~]$ vainfo 
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG4Simple            : VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    : VAEntrypointVLD
      <unknown profile>               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

How to compile xmr-stak (2.4.5) under CentOS 7 for CPU mining cryptocurrencies

Thanks to xmr-stak we can have one application capable of mining many different cryptocurrencies based on different algorithms. XMR-STAK is GPU and CPU miner, here we present only the CPU ability. Here are the steps you should do to install (in fact install dependencies and compile the miner) and to begin CPU mining:

STEP 1) Update your system and install the following dependencies

Because xmr-stak need a newer version of GNU GCC than the CentOS ships with you must install GNU GCC 5.1 at least. Because the latest versions have better optimizations for the processors we use here GNU GCC 7 from Software Collection repository – more information for this repository here: How to install new gcc and development tools under CentOS 7

[myuser@srv ~]# sudo yum update -y
[myuser@srv ~]# sudo yum install -y centos-release-scl epel-release
[myuser@srv ~]# sudo yum install -y cmake3 devtoolset-7-gcc* hwloc-devel libmicrohttpd-devel openssl openssl-devel make git screen

STEP 2) Compile the mining program xmr-stak

[myuser@srv ~]# scl enable devtoolset-7 bash
[myuser@srv ~]# git clone https://github.com/fireice-uk/xmr-stak.git
Cloning into 'xmr-stak'...
remote: Counting objects: 4926, done.
remote: Total 4926 (delta 0), reused 0 (delta 0), pack-reused 4926
Receiving objects: 100% (4926/4926), 1.45 MiB | 0 bytes/s, done.
Resolving deltas: 100% (3512/3512), done.
[myuser@srv ~]# mkdir xmr-stak/build
[myuser@srv ~]# cd xmr-stak/build
[myuser@srv build]# export CFLAGS="-O2 -march=native -msse3 -fomit-frame-pointer -pipe"
[myuser@srv build]# export CHOST="x86_64-pc-linux-gnu"
[myuser@srv build]# export CXXFLAGS="${CFLAGS}"
[myuser@srv build]# export LDFLAGS="-Wl,-O1"
[myuser@srv build]# cmake3 .. -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.0.2k") 
-- Configuring done
-- Generating done
-- Build files have been written to: /root/xmr-stak/build
[myuser@srv build]# make -j 8
Scanning dependencies of target xmr-stak-c
[  3%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_jh.c.o
[ 19%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_blake256.c.o
[ 19%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_groestl.c.o
[ 19%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_keccak.c.o
[ 19%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_skein.c.o
[ 23%] Linking C static library bin/libxmr-stak-c.a
[ 23%] Built target xmr-stak-c
Scanning dependencies of target xmr-stak-backend
[ 26%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/version.cpp.o
[ 30%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/jconf.cpp.o
[ 34%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/jconf.cpp.o
[ 38%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/minethd.cpp.o
[ 42%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/hwlocMemory.cpp.o
[ 46%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/backendConnector.cpp.o
[ 50%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_common.cpp.o
[ 53%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/globalStates.cpp.o
[ 57%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o
[ 61%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/webdesign.cpp.o
[ 65%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/console.cpp.o
[ 69%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/executor.cpp.o
[ 73%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/telemetry.cpp.o
[ 76%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/uac.cpp.o
[ 80%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/utility.cpp.o
[ 84%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/jpsock.cpp.o
[ 88%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/socket.cpp.o
[ 92%] Linking CXX static library bin/libxmr-stak-backend.a
[ 92%] Built target xmr-stak-backend
Scanning dependencies of target xmr-stak
[ 96%] Building CXX object CMakeFiles/xmr-stak.dir/xmrstak/cli/cli-miner.cpp.o
[100%] Linking CXX executable bin/xmr-stak
[100%] Built target xmr-stak
[root@srv build]#

Execute the program to see if everything is OK. With the help output you can see how many algorithms are supported as of version 2.4.5 of xmr-stak.

[myuser@srv bin]# cd bin
[myuser@srv bin]# ./xmr-stak --help
Usage: xmr-stak [OPTION]...
 
  -h, --help                 show this help
  -v, --version              show version number
  -V, --version-long         show long version number
  -c, --config FILE          common miner configuration file
  -C, --poolconf FILE        pool configuration file
  --benchmark BLOCKVERSION   ONLY do a benchmark and exit
  --benchwait WAIT_SEC             ... benchmark wait time
  --benchwork WORK_SEC             ... benchmark work time
  --noCPU                    disable the CPU miner backend
  --cpu FILE                 CPU backend miner config file
  -i --httpd HTTP_PORT       HTTP interface port
 
The following options can be used for automatic start without a guided config,
If config exists then this pool will be top priority.
  -o, --url URL              pool url and port, e.g. pool.usxmrpool.com:3333
  -O, --tls-url URL          TLS pool url and port, e.g. pool.usxmrpool.com:10443
  -u, --user USERNAME        pool user name or wallet address
  -r, --rigid RIGID          rig identifier for pool-side statistics (needs pool support)
  -p, --pass PASSWD          pool password, in the most cases x or empty ""
  --use-nicehash             the pool should run in nicehash mode
  --currency NAME            currency to mine

Supported coin options: 
        - aeon7
        - bbscoin
        - croat
        - cryptonight
        - cryptonight_masari
        - cryptonight_haven
        - cryptonight_heavy
        - cryptonight_lite
        - cryptonight_lite_v7
        - cryptonight_lite_v7_xor
        - cryptonight_v7
        - cryptonight_v7_stellite
        - edollar
        - electroneum
        - graft
        - haven
        - intense
        - ipbc
        - karbo
        - masari
        - monero7
        - stellite
        - sumokoin
        - turtlecoin

Version: xmr-stak 2.4.5 b3f79de
Brought to by fireice_uk and psychocrypt under GPLv3.

Electroneum CPU mining with XMR-STAK

Using Cryptonote V7 Variant 1 (aka. “monerov7″/”cryptonight_v7”) algorithm. First run.
Couple of important questions to answer:

  • Please enter the currency that you want to mine: cryptonight_v7
  • Username (wallet address or pool login): etnk111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 – this is your address, put here your real public wallet address, DO NOT PUT THIS FALSE ADDRESS
  • Pool address: pool.etn.spacepools.org:3333 – the pool address to use, we use etn.spacepools.org pool
  • Username (wallet address or pool login): your email address
[myuser@srv bin]# sudo sysctl -w vm.nr_hugepages=128
vm.nr_hugepages = 128
[myuser@srv bin]# ./xmr-stak 
Please enter:
- Do you want to use the HTTP interface?
Unlike the screen display, the browser interface is not affected by the GPU lag.
If you don't want to use it, please enter 0, otherwise enter port number that the miner should listen on
0
Configuration stored in file 'config.txt'
Please enter:
- Please enter the currency that you want to mine: 
        - aeon7
        - bbscoin
        - croat
        - cryptonight
        - cryptonight_masari
        - cryptonight_haven
        - cryptonight_heavy
        - cryptonight_lite
        - cryptonight_lite_v7
        - cryptonight_lite_v7_xor
        - cryptonight_v7
        - cryptonight_v7_stellite
        - edollar
        - electroneum
        - graft
        - haven
        - intense
        - ipbc
        - karbo
        - masari
        - monero7
        - stellite
        - sumokoin
        - turtlecoin

cryptonight_v7
- Pool address: e.g. pool.example.com:3333
pool.etn.spacepools.org:3333
- Username (wallet address or pool login):
etnk111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
- Password (mostly empty or x):
myuser@example.com
- Rig identifier for pool-side statistics (needs pool support). Can be empty:

- Does this pool port support TLS/SSL? Use no if unknown. (y/N)
N
- Do you want to use nicehash on this pool? (y/n)
n
- Do you want to use multiple pools? (y/n)
n
Pool configuration stored in file 'pools.txt'
[2018-06-28 01:30:14] : MEMORY ALLOC FAILED: mlock failed
[2018-06-28 01:30:14] : MEMORY ALLOC FAILED: mlock failed
[2018-06-28 01:30:14] : MEMORY ALLOC FAILED: mlock failed
[2018-06-28 01:30:14] : MEMORY ALLOC FAILED: mlock failed
[2018-06-28 01:30:14] : MEMORY ALLOC FAILED: mlock failed
-------------------------------------------------------------------
xmr-stak 2.4.5 b3f79de

Brought to you by fireice_uk and psychocrypt under GPLv3.
Based on CPU mining code by wolf9466 (heavily optimized by fireice_uk).

Configurable dev donation level is set to 2.0%

You can use following keys to display reports:
'h' - hashrate
'r' - results
'c' - connection
-------------------------------------------------------------------
xmr-stak 2.4.5 b3f79de

Brought to you by fireice_uk and psychocrypt under GPLv3.
Based on CPU mining code by wolf9466 (heavily optimized by fireice_uk).

Configurable dev donation level is set to 2.0%

You can use following keys to display reports:
'h' - hashrate
'r' - results
'c' - connection
-------------------------------------------------------------------
[2018-06-28 01:30:14] : Mining coin: cryptonight_v7
[2018-06-28 01:30:14] : Starting 1x thread, affinity: 0.
[2018-06-28 01:30:14] : hwloc: can't bind memory
[2018-06-28 01:30:14] : Starting 1x thread, affinity: 1.
[2018-06-28 01:30:14] : MEMORY ALLOC FAILED: mlock failed
[2018-06-28 01:30:14] : hwloc: can't bind memory
[2018-06-28 01:30:14] : Starting 1x thread, affinity: 2.
[2018-06-28 01:30:14] : MEMORY ALLOC FAILED: mlock failed
[2018-06-28 01:30:14] : hwloc: can't bind memory
[2018-06-28 01:30:14] : Starting 1x thread, affinity: 3.
[2018-06-28 01:30:14] : MEMORY ALLOC FAILED: mlock failed
[2018-06-28 01:30:14] : hwloc: can't bind memory
[2018-06-28 01:30:14] : Fast-connecting to pool.etn.spacepools.org:3333 pool ...
[2018-06-28 01:30:14] : MEMORY ALLOC FAILED: mlock failed
[2018-06-28 01:30:14] : Pool pool.etn.spacepools.org:3333 connected. Logging in...
[2018-06-28 01:30:14] : Difficulty changed. Now: 50000.
[2018-06-28 01:30:14] : Pool logged in.
[2018-06-28 01:30:35] : Result accepted by the pool.
[2018-06-28 01:30:43] : Difficulty changed. Now: 35714.
[2018-06-28 01:30:43] : New block detected.
[2018-06-28 01:31:13] : Difficulty changed. Now: 25000.
[2018-06-28 01:31:13] : New block detected.
[2018-06-28 01:31:43] : Difficulty changed. Now: 17500.
[2018-06-28 01:31:43] : New block detected.
[2018-06-28 01:32:13] : Difficulty changed. Now: 12250.
[2018-06-28 01:32:13] : New block detected.
HASHRATE REPORT - CPU
| ID |    10s |    60s |    15m | ID |    10s |    60s |    15m |
|  0 |   67.5 |   64.9 |   (na) |  1 |   68.3 |   67.7 |   (na) |
|  2 |   69.1 |   67.9 |   (na) |  3 |   66.4 |   65.3 |   (na) |
Totals (CPU):   271.3  265.8    0.0 H/s
-----------------------------------------------------------------
Totals (ALL):    271.3  265.8    0.0 H/s
Highest:   274.7 H/s
-----------------------------------------------------------------
RESULT REPORT
Difficulty       : 3845
Good results     : 49 / 49 (100.0 %)
Avg result time  : 16.3 sec
Pool-side hashes : 223158

Top 10 best results found:
|  0 |           298785 |  1 |           231734 |
|  2 |           176492 |  3 |            82592 |
|  4 |            50284 |  5 |            49914 |
|  6 |            28493 |  7 |            22570 |
|  8 |            18460 |  9 |            17889 |

Error details:
Yay! No errors.

the processor is “Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz” and the hash power is 274.7 H/s.

Clear or delete systemd logs

Systemd linux distros use Journald service to collect and store logs in the system. Here are a couple of tips if you have problems with the space they occupy. It is good that all systemd linux distros support it – CentOS 7, Ubuntu 16+, Fedora, OpenSuse and so on.

TIP 1) Remove the old archive logs older than 10 days with

Time based removal of old logs. It will remove the old files. This command won’t change the configuration, so it just has a temporary effect.

journalctl --vacuum-time=10d

TIP 2) Remove the old archive logs greater than 1G

Size based removal of old logs. It will reduce the size of the logs to this specified size. This command won’t change the configuration, so it just has a temporary effect.

journalctl --vacuum-size=1024M

TIP 3) Show disk usage

[root@srv ~]# journalctl --disk-usage
Archived and active journals take up 785.5M on disk.

TIP 4) Show all logs and information for them

Where are the log files, the size they occupy, the time period of the entries in them and more:

[root@srv0 ~]# journalctl --header
File Path: /run/log/journal/bb5aa69bfa2b483386443ede7a92a45a/system.journal
File ID: 7deaff4610a94c82aab85386597e825b
Machine ID: bb5aa69bfa2b483386443ede7a92a45a
Boot ID: e89507fa3f814b8a96f9d70914c120b0
Sequential Number ID: 541a59d9a68342d3980d86e565a48c7d
State: ONLINE
Compatible Flags:
Incompatible Flags: COMPRESSED-XZ
Header size: 240
Arena size: 102956816
Data Hash Table Size: 178744
Field Hash Table Size: 333
Rotate Suggested: no
Head Sequential Number: 1239405
Tail Sequential Number: 1341511
Head Realtime Timestamp: mon 2018-06-25 10:09:09 UTC
Tail Realtime Timestamp: tue 2018-06-28 00:07:10 UTC
Tail Monotonic Timestamp: 1month 2d 21h 6min 47.287s
Objects: 258136
Entry Objects: 102107
Data Objects: 129585
Data Hash Table Fill: 72.5%
Field Objects: 36
Field Hash Table Fill: 10.8%
Tag Objects: 0
Entry Array Objects: 26406
Disk usage: 98.1M

File Path: /run/log/journal/bb5aa69bfa2b483386443ede7a92a45a/system@541a59d9a68342d3980d86e565a48c7d-000000000011512d-00056f3f3ff56172.journal
File ID: a8e1f042bc144df78f37005b0b555a82
Machine ID: bb5aa69bfa2b483386443ede7a92a45a
Boot ID: e89507fa3f814b8a96f9d70914c120b0
Sequential Number ID: 541a59d9a68342d3980d86e565a48c7d
State: ARCHIVED
Compatible Flags:
Incompatible Flags: COMPRESSED-XZ
Header size: 240
Arena size: 102956816
Data Hash Table Size: 178744
Field Hash Table Size: 333
Rotate Suggested: no
Head Sequential Number: 1134893
Tail Sequential Number: 1239404
Head Realtime Timestamp: fri 2018-06-22 18:32:10 UTC
Tail Realtime Timestamp: mon 2018-06-25 10:09:09 UTC
Tail Monotonic Timestamp: 1month 7h 8min 45.991s
Objects: 263445
Entry Objects: 104512
Data Objects: 131953
Data Hash Table Fill: 73.8%
Field Objects: 34
Field Hash Table Fill: 10.2%
Tag Objects: 0
Entry Array Objects: 26944
Disk usage: 98.1M

File Path: /run/log/journal/bb5aa69bfa2b483386443ede7a92a45a/system@541a59d9a68342d3980d86e565a48c7d-00000000000fc083-00056f0d6ef70320.journal
File ID: 007272b1f181487d83116bee96c40c30
Machine ID: bb5aa69bfa2b483386443ede7a92a45a
Boot ID: e89507fa3f814b8a96f9d70914c120b0
Sequential Number ID: 541a59d9a68342d3980d86e565a48c7d
State: ARCHIVED
Compatible Flags:
Incompatible Flags: COMPRESSED-XZ
Header size: 240
Arena size: 102956816
Data Hash Table Size: 178744
Field Hash Table Size: 333
Rotate Suggested: no
Head Sequential Number: 1032323
Tail Sequential Number: 1134892
Head Realtime Timestamp: wed 2018-06-20 07:06:10 UTC
Tail Realtime Timestamp: fri 2018-06-22 18:32:10 UTC
Tail Monotonic Timestamp: 4w 2h 1min 46.980s
Objects: 263998
Entry Objects: 102570
Data Objects: 133456
Data Hash Table Fill: 74.7%
Field Objects: 37
Field Hash Table Fill: 11.1%
Tag Objects: 0
Entry Array Objects: 27933
Disk usage: 98.1M

File Path: /run/log/journal/bb5aa69bfa2b483386443ede7a92a45a/system@541a59d9a68342d3980d86e565a48c7d-00000000000e3f67-00056ee09376d287.journal
File ID: 4c268268a6e34d6297c7ae9ca01fc31b
Machine ID: bb5aa69bfa2b483386443ede7a92a45a
Boot ID: e89507fa3f814b8a96f9d70914c120b0
Sequential Number ID: 541a59d9a68342d3980d86e565a48c7d
State: ARCHIVED
Compatible Flags:
Incompatible Flags: COMPRESSED-XZ
Header size: 240
Arena size: 102956816
Data Hash Table Size: 178744
Field Hash Table Size: 333
Rotate Suggested: yes
Head Sequential Number: 933735
Tail Sequential Number: 1032322
Head Realtime Timestamp: mon 2018-06-18 01:35:09 UTC
Tail Realtime Timestamp: wed 2018-06-20 07:06:10 UTC
Tail Monotonic Timestamp: 3w 4d 14h 35min 47.248s
Objects: 261498
Entry Objects: 98588
Data Objects: 134059
Data Hash Table Fill: 75.0%
Field Objects: 40
Field Hash Table Fill: 12.0%
Tag Objects: 0
Entry Array Objects: 28809
Disk usage: 98.1M

File Path: /run/log/journal/bb5aa69bfa2b483386443ede7a92a45a/system@541a59d9a68342d3980d86e565a48c7d-00000000000cbf3b-00056eb3ea255b2a.journal
File ID: 7019a721bebe4e00b76410a6e7052c6d
Machine ID: bb5aa69bfa2b483386443ede7a92a45a
Boot ID: e89507fa3f814b8a96f9d70914c120b0
Sequential Number ID: 541a59d9a68342d3980d86e565a48c7d
State: ARCHIVED
Compatible Flags:
Incompatible Flags: COMPRESSED-XZ
Header size: 240
Arena size: 102956816
Data Hash Table Size: 178744
Field Hash Table Size: 333
Rotate Suggested: yes
Head Sequential Number: 835387
Tail Sequential Number: 933734
Head Realtime Timestamp: fri 2018-06-15 20:18:10 UTC
Tail Realtime Timestamp: mon 2018-06-18 01:35:09 UTC
Tail Monotonic Timestamp: 3w 2d 9h 4min 45.972s
Objects: 260794
Entry Objects: 98348
Data Objects: 134060
Data Hash Table Fill: 75.0%
Field Objects: 33
Field Hash Table Fill: 9.9%
Tag Objects: 0
Entry Array Objects: 28351
Disk usage: 98.1M

File Path: /run/log/journal/bb5aa69bfa2b483386443ede7a92a45a/system@541a59d9a68342d3980d86e565a48c7d-00000000000b2fac-00056e827d3375dd.journal
File ID: 61c16e8acc364d97b8c0c7cc2afcb6ec
Machine ID: bb5aa69bfa2b483386443ede7a92a45a
Boot ID: e89507fa3f814b8a96f9d70914c120b0
Sequential Number ID: 541a59d9a68342d3980d86e565a48c7d
State: ARCHIVED
Compatible Flags:
Incompatible Flags: COMPRESSED-XZ
Header size: 240
Arena size: 102956816
Data Hash Table Size: 178744
Field Hash Table Size: 333
Rotate Suggested: no
Head Sequential Number: 733100
Tail Sequential Number: 835386
Head Realtime Timestamp: wed 2018-06-13 09:20:08 UTC
Tail Realtime Timestamp: fri 2018-06-15 20:18:10 UTC
Tail Monotonic Timestamp: 3w 3h 47min 46.827s
Objects: 264298
Entry Objects: 102287
Data Objects: 134043
Data Hash Table Fill: 75.0%
Field Objects: 33
Field Hash Table Fill: 9.9%
Tag Objects: 0
Entry Array Objects: 27933
Disk usage: 98.1M

File Path: /run/log/journal/bb5aa69bfa2b483386443ede7a92a45a/system@541a59d9a68342d3980d86e565a48c7d-000000000009966a-00056e4cbbb6ebfc.journal
File ID: c90df7bdc4654ab7a4ac955c74a779a3
Machine ID: bb5aa69bfa2b483386443ede7a92a45a
Boot ID: e89507fa3f814b8a96f9d70914c120b0
Sequential Number ID: 541a59d9a68342d3980d86e565a48c7d
State: ARCHIVED
Compatible Flags:
Incompatible Flags: COMPRESSED-XZ
Header size: 240
Arena size: 102956816
Data Hash Table Size: 178744
Field Hash Table Size: 333
Rotate Suggested: no
Head Sequential Number: 628330
Tail Sequential Number: 733099
Head Realtime Timestamp: sun 2018-06-10 17:12:09 UTC
Tail Realtime Timestamp: wed 2018-06-13 09:19:10 UTC
Tail Monotonic Timestamp: 2w 4d 16h 48min 46.993s
Objects: 263295
Entry Objects: 104770
Data Objects: 131816
Data Hash Table Fill: 73.7%
Field Objects: 37
Field Hash Table Fill: 11.1%
Tag Objects: 0
Entry Array Objects: 26670
Disk usage: 98.1M

File Path: /run/log/journal/bb5aa69bfa2b483386443ede7a92a45a/system@541a59d9a68342d3980d86e565a48c7d-000000000007fd20-00056e16f3135f30.journal
File ID: 32915d651dd84728b9e4a33a97b480cf
Machine ID: bb5aa69bfa2b483386443ede7a92a45a
Boot ID: e89507fa3f814b8a96f9d70914c120b0
Sequential Number ID: 541a59d9a68342d3980d86e565a48c7d
State: ARCHIVED
Compatible Flags:
Incompatible Flags: COMPRESSED-XZ
Header size: 240
Arena size: 102956816
Data Hash Table Size: 178744
Field Hash Table Size: 333
Rotate Suggested: no
Head Sequential Number: 523552
Tail Sequential Number: 628329
Head Realtime Timestamp: fri 2018-06-08 01:02:10 UTC
Tail Realtime Timestamp: sun 2018-06-10 17:12:09 UTC
Tail Monotonic Timestamp: 2w 2d 41min 46.200s
Objects: 263287
Entry Objects: 104778
Data Objects: 131696
Data Hash Table Fill: 73.7%
Field Objects: 36
Field Hash Table Fill: 10.8%
Tag Objects: 0
Entry Array Objects: 26775
Disk usage: 98.1M
[root@srv0 ~]#

* Deleting logs

[root@srv0 ~]# journalctl --vacuum-size=128M
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a33241-000570199db5be3c.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a34463-0005701a0b24d0fc.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a3568c-0005701a79e388c7.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a36899-0005701ae529f439.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a37ac8-0005701b50781f62.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a38cde-0005701bbd3b60c3.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a39ef6-0005701c28dcf40e.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a3b0f1-0005701c9416ee94.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a3c309-0005701cffe19015.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a3d521-0005701d6c79b9cb.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a3e748-0005701dd7c60e79.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a3f92d-0005701e48413eb8.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a40b0a-0005701ec83a0c74.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a41ce2-0005701f3fdcadc6.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a42f04-0005701fabfefbca.journal (8.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a4410e-000570201757a256.journal (120.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a60a8f-0005702ac025bb0c.journal (120.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a7d254-000570359f2bd7eb.journal (120.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000a99a34-000570405b5e812e.journal (120.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000ab639b-0005704b05553c7d.journal (120.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000ad2c3e-00057055cb403fae.journal (120.0M).
Deleted archived journal /var/log/journal/9be717e698354ec481abb641cf4085c3/system@79d0440cc1174c2db132b707a0567bcb-0000000000aef5c8-000570607686fd78.journal (120.0M).
Vacuuming done, freed 960.0M of archived journals from /var/log/journal/9be717e698354ec481abb641cf4085c3.

Use Intel QuickSync with ffmpeg to have hardware accelerated video decoding and encoding – CentOS 7.4.1708

This howto shows how you can use ffmpeg to hardware accelerate the video decoding and encoding if you have the proper Intel processor. Some of the Intel processors have GPU unit in them, which can be used to decode and encode video streams and it is pretty fast! High end Intel CPU could encode around 20 h264 (using faster preset) video streams on a single processor mini server as SUPERMICRO system using X11SSV-M4F.
Here are the steps how to enable the hardware options and what and how to install the software to hardware encode a video stream successful under linux – CentOS 7 distro.

For the first four steps just follow the howto “Install Intel Media Studio SDK and GPU driver from Intel Media Server Studio 2018 R1 – CentOS 7 (7.4.1708)” Here we include only the headers of the steps, because they are important part of this howto.
Installing Media Server Studio your system will get validated stack of software by Intel to build application against Media SDK interface:

  • libmfx.a dispatcher – the API for your application
  • libmfxhw64.so hardware implementation
  • related libraries (including OpenCL)
  • specific versions for libva and libdrm
  • user mode driver
  • modified i915 graphics driver module
  • kernel patches

Here are the steps:

STEP 1) Enable internal graphics in your system.

We have an article on the topic – Enable internal graphics in SUPERMICRO servers

STEP 2) Install the right CentOS 7 – 7.4.1708

We have an article on the topic – Howto do a netinstall of CentOS 7 (7.4.1708) – minimal server installation

STEP 3) Download Intel Media Server Studio 2018 R1

We have an article on the topic – Download, what is in the package Intel Media Server Studio 2018 R1 and which Linux distro it supports

STEP 4) Install Intel Media Studio SDK from Intel Media Server Studio 2018 R1

“Install Intel Media Studio SDK and GPU driver from Intel Media Server Studio 2018 R1 – CentOS 7 (7.4.1708)”

STEP 5) Tune pkgconfig libmfx (Intel library, installed with the Media Server Studio)

Create a file:

/usr/lib64/pkgconfig/libmfx.pc

with the following content:

prefix=/opt/intel/mediasdk
exec_prefix=${prefix}
libdir=${prefix}/lib/lin_x64
includedir=${prefix}/include
 
Name: libmfx
Description: Intel Media SDK
Version: 16.8
Libs: -L${libdir} -lmfx -lva -lstdc++ -ldl -lva-drm -ldrm
Cflags: -I${includedir} -I/usr/include/libdrm

STEP 6) Move the Media SDK include files in a mfx sub-directory

This is required because ffmpeg expect these files to be in a sub-directory

[root@srv ~]# mkdir /opt/intel/mediasdk/include/mfx
[root@srv ~]# cp /opt/intel/mediasdk/include/*.h /opt/intel/mediasdk/include/mfx/

STEP 7) Install yasm – a dependency for the ffmpeg software.

[root@srv ~]# wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
[root@srv ~]# tar xzf yasm-1.3.0.tar.gz
[root@srv ~]# cd yasm-1.3.0
[root@srv yasm-1.3.0]# export CFLAGS="-O2 -march=native -msse3 -fomit-frame-pointer -pipe"
[root@srv yasm-1.3.0]# export CXXFLAGS="${CFLAGS}"
[root@srv yasm-1.3.0]# export CHOST="x86_64-pc-linux-gnu"
[root@srv yasm-1.3.0]# export LDFLAGS="-Wl,-O1"
[root@srv yasm-1.3.0]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
....
....
....
[root@srv yasm-1.3.0]# make -j8
gcc -std=gnu99  -I.  \
  -c -o genperf.o `test -f tools/genperf/genperf.c || echo './'`tools/genperf/genperf.c
gcc -std=gnu99  -I.  \
  -c -o gp-perfect.o `test -f tools/genperf/perfect.c || echo './'`tools/genperf/perfect.c
gcc -std=gnu99  -I.  \
  -c -o gp-phash.o `test -f libyasm/phash.c || echo './'`libyasm/phash.c
gcc -std=gnu99  -I.  \
  -c -o gp-xmalloc.o `test -f libyasm/xmalloc.c || echo './'`libyasm/xmalloc.c
gcc -std=gnu99  -I.  \
  -c -o gp-xstrdup.o `test -f libyasm/xstrdup.c || echo './'`libyasm/xstrdup.c
gcc -std=gnu99  -I.  \
  -c -o re2c-main.o `test -f tools/re2c/main.c || echo './'`tools/re2c/main.c
gcc -std=gnu99  -I.  \
  -c -o re2c-code.o `test -f tools/re2c/code.c || echo './'`tools/re2c/code.c
....
....
....
[root@srv yasm-1.3.0]# make install
make  install-recursive
make[1]: Entering directory `/root/yasm-1.3.0'
....
....
....
[root@srv yasm-1.3.0]#
[root@srv yasm-1.3.0]# ldconfig
[root@srv yasm-1.3.0]# cd ../
[root@srv ~]#

STEP 8) Download ffmpeg version 2.8.X and compile it

it is important to use this branch 2.8.X because we’ve tested with the others 3.2.X, 3.3.X, 3.4.X and there were errors and we unable to use the the GPU unit to accelerate our video decoding and encoding. Here is the different ffmpeg release https://ffmpeg.org/download.html#releases or you can use the github to download https://github.com/FFmpeg/FFmpeg/releases

[root@srv ~]# wget https://www.ffmpeg.org/releases/ffmpeg-2.8.14.tar.bz2
[root@srv ~]# tar xjf ffmpeg-2.8.14.tar.bz2
[root@srv ~]# cd ffmpeg-2.8.14
[root@srv ffmpeg-2.8.14]# export CFLAGS="-O2 -march=native -msse3 -fomit-frame-pointer -pipe"
[root@srv ffmpeg-2.8.14]# export CXXFLAGS="${CFLAGS}"
[root@srv ffmpeg-2.8.14]# export CHOST="x86_64-pc-linux-gnu"
[root@srv ffmpeg-2.8.14]# export LDFLAGS="-Wl,-O1"
[root@srv ffmpeg-2.8.14]# ./configure --enable-libmfx --prefix=/usr/local/ffmpeg-qsv
install prefix            /usr/local/ffmpeg-qsv
source path               .
C compiler                gcc
C library                 glibc
ARCH                      x86 (generic)
big-endian                no
runtime cpu detection     yes
yasm                      yes
MMX enabled               yes
MMXEXT enabled            yes
3DNow! enabled            yes
3DNow! extended enabled   yes
SSE enabled               yes
SSSE3 enabled             yes
AVX enabled               yes
XOP enabled               yes
FMA3 enabled              yes
FMA4 enabled              yes
i686 features enabled     yes
CMOV is fast              yes
EBX available             yes
EBP available             yes
debug symbols             yes
strip symbols             yes
optimize for size         no
optimizations             yes
static                    yes
shared                    no
postprocessing support    no
new filter support        yes
network support           yes
threading support         pthreads
safe bitstream reader     yes
SDL support               no
opencl enabled            no
texi2html enabled         no
perl enabled              yes
pod2man enabled           yes
makeinfo enabled          no
makeinfo supports HTML    no

Enabled programs:
ffmpeg                  ffprobe                 ffserver

External libraries:
iconv                   lzma                    zlib
libmfx

Enabled decoders:
aac                     ayuv                    frwu
aac_fixed               bethsoftvid             g2m
aac_latm                bfi                     g723_1
aasc                    bink                    g729
ac3                     binkaudio_dct           gif
ac3_fixed               binkaudio_rdft          gsm
adpcm_4xm               bintext                 gsm_ms
adpcm_adx               bmp                     h261
adpcm_afc               bmv_audio               h263
adpcm_ct                bmv_video               h263i
adpcm_dtk               brender_pix             h263p
adpcm_ea                c93                     h264
adpcm_ea_maxis_xa       cavs                    h264_qsv
adpcm_ea_r1             ccaption                hap
adpcm_ea_r2             cdgraphics              hevc
adpcm_ea_r3             cdxl                    hevc_qsv
adpcm_ea_xas            cinepak                 hnm4_video
adpcm_g722              cljr                    hq_hqa
adpcm_g726              cllc                    hqx
adpcm_g726le            comfortnoise            huffyuv
adpcm_ima_amv           cook                    iac
adpcm_ima_apc           cpia                    idcin
adpcm_ima_dk3           cscd                    idf
adpcm_ima_dk4           cyuv                    iff_byterun1
adpcm_ima_ea_eacs       dca                     iff_ilbm
adpcm_ima_ea_sead       dds                     imc
adpcm_ima_iss           dfa                     indeo2
adpcm_ima_oki           dirac                   indeo3
adpcm_ima_qt            dnxhd                   indeo4
adpcm_ima_rad           dpx                     indeo5
adpcm_ima_smjpeg        dsd_lsbf                interplay_dpcm
adpcm_ima_wav           dsd_lsbf_planar         interplay_video
adpcm_ima_ws            dsd_msbf                jacosub
adpcm_ms                dsd_msbf_planar         jpeg2000
adpcm_sbpro_2           dsicinaudio             jpegls
adpcm_sbpro_3           dsicinvideo             jv
adpcm_sbpro_4           dss_sp                  kgv1
adpcm_swf               dvbsub                  kmvc
adpcm_thp               dvdsub                  lagarith
adpcm_thp_le            dvvideo                 loco
adpcm_vima              dxa                     mace3
adpcm_xa                dxtory                  mace6
adpcm_yamaha            eac3                    mdec
aic                     eacmv                   metasound
alac                    eamad                   microdvd
alias_pix               eatgq                   mimic
als                     eatgv                   mjpeg
amrnb                   eatqi                   mjpegb
amrwb                   eightbps                mlp
amv                     eightsvx_exp            mmvideo
anm                     eightsvx_fib            motionpixels
ansi                    escape124               movtext
ape                     escape130               mp1
apng                    evrc                    mp1float
ass                     exr                     mp2
asv1                    ffv1                    mp2float
asv2                    ffvhuff                 mp3
atrac1                  ffwavesynth             mp3adu
atrac3                  fic                     mp3adufloat
atrac3p                 flac                    mp3float
aura                    flashsv                 mp3on4
aura2                   flashsv2                mp3on4float
avrn                    flic                    mpc7
avrp                    flv                     mpc8
avs                     fourxm                  mpeg1video
avui                    fraps                   mpeg2_qsv
mpeg2video              prores                  tscc2
mpeg4                   prores_lgpl             tta
mpegvideo               ptx                     twinvq
mpl2                    qcelp                   txd
msa1                    qdm2                    ulti
msmpeg4v1               qdraw                   utvideo
msmpeg4v2               qpeg                    v210
msmpeg4v3               qtrle                   v210x
msrle                   r10k                    v308
mss1                    r210                    v408
mss2                    ra_144                  v410
msvideo1                ra_288                  vb
mszh                    ralf                    vble
mts2                    rawvideo                vc1
mvc1                    realtext                vc1_qsv
mvc2                    rl2                     vc1image
mxpeg                   roq                     vcr1
nellymoser              roq_dpcm                vima
nuv                     rpza                    vmdaudio
on2avc                  rv10                    vmdvideo
opus                    rv20                    vmnc
paf_audio               rv30                    vorbis
paf_video               rv40                    vp3
pam                     s302m                   vp5
pbm                     sami                    vp6
pcm_alaw                sanm                    vp6a
pcm_bluray              sgi                     vp6f
pcm_dvd                 sgirle                  vp7
pcm_f32be               shorten                 vp8
pcm_f32le               sipr                    vp9
pcm_f64be               smackaud                vplayer
pcm_f64le               smacker                 vqa
pcm_lxf                 smc                     wavpack
pcm_mulaw               smvjpeg                 webp
pcm_s16be               snow                    webvtt
pcm_s16be_planar        sol_dpcm                wmalossless
pcm_s16le               sonic                   wmapro
pcm_s16le_planar        sp5x                    wmav1
pcm_s24be               srt                     wmav2
pcm_s24daud             ssa                     wmavoice
pcm_s24le               stl                     wmv1
pcm_s24le_planar        subrip                  wmv2
pcm_s32be               subviewer               wmv3
pcm_s32le               subviewer1              wmv3image
pcm_s32le_planar        sunrast                 wnv1
pcm_s8                  svq1                    ws_snd1
pcm_s8_planar           svq3                    xan_dpcm
pcm_u16be               tak                     xan_wc3
pcm_u16le               targa                   xan_wc4
pcm_u24be               targa_y216              xbin
pcm_u24le               tdsc                    xbm
pcm_u32be               text                    xface
pcm_u32le               theora                  xl
pcm_u8                  thp                     xsub
pcm_zork                tiertexseqvideo         xwd
pcx                     tiff                    y41p
pgm                     tmv                     yop
pgmyuv                  truehd                  yuv4
pgssub                  truemotion1             zero12v
pictor                  truemotion2             zerocodec
pjs                     truespeech              zlib
png                     tscc                    zmbv
ppm

Enabled encoders:
a64multi                huffyuv                 png
a64multi5               jpeg2000                ppm
aac                     jpegls                  prores
ac3                     ljpeg                   prores_aw
ac3_fixed               mjpeg                   prores_ks
adpcm_adx               movtext                 qtrle
adpcm_g722              mp2                     r10k
adpcm_g726              mp2fixed                r210
adpcm_ima_qt            mpeg1video              ra_144
adpcm_ima_wav           mpeg2_qsv               rawvideo
adpcm_ms                mpeg2video              roq
adpcm_swf               mpeg4                   roq_dpcm
adpcm_yamaha            msmpeg4v2               rv10
alac                    msmpeg4v3               rv20
alias_pix               msvideo1                s302m
amv                     nellymoser              sgi
apng                    pam                     snow
ass                     pbm                     sonic
asv1                    pcm_alaw                sonic_ls
asv2                    pcm_f32be               srt
avrp                    pcm_f32le               ssa
avui                    pcm_f64be               subrip
ayuv                    pcm_f64le               sunrast
bmp                     pcm_mulaw               svq1
cinepak                 pcm_s16be               targa
cljr                    pcm_s16be_planar        tiff
comfortnoise            pcm_s16le               tta
dca                     pcm_s16le_planar        utvideo
dnxhd                   pcm_s24be               v210
dpx                     pcm_s24daud             v308
dvbsub                  pcm_s24le               v408
dvdsub                  pcm_s24le_planar        v410
dvvideo                 pcm_s32be               vorbis
eac3                    pcm_s32le               wavpack
ffv1                    pcm_s32le_planar        webvtt
ffvhuff                 pcm_s8                  wmav1
flac                    pcm_s8_planar           wmav2
flashsv                 pcm_u16be               wmv1
flashsv2                pcm_u16le               wmv2
flv                     pcm_u24be               xbm
g723_1                  pcm_u24le               xface
gif                     pcm_u32be               xsub
h261                    pcm_u32le               xwd
h263                    pcm_u8                  y41p
h263p                   pcx                     yuv4
h264_qsv                pgm                     zlib
hevc_qsv                pgmyuv                  zmbv

Enabled hwaccels:
h263_vaapi              hevc_vaapi              vc1_qsv
h264_qsv                mpeg2_qsv               vc1_vaapi
h264_vaapi              mpeg2_vaapi             wmv3_vaapi
hevc_qsv                mpeg4_vaapi

Enabled parsers:
aac                     dvdsub                  mpegvideo
aac_latm                flac                    opus
ac3                     g729                    png
adx                     gsm                     pnm
bmp                     h261                    rv30
cavsvideo               h263                    rv40
cook                    h264                    tak
dca                     hevc                    vc1
dirac                   mjpeg                   vorbis
dnxhd                   mlp                     vp3
dpx                     mpeg4video              vp8
dvbsub                  mpegaudio               vp9
dvd_nav

Enabled demuxers:
aa                      g723_1                  mpjpeg
aac                     g729                    mpl2
ac3                     gif                     mpsub
act                     gsm                     msnwc_tcp
adf                     gxf                     mtv
adp                     h261                    mv
adx                     h263                    mvi
aea                     h264                    mxf
afc                     hevc                    mxg
aiff                    hls                     nc
amr                     hnm                     nistsphere
anm                     ico                     nsv
apc                     idcin                   nut
ape                     idf                     nuv
apng                    iff                     ogg
aqtitle                 ilbc                    oma
asf                     image2                  paf
asf_o                   image2_alias_pix        pcm_alaw
ass                     image2_brender_pix      pcm_f32be
ast                     image2pipe              pcm_f32le
au                      image_bmp_pipe          pcm_f64be
avi                     image_dds_pipe          pcm_f64le
avr                     image_dpx_pipe          pcm_mulaw
avs                     image_exr_pipe          pcm_s16be
bethsoftvid             image_j2k_pipe          pcm_s16le
bfi                     image_jpeg_pipe         pcm_s24be
bfstm                   image_jpegls_pipe       pcm_s24le
bink                    image_pictor_pipe       pcm_s32be
bintext                 image_png_pipe          pcm_s32le
bit                     image_qdraw_pipe        pcm_s8
bmv                     image_sgi_pipe          pcm_u16be
boa                     image_sunrast_pipe      pcm_u16le
brstm                   image_tiff_pipe         pcm_u24be
c93                     image_webp_pipe         pcm_u24le
caf                     ingenient               pcm_u32be
cavsvideo               ipmovie                 pcm_u32le
cdg                     ircam                   pcm_u8
cdxl                    iss                     pjs
cine                    iv8                     pmp
concat                  ivf                     pva
data                    jacosub                 pvf
daud                    jv                      qcp
dfa                     latm                    r3d
dirac                   live_flv                rawvideo
dnxhd                   lmlm4                   realtext
dsf                     loas                    redspark
dsicin                  lrc                     rl2
dss                     lvf                     rm
dts                     lxf                     roq
dtshd                   m4v                     rpl
dv                      matroska                rsd
dvbsub                  mgsts                   rso
dxa                     microdvd                rtp
ea                      mjpeg                   rtsp
ea_cdata                mlp                     sami
eac3                    mlv                     sap
epaf                    mm                      sbg
ffm                     mmf                     sdp
ffmetadata              mov                     sdr2
filmstrip               mp3                     segafilm
flac                    mpc                     shorten
flic                    mpc8                    siff
flv                     mpegps                  sln
fourxm                  mpegts                  smacker
frm                     mpegtsraw               smjpeg
g722                    mpegvideo               smush
sol                     tmv                     wav
sox                     truehd                  wc3
spdif                   tta                     webm_dash_manifest
srt                     tty                     webvtt
stl                     txd                     wsaud
str                     vc1                     wsvqa
subviewer               vc1t                    wtv
subviewer1              vivo                    wv
sup                     vmd                     xa
swf                     vobsub                  xbin
tak                     voc                     xmv
tedcaptions             vplayer                 xwma
thp                     vqf                     yop
tiertexseq              w64                     yuv4mpegpipe

Enabled muxers:
a64                     ipod                    pcm_s32be
ac3                     ircam                   pcm_s32le
adts                    ismv                    pcm_s8
adx                     ivf                     pcm_u16be
aiff                    jacosub                 pcm_u16le
amr                     latm                    pcm_u24be
apng                    lrc                     pcm_u24le
asf                     m4v                     pcm_u32be
asf_stream              matroska                pcm_u32le
ass                     matroska_audio          pcm_u8
ast                     md5                     psp
au                      microdvd                rawvideo
avi                     mjpeg                   rm
avm2                    mkvtimestamp_v2         roq
bit                     mlp                     rso
caf                     mmf                     rtp
cavsvideo               mov                     rtp_mpegts
crc                     mp2                     rtsp
dash                    mp3                     sap
data                    mp4                     segment
daud                    mpeg1system             singlejpeg
dirac                   mpeg1vcd                smjpeg
dnxhd                   mpeg1video              smoothstreaming
dts                     mpeg2dvd                sox
dv                      mpeg2svcd               spdif
eac3                    mpeg2video              spx
f4v                     mpeg2vob                srt
ffm                     mpegts                  stream_segment
ffmetadata              mpjpeg                  swf
filmstrip               mxf                     tee
flac                    mxf_d10                 tg2
flv                     mxf_opatom              tgp
framecrc                null                    truehd
framemd5                nut                     uncodedframecrc
g722                    oga                     vc1
g723_1                  ogg                     vc1t
gif                     oma                     voc
gxf                     opus                    w64
h261                    pcm_alaw                wav
h263                    pcm_f32be               webm
h264                    pcm_f32le               webm_chunk
hds                     pcm_f64be               webm_dash_manifest
hevc                    pcm_f64le               webp
hls                     pcm_mulaw               webvtt
ico                     pcm_s16be               wtv
ilbc                    pcm_s16le               wv
image2                  pcm_s24be               yuv4mpegpipe
image2pipe              pcm_s24le

Enabled protocols:
async                   hls                     rtmpt
cache                   http                    rtp
concat                  httpproxy               srtp
crypto                  icecast                 subfile
data                    md5                     tcp
ffrtmphttp              mmsh                    udp
file                    mmst                    udplite
ftp                     pipe                    unix
gopher                  rtmp

Enabled filters:
acrossfade              dctdnoiz                paletteuse
adelay                  deband                  pan
adrawgraph              decimate                perms
aecho                   deflate                 pixdesctest
aeval                   dejudder                psnr
aevalsrc                deshake                 qp
afade                   detelecine              random
aformat                 dilation                removegrain
ainterleave             drawbox                 removelogo
allpass                 drawgraph               replaygain
allrgb                  drawgrid                reverse
allyuv                  dynaudnorm              rgbtestsrc
alphaextract            earwax                  rotate
alphamerge              edgedetect              scale
amerge                  elbg                    scale2ref
amix                    equalizer               select
amovie                  erosion                 sendcmd
anull                   extractplanes           separatefields
anullsink               fade                    setdar
anullsrc                fftfilt                 setfield
apad                    field                   setpts
aperms                  fieldmatch              setsar
aphasemeter             fieldorder              settb
aphaser                 flanger                 showcqt
aresample               format                  showfreqs
areverse                fps                     showinfo
aselect                 framepack               showpalette
asendcmd                framerate               showspectrum
asetnsamples            framestep               showvolume
asetpts                 gradfun                 showwaves
asetrate                haldclut                showwavespic
asettb                  haldclutsrc             shuffleplanes
ashowinfo               hflip                   sidechaincompress
asplit                  highpass                signalstats
astats                  histogram               silencedetect
astreamsync             hqx                     silenceremove
atadenoise              hstack                  sine
atempo                  hue                     smptebars
atrim                   idet                    smptehdbars
avectorscope            il                      split
bandpass                inflate                 ssim
bandreject              interleave              swapuv
bass                    join                    tblend
bbox                    lenscorrection          telecine
biquad                  life                    testsrc
blackdetect             lowpass                 thumbnail
blend                   lut                     tile
cellauto                lut3d                   transpose
channelmap              lutrgb                  treble
channelsplit            lutyuv                  trim
chorus                  mandelbrot              unsharp
codecview               mergeplanes             vectorscope
color                   movie                   vflip
colorbalance            negate                  vignette
colorchannelmixer       noformat                volume
colorkey                noise                   volumedetect
colorlevels             null                    vstack
compand                 nullsink                w3fdif
concat                  nullsrc                 waveform
copy                    overlay                 xbr
crop                    pad                     yadif
curves                  palettegen              zoompan
dcshift

Enabled bsfs:
aac_adtstoasc           imx_dump_header         mpeg4_unpack_bframes
chomp                   mjpeg2jpeg              noise
dump_extradata          mjpega_dump_header      remove_extradata
h264_mp4toannexb        mov2textsub             text2movsub
hevc_mp4toannexb        mp3_header_decompress

Enabled indevs:
dv1394                  lavfi                   v4l2
fbdev                   oss

Enabled outdevs:
fbdev                   oss                     v4l2

License: LGPL version 2.1 or later
Creating config.mak, config.h, and doc/config.texi...
[root@conv11 ffmpeg-2.8.14]# make -j 8
CC      libavdevice/oss.o
CC      libavdevice/alldevices.o
CC      libavdevice/avdevice.o
CC      libavdevice/lavfi.o
CC      libavdevice/dv1394.o
....
....
....
LD      ffmpeg_g
LD      ffprobe_g
LD      ffserver_g
CP      ffserver
STRIP   ffserver
CP      ffprobe
CP      ffmpeg
STRIP   ffprobe
STRIP   ffmpeg
[root@conv11 ffmpeg-2.8.14]# make install
INSTALL doc/ffmpeg.1
INSTALL doc/ffprobe.1
INSTALL doc/ffserver.1
INSTALL doc/ffmpeg-all.1
....
....
....
INSTALL libavutil/tea.h
INSTALL libavutil/lzo.h
INSTALL libavutil/avconfig.h
INSTALL libavutil/ffversion.h
INSTALL libavutil/libavutil.pc
[root@conv11 ffmpeg-2.8.14]#

And now you have a ffmpeg installation build against Intel API libmfx dispatcher, which could benefit from the hardware acceleration in decoding and encoding video streams. Thus using a Intel QuickSync technology.

STEP 9) ffmpeg example – how to use the GPU hardware decoding and encoding

[root@conv11 ffmpeg-2.8.14]# cd
[root@conv11 ~]# wget http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_60fps_stereo_abl.mp4
[root@conv11 ~]# /usr/local/ffmpeg-qsv/bin/ffmpeg -vcodec h264_qsv -i bbb_sunflower_1080p_60fps_stereo_abl.mp4 -vcodec h264_qsv -b:v 600k -maxrate 1200K -s 1280x720 -aspect 16:9 -preset medium -maxrate 500K -g 50 -strict -2 -c:a aac -b:a 96k -ar 44100 -f mpegts -threads 0 output.mp4
ffmpeg version 2.8.14 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-16)
  configuration: --enable-libmfx --prefix=/usr/local/ffmpeg-qsv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bbb_sunflower_1080p_60fps_stereo_abl.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isomavc1
    creation_time   : 2013-12-16 18:03:30
    title           : Big Buck Bunny, Sunflower version
    artist          : Blender Foundation 2008, Janus Bager Kristensen 2013
    comment         : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
    genre           : Animation
    composer        : Sacha Goedegebure
  Duration: 00:10:34.53, start: 0.000000, bitrate: 6490 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), nv12, 1920x2160, 6005 kb/s, 60 fps, 60 tbr, 60k tbn, 60k tbc (default)
    Metadata:
      creation_time   : 2013-12-16 18:03:30
      handler_name    : GPAC ISO Video Handler
    Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 160 kb/s (default)
    Metadata:
      creation_time   : 2013-12-16 18:03:37
      handler_name    : GPAC ISO Audio Handler
    Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 320 kb/s (default)
    Metadata:
      creation_time   : 2013-12-16 18:03:37
      handler_name    : GPAC ISO Audio Handler
    Side data:
      audio service type: main
libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
Output #0, mpegts, to 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isomavc1
    composer        : Sacha Goedegebure
    title           : Big Buck Bunny, Sunflower version
    artist          : Blender Foundation 2008, Janus Bager Kristensen 2013
    comment         : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
    genre           : Animation
    encoder         : Lavf56.40.101
    Stream #0:0(und): Video: h264 (h264_qsv), nv12, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 600 kb/s, 60 fps, 90k tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2013-12-16 18:03:30
      handler_name    : GPAC ISO Video Handler
      encoder         : Lavc56.60.100 h264_qsv
    Stream #0:1(und): Audio: aac, 44100 Hz, 5.1(side), fltp, 96 kb/s (default)
    Metadata:
      creation_time   : 2013-12-16 18:03:37
      handler_name    : GPAC ISO Audio Handler
      encoder         : Lavc56.60.100 aac
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_qsv) -> h264 (h264_qsv))
  Stream #0:2 -> #0:1 (ac3 (native) -> aac (native))
Press [q] to stop, [?] for help
libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
[h264_qsv @ 0x3587360] A decode call did not consume any dataitrate=1162.5kbits/s    
    Last message repeated 14 times
frame=38072 fps=126 q=-0.0 Lsize=   90023kB time=00:10:34.48 bitrate=1162.3kbits/s    
video:71572kB audio:7436kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 13.942102%
[root@conv11 ~]# /usr/local/ffmpeg-qsv/bin/ffmpeg -i output.mp4
ffmpeg version 2.8.14 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-16)
  configuration: --enable-libmfx --prefix=/usr/local/ffmpeg-qsv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
Input #0, mpegts, from 'output.mp4':
  Duration: 00:10:34.57, start: 1.400000, bitrate: 1162 kb/s
  Program 1 
    Metadata:
      service_name    : Big Buck Bunny, Sunflower version
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 90k tbn, 120 tbc
    Stream #0:1[0x101](und): Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, 5.1, fltp, 100 kb/s

You can see ffmpeg is using VA-API and /opt/intel/mediasdk/lib64/iHD_drv_video.so for video acceleration encoding.

* Live stream decoding and encoding with hardware acceleration and outputting multiple output

The input stream is from a multicast source and the output is a wowza server

/usr/local/ffmpeg-qsv/bin/ffmpeg -vcodec h264_qsv -i 'udp://239.10.10.1:5000?fifo_size=1000000&overrun_nonfatal=1' -filter_complex '[0:v]yadif=1:0:0,split=3[v1][v2][v3];[v1]scale=1280:720,framerate=50[out1];[v2]scale=960:540,framerate=25[out2];[v3]scale=640:360,framerate=25[out3]' -map '[out1]' -map '[out2]' -map '[out3]' -map 0:a -streamid 0:0x151 -streamid 1:0x150 -streamid 2:0x149 -streamid 3:0x140 -vcodec h264_qsv -preset medium -maxrate:0 1900K -bufsize:0 2400K -b:v:0 1500k -maxrate:1 1200K -bufsize:1 1000K -b:v:1 1000k -maxrate:2 900K -bufsize:2 1000K -b:v:2 600k -g 50 -strict -2 -c:a aac -b:a 96k -ar 44100 -reorder_queue_size 32 -threads 8 -fflags +igndts -copyts -f mpegts 'udp://10.10.10.10:30000?pkt_size=2632&buffer_size=20000000&fifo_size=2000000'
ffmpeg version 2.8.14 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-16)
  configuration: --enable-libmfx --prefix=/usr/local/ffmpeg-qsv3
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
[h264_qsv @ 0x21e6960] non-existing PPS 0 referenced
libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
    Last message repeated 1 times
Input #0, mpegts, from 'udp://239.10.10.33:5000?fifo_size=1000000&overrun_nonfatal=1':
  Duration: N/A, start: 1375.213422, bitrate: N/A
  Program 74 
    Metadata:
      service_name    : Test 1 HD
      service_provider: Test
    Stream #0:0[0x734]: Video: h264 (High) ([27][0][0][0] / 0x001B), nv12, 1920x1080, 25 fps, 25 tbr, 90k tbn, 90k tbc
    Stream #0:1[0x744]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s
[Parsed_framerate_7 @ 0x2413620] time base:1/180000 -> 1/180000 exact:1
[Parsed_framerate_7 @ 0x2413620] fps -> fps:25/1 scene score:7.000000 interpolate start:15 end:240
[Parsed_framerate_5 @ 0x2438d20] time base:1/180000 -> 1/180000 exact:1
[Parsed_framerate_5 @ 0x2438d20] fps -> fps:25/1 scene score:7.000000 interpolate start:15 end:240
[Parsed_framerate_3 @ 0x2934640] time base:1/180000 -> 1/180000 exact:1
[Parsed_framerate_3 @ 0x2934640] fps -> fps:50/1 scene score:7.000000 interpolate start:15 end:240
libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
Output #0, mpegts, to 'udp://10.10.10.10:30000?pkt_size=2632&buffer_size=20000000&fifo_size=2000000':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: h264 (h264_qsv), nv12, 1280x720, q=2-31, 1500 kb/s, 50 fps, 90k tbn, 50 tbc
    Metadata:
      encoder         : Lavc56.60.100 h264_qsv
    Stream #0:1: Video: h264 (h264_qsv), nv12, 960x540, q=2-31, 1000 kb/s, 25 fps, 90k tbn, 25 tbc
    Metadata:
      encoder         : Lavc56.60.100 h264_qsv
    Stream #0:2: Video: h264 (h264_qsv), nv12, 640x360, q=2-31, 600 kb/s, 25 fps, 90k tbn, 25 tbc
    Metadata:
      encoder         : Lavc56.60.100 h264_qsv
    Stream #0:3: Audio: aac, 44100 Hz, stereo, fltp, 96 kb/s
    Metadata:
      encoder         : Lavc56.60.100 aac
Stream mapping:
  Stream #0:0 (h264_qsv) -> yadif (graph 0)
  framerate (graph 0) -> Stream #0:0 (h264_qsv)
  framerate (graph 0) -> Stream #0:1 (h264_qsv)
  framerate (graph 0) -> Stream #0:2 (h264_qsv)
  Stream #0:1 -> #0:3 (mp2 (native) -> aac (native))
Press [q] to stop, [?] for help
libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
[h264_qsv @ 0x21ea740] A decode call did not consume any data=00:23:14.04 bitrate=  46.6kbits/s    
frame=  937 fps= 59 q=-0.0 Lq=-0.0 q=-0.0 size=    8267kB time=00:23:14.57 bitrate=  48.6kbits/s    
video:7225kB audio:228kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 10.923792%

* Troubleshooting

If you get a build error like this, you skipped the (STEP 6) Move the Media SDK include files in a mfx sub-directory. This is required because ffmpeg expect these files to be in a sub-directory. Just move the files in a sub-directory mfx as it is shown in (STEP 6)

gcc -Wl,-O1 -Wl,--as-needed -Wl,-z,noexecstack -o /tmp/ffconf.7IhNLjmP/test /tmp/ffconf.7IhNLjmP/test.o -lm -ldl -llzma -lz -pthread -pthread
use_pkg_config libmfx libmfx mfx/mfxvideo.h MFXInit
check_pkg_config libmfx libmfx mfx/mfxvideo.h MFXInit
pkg-config --exists --print-errors libmfx
check_func_headers mfx/mfxvideo.h MFXInit -I/opt/intel/mediasdk/include -I/usr/include/libdrm -L/opt/intel/mediasdk/lib/lin_x64 -lmfx -lva -lstdc++ -ldl -lva-drm -ldrm
check_ld cc -I/opt/intel/mediasdk/include -I/usr/include/libdrm -L/opt/intel/mediasdk/lib/lin_x64 -lmfx -lva -lstdc++ -ldl -lva-drm -ldrm
check_cc -I/opt/intel/mediasdk/include -I/usr/include/libdrm -L/opt/intel/mediasdk/lib/lin_x64
BEGIN /tmp/ffconf.7IhNLjmP/test.c
    1   #include <mfx/mfxvideo.h>
    2   #include <stdint.h>
    3   long check_MFXInit(void) { return (long) MFXInit; }
    4   int main(void) { int ret = 0;
    5    ret |= ((intptr_t)check_MFXInit) & 0xFFFF;
    6   return ret; }
END /tmp/ffconf.7IhNLjmP/test.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -O2 -march=native -msse3 -fomit-frame-pointer -pipe -std=c11 -fomit-frame-pointer -pthread -I/opt/intel/mediasdk/include -I/usr/include/libdrm -L/opt/intel/mediasdk/lib/lin_x64 -c -o /tmp/ffconf.7IhNLjmP/test.o /tmp/ffconf.7IhNLjmP/test.c
/tmp/ffconf.7IhNLjmP/test.c:1:26: fatal error: mfx/mfxvideo.h: No such file or directory
 #include <mfx/mfxvideo.h>
                          ^
compilation terminated.
require libmfx mfx/mfxvideo.h MFXInit -llibmfx
check_lib libmfx mfx/mfxvideo.h MFXInit -llibmfx
check_func_headers mfx/mfxvideo.h MFXInit -llibmfx
check_ld cc -llibmfx
check_cc
BEGIN /tmp/ffconf.7IhNLjmP/test.c
    1   #include <mfx/mfxvideo.h>
    2   #include <stdint.h>
    3   long check_MFXInit(void) { return (long) MFXInit; }
    4   int main(void) { int ret = 0;
    5    ret |= ((intptr_t)check_MFXInit) & 0xFFFF;
    6   return ret; }
END /tmp/ffconf.7IhNLjmP/test.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -O2 -march=native -msse3 -fomit-frame-pointer -pipe -std=c11 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.7IhNLjmP/test.o /tmp/ffconf.7IhNLjmP/test.c
/tmp/ffconf.7IhNLjmP/test.c:1:26: fatal error: mfx/mfxvideo.h: No such file or directory
 #include <mfx/mfxvideo.h>
                          ^
compilation terminated.
ERROR: libmfx not found

Install Intel Media Studio SDK and GPU driver from Intel Media Server Studio 2018 R1 – CentOS 7 (7.4.1708)

This tutorial shows how to install GPU video Driver for Intel Internal Graphics – the GPU unit in Intel processors and the Intel Media SDK to enable hardware video decoding and encoding capabilities of the Intel processors with GPU builtin.

Installing Media Server Studio your system will get validated stack of software by Intel to build application against Media SDK interface. So you’ll put in your system not only Intel software but the proper version of the libraries, on which the Intel Media SDK depends on. At the end your application will link to the Intel libmfx dispatcher. Basically you get:

  • libmfx.a dispatcher – the API for your application
  • libmfxhw64.so hardware implementation
  • related libraries (including OpenCL)
  • specific versions for libva and libdrm
  • user mode driver
  • modified i915 graphics driver module
  • kernel patches

STEP 1) Enable internal graphics in your system.

Not only you have to enable the internal graphics from the BIOS of your motherboard, but you must verify the mother board supports internal graphics. Here is the tutorial for the SUPERMICRO servers – “Enable internal graphics in SUPERMICRO servers”. As you can see from the link, for SUPEMICRO servers you will need:

Intel Xeon E3-1200 v4 Family with C226 chipset
Intel Xeon E3-1200 and E3-1500 v5 Family with C236 chipset

But you can use a Desktop processor like Intel i3, i5, i7, which have builtin GPU and the chances the motherboard supports it is really big, just enable it from the BIOS.

STEP 2) Install the right CentOS 7 – 7.4.1708

We need this specific version, because at present the latest version of Intel Media Server Studio requires it. Intel support only this specific version with their latest Intel Media Server Studio 2018 R1 – we need it because it ships the needed Intel GPU driver and the right libraries to compile against. Here is a howto how you can install this version – Howto do a netinstall of CentOS 7 – minimal server installation Now this version is deprecated so you could have problems finding it. Here is the right place – http://vault.centos.org/7.4.1708/isos/x86_64/ Just follow the instructions for downloading.
Check the right version of the CentOS 7 and whether you enabled successfully the Internal Graphics in the BIOS:

[root@srv ~]# cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core) 
[root@srv ~]# uname -a
Linux conv11.mytv.bg 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@srv ~]# lspci |grep Display
00:02.0 Display controller: Intel Corporation Iris Pro Graphics P580 (rev 09)

Iris Pro Graphics P580 (rev 09)

is the GPU unit of “Intel(R) Xeon(R) CPU E3-1585 v5 @ 3.50GHz”. If you do not see it with lspci you woud not be able to proceed with the steps below.

STEP 3) Download Intel Media Server Studio 2018 R1

We have another howto to follow for this step. Because Intel want to register before downloading it we made another howto with the steps and what to expect in the Intel Media Server Studio 2018 R1 package – just follow the simple steps (to register and download): “Download, what is in the package Intel Media Server Studio 2018 R1 and which linux distro it supports”

STEP 4) Install Intel Media Studio SDK from Intel Media Server Studio 2018 R1

It assumes you are the root user, downloaded the MediaServerStudioEssentials2018R1.tar.gz from the previous step (step 3) and put the file in /root/ directory.

[root@srv ~]# ls -la MediaServerStudioEssentials2018R1.tar.gz
-rw-r--r--. 1 root root 576084887 18 Jun 13,20 MediaServerStudioEssentials2018R1.tar.gz
[root@srv ~]# tar xzvf MediaServerStudioEssentials2018R1.tar.gz
MediaServerStudioEssentials2018R1/
MediaServerStudioEssentials2018R1/Intel(R)_Media_Server_Studio_EULA.pdf
MediaServerStudioEssentials2018R1/Intel_SDK_for_OpenCL_2017_r2_release_notes.pdf
MediaServerStudioEssentials2018R1/MediaSamples_Linux_2018R1_b982.tar.gz.sig
MediaServerStudioEssentials2018R1/site_license_materials.txt
MediaServerStudioEssentials2018R1/third_party_programs.txt
MediaServerStudioEssentials2018R1/redist.txt
MediaServerStudioEssentials2018R1/media_server_studio_essentials_release_notes.pdf
MediaServerStudioEssentials2018R1/MediaSamples_Linux_2018R1_b982.tar.gz
MediaServerStudioEssentials2018R1/intel_sdk_for_opencl_2017_7.0.0.2580_x64.tgz
MediaServerStudioEssentials2018R1/SDK2018Production16.8.tar.gz
[root@srv ~]# cd MediaServerStudioEssentials2018R1/
[root@srv MediaServerStudioEssentials2018R1]# tar xzvf SDK2018Production16.8.tar.gz
SDK2018Production16.8/
SDK2018Production16.8/Generic/
SDK2018Production16.8/Generic/intel-opencl-16.8-67208.x86_64.tar.xz
SDK2018Production16.8/Generic/intel-opencl-devel-16.8-67208.x86_64.tar.xz
SDK2018Production16.8/Generic/intel-linux-media_generic_16.8-69021_64bit.tar.gz
SDK2018Production16.8/Generic/NOTICES.TXT
SDK2018Production16.8/Generic/intel-linux-media_generic_16.8-69021_64bit.tar.gz.sig
SDK2018Production16.8/Generic/vpg_ocl_linux_rpmdeb.public
SDK2018Production16.8/Generic/intel-opencl-cpu-16.8-67208.x86_64.tar.xz
SDK2018Production16.8/media_server_studio_getting_started_guide.pdf
SDK2018Production16.8/CentOS_7.4/
SDK2018Production16.8/CentOS_7.4/libdrm-2.4.74-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/mss-linux-xcode-media.public
SDK2018Production16.8/CentOS_7.4/MediaSamples_Linux_bin-16.8-69021.tar.gz.sig
SDK2018Production16.8/CentOS_7.4/MediaSamples_Linux_bin-16.8-69021.tar.gz
SDK2018Production16.8/CentOS_7.4/intel-linux-media-devel-16.8-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/intel-opencl-cpu-16.8-67208.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/intel-linux-media-16.8-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/NOTICES.TXT
SDK2018Production16.8/CentOS_7.4/install_scripts_centos_16.8-69021.tar.gz
SDK2018Production16.8/CentOS_7.4/install_scripts_centos_16.8-69021.tar.gz.sig
SDK2018Production16.8/CentOS_7.4/ukmd-kmod-16.8-69021.el7.centos.src.rpm
SDK2018Production16.8/CentOS_7.4/kmod-ukmd-16.8-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/libva-2.0.1.pre1-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/drm-utils-2.4.74-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/libdrm-devel-2.4.74-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/intel-opencl-devel-16.8-67208.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/intel-opencl-16.8-67208.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/vpg_ocl_linux_rpmdeb.public
SDK2018Production16.8/CentOS_7.4/libva-devel-2.0.1.pre1-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/intel-opencl-release-notes.pdf
SDK2018Production16.8/media_server_studio_fei_release_notes.pdf
SDK2018Production16.8/media_server_studio_sdk_release_notes.pdf
[root@srv MediaServerStudioEssentials2018R1]# cd SDK2018Production16.8/CentOS_7.4/
[root@srv CentOS_7.4]# tar xzvf install_scripts_centos_16.8-69021.tar.gz
install_sdk_CentOS.sh
uninstall_sdk_CentOS.sh
[root@srv CentOS_7.4]# ./install_sdk_CentOS.sh
Checking yum by paramters "--releasever=7.4.1708"...
Loaded plugins: fastestmirror
Determining fastest mirrors
Cannot find a valid baseurl for repo: base/7.4.1708/x86_64
Checking yum by paramters "--releasever=7.4.1708"...Failed!
This Version of MediaServerStudio has been validated against CentOS 7.4.1708.
To install MediaServerStudio there is a requirement to install packages using yum package manager.
yum package manager automatically installs from latest CentOS released version repository.
If CentOS latest release version is newer than 7.4.1708, yum will default to install packages from this repository.
This could lead to packages been installed that could conflict with this version of MediaServerStudio and cause installation to fail.
It is ultimate responsibility of user to manage yum repositories to ensure that packages installed during installation of MediaServerStudio using yum package manger are installed from correct repository.
For more information on CentOS version please see: "https://wiki.centos.org/FAQ/General#head-dcca41e9a3d5ac4c6d900a991990fd11930867d6"


User has 3 options to proceed with installation:
1: (default) Installation Script will automatically attempt to enable correct repositories to install from.
2: User can manually edit yum repository files to ensure yum installs from correct repository, i.e. "--releasever=7.4.1708" is workable.
   If this option is chosen installation will abort then user need to fix yum repository files and run this script again.
3: Force installation from default yum repository, i.e. using "--releasever=7" yum option (ONLY for advanced users who clearly know what will happen)

If no response in 120 seconds option 1 will be default [1]2

   Here is an example how to fix yum repository file but just for information -
   Edit /etc/yum.repos.d/CentOS-Base.repo, comment out the mirrorlist lines, uncomment and edit the baseurl lines for each entry to point to correct URL -
   (a)
   ====================================================================================================
   #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
   baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
   ====================================================================================================
   OR (b)
   ====================================================================================================
   #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
   baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
   ====================================================================================================
   The reason of (b) is centos will move from mirror to vault for old versions then (a) won't work any longer.
   One example for old CentOS7.2 is
       http://mirror.centos.org/centos/7.2.1511/readme
   It is expected the same deprecation of mirror will happen one day for CentOS7.4, too.

Please finish the modification and re-run the script to install.

Edit your

/etc/yum.repos.d/CentOS-Base.repo

and put in it the following:

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

Execute the installation script again (full log of the installation you can see at the end of the howto):

[root@srv CentOS_7.4]# ./install_sdk_CentOS.sh 
Checking yum by paramters "--releasever=7.4.1708"...
Loaded plugins: fastestmirror
base                                                                                                                                           | 3.6 kB  00:00:00     
(1/2): base/7.4.1708/x86_64/group_gz                                                                                                           | 156 kB  00:00:00     
(2/2): base/7.4.1708/x86_64/primary_db                                                                                                         | 5.7 MB  00:00:01     
Determining fastest mirrors
Checking yum by paramters "--releasever=7.4.1708"...Succeeded!
Installing prerequisiters with yum parameters "--releasever=7.4.1708"...
Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package autoconf.noarch 0:2.69-11.el7 will be installed
--> Processing Dependency: perl >= 5.006 for package: autoconf-2.69-11.el7.noarch
...
...
...
Complete!
Installing prerequisiters with yum parameters "--releasever=7.4.1708"...Succeeded!
Installing user-space library rpms...
warning: libdrm-2.4.74-69021.el7.centos.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID a9b021f4: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:libdrm-2.4.74-69021.el7.centos   ################################# [  9%]
   2:libva-2.0.1.pre1-69021.el7.centos################################# [ 18%]
   3:intel-linux-media-16.8-69021.el7.################################# [ 27%]
Install finished. Please reboot.
   4:intel-opencl-16.8-67208          ################################# [ 36%]
   5:intel-opencl-cpu-16.8-67208      ################################# [ 45%]
   6:intel-linux-media-devel-16.8-6902################################# [ 55%]
   7:libva-devel-2.0.1.pre1-69021.el7.################################# [ 64%]
   8:libdrm-devel-2.4.74-69021.el7.cen################################# [ 73%]
   9:drm-utils-2.4.74-69021.el7.centos################################# [ 82%]
  10:intel-opencl-devel-16.8-67208    ################################# [ 91%]
Cleaning up / removing...
  11:libdrm-2.4.74-1.el7              ################################# [100%]
Installing kmod-ukmd-16.8-69021...
warning: kmod-ukmd-16.8-69021.el7.centos.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID a9b021f4: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:kmod-ukmd-16.8-69021.el7.centos  ################################# [100%]
Working. This may take some time ...
Done.

Installation done. Please reboot.
[root@srv CentOS_7.4]# reboot

You can see this time the installation script completed successfully. You should reboot to load the Intel GPU driver.

STEP 5) Verify the installation of Intel GPU driver and Intel Media Studio SDK

After you reboot your machine you should check if the Intel GPU driver is loaded and is working properly:

[root@srv ~]# ls /opt/intel/mediasdk/
doc  include  lib  lib64  opensource  plugins  tools
[root@conv11 ~]# lsmod | grep 'i915'
i915                 1328806  1 
drm_ukmd_kms_helper   141366  1 i915
drm_ukmd_compat       122928  2 i915,drm_ukmd_kms_helper
drm_ukmd              369737  3 i915,drm_ukmd_kms_helper
i2c_algo_bit           13413  3 ast,igb,i915
video                  24520  1 i915
i2c_core               40756  10 ast,drm,igb,i915,i2c_i801,i2c_hid,drm_kms_helper,i2c_algo_bit,drm_ukmd,drm_ukmd_kms_helper
[root@srv ~]# dmesg|grep drm
[    2.114138] drm: loading out-of-tree module taints kernel.
[    2.114269] drm: module verification failed: signature and/or required key missing - tainting kernel
[    2.115431] [drm] Initialized
[    2.120228] [drm_ukmd] Initialized drm_ukmd module
[    2.120643] Initialized drm/i915 compat module 20180222-16.8-69021-k0260ae1
[    2.128447] [drm_ukmd] Found 128MB of eLLC
[    2.128686] [drm_ukmd] Memory usable by graphics device = 4096M
[    2.128690] [drm_ukmd] Replacing VGA console driver
[    2.135059] [drm_ukmd] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.135060] [drm_ukmd] Driver supports precise vblank timestamp query.
[    2.180772] [drm_ukmd] failed to retrieve link info, disabling eDP
[    2.182319] [drm_ukmd] Cannot find any crtc or sizes - going 1024x768
[    2.182355] [drm_ukmd] RC6 disabled, disabling runtime PM support
[    2.182362] [drm_ukmd] Initialized i915 1.6.0 20180222-16.8-69021-k0e37c29 for 0000:00:02.0 on minor 0
[    2.182443] [drm] Using P2A bridge for configuration
[    2.182447] [drm] AST 2400 detected
[    2.182457] [drm] Analog VGA only
[    2.182471] [drm] dram 1632000000 1 16 01000000
[    2.182663] i915 0000:00:02.0: fb1: inteldrmfb frame buffer device
[    2.187145] fb: conflicting fb hw usage astdrmfb vs EFI VGA - removing generic driver
[    2.187277] fbcon: astdrmfb (fb0) is primary device
[    2.228185] ast 0000:03:00.0: fb0: astdrmfb frame buffer device
[    2.346863] [drm] Initialized ast 0.1.0 20120228 for 0000:03:00.0 on minor 1
[    3.767992] [drm_ukmd] RC6 off
[    3.769801] [drm_ukmd] The Ring/GT multiplier is 2
[root@srv ~]# ls -altr /dev/dri/
total 0
drwxr-xr-x.  2 root root       120 26 Jun  1,35 .
crw-rw----.  1 root video 226, 128 26 Jun  1,35 renderD128
crw-------.  1 root video 226,  64 26 Jun  1,35 controlD64
crw-rw----.  1 root video 226,   0 26 Jun  1,35 card0
crw-rw----.  1 root video 226,   1 26 Jun  1,35 card1
drwxr-xr-x. 19 root root      3220 26 Jun  1,35 ..
[root@srv ~]#

The Intel Graphic Driver is loaded successfully as you can see, it is very important to have a directory

/dev/dri/

and “dev” devices like

/dev/dri/renderD128

/dev/dri/controlD64

/dev/dri/card0 or/and /dev/dri/card1

After the reboot if you get

[root@srv ~]# ls -altr /dev/dri/
ls: cannot access /dev/dri/: No such file or directory

see the troubleshooting section below!
You can use a sample program from the SDK to verify everything is installed properly – the Driver and the libraries are installed and loaded.

[root@srv ~]# cd MediaServerStudioEssentials2018R1
[root@srv MediaServerStudioEssentials2018R1]# tar xzf MediaSamples_Linux_2018R1_b982.tar.gz
[root@srv MediaServerStudioEssentials2018R1]# 
[root@srv ~]# cd MediaServerStudioEssentials2018R1/MediaSamples_Linux_2018R1_b982/samples/_bin/x64/
[root@srv x64]# ./sample_multi_transcode -i::h264 ../content/test_stream.264 -o::h264 test_out.h264 -hw -la
Multi Transcoding Sample Version 8.2.25.982

libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
Pipeline surfaces number (DecPool): 59
MFX HARDWARE Session 0 API ver 1.25 parameters: 
Input  video: AVC 
Output video: AVC 

Session 0 was NOT joined with other sessions

Transcoding started
..
Transcoding finished

Common transcoding time is 0.139387 sec
-------------------------------------------------------------------------------
*** session 0 PASSED (MFX_ERR_NONE) 0.139182 sec, 101 frames
-i::h264 ../content/test_stream.264 -o::h264 test_out.h264 -hw -la 

-------------------------------------------------------------------------------

The test PASSED

The test is “PASSED”, the sample stream is transcoded successfully with hardware accelaration.

* Troubleshooting – missing /dev/dri/ directory and no KMS by default!

[root@srv ~]# ls /opt/intel/mediasdk/
doc  include  lib  lib64  opensource  plugins  tools
[root@srv ~]# lsmod | grep 'i915'
i915                 1328806  0 
drm_ukmd_kms_helper   141366  1 i915
drm_ukmd_compat       122928  2 i915,drm_ukmd_kms_helper
drm_ukmd              369737  2 i915,drm_ukmd_kms_helper
i2c_algo_bit           13413  2 igb,i915
video                  24520  1 i915
i2c_core               40756  10 drm,igb,i915,i2c_i801,i2c_hid,ipmi_ssif,drm_kms_helper,i2c_algo_bit,drm_ukmd,drm_ukmd_kms_helper
[root@srv ~]# dmesg|grep drm
[    2.111649] drm: loading out-of-tree module taints kernel.
[    2.111752] drm: module verification failed: signature and/or required key missing - tainting kernel
[    2.112516] [drm] Initialized
[    2.115745] [drm_ukmd] Initialized drm_ukmd module
[    2.116043] Initialized drm/i915 compat module 20180222-16.8-69021-k0260ae1
[root@srv ~]#
[root@srv ~]# ls -altr /dev/dri/
ls: cannot access /dev/dri/: No such file or directory

If you see the above error of missing

/dev/dri

directory, but the driver seems loaded it is because by default on some systems the modsetting is off (KMS – https://en.wikipedia.org/wiki/Mode_setting) and now thw driver is half working. So you need to remove the driver and load it with a parameter:

[root@srv ~]# rmmod i915
[root@srv ~]# modprobe i915 modeset=1
[root@srv ~]# dmesg|grep drm
[    2.111649] drm: loading out-of-tree module taints kernel.
[    2.111752] drm: module verification failed: signature and/or required key missing - tainting kernel
[    2.112516] [drm] Initialized
[    2.115745] [drm_ukmd] Initialized drm_ukmd module
[    2.116043] Initialized drm/i915 compat module 20180222-16.8-69021-k0260ae1
[  594.423711] [drm_ukmd] Found 128MB of eLLC
[  594.423942] [drm_ukmd] Memory usable by graphics device = 4096M
[  594.423945] [drm_ukmd] Replacing VGA console driver
[  594.429823] [drm_ukmd] Supports vblank timestamp caching Rev 2 (21.10.2013).
[  594.429823] [drm_ukmd] Driver supports precise vblank timestamp query.
[  594.470490] [drm_ukmd] failed to retrieve link info, disabling eDP
[  594.472353] [drm_ukmd] Cannot find any crtc or sizes - going 1024x768
[  594.472705] i915 0000:00:02.0: fb1: inteldrmfb frame buffer device
[  594.479838] [drm_ukmd] RC6 disabled, disabling runtime PM support
[  594.479841] [drm_ukmd] Initialized i915 1.6.0 20180222-16.8-69021-k0e37c29 for 0000:00:02.0 on minor 0
[  595.771996] [drm_ukmd] RC6 off
[  595.772030] [drm_ukmd] The Ring/GT multiplier is 2

You see a lot more information for “drm” in “dmesg” and the “dev” devices are here:

[root@srv ~]# ls -al /dev/dri/
total 0
drwxr-xr-x.  2 root root       100 25 Jun 13,20 .
drwxr-xr-x. 19 root root      3220 26 Jun  0,24 ..
crw-rw----.  1 root video 226,   0 25 Jun 13,20 card0
crw-------.  1 root video 226,  64 25 Jun 13,20 controlD64
crw-rw----.  1 root video 226, 128 25 Jun 13,20 renderD128
[root@srv ~]#

If you see the “/dev/dri/renderD128” the Intel GPU driver is loaded correctly and you can use hardware video decoding and encoding.
It is a good practice to enable it by default (of course, if it wasn’t by default! If in your system the KMS load by default you can skip it):
First check if in /etc/default/grub there is “nomodeset” in “GRUB_CMDLINE_LINUX” and remove it and update your grub2 configuration with (the BIOS of the server is in UEFI mode for sure if you want to have KMS):

[root@srv ~]# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-693.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-693.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-c1a8b43c94cb4b5caa8786ca5e85211c
Found initrd image: /boot/initramfs-0-rescue-c1a8b43c94cb4b5caa8786ca5e85211c.img
done
[root@srv ~]# reboot

Reboot and check again if the driver loaded with modsetting (KMS) enabled. If it is still not loaded properly you could try to add to “/etc/default/grub” in “GRUB_CMDLINE_LINUX” the following (just add the two options to the other options in the variable – you could try first only the first one, because preliminary_hw_support could lead to instability in some hardware):

GRUB_CMDLINE_LINUX="i915.modeset=1 i915.preliminary_hw_support=1"

And then againt regenerate the grub2 config with:

[root@srv ~]# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-693.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-693.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-c1a8b43c94cb4b5caa8786ca5e85211c
Found initrd image: /boot/initramfs-0-rescue-c1a8b43c94cb4b5caa8786ca5e85211c.img
done
[root@srv ~]# reboot

Now you should have “/dev/dri” directory.

* Full log of the installation

Click on the second page.

Download, what is in the package Intel Media Server Studio 2018 R1 and which linux distro it supports

This howto is just information what to expect from the community package of Intel Media Server Studio.

This package is the starting point of the Quick Sync using and development process – you’ll need parts of it if you want to use hardware encoding and decoding for video streams like MPEG-2, H.264, VC-1, VP8, VP9, HEVC and more!


Most of the time this package is needed for the Intel® Media SDK and the graphics drivers it provides. So the main purpose here is to give you an information which version of the SDK and the graphics drivers are included in the different package and which kernel and Linux distro is supported.
Different versions support different OS linux distros – mainly different CentOS 7. The package supports also a Generic Linux installation on a relatively older kernel.

First we start how to freely download the “Intel Media Server Studio Community Edition” from the Intel site: https://software.intel.com/en-us/intel-media-server-studio
This package (as you can see below) supports CentOS 7.4.1708 or any linux distro by downloading kernel 4.4.111.

STEP 1) Get the free community edition, select “Community” from the dropdown as shown and click on “Free Download”.

main menu
Intel Media Server Studio 2018 for Linux

STEP 2) Intel wants to register before downloading the Community edition, if you have already had an account you could sign in.

Fill the data with your personal and company details, do not fake them! You can miss something important from Intel and you know they give you a big piece of software for free, which could help you a lot!

main menu
Intel user registration

STEP 3) Check your details, enter your password and click “Register” on the bottom.

main menu
Register an Account

STEP 4) Click on “Choose a Version” and select “2018 2018_R1” – this is the latest version at the moment.

If you need another one just choose the right for you from the dropdown box. Check the checkbox with the “Consent to the collection of the information and would like to download the software”.

main menu
Intel Media Server Studio community Edition – 2018

STEP 5) To download the package click in “Intel Media Server Studio for Linux*”, the file is 549MB in size.

main menu
Intel Media Server Studio community Edition – 2018 Download

STEP 6) The file name is MediaServerStudioEssentials2018R1.tar.gz and in fact it is the Essentials version of the studio without any paid support.

main menu
Intel Media Server Studio community Edition – 2018 – file name

Here is what is in the archive:

  1. SDK 2018 Production 16.8 – there two version way to install it:
    1. it supports CentOS version 7.4.1708, because it is deprecated you should use vault.centos.org.
      • libdrm-2.4.74-69021
      • intel-linux-media-devel-16.8-69021
      • intel-opencl-cpu-16.8-67208
      • intel-linux-media-16.8-69021
      • ukmd-kmod-16.8-69021
      • kmod-ukmd-16.8-69021
      • libva-2.0.1.pre1-69021
      • drm-utils-2.4.74-69021
      • libdrm-devel-2.4.74-69021
      • intel-opencl-devel-16.8-67208
      • intel-opencl-16.8-67208
      • libva-devel-2.0.1.pre1-69021

      Here is the modinfo output of the CentOS 7 i915 driver:

      [root@conv11 Generic]# modinfo i915
      filename:       /lib/modules/3.10.0-693.el7.x86_64/weak-updates/ukmd/i915.ko
      license:        GPL and additional rights
      description:    Intel Graphics
      author:         Intel Corporation
      author:         Tungsten Graphics, Inc.
      firmware:       i915/bxt_dmc_ver1.bin
      firmware:       i915/skl_dmc_ver1_26.bin
      firmware:       i915/skl_guc_ver4.bin
      rhelversion:    7.4
      
    2. Generic Install – the setup will try to download kernel version 4.4.111 and install above libraries and compile i915 module.
  2. MediaSamples Linux 2018 R1_b982
  3. Intel SDK for Opencl 2017 7.0.0 2580_x64 – it includes Intel Code builder 2017.0-7.0.0.2580

Here is the files in the archive:

srv@local ~ $ tar xzvf MediaServerStudioEssentials2018R1.tar.gz
MediaServerStudioEssentials2018R1/
MediaServerStudioEssentials2018R1/Intel(R)_Media_Server_Studio_EULA.pdf
MediaServerStudioEssentials2018R1/Intel_SDK_for_OpenCL_2017_r2_release_notes.pdf
MediaServerStudioEssentials2018R1/MediaSamples_Linux_2018R1_b982.tar.gz.sig
MediaServerStudioEssentials2018R1/site_license_materials.txt
MediaServerStudioEssentials2018R1/third_party_programs.txt
MediaServerStudioEssentials2018R1/redist.txt
MediaServerStudioEssentials2018R1/media_server_studio_essentials_release_notes.pdf
MediaServerStudioEssentials2018R1/MediaSamples_Linux_2018R1_b982.tar.gz
MediaServerStudioEssentials2018R1/intel_sdk_for_opencl_2017_7.0.0.2580_x64.tgz
MediaServerStudioEssentials2018R1/SDK2018Production16.8.tar.gz
srv@local ~ $ tar xzvf MediaServerStudioEssentials2018R1/SDK2018Production16.8.tar.gz
SDK2018Production16.8/
SDK2018Production16.8/Generic/
SDK2018Production16.8/Generic/intel-opencl-16.8-67208.x86_64.tar.xz
SDK2018Production16.8/Generic/intel-opencl-devel-16.8-67208.x86_64.tar.xz
SDK2018Production16.8/Generic/intel-linux-media_generic_16.8-69021_64bit.tar.gz
SDK2018Production16.8/Generic/NOTICES.TXT
SDK2018Production16.8/Generic/intel-linux-media_generic_16.8-69021_64bit.tar.gz.sig
SDK2018Production16.8/Generic/vpg_ocl_linux_rpmdeb.public
SDK2018Production16.8/Generic/intel-opencl-cpu-16.8-67208.x86_64.tar.xz
SDK2018Production16.8/media_server_studio_getting_started_guide.pdf
SDK2018Production16.8/CentOS_7.4/
SDK2018Production16.8/CentOS_7.4/libdrm-2.4.74-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/mss-linux-xcode-media.public
SDK2018Production16.8/CentOS_7.4/MediaSamples_Linux_bin-16.8-69021.tar.gz.sig
SDK2018Production16.8/CentOS_7.4/MediaSamples_Linux_bin-16.8-69021.tar.gz
SDK2018Production16.8/CentOS_7.4/intel-linux-media-devel-16.8-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/intel-opencl-cpu-16.8-67208.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/intel-linux-media-16.8-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/NOTICES.TXT
SDK2018Production16.8/CentOS_7.4/install_scripts_centos_16.8-69021.tar.gz
SDK2018Production16.8/CentOS_7.4/install_scripts_centos_16.8-69021.tar.gz.sig
SDK2018Production16.8/CentOS_7.4/ukmd-kmod-16.8-69021.el7.centos.src.rpm
SDK2018Production16.8/CentOS_7.4/kmod-ukmd-16.8-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/libva-2.0.1.pre1-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/drm-utils-2.4.74-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/libdrm-devel-2.4.74-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/intel-opencl-devel-16.8-67208.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/intel-opencl-16.8-67208.x86_64.rpm
SDK2018Production16.8/CentOS_7.4/vpg_ocl_linux_rpmdeb.public
SDK2018Production16.8/CentOS_7.4/libva-devel-2.0.1.pre1-69021.el7.centos.x86_64.rpm
SDK2018Production16.8/intel-opencl-release-notes.pdf
SDK2018Production16.8/media_server_studio_fei_release_notes.pdf
SDK2018Production16.8/media_server_studio_sdk_release_notes.pdf
srv@local ~ $ tar xzvf MediaServerStudioEssentials2018R1/intel_sdk_for_opencl_2017_7.0.0.2580_x64.tgz
intel_sdk_for_opencl_2017_7.0.0.2580_x64/
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/images/
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/images/finish.png
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/images/micl.png
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/images/splash.png
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/licenses/
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/licenses/PYTHON/
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/licenses/PYTHON/License-BEOPEN.com_v1.0.txt
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/licenses/openssl/
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/licenses/openssl/license.txt
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/licenses/openssl/readme.txt
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/licenses/libstdc++/
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/licenses/libstdc++/readme-libstdc++.txt
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/scripts/
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/scripts/force_remove.sh
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/libz/
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/libz/libz.so.1
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/libz/libz.so.1.2.11
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/libz/libz.so
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Core.so
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Core.so.5
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Core.so.5.6
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Core.so.5.6.2
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5DBus.so
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5DBus.so.5
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5DBus.so.5.6
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5DBus.so.5.6.2
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Gui.so
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Gui.so.5
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Gui.so.5.6
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Gui.so.5.6.2
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Widgets.so
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Widgets.so.5
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Widgets.so.5.6
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Widgets.so.5.6.2
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5XcbQpa.so
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5XcbQpa.so.5
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5XcbQpa.so.5.6
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5XcbQpa.so.5.6.2
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Xml.so
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Xml.so.5
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Xml.so.5.6
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libQt5Xml.so.5.6.2
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libxcb.so
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libxcb.so.1
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/qt/libxcb.so.1.1.0
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/libsv.so
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/install
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/install_gui
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/platforms/
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/platforms/libqxcb.so
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/imageformats/
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/imageformats/libqjpeg.so
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/libISSASecureWebChannel.so
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/libISSASoapMessenger.so
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/libcrypto.so.1.0.0
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/32e/libssl.so.1.0.0
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/mediaconfig.xml
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/gt_debugger_post_install.cab
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/gt_debugger_prerequisites.cab
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/phonehome.cab
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/pset_standard_dialogs.cab
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/pset_user_stat.cab
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/signing.cab
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/disable_nonroot_installation.cab
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/opencl_prerequisites.cab
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/os_detection.cab
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/ism.cab
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/check.awk
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/install.cab
intel_sdk_for_opencl_2017_7.0.0.2580_x64/pset/EULA.htm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/install.sh
intel_sdk_for_opencl_2017_7.0.0.2580_x64/install_GUI.sh
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/intel-ism-2.2.0.102.tgz
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/gt_debugger_target-ubuntu-2016.0-41250.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/intel-sdk-opencl-codebuilder-base-2017.0-7.0.0.2580.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/intel-sdk-opencl-codebuilder-base-ubuntu-2017.0-7.0.0.2580.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/intel-sdk-opencl-codebuilder-core-2017.0-7.0.0.2580.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/intel-sdk-opencl-codebuilder-devel-2017.0-7.0.0.2580.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/intel-sdk-opencl-codebuilder-devel-ubuntu-2017.0-7.0.0.2580.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/intel-sdk-opencl-codebuilder-eclipse-plugin-2017.0-7.0.0.2580.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/intel-sdk-opencl-codebuilder-intel-devel-2017.0-7.0.0.2580.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/intel-sdk-opencl-codebuilder-intel-devel-ubuntu-2017.0-7.0.0.2580.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/intel-sdk-opencl-codebuilder-intel-cpu-exp-2017.0-7.0.0.2580.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/gt_debugger_core-2016.0-41250.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/gt_debugger_core-pset-2016.0-41250.noarch.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/gt_debugger_elfdwarf_sources-2016.0-41250.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/gt_debugger_gdb_sources-2016.0-41250.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/gt_debugger_host-2016.0-41250.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/gt_debugger_host-ubuntu-2016.0-41250.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/gt_debugger_igfxgdb_sources-2016.0-41250.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/gt_debugger_licenses-2016.0-41250.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/gt_debugger_target-2016.0-41250.x86_64.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/rpm/intel-sdk-opencl-codebuilder-core-pset-2017.0-7.0.0.2580.noarch.rpm
intel_sdk_for_opencl_2017_7.0.0.2580_x64/silent.cfg
intel_sdk_for_opencl_2017_7.0.0.2580_x64/EULA.txt
intel_sdk_for_opencl_2017_7.0.0.2580_x64/PUBLIC_KEY.PUB

Here are the installed media in “/opt/intel” – the librabry files and which version are available:

/opt/
/opt/intel
/opt/intel/common
/opt/intel/common/mdf
/opt/intel/common/mdf/lib64
/opt/intel/common/mdf/lib64/libigc.so
/opt/intel/common/mdf/lib64/igfxcmrt64.so
/opt/intel/common/mdf/lib64/libigfxcmrt64.so
/opt/intel/opencl
/opt/intel/opencl/libigdccl.so
/opt/intel/opencl/libOpenCL.so
/opt/intel/opencl/__ocl_svml_e9.so
/opt/intel/opencl/libcommon_clang_legacy.so
/opt/intel/opencl/clbltfne9.rtl
/opt/intel/opencl/clbltfnh8_img_cbk.o
/opt/intel/opencl/__ocl_svml_h8.so
/opt/intel/opencl/libintelocl.so
/opt/intel/opencl/clbltfne9_img_cbk.rtl
/opt/intel/opencl/LICENSE
/opt/intel/opencl/libigdrcl.so
/opt/intel/opencl/clbltfnshared.rtl
/opt/intel/opencl/libIntelOpenCL.so
/opt/intel/opencl/libiga64.so
/opt/intel/opencl/libigdbcl.so
/opt/intel/opencl/igdclbif.bin
/opt/intel/opencl/include
/opt/intel/opencl/include/CL
/opt/intel/opencl/include/CL/cl_vebox_intel.h
/opt/intel/opencl/include/CL/cl.hpp
/opt/intel/opencl/include/CL/cl_platform.h
/opt/intel/opencl/include/CL/cl_gl.h
/opt/intel/opencl/include/CL/cl_ext.h
/opt/intel/opencl/include/CL/cl.h
/opt/intel/opencl/include/CL/va_ext.h
/opt/intel/opencl/include/CL/cl_gl_ext.h
/opt/intel/opencl/include/CL/opencl.h
/opt/intel/opencl/include/CL/cl2.hpp
/opt/intel/opencl/__ocl_svml_l9.so
/opt/intel/opencl/clbltfnh8.rtl
/opt/intel/opencl/libcommon_clang.so
/opt/intel/opencl/kernel-4.4-xcode.patch
/opt/intel/opencl/libigdmcl.so
/opt/intel/opencl/libigdfcl.so
/opt/intel/opencl/kernel-4.7.patch
/opt/intel/opencl/libtbb.so.2
/opt/intel/opencl/clbltfnl9_img_cbk.rtl
/opt/intel/opencl/NOTICES
/opt/intel/opencl/libtbb.so
/opt/intel/opencl/libmd.so
/opt/intel/opencl/clbltfnl9.rtl
/opt/intel/opencl/clbltfne9_img_cbk.o
/opt/intel/opencl/libtask_executor.so
/opt/intel/opencl/libtbbmalloc.so.2
/opt/intel/opencl/libtbbmalloc.so
/opt/intel/opencl/clbltfnl9_img_cbk.o
/opt/intel/opencl/libOpenCL.so.1
/opt/intel/opencl/libcpu_device.so
/opt/intel/opencl/libcl_logger.so
/opt/intel/opencl/libclang_compiler.so
/opt/intel/opencl/libOclCpuBackEnd.so
/opt/intel/opencl/libigdfcl_legacy.so
/opt/intel/opencl/OpenCL.pc
/opt/intel/opencl/clbltfnh8_img_cbk.rtl
/opt/intel/mediasdk
/opt/intel/mediasdk/plugins
/opt/intel/mediasdk/plugins/libmfx_hevcd_hw64.so
/opt/intel/mediasdk/plugins/libmfx_h264la_hw64.so
/opt/intel/mediasdk/plugins/libmfx_hevce_hw64.so
/opt/intel/mediasdk/plugins/libmfx_vp8d_hw64.so
/opt/intel/mediasdk/plugins/plugins.cfg
/opt/intel/mediasdk/doc
/opt/intel/mediasdk/doc/dynamic_slice_shutdown.pdf
/opt/intel/mediasdk/doc/mediasdk-man.pdf
/opt/intel/mediasdk/doc/mediasdkvp8-man.pdf
/opt/intel/mediasdk/doc/mediasdkusr-man.pdf
/opt/intel/mediasdk/doc/mediasdkjpeg-man.pdf
/opt/intel/mediasdk/doc/mediasdkfei-man.pdf
/opt/intel/mediasdk/doc/mediasdk_hevc_interlace_whitepaper.pdf
/opt/intel/mediasdk/opensource
/opt/intel/mediasdk/opensource/libva
/opt/intel/mediasdk/opensource/libva/2.0.1.pre1-69021
/opt/intel/mediasdk/opensource/libva/2.0.1.pre1-69021/libva-2.0.1.pre1.tar.bz2
/opt/intel/mediasdk/opensource/libdrm
/opt/intel/mediasdk/opensource/libdrm/2.4.74-69021
/opt/intel/mediasdk/opensource/libdrm/2.4.74-69021/libdrm-2.4.74.tar.bz2
/opt/intel/mediasdk/opensource/readme-dispatcher-linux.pdf
/opt/intel/mediasdk/opensource/mfx_dispatch
/opt/intel/mediasdk/opensource/mfx_dispatch/pkg-config.pc.cmake
/opt/intel/mediasdk/opensource/mfx_dispatch/include
/opt/intel/mediasdk/opensource/mfx_dispatch/include/mfx_plugin_cfg_parser.h
/opt/intel/mediasdk/opensource/mfx_dispatch/include/mfx_vector.h
/opt/intel/mediasdk/opensource/mfx_dispatch/include/mfx_dispatcher_defs.h
/opt/intel/mediasdk/opensource/mfx_dispatch/include/mfx_critical_section.h
/opt/intel/mediasdk/opensource/mfx_dispatch/include/mfx_dispatcher_log.h
/opt/intel/mediasdk/opensource/mfx_dispatch/include/mfx_plugin_hive.h
/opt/intel/mediasdk/opensource/mfx_dispatch/include/mfx_dxva2_device.h
/opt/intel/mediasdk/opensource/mfx_dispatch/include/mfx_win_reg_key.h
/opt/intel/mediasdk/opensource/mfx_dispatch/include/mfx_dispatcher.h
/opt/intel/mediasdk/opensource/mfx_dispatch/include/mfxaudio_exposed_functions_list.h
/opt/intel/mediasdk/opensource/mfx_dispatch/include/mfx_load_dll.h
/opt/intel/mediasdk/opensource/mfx_dispatch/include/mfx_load_plugin.h
/opt/intel/mediasdk/opensource/mfx_dispatch/include/mfx_exposed_functions_list.h
/opt/intel/mediasdk/opensource/mfx_dispatch/include/mfx_library_iterator.h
/opt/intel/mediasdk/opensource/mfx_dispatch/src
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_library_iterator.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_load_dll_linux.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_dxva2_device.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_dispatcher_log.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_win_reg_key.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_load_dll.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_plugin_hive_linux.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/main.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_critical_section_linux.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_library_iterator_linux.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_critical_section.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_plugin_cfg_parser.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_function_table.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_load_plugin.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_plugin_hive.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/src/mfx_dispatcher.cpp
/opt/intel/mediasdk/opensource/mfx_dispatch/CMakeLists.txt
/opt/intel/mediasdk/tools
/opt/intel/mediasdk/tools/tracer
/opt/intel/mediasdk/tools/tracer/README
/opt/intel/mediasdk/tools/tracer/libmfx-tracer.so
/opt/intel/mediasdk/tools/tracer/mfx-tracer-config
/opt/intel/mediasdk/tools/metrics_monitor
/opt/intel/mediasdk/tools/metrics_monitor/doc
/opt/intel/mediasdk/tools/metrics_monitor/doc/metricsmon-man.pdf
/opt/intel/mediasdk/tools/metrics_monitor/sample
/opt/intel/mediasdk/tools/metrics_monitor/sample/run.sh
/opt/intel/mediasdk/tools/metrics_monitor/sample/build.sh
/opt/intel/mediasdk/tools/metrics_monitor/sample/cttmetrics_sample.cpp
/opt/intel/mediasdk/tools/metrics_monitor/_bin
/opt/intel/mediasdk/tools/metrics_monitor/_bin/libcttmetrics.so
/opt/intel/mediasdk/tools/metrics_monitor/_bin/metrics_monitor
/opt/intel/mediasdk/tools/metrics_monitor/README
/opt/intel/mediasdk/tools/metrics_monitor/include
/opt/intel/mediasdk/tools/metrics_monitor/include/cttmetrics.h
/opt/intel/mediasdk/include
/opt/intel/mediasdk/include/mfxenc.h
/opt/intel/mediasdk/include/mfxdispatcherprefixedfunctions.h
/opt/intel/mediasdk/include/mfxcommon.h
/opt/intel/mediasdk/include/mfxstructures.h
/opt/intel/mediasdk/include/mfxaudio.h
/opt/intel/mediasdk/include/mfxjpeg.h
/opt/intel/mediasdk/include/mfxplugin++.h
/opt/intel/mediasdk/include/mfxvp8.h
/opt/intel/mediasdk/include/mfxplugin.h
/opt/intel/mediasdk/include/mfxvideo++.h
/opt/intel/mediasdk/include/mfxbrc.h
/opt/intel/mediasdk/include/mfxmvc.h
/opt/intel/mediasdk/include/mfxsession.h
/opt/intel/mediasdk/include/mfxastructures.h
/opt/intel/mediasdk/include/mfxvideo.h
/opt/intel/mediasdk/include/mfxla.h
/opt/intel/mediasdk/include/mfxfei.h
/opt/intel/mediasdk/include/mfxdefs.h
/opt/intel/mediasdk/include/mfxpak.h
/opt/intel/mediasdk/include/mfxaudio++.h
/opt/intel/mediasdk/include/mfxvstructures.h
/opt/intel/mediasdk/lib64
/opt/intel/mediasdk/lib64/hme_downscale_gen9.isa
/opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.25
/opt/intel/mediasdk/lib64/HevcEnc_PB_genx.isa
/opt/intel/mediasdk/lib64/libmfxhw64.so
/opt/intel/mediasdk/lib64/AVCEncKernel_SKL_genx.isa
/opt/intel/mediasdk/lib64/HevcEnc_I_genx.isa
/opt/intel/mediasdk/lib64/hme_gen9.isa
/opt/intel/mediasdk/lib64/FEI_gen8.isa
/opt/intel/mediasdk/lib64/hme_gen8.isa
/opt/intel/mediasdk/lib64/hme_downscale_gen8.isa
/opt/intel/mediasdk/lib64/libmfxsw64.so
/opt/intel/mediasdk/lib64/iHD_drv_video.so
/opt/intel/mediasdk/lib64/hme_downscale_genx.isa
/opt/intel/mediasdk/lib64/libmfxsw64-p.so.1.25
/opt/intel/mediasdk/lib64/FEI_gen9.isa
/opt/intel/mediasdk/lib64/AVCEncKernel_BDW_genx.isa
/opt/intel/mediasdk/lib
/opt/intel/mediasdk/lib/lin_x64
/opt/intel/mediasdk/lib/lin_x64/libmfx.a

bacula – Device not in SD Device resources or no matching Media Type

If you happen to have such error in your bacula backup server:

20-Jun 00:19 bkp-srv-dir JobId 23741: No prior Full backup Job record found.
20-Jun 00:19 bkp-srv-dir JobId 23741: No prior or suitable Full backup found in catalog. Doing FULL backup.
20-Jun 00:19 bkp-srv-dir JobId 23741: Start Backup JobId 23741, Job=srv1-img.2018-06-20_00.19.09_56
20-Jun 00:19 bkp-srv-sd JobId 23741: Fatal error: Device reservation failed for JobId=23741: 
20-Jun 00:19 bkp-srv-dir JobId 23741: Fatal error: 
     Storage daemon didn't accept Device "srv1-img" because:
     3924 Device "srv1-img" not in SD Device resources or no matching Media Type.
20-Jun 00:19 bkp-srv-dir JobId 23741: Error: Bacula bkp-srv-dir 7.0.5 (28Jul14):
  Build OS:               x86_64-pc-linux-gnu ubuntu 16.04
  JobId:                  23741
  Job:                    srv1-img.2018-06-20_00.19.09_56
  Backup Level:           Full (upgraded from Incremental)
  Client:                 "srv1-img" 7.4.0 (16Jan16) x86_64-pc-linux-gnu,ubuntu,12.04
  FileSet:                "srv1-img" 2018-04-13 23:05:00
  Pool:                   "srv1-img-full" (From Job FullPool override)
  Catalog:                "DefaultCatalog" (From Client resource)
  Storage:                "srv1-img" (From Job resource)
  Scheduled time:         20-Jun-2018 00:19:06
  Start time:             20-Jun-2018 00:19:11
  End time:               20-Jun-2018 00:19:11
  Elapsed time:           0 secs
  Priority:               10
  FD Files Written:       0
  SD Files Written:       0
  FD Bytes Written:       0 (0 B)
  SD Bytes Written:       0 (0 B)
  Rate:                   0.0 KB/s
  Software Compression:   None
  VSS:                    no
  Encryption:             no
  Accurate:               no
  Volume name(s):         
  Volume Session Id:      3105
  Volume Session Time:    1521814321
  Last Volume Bytes:      0 (0 B)
  Non-fatal FD errors:    1
  SD Errors:              0
  FD termination status:  
  SD termination status:  
  Termination:            *** Backup Error ***

First thing to check is the status of Storage Devices you have with bconsole:

bkp-srv bacula # bconsole 
Connecting to Director localhost:9101
1000 OK: 1 bkp-srv-dir Version: 7.0.5 (28 July 2014)
Enter a period to cancel a command.
*status storage
Automatically selected Storage: bkp-srv
Connecting to Storage daemon bkp-srv at 78.140.166.26:9103

bkp-srv-sd Version: 7.0.5 (28 July 2014) x86_64-pc-linux-gnu ubuntu 16.04
Daemon started 20-Jun-18 00:43. Jobs: run=1, running=0.
 Heap: heap=135,168 smbytes=302,033 max_bytes=478,209 bufs=243 max_bufs=262
 Sizes: boffset_t=8 size_t=8 int32_t=4 int64_t=8 mode=0,0

Running Jobs:
No Jobs running.
====

Jobs waiting to reserve a drive:
====

Terminated Jobs:
 JobId  Level    Files      Bytes   Status   Finished        Name 
===================================================================
 23736  Incr          3    383.9 K  OK       19-Jun-18 14:05 srv1-dns
 23737  Incr          3    859.9 K  OK       19-Jun-18 14:05 srv2-dns
 23738  Incr        485    301.8 M  OK       19-Jun-18 14:05 srv3-dns
 23739  Incr         12    91.44 M  OK       19-Jun-18 14:05 srv4-dns
 23740  Full          1    1.358 G  OK       19-Jun-18 14:14 BackupCatalog
 23741  Full          0         0   Error    20-Jun-18 14:19 srv1-img
====

Device status:

Device "localstorage" (/mnt/storage/backups/localstorage) is not open.
==

Device "srv1-dns" (/mnt/storage/backups/srv1-dns) is not open.
==

Device "srv2-dns" (/mnt/storage/backups/srv2-dns) is not open.
==

Device "srv3-dns" (/mnt/storage/backups/srv3-dns) is not open.
==

Device "srv4-dns" (/mnt/storage/backups/srv4-dns) is not open.
==

Device "bkp-srv" (/mnt/storage/backups/bkp-srv) is not open.
==
====

Used Volume status:
====

====

As you can see there is no storage Device with name “srv1-img” as it expected from the error above.
You should check two files:

bacula-dir.conf

and

bacula-sd.conf

In file “/etc/bacula/bacula-dir.conf” you should have section like this:

Storage {
  Name = srv1-img
  Address = 10.10.10.10
  SDPort = 9103
  Password = mysecretpass
  Device = srv1-img
  Media Type = File
  Maximum Concurrent Jobs = 10
}

And in file “/etc/bacula/bacula-sd.conf”:

Device {
   Name = srv1-img
   Media Type = File
   Archive Device = /mnt/storage/backups/srv1-img
   LabelMedia = yes;
   Random Access = Yes;
   AutomaticMount = yes;
   RemovableMedia = no;
   AlwaysOpen = no;
 }

The important parts for this particular error (“3924 Device “srv1-img” not in SD Device resources or no matching Media Type.”) are highlighted:

  1. “Name” – the name of the storage
  2. “Media Type” – the type of the storage

You may also check the path of the storage – /mnt/storage/backups/srv1-img.

The two parameters must be the same! And if you verify these two configurations exist in the files and the above two parameters are the same and still get the error you MUST restart your SD (storage device) daemon, a “reload” command from the bconsole won’t work!

bkp-srv bacula # systemctl restart bacula-sd.service
bkp-srv bacula # systemctl status bacula-sd.service
* bacula-sd.service - LSB: Start Bacula Storage Daemon at boot time
   Loaded: loaded (/etc/init.d/bacula-sd; bad; vendor preset: enabled)
   Active: active (running) since Wed 2018-06-20 00:43:22 UTC; 4s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 25249 ExecStop=/etc/init.d/bacula-sd stop (code=exited, status=0/SUCCESS)
  Process: 25259 ExecStart=/etc/init.d/bacula-sd start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/bacula-sd.service
           `-25269 /usr/sbin/bacula-sd -c /etc/bacula/bacula-sd.conf -u bacula -g tape

Jun 20 00:43:22 bkp-srv systemd[1]: Starting LSB: Start Bacula Storage Daemon at boot time...
Jun 20 00:43:22 bkp-srv bacula-sd[25259]:  * Starting Bacula Storage daemon... bacula-sd
Jun 20 00:43:22 bkp-srv bacula-sd[25259]:    ...done.
Jun 20 00:43:22 bkp-srv systemd[1]: Started LSB: Start Bacula Storage Daemon at boot time.

And verify it restarted successfully.

Then you the storage device named “srv1-img” should appear in bconsole status storage command:
First thing to check is the status of Storage Devices you have with bconsole:

bkp-srv bacula # bconsole 
Connecting to Director localhost:9101
1000 OK: 1 bkp-srv-dir Version: 7.0.5 (28 July 2014)
Enter a period to cancel a command.
*status storage
Automatically selected Storage: bkp-srv
Connecting to Storage daemon bkp-srv at 78.140.166.26:9103

bkp-srv-sd Version: 7.0.5 (28 July 2014) x86_64-pc-linux-gnu ubuntu 16.04
Daemon started 20-Jun-18 00:43. Jobs: run=1, running=0.
 Heap: heap=135,168 smbytes=302,033 max_bytes=478,209 bufs=243 max_bufs=262
 Sizes: boffset_t=8 size_t=8 int32_t=4 int64_t=8 mode=0,0

Running Jobs:
No Jobs running.
====

Jobs waiting to reserve a drive:
====

Terminated Jobs:
 JobId  Level    Files      Bytes   Status   Finished        Name 
===================================================================
 23736  Incr          3    383.9 K  OK       19-Jun-18 14:05 srv1-dns
 23737  Incr          3    859.9 K  OK       19-Jun-18 14:05 srv2-dns
 23738  Incr        485    301.8 M  OK       19-Jun-18 14:05 srv3-dns
 23739  Incr         12    91.44 M  OK       19-Jun-18 14:05 srv4-dns
 23740  Full          1    1.358 G  OK       19-Jun-18 14:14 BackupCatalog
 23741  Full          0         0   Error    20-Jun-18 14:19 srv1-img
====

Device status:

Device "localstorage" (/mnt/storage/backups/localstorage) is not open.
==

Device "srv1-dns" (/mnt/storage/backups/srv1-dns) is not open.
==

Device "srv2-dns" (/mnt/storage/backups/srv2-dns) is not open.
==

Device "srv3-dns" (/mnt/storage/backups/srv3-dns) is not open.
==

Device "srv4-dns" (/mnt/storage/backups/srv4-dns) is not open.
==

Device "bkp-srv" (/mnt/storage/backups/bkp-srv) is not open.
==

Device "srv1-img" (/mnt/storage/backups/srv1-img) is not open.
==
====

Used Volume status:
====

====

Extras – rerun the job and verify the backup was executed.

bkp-srv bacula # bconsole 
Connecting to Director localhost:9101
1000 OK: 1 bkp-srv-dir Version: 7.0.5 (28 July 2014)
Enter a period to cancel a command.
*run
Automatically selected Catalog: DefaultCatalog
Using Catalog "DefaultCatalog"
A job name must be specified.
The defined Job resources are:
     1: BackupCatalog
     2: srv1-dns
     3: srv2-dns
     4: srv3-dns
     5: srv4-dns
     6: srv1-img
Select Job resource (1-33): 6
Run Backup job
JobName:  srv1-img
Level:    Incremental
Client:   srv1-img
FileSet:  srv1-img
Pool:     Default (From Job resource)
Storage:  srv1-img (From Job resource)
When:     2018-06-20 00:43:59
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=23742
You have messages.
*messages 
20-Jun 00:44 bkp-srv-dir JobId 23742: No prior Full backup Job record found.
20-Jun 00:44 bkp-srv-dir JobId 23742: No prior or suitable Full backup found in catalog. Doing FULL backup.
20-Jun 00:44 bkp-srv-dir JobId 23742: Start Backup JobId 23742, Job=srv1-img.2018-06-20_00.44.01_00
20-Jun 00:44 bkp-srv-dir JobId 23742: Created new Volume="srv1-img-full0394", Pool="srv1-img-full", MediaType="File" in catalog.
20-Jun 00:44 bkp-srv-dir JobId 23742: Using Device "srv1-img" to write.
20-Jun 00:44 bkp-srv-sd JobId 23742: Labeled new Volume "srv1-img-full0394" on file device "srv1-img" (/mnt/storage/backups/srv1-img).
20-Jun 00:44 bkp-srv-sd JobId 23742: Wrote label to prelabeled Volume "srv1-img-full0394" on file device "srv1-img" (/mnt/storage/backups/srv1-img)
*messages
20-Jun 00:44 bkp-srv-dir JobId 23742: Volume used once. Marking Volume "srv1-img-full0394" as Used.
*messages
You have no messages.

Enable internal graphics in SUPERMICRO servers

Here are the steps to enable your internal graphics – the CPU internal video chip in your Intel processor. Multiple Intel processors have video unit in it, which could be used for hardware decoding and encoding of video streams. We have two kind of processors:

Intel(R) Xeon(R) CPU E3-1585 v5 @ 3.50GHz

and

Intel(R) Xeon(R) CPU E3-1285 v4 @ 3.50GHz

the two processors packed with the right motherboard will give you a big advance in hardware decoding and encoding with your server! Intel calls it “Intel Quick Sync Video” and to use it your chipset should support it, so when using SUPERMICRO your motherboard must be equipped with C226 (for v4 CPU) and C236 (for v5 CPU)! Your CPU could have video unit in it, but if your chipset does not support internal graphics you won’t be able to use it, so be careful to have C226 or C236 Chipsets!
So if you have another setup (not Supermicro) you should check the chipset of your motherboard if it support internal graphics this is very important, because there are numerous motherboard, which have BIOS options for Enable/Disable of the internal graphics, but you cannot use it!
Here are the compliant platforms to use the video unit properly:

Intel Xeon E3-1200 v4 Family with C226 chipset
Intel Xeon E3-1200 and E3-1500 v5 Family with C236 chipset

If you enabled the internal graphics properly you’ll see it in hardware devices Device manager in MS Windows and in linux with “lspci”:

[root@srv ~]# lspci |grep -i display
00:02.0 Display controller: Intel Corporation Device 193a (rev 09)

Your BIOS menus could vary, but for SUPERMICRO there are vary similar:

STEP 1) The SUPERMICRO server is intializing you. Hit “DEL” button on your keyboard to enter BIOS Setup.

main menu
SUPERMICRO server

Keep on reading!

How to install new gcc and development tools under CentOS 7

CentOS 7 is a very stable and conservative operating system. It offers us free enterprise-class operating system, which is compatible with Red Hat, but in many situations, we need a newer (not even a bleeding edge) tools from a trusted source not from an unknown third repository! Let’s say you are a developer and you need newer than GCC 4.8 (which is more than 5 years old and at present, we have stable GCC 8.x stable branch). There are repositories, which would surely break your system at one point even they do not break it at first installing a newer version of GNU GCC! There is a really easy and “official” way to have newer development software in CentOS 7 by using the Software Collection – https://www.softwarecollections.org/en/scls/
We can say these packages are officially maintained by CentOS 7 team and as a whole Red Hat/CentOS officials and community developers! The collection aims at

  1. Multiple version installed of the same components, you can have multiple GNU GCC installed without breaking your system or compiling manually. Not only GNU GCC, but you can also have PHP, Ruby, Python, famous databases like Mysql, MongoDB, PostgreSQL and many more
  2. To have a newer version of the same components, you can have multiple version of GNU GCC – you can install with no worries of breaking your system GNU GCC 6 and 7

This article is to install GNU GCC 7 on CentOS 7 and we have a new one to install GNU GCC 8How to install GNU GCC 8 on CentOS 7.

So here is how to install GNU GCC 7:

STEP 1) Install the repository in your system

yum install centos-release-scl

Here is the output in our system:

[srv@local ~]# yum -y install centos-release-scl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.crazyfrogs.org
 * extras: centos.quelquesmots.fr
 * updates: centos.mirror.fr.planethoster.net
Resolving Dependencies
--> Running transaction check
---> Package centos-release-scl.noarch 0:2-2.el7.centos will be installed
--> Processing Dependency: centos-release-scl-rh for package: centos-release-scl-2-2.el7.centos.noarch
--> Running transaction check
---> Package centos-release-scl-rh.noarch 0:2-2.el7.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================================
 Package                                          Arch                              Version                                   Repository                         Size
======================================================================================================================================================================
Installing:
 centos-release-scl                               noarch                            2-2.el7.centos                            extras                             12 k
Installing for dependencies:
 centos-release-scl-rh                            noarch                            2-2.el7.centos                            extras                             12 k

Transaction Summary
======================================================================================================================================================================
Install  1 Package (+1 Dependent package)

STEP 2) Install the development tools and GNU GCC 7, which is part of the “devtools” package

yum install devtoolset-7-gcc*

Here is the output in our system:

[srv@local ~]# yum install devtoolset-7-gcc*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.crazyfrogs.org
 * extras: centos.quelquesmots.fr
 * updates: centos.mirror.fr.planethoster.net
centos-sclo-rh                                                                                                                                 | 3.0 kB  00:00:00     
centos-sclo-sclo                                                                                                                               | 2.9 kB  00:00:00     
(1/2): centos-sclo-sclo/x86_64/primary_db                                                                                                      | 281 kB  00:00:00     
(2/2): centos-sclo-rh/x86_64/primary_db                                                                                                        | 3.5 MB  00:00:03     
Resolving Dependencies
--> Running transaction check
---> Package devtoolset-7-gcc.x86_64 0:7.3.1-5.4.el7 will be installed
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: devtoolset-7-gcc-7.3.1-5.4.el7.x86_64
--> Processing Dependency: devtoolset-7-binutils >= 2.22.52.0.1 for package: devtoolset-7-gcc-7.3.1-5.4.el7.x86_64
--> Processing Dependency: devtoolset-7-runtime for package: devtoolset-7-gcc-7.3.1-5.4.el7.x86_64
--> Processing Dependency: libmpfr.so.4()(64bit) for package: devtoolset-7-gcc-7.3.1-5.4.el7.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: devtoolset-7-gcc-7.3.1-5.4.el7.x86_64
---> Package devtoolset-7-gcc-c++.x86_64 0:7.3.1-5.4.el7 will be installed
--> Processing Dependency: devtoolset-7-libstdc++-devel = 7.3.1-5.4.el7 for package: devtoolset-7-gcc-c++-7.3.1-5.4.el7.x86_64
---> Package devtoolset-7-gcc-gdb-plugin.x86_64 0:7.3.1-5.4.el7 will be installed
---> Package devtoolset-7-gcc-gfortran.x86_64 0:7.3.1-5.4.el7 will be installed
--> Processing Dependency: devtoolset-7-libquadmath-devel = 7.3.1-5.4.el7 for package: devtoolset-7-gcc-gfortran-7.3.1-5.4.el7.x86_64
--> Processing Dependency: libgfortran4 >= 7.1.1-2 for package: devtoolset-7-gcc-gfortran-7.3.1-5.4.el7.x86_64
---> Package devtoolset-7-gcc-plugin-devel.x86_64 0:7.3.1-5.4.el7 will be installed
--> Processing Dependency: mpfr-devel >= 2.2.1 for package: devtoolset-7-gcc-plugin-devel-7.3.1-5.4.el7.x86_64
--> Processing Dependency: libmpc-devel >= 0.8.1 for package: devtoolset-7-gcc-plugin-devel-7.3.1-5.4.el7.x86_64
--> Processing Dependency: gmp-devel >= 4.1.2-8 for package: devtoolset-7-gcc-plugin-devel-7.3.1-5.4.el7.x86_64
--> Running transaction check
---> Package devtoolset-7-binutils.x86_64 0:2.28-11.el7 will be installed
---> Package devtoolset-7-libquadmath-devel.x86_64 0:7.3.1-5.4.el7 will be installed
--> Processing Dependency: libquadmath for package: devtoolset-7-libquadmath-devel-7.3.1-5.4.el7.x86_64
---> Package devtoolset-7-libstdc++-devel.x86_64 0:7.3.1-5.4.el7 will be installed
---> Package devtoolset-7-runtime.x86_64 0:7.1-4.el7 will be installed
--> Processing Dependency: scl-utils >= 20120927-11 for package: devtoolset-7-runtime-7.1-4.el7.x86_64
--> Processing Dependency: /usr/sbin/semanage for package: devtoolset-7-runtime-7.1-4.el7.x86_64
--> Processing Dependency: /usr/sbin/semanage for package: devtoolset-7-runtime-7.1-4.el7.x86_64
---> Package glibc-devel.x86_64 0:2.17-222.el7 will be installed
--> Processing Dependency: glibc-headers = 2.17-222.el7 for package: glibc-devel-2.17-222.el7.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-222.el7.x86_64
---> Package gmp-devel.x86_64 1:6.0.0-15.el7 will be installed
---> Package libgfortran4.x86_64 0:7.2.1-1.2.1.el7_5 will be installed
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package libmpc-devel.x86_64 0:1.0.1-3.el7 will be installed
---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
---> Package mpfr-devel.x86_64 0:3.1.1-4.el7 will be installed
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.17-222.el7 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-222.el7.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-222.el7.x86_64
---> Package libquadmath.x86_64 0:4.8.5-28.el7_5.1 will be installed
---> Package policycoreutils-python.x86_64 0:2.5-22.el7 will be installed
--> Processing Dependency: setools-libs >= 3.3.8-2 for package: policycoreutils-python-2.5-22.el7.x86_64
--> Processing Dependency: libsemanage-python >= 2.5-9 for package: policycoreutils-python-2.5-22.el7.x86_64
--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-22.el7.x86_64
--> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-22.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-22.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-22.el7.x86_64
--> Processing Dependency: libcgroup for package: policycoreutils-python-2.5-22.el7.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-22.el7.x86_64
--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-22.el7.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-22.el7.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-22.el7.x86_64
---> Package scl-utils.x86_64 0:20130529-18.el7_4 will be installed
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.8.1-3.el7 will be installed
---> Package checkpolicy.x86_64 0:2.5-6.el7 will be installed
---> Package kernel-headers.x86_64 0:3.10.0-862.3.2.el7 will be installed
---> Package libcgroup.x86_64 0:0.41-15.el7 will be installed
---> Package libsemanage-python.x86_64 0:2.5-11.el7 will be installed
---> Package python-IPy.noarch 0:0.75-6.el7 will be installed
---> Package setools-libs.x86_64 0:3.3.8-2.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================================
 Package                                             Arch                        Version                                    Repository                           Size
======================================================================================================================================================================
Installing:
 devtoolset-7-gcc                                    x86_64                      7.3.1-5.4.el7                              centos-sclo-rh                       29 M
 devtoolset-7-gcc-c++                                x86_64                      7.3.1-5.4.el7                              centos-sclo-rh                       11 M
 devtoolset-7-gcc-gdb-plugin                         x86_64                      7.3.1-5.4.el7                              centos-sclo-rh                      123 k
 devtoolset-7-gcc-gfortran                           x86_64                      7.3.1-5.4.el7                              centos-sclo-rh                       11 M
 devtoolset-7-gcc-plugin-devel                       x86_64                      7.3.1-5.4.el7                              centos-sclo-rh                      1.3 M
Installing for dependencies:
 audit-libs-python                                   x86_64                      2.8.1-3.el7                                base                                 75 k
 checkpolicy                                         x86_64                      2.5-6.el7                                  base                                294 k
 devtoolset-7-binutils                               x86_64                      2.28-11.el7                                centos-sclo-rh                      5.3 M
 devtoolset-7-libquadmath-devel                      x86_64                      7.3.1-5.4.el7                              centos-sclo-rh                      153 k
 devtoolset-7-libstdc++-devel                        x86_64                      7.3.1-5.4.el7                              centos-sclo-rh                      2.6 M
 devtoolset-7-runtime                                x86_64                      7.1-4.el7                                  centos-sclo-rh                       20 k
 glibc-devel                                         x86_64                      2.17-222.el7                               base                                1.1 M
 glibc-headers                                       x86_64                      2.17-222.el7                               base                                678 k
 gmp-devel                                           x86_64                      1:6.0.0-15.el7                             base                                181 k
 kernel-headers                                      x86_64                      3.10.0-862.3.2.el7                         updates                             7.1 M
 libcgroup                                           x86_64                      0.41-15.el7                                base                                 65 k
 libgfortran4                                        x86_64                      7.2.1-1.2.1.el7_5                          updates                             676 k
 libmpc                                              x86_64                      1.0.1-3.el7                                base                                 51 k
 libmpc-devel                                        x86_64                      1.0.1-3.el7                                base                                 32 k
 libquadmath                                         x86_64                      4.8.5-28.el7_5.1                           updates                             188 k
 libsemanage-python                                  x86_64                      2.5-11.el7                                 base                                112 k
 mpfr                                                x86_64                      3.1.1-4.el7                                base                                203 k
 mpfr-devel                                          x86_64                      3.1.1-4.el7                                base                                 68 k
 policycoreutils-python                              x86_64                      2.5-22.el7                                 base                                454 k
 python-IPy                                          noarch                      0.75-6.el7                                 base                                 32 k
 scl-utils                                           x86_64                      20130529-18.el7_4                          base                                 24 k
 setools-libs                                        x86_64                      3.3.8-2.el7                                base                                619 k

Transaction Summary
======================================================================================================================================================================
Install  5 Packages (+22 Dependent packages)

Total download size: 73 M
Installed size: 188 M
Is this ok [y/d/N]: y

STEP 3) Use the installed tools.

Because using such a package with multiple complex packages you must configure multiple environment and links to the versions you installed replacing the ones from your base system, but the package comes with a handy tool, which executing it will configure everything and you are ready to go!

scl enable devtoolset-7 bash

And you’ll be in a bash environment, which is configured for GNU GCC 7.

[srv@local ~]# scl enable devtoolset-7 bash
[srv@local ~]# which gcc
/opt/rh/devtoolset-7/root/usr/bin/gcc
[srv@local ~]# gcc --version
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@srv ~]#

As long as you are in this bash shell (you do not type exit) your environment is configured to use GNU GCC 7 and you can use make, cmake to compile your projects with this newer version.

Before entering the devtoolset-7 bash shell, here is the error for the GNU GCC version:

[srv@local build]# cmake3 ../
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:29 (message):
  g++ version must be at least 5.1!


-- Configuring incomplete, errors occurred!
See also "/root/myproject/build/CMakeFiles/CMakeOutput.log".

After entering the devtoolset-7 bash shell, everything is configured OK and you can proceed with the “make”:

[srv@local build]# rm -R *
[srv@local build]# cmake3 ../ 
-- The C compiler identification is GNU 7.3.1
-- The CXX compiler identification is GNU 7.3.1
-- Check for working C compiler: /opt/rh/devtoolset-7/root/usr/bin/cc
-- Check for working C compiler: /opt/rh/devtoolset-7/root/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.0.2k") 
-- Configuring done
-- Generating done
-- Build files have been written to: /root/myproject/build
[srv@local ~]# make -j 8
Scanning dependencies of target myproject
[  3%] Building C object CMakeFiles/myproject.dir/myproject/backend/cpu/crypto/c_keccak.c.o
[  7%] Building C object CMakeFiles/myproject.dir/myproject/backend/cpu/crypto/c_groestl.c.o
[ 15%] Building C object CMakeFiles/myproject.dir/myproject/backend/cpu/crypto/c_blake256.c.o
...

*Update1

Here you can see how to install GNU GCC 8.3 – How to install GNU GCC 8 on CentOS 7