How to install the latest linux kernel (mainline) in CentOS 7 distro

Here you can see the steps to install the latest (mainline stable) kernel under CentOS 7, whether we need the latest driver, because we bought a new laptop released for the first time last month with the latest hardware or there is a hot fix of some nasty bug it is of no matter.
Here are the steps about installing the latest kernel to our CentOS 7, you must have root access:

  • STEP 1 Import the public key of the repository, which offer us the packages of the CentOS 7 mainline stable kernel (and some other kernels, like the Red Hat Enterprise Linux (RHEL) 6 and 7 and more, you can check out the site). The site of the repository is

    https://elrepo.org/

    Import the public key

    #change to root user (skip the first line if you are root)
    sudo su
    rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
    
  • STEP 2 Check the latest version of the rpm install package of the repository, the command is under

    To install ELRepo for RHEL-7, SL-7 or CentOS-7:

    So at present the latest version is “7.0-3” and execute to wget to download the package for the repository elrepo:

    wget http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
    
  • STEP 3 Install the elrepo package with yum (you can do it with rpm command, but let yum manage all your packages and metadata for them!)
    yum -y install ./elrepo-release-7.0-3.el7.elrepo.noarch.rpm
    

    STEP 4 List the available kernels from the elrepo to choose the one you like

    yum list available --disablerepo='*' --enablerepo=elrepo-kernel
    

    To install the latest mainline kernel you must use package starting with

    kernel-ml-*

    at moment of writing the latest mainline kernel is

    4.15.4-1.el7.elrepo

    So execute

    yum install -y --enablerepo=elrepo-kernel kernel-ml
    

    And it will pull the

    kernel-ml-4.15.4-1.el7.elrepo.x86_64

    and install it

  • STEP 5 Check if you are going to boot the new kernel, you’ve installed and set the right one to boot

    cat /boot/grub2/grubenv |grep saved
    # GRUB Environment Block
    saved_entry=CentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)
    

    And as you see, no it’ll not boot to the new kernel, so you must configure grub2 to boot your newly just installed kernel. First check all the installed kernels, set the right kernel and then it is mandatory to call

    grub2-mkconfig

    to update the grub2 configuration:

    [root@srv ~]# awk -F\' /^menuentry/{print\$2} /boot/grub2/grub.cfg 
    CentOS Linux (4.15.4-1.el7.elrepo.x86_64) 7 (Core)
    CentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)
    CentOS Linux (0-rescue-0a26fe4b81d845209fb8958c8e29d600) 7 (Core)
    

    The position 0 (YES, it starts from ZERO!) is “CentOS Linux (4.15.4-1.el7.elrepo.x86_64) 7 (Core)”, so you have two options to set it:

    grub2-set-default 0
    grub2-mkconfig -o /boot/grub2/grub.cfg
    

    Check to see if everything is OK with

    [root@srv ~]# cat /boot/grub2/grubenv |grep saved
    saved_entry=0
    

    or you can set the name of the kernel to boot with

    grub2-set-default "CentOS Linux (4.15.4-1.el7.elrepo.x86_64) 7 (Core)"
    grub2-mkconfig -o /boot/grub2/grub.cfg
    

    Check to see if everything is OK with

    [root@srv ~]# cat /boot/grub2/grubenv |grep saved
    saved_entry=CentOS Linux (4.15.4-1.el7.elrepo.x86_64) 7 (Core)
    
  • STEP 6 is just to reboot
    reboot
    

    STEP 4 Verification of running the latest kernel

    root@srv:~# uname -a
    Linux srv.local 4.15.4-1.el7.elrepo.x86_64 #1 SMP Sat Feb 17 13:35:20 EST 2018 x86_64 x86_64 x86_64 GNU/Linux
    

Install log of the procedure (your output may vary depending on your hardware installed in your system):

[root@srv ~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
[root@srv ~]# wget http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
--2018-02-19 10:20:42--  http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
Resolving www.elrepo.org (www.elrepo.org)... 69.195.83.87
Connecting to www.elrepo.org (www.elrepo.org)|69.195.83.87|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8656 (8.5K) [application/x-rpm]
Saving to: ‘elrepo-release-7.0-3.el7.elrepo.noarch.rpm’

100%[=======================================================================>] 8,656       --.-K/s   in 0.001s  

2018-02-19 10:20:42 (6.97 MB/s) - ‘elrepo-release-7.0-3.el7.elrepo.noarch.rpm’ saved [8656/8656]
[root@srv ~]# yum -y install ./elrepo-release-7.0-3.el7.elrepo.noarch.rpm 
Loaded plugins: fastestmirror
Examining ./elrepo-release-7.0-3.el7.elrepo.noarch.rpm: elrepo-release-7.0-3.el7.elrepo.noarch
Marking ./elrepo-release-7.0-3.el7.elrepo.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package elrepo-release.noarch 0:7.0-3.el7.elrepo will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================
 Package              Arch         Version                   Repository                                     Size
=================================================================================================================
Installing:
 elrepo-release       noarch       7.0-3.el7.elrepo          /elrepo-release-7.0-3.el7.elrepo.noarch       5.2 k

Transaction Summary
=================================================================================================================
Install  1 Package

Total size: 5.2 k
Installed size: 5.2 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : elrepo-release-7.0-3.el7.elrepo.noarch                                                        1/1 
  Verifying  : elrepo-release-7.0-3.el7.elrepo.noarch                                                        1/1 

Installed:
  elrepo-release.noarch 0:7.0-3.el7.elrepo                                                                       

Complete!
[root@srv ~]# yum list available --disablerepo='*' --enablerepo=elrepo-kernel
Loaded plugins: fastestmirror                                                                                                                                               
Loading mirror speeds from cached hostfile                                                                                                                                  
 * elrepo-kernel: mirrors.netix.net                                                                                                                                         
Available Packages                                                                                                                                                          
kernel-lt.x86_64                                                                      4.4.116-1.el7.elrepo                                                     elrepo-kernel
kernel-lt-devel.x86_64                                                                4.4.116-1.el7.elrepo                                                     elrepo-kernel
kernel-lt-doc.noarch                                                                  4.4.116-1.el7.elrepo                                                     elrepo-kernel
kernel-lt-headers.x86_64                                                              4.4.116-1.el7.elrepo                                                     elrepo-kernel
kernel-lt-tools.x86_64                                                                4.4.116-1.el7.elrepo                                                     elrepo-kernel
kernel-lt-tools-libs.x86_64                                                           4.4.116-1.el7.elrepo                                                     elrepo-kernel
kernel-lt-tools-libs-devel.x86_64                                                     4.4.116-1.el7.elrepo                                                     elrepo-kernel
kernel-ml.x86_64                                                                      4.15.4-1.el7.elrepo                                                      elrepo-kernel
kernel-ml-devel.x86_64                                                                4.15.4-1.el7.elrepo                                                      elrepo-kernel
kernel-ml-doc.noarch                                                                  4.15.4-1.el7.elrepo                                                      elrepo-kernel
kernel-ml-headers.x86_64                                                              4.15.4-1.el7.elrepo                                                      elrepo-kernel
kernel-ml-tools.x86_64                                                                4.15.4-1.el7.elrepo                                                      elrepo-kernel
kernel-ml-tools-libs.x86_64                                                           4.15.4-1.el7.elrepo                                                      elrepo-kernel
kernel-ml-tools-libs-devel.x86_64                                                     4.15.4-1.el7.elrepo                                                      elrepo-kernel
perf.x86_64                                                                           4.15.4-1.el7.elrepo                                                      elrepo-kernel
python-perf.x86_64                                                                    4.15.4-1.el7.elrepo                                                      elrepo-kernel
[root@srv ~]# yum install -y --enablerepo=elrepo-kernel kernel-ml
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.uni-sofia.bg
 * elrepo: mirrors.netix.net
 * elrepo-kernel: mirrors.netix.net
 * extras: centos.uni-sofia.bg
 * updates: centos.uni-sofia.bg
Resolving Dependencies
--> Running transaction check
---> Package kernel-ml.x86_64 0:4.15.4-1.el7.elrepo will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================
 Package                               Arch                               Version                                           Repository                                 Size
============================================================================================================================================================================
Installing:
 kernel-ml                             x86_64                             4.15.4-1.el7.elrepo                               elrepo-kernel                              44 M

Transaction Summary
============================================================================================================================================================================
Install  1 Package

Total download size: 44 M
Installed size: 195 M
Downloading packages:
kernel-ml-4.15.4-1.el7.elrepo.x86_64.rpm                                                                                                             |  44 MB  00:00:10     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : kernel-ml-4.15.4-1.el7.elrepo.x86_64                                                                                                                     1/1 
  Verifying  : kernel-ml-4.15.4-1.el7.elrepo.x86_64                                                                                                                     1/1 

Installed:
  kernel-ml.x86_64 0:4.15.4-1.el7.elrepo                                                                                                                                    

Complete!
[root@srv ~]# cat /boot/grub2/grubenv |grep saved
# GRUB Environment Block
saved_entry=CentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)
[root@srv ~]# awk -F\' /^menuentry/{print\$2} /etc/grub2.cfg
CentOS Linux (4.15.4-1.el7.elrepo.x86_64) 7 (Core)
CentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-0a26fe4b81d845209fb8958c8e29d600) 7 (Core)
[root@srv ~]# grub2-set-default "CentOS Linux (4.15.4-1.el7.elrepo.x86_64) 7 (Core)"
[root@srv ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.4-1.el7.elrepo.x86_64
Found initrd image: /boot/initramfs-4.15.4-1.el7.elrepo.x86_64.img
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-0a26fe4b81d845209fb8958c8e29d600
Found initrd image: /boot/initramfs-0-rescue-0a26fe4b81d845209fb8958c8e29d600.img
done
[root@srv ~]# reboot
Connection to 192.168.0.18 closed by remote host.
Connection to 192.168.0.18 closed.
...
...
...
[root@srv ~]# uname -a
Linux srv.local 4.15.4-1.el7.elrepo.x86_64 #1 SMP Sat Feb 17 13:35:20 EST 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@srv ~]#

How to install the latest linux kernel (mainline) in Ubuntu (17.10) distro

Sometimes we need to install the latest kernel version of our linux distro (btw it is called “mainline” if you need to google something about it)! Whether we need the latest driver, because we bought a new laptop released for the first time last month with the latest hardware or there is a hot fix of some nasty bug it is of no matter. Here are the steps (and some troubleshooting) about installing the latest kernel to our Ubuntu install 17.10 (with old versions like 16, 15 and 14 should be the same):

  • STEP 1 is to choose our desired kernel from

    http://kernel.ubuntu.com/~kernel-ppa/mainline/

    Open this address in your favorite browser and choose the latest. In our example the latest kernel, which is no release candidate, 4.14.15. Enter the directory

    http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15.1/

    and choose your build, for example amd64 for your 64bit setup (and for most cases choose -generic- one)

    mkdir /root/latestkernel
    cd /root/latestkernel
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15.1/linux-headers-4.15.1-041501_4.15.1-041501.201802031831_all.deb
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15.1/linux-headers-4.15.1-041501-generic_4.15.1-041501.201802031831_amd64.deb
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15.1/linux-image-4.15.1-041501-generic_4.15.1-041501.201802031831_amd64.deb
    
  • STEP 2 after successfully downloading the 3 files just install them with “dpkg” (the package manager tool)
    sudo dpkg -i linux-headers-4.15.1*.deb linux-image-4.15.1*.deb
    
  • STEP 3 is just to reboot your machine, the installation setup did everything you needed to load this kernel
    reboot
    

    STEP 4 Verification of running the latest kernel

    root@srv:~# uname -a
    Linux srv.local 4.15.1-041501-generic #201802031831 SMP Sat Feb 3 18:32:13 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
    

Install log of the procedure (your output may vary depending on your hardware installed in your system):

root@srv:~/latestkernel# sudo dpkg -i linux-headers-4.15.1*.deb linux-image-4.15.1*.deb
Selecting previously unselected package linux-headers-4.15.1-041501.
(Reading database ... 200430 files and directories currently installed.)
Preparing to unpack linux-headers-4.15.1-041501_4.15.1-041501.201802031831_all.deb ...
Unpacking linux-headers-4.15.1-041501 (4.15.1-041501.201802031831) ...
Selecting previously unselected package linux-headers-4.15.1-041501-generic.
Preparing to unpack linux-headers-4.15.1-041501-generic_4.15.1-041501.201802031831_amd64.deb ...
Unpacking linux-headers-4.15.1-041501-generic (4.15.1-041501.201802031831) ...
Selecting previously unselected package linux-image-4.15.1-041501-generic.
Preparing to unpack linux-image-4.15.1-041501-generic_4.15.1-041501.201802031831_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.15.1-041501-generic /boot/vmlinuz-4.15.1-041501-generic
Done.
Unpacking linux-image-4.15.1-041501-generic (4.15.1-041501.201802031831) ...
Setting up linux-headers-4.15.1-041501 (4.15.1-041501.201802031831) ...
Setting up linux-headers-4.15.1-041501-generic (4.15.1-041501.201802031831) ...                                                                                             
Setting up linux-image-4.15.1-041501-generic (4.15.1-041501.201802031831) ...                                                                                               
Running depmod.                                                                                                                                                             
update-initramfs: deferring update (hook will be called later)                                                                                                              
Examining /etc/kernel/postinst.d.                                                                                                                                           
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.15.1-041501-generic /boot/vmlinuz-4.15.1-041501-generic                                                      
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.15.1-041501-generic /boot/vmlinuz-4.15.1-041501-generic                                                       
update-initramfs: Generating /boot/initrd.img-4.15.1-041501-generic                                                                                                         
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.15.1-041501-generic /boot/vmlinuz-4.15.1-041501-generic                                                   
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.15.1-041501-generic /boot/vmlinuz-4.15.1-041501-generic                                                       
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.15.1-041501-generic /boot/vmlinuz-4.15.1-041501-generic                                                        
Generating grub configuration file ...                                                                                                                                      
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.                                                                   
Found linux image: /boot/vmlinuz-4.15.1-041501-generic                                                                                                                      
Found initrd image: /boot/initrd.img-4.15.1-041501-generic                                                                                                                  
Found linux image: /boot/vmlinuz-4.14.15-041415-generic                                                                                                                     
Found initrd image: /boot/initrd.img-4.14.15-041415-generic                                                                                                                 
Found linux image: /boot/vmlinuz-4.13.0-32-generic
Found initrd image: /boot/initrd.img-4.13.0-32-generic
Found linux image: /boot/vmlinuz-4.13.0-21-generic
Found initrd image: /boot/initrd.img-4.13.0-21-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
root@srv:~/latestkernel#

Access Violation error, when compiling packages in Gentoo

Sometimes if you try to emerge a package in Gentoo you could receive error in the configure phase of the compilation process. The example below is with the emerging the PHP – dev-lang/php-5.6.33:5.6::gentoo, but could happen with many other packages, which are rather old and probably not maintained or the sandbox or even the portage packages are old.
So here is the error and the compilation stops:

srv ~ # emerge -av --nodeps "<php-7"
...
checking for mmap() using MAP_ANON shared memory support... yes
checking for mmap() using /dev/zero shared memory support... yes
checking for mmap() using shm_open() shared memory support...  * ACCESS DENIED:  open_wr:      /run/test.shm.8811LBKone
no
checking for mmap() using regular file shared memory support... yes
...
checking for mmap() using MAP_ANON shared memory support... yes
checking for mmap() using /dev/zero shared memory support... yes
checking for mmap() using shm_open() shared memory support...  * ACCESS DENIED:  open_wr:      /run/test.shm.180309hAMbj
no
checking for mmap() using regular file shared memory support... yes
....
Thank you for using PHP.
config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing libtool commands
config.status: executing default commands
>>> Source configured.
 * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 * LOG FILE: "/var/log/sandbox/sandbox-13466.log"
 * 
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: open_wr
S: deny
P: /run/test.shm.21532Xx6ViE
A: /run/test.shm.21532Xx6ViE
R: /run/test.shm.21532Xx6ViE
C: ./conftest 

F: open_wr
S: deny
P: /run/test.shm.31817hurGxH
A: /run/test.shm.31817hurGxH
R: /run/test.shm.31817hurGxH
C: ./conftest 

F: open_wr
S: deny
P: /run/test.shm.8811LBKone
A: /run/test.shm.8811LBKone
R: /run/test.shm.8811LBKone
C: ./conftest 

F: open_wr
S: deny
P: /run/test.shm.180309hAMbj
A: /run/test.shm.180309hAMbj
R: /run/test.shm.180309hAMbj
C: ./conftest 
 * --------------------------------------------------------------------------------

>>> Failed to emerge dev-lang/php-5.6.33, Log file:

>>>  '/var/tmp/portage/dev-lang/php-5.6.33/temp/build.log'

You could try adding “-sandbox” to feature in “/etc/portage/make.conf”

FEATURES="-sandbox"

But

the sandbox feature is very important and should not be disabled by default.

And that’s why sometime when you disable it with “-sandbox” you still get access violation and you still cannot install/compile the package!
The thing is you see the error and you can fix it easily. The important part is the directory, which causes the error, in the above example with “dev-lang/php”, but could be any other Gentoo package, the problem is the writing permission for files in “/run” directory. So open the configuration file

/etc/sandbox.d/00default

and you’ll see the there is a variable called SANDBOX_WRITE, which accept paths. If you add to this variable at the end the directory “/run” or your access violated directory you’ll be able to install/compile your package with no problems, for the above problem the solution was:

SANDBOX_WRITE="/usr/tmp/conftest:/usr/lib/conftest:/usr/lib32/conftest:/usr/lib64/conftest:/usr/tmp/cf:/usr/lib/cf:/usr/lib32/cf:/usr/lib64/cf:/run"

Ryzen Threadripper kernel problems with PCIe – wifi, network, video problems

If you have Ryzen Threadripper (in my case 1950X) and Ubuntu 17.10 (because the others versions do not boot at all!) with the latest kernel 4.15.x and the default vmlinuz-4.13.0-21-generic you might experience frequently wifi, network cards and video cards problems like wifi disconnects and network cards lost connections and some kind of freezes for a second or two of the video! If you have Ryzen Threadripper 1950X and or ASUS ROG ZENITH EXTREME (or any other motherboard with the chipset AMD X399) and ubuntu 17.10 or probably any linux distro with any kernel you might experience really unstable system. Look at your dmesg and if you see something like

[   18.669950] dpc 0000:00:01.1:pcie010: DPC containment event, status:0x1f00 source:0x0000
[   18.669966] pcieport 0000:00:01.1: AER: Corrected error received: id=0000
[   18.669970] pcieport 0000:00:01.1: PCIe Bus Error: severity=Corrected, type=Data Link Layer, id=0009(Receiver ID)
[   18.669973] pcieport 0000:00:01.1:   device [1022:1453] error status/mask=00000040/00006000
[   18.669975] pcieport 0000:00:01.1:    [ 6] Bad TLP               
[   23.805640] dpc 0000:00:01.1:pcie010: DPC containment event, status:0x1f00 source:0x0000
[   23.805664] pcieport 0000:00:01.1: AER: Corrected error received: id=0000
[   23.805669] pcieport 0000:00:01.1: PCIe Bus Error: severity=Corrected, type=Data Link Layer, id=0009(Receiver ID)
[   23.805674] pcieport 0000:00:01.1:   device [1022:1453] error status/mask=00000040/00006000
[   23.805678] pcieport 0000:00:01.1:    [ 6] Bad TLP               
[   23.838698] dpc 0000:00:01.1:pcie010: DPC containment event, status:0x1f00 source:0x0000
[   23.838716] pcieport 0000:00:01.1: AER: Corrected error received: id=0000
[   23.838720] pcieport 0000:00:01.1: PCIe Bus Error: severity=Corrected, type=Data Link Layer, id=0009(Receiver ID)
[   23.838725] pcieport 0000:00:01.1:   device [1022:1453] error status/mask=00000040/00006000
[   23.838728] pcieport 0000:00:01.1:    [ 6] Bad TLP               
[   36.124101] atlantic: link change old 0 new 100
[   36.124222] IPv6: ADDRCONF(NETDEV_CHANGE): enp65s0: link becomes ready
[   52.294413] dpc 0000:00:01.1:pcie010: DPC containment event, status:0x1f00 source:0x0000
[   52.294436] pcieport 0000:00:01.1: AER: Corrected error received: id=0000
[   52.294441] pcieport 0000:00:01.1: PCIe Bus Error: severity=Corrected, type=Data Link Layer, id=0009(Receiver ID)
[   52.294446] pcieport 0000:00:01.1:   device [1022:1453] error status/mask=00000040/00006000
[   52.294449] pcieport 0000:00:01.1:    [ 6] Bad TLP               
[   53.275256] dpc 0000:00:01.1:pcie010: DPC containment event, status:0x1f00 source:0x0000
[   53.275289] pcieport 0000:00:01.1: AER: Corrected error received: id=0000
[   53.275293] pcieport 0000:00:01.1: PCIe Bus Error: severity=Corrected, type=Data Link Layer, id=0009(Receiver ID)
[   53.275298] pcieport 0000:00:01.1:   device [1022:1453] error status/mask=00000040/00006000
[   53.275301] pcieport 0000:00:01.1:    [ 6] Bad TLP               
[   53.418493] dpc 0000:00:01.1:pcie010: DPC containment event, status:0x1f00 source:0x0000
[   53.418517] pcieport 0000:00:01.1: AER: Corrected error received: id=0000
[   53.418522] pcieport 0000:00:01.1: PCIe Bus Error: severity=Corrected, type=Data Link Layer, id=0009(Receiver ID)
[   53.418527] pcieport 0000:00:01.1:   device [1022:1453] error status/mask=00000040/00006000
[   53.418530] pcieport 0000:00:01.1:    [ 6] Bad TLP               
[   53.649938] dpc 0000:00:01.1:pcie010: DPC containment event, status:0x1f00 source:0x0000
[   53.649962] pcieport 0000:00:01.1: AER: Corrected error received: id=0000
[   53.649967] pcieport 0000:00:01.1: PCIe Bus Error: severity=Corrected, type=Data Link Layer, id=0009(Receiver ID)
[   53.649972] pcieport 0000:00:01.1:   device [1022:1453] error status/mask=00000040/00006000
[   53.649975] pcieport 0000:00:01.1:    [ 6] Bad TLP               
[  113.294411] dpc 0000:00:01.1:pcie010: DPC containment event, status:0x1f00 source:0x0000
[  113.294434] pcieport 0000:00:01.1: AER: Corrected error received: id=0000
[  113.294439] pcieport 0000:00:01.1: PCIe Bus Error: severity=Corrected, type=Data Link Layer, id=0009(Receiver ID)
[  113.294444] pcieport 0000:00:01.1:   device [1022:1453] error status/mask=00000040/00006000
[  113.294450] pcieport 0000:00:01.1:    [ 6] Bad TLP               
[  265.469397] dpc 0000:00:01.1:pcie010: DPC containment event, status:0x1f00 source:0x0000
[  265.469419] pcieport 0000:00:01.1: AER: Corrected error received: id=0000
[  265.469424] pcieport 0000:00:01.1: PCIe Bus Error: severity=Corrected, type=Data Link Layer, id=0009(Transmitter ID)
[  265.469429] pcieport 0000:00:01.1:   device [1022:1453] error status/mask=00001000/00006000
[  265.469438] pcieport 0000:00:01.1:    [12] Replay Timer Timeout  
[  533.031982] dpc 0000:00:01.1:pcie010: DPC containment event, status:0x1f00 source:0x0000
[  533.032004] pcieport 0000:00:01.1: AER: Corrected error received: id=0000
[  533.032009] pcieport 0000:00:01.1: PCIe Bus Error: severity=Corrected, type=Data Link Layer, id=0009(Receiver ID)
[  533.032014] pcieport 0000:00:01.1:   device [1022:1453] error status/mask=00000080/00006000
[  533.032022] pcieport 0000:00:01.1:    [ 7] Bad DLLP      

Apparently everything on the pci express could be affected! So till the kernel team fixes the issues, you can use the following workaround: add to the kernel boot parameters

pcie_aspm=off

Under Ubuntu you can add in the file

/etc/default/grub

the following line

GRUB_CMDLINE_LINUX="pcie_aspm=off"

And then execute

update-grub

the changes to take effect in the grub configuration. Then reboot the machine!

Under CentOS 7 the configuration file and the line to put are the same just the update of the grub configuration is different:

  • For UEFI-based systems execute:
    grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
    
  • For legacy-BIOS systems execute:
    grub2-mkconfig -o /boot/grub2/grub.cfg
    

*You should know what is your setup, probably UEFI-based, you could check in your boot directory, if there is /boot/efi/EFI/centos/grub.cfg you probably should use the option for UEFI-based, if you do not have any “efi” directory under “/boot” use the second option for legacy-BIOS.
Then reboot the machine!

xmr-stak GPU disabled after kernel or driver updated

Sometime when the user upgrades the kernel or the graphic card driver (NVIDIA or ATI) under Ubuntu (it is essentially the same with the other distros) we may encounter errors with xmr-stak and even not to be able to use our graphic card for mining!
Here we have an UBUNTU 17.10.1 and when we updated the kernel to the latest our mining xmr-stak software stopped using the NVIDIA card:

-------------------------------------------------------------------
[2018-02-16 12:17:11] : Start mining: MONERO
WARNING: NVIDIA Insufficient driver!
WARNING: NVIDIA no device found
[2018-02-16 12:17:11] : WARNING: backend NVIDIA disabled.
[2018-02-16 12:17:11] : WARNING: UNKNOWN_ERROR when calling clGetPlatformIDs for number of platforms.
[2018-02-16 12:17:11] : WARNING: No OpenCL platform found.
[2018-02-16 12:17:11] : WARNING: No AMD OpenCL platform found. Possible driver issues or wrong vendor driver.
[2018-02-16 12:17:11] : WARNING: backend AMD disabled.
[2018-02-16 12:17:11] : Starting 1x thread, affinity: 0.
[2018-02-16 12:17:11] : hwloc: memory pinned

As you can see the NVIDIA backend is disabled! In fact the driver seemed OK and loaded and even the X was working.
So in such a situation just reinstall the NVIDIA driver and install the software dependecies for the mining xmr-software (detailed explanation here)
Here what you can do:

sudo apt-get purge nvidia-*
sudo apt-get -y install libboost-all-dev libleveldb-dev libcurl4-openssl-dev libmicrohttpd-dev libminiupnpc-dev libgmp-dev  cuda nvidia-opencl-dev libmicrohttpd-dev libssl-dev cmake build-essential
sudo reboot

And you’ll have again an usable and properly installed GPU mining system.

Here is the log of the reinstallation, check it if you think you are going in the wrong direction, when purging the driver:

root@srv2:~/xmr-stak/build/bin# apt-get purge nvidia-*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  bbswitch-dkms cuda-command-line-tools-9-1 cuda-compiler-9-1 cuda-cublas-9-1 cuda-cublas-dev-9-1 cuda-cudart-9-1 cuda-cudart-dev-9-1 cuda-cufft-9-1 cuda-cufft-dev-9-1
  cuda-cuobjdump-9-1 cuda-cupti-9-1 cuda-curand-9-1 cuda-curand-dev-9-1 cuda-cusolver-9-1 cuda-cusolver-dev-9-1 cuda-cusparse-9-1 cuda-cusparse-dev-9-1
  cuda-documentation-9-1 cuda-driver-dev-9-1 cuda-gdb-9-1 cuda-gpu-library-advisor-9-1 cuda-libraries-9-1 cuda-libraries-dev-9-1 cuda-license-9-1 cuda-memcheck-9-1
  cuda-misc-headers-9-1 cuda-npp-9-1 cuda-npp-dev-9-1 cuda-nsight-9-1 cuda-nvcc-9-1 cuda-nvdisasm-9-1 cuda-nvgraph-9-1 cuda-nvgraph-dev-9-1 cuda-nvml-dev-9-1
  cuda-nvprof-9-1 cuda-nvprune-9-1 cuda-nvrtc-9-1 cuda-nvrtc-dev-9-1 cuda-nvtx-9-1 cuda-nvvp-9-1 cuda-samples-9-1 cuda-toolkit-9-1 cuda-tools-9-1 cuda-visual-tools-9-1
  dkms freeglut3 freeglut3-dev lib32gcc1 libc6-i386 libglu1-mesa-dev libice-dev libsm-dev libvdpau1 libxi-dev libxmu-dev libxmu-headers libxnvctrl0 libxt-dev
  linux-headers-4.13.0-21 linux-headers-4.13.0-21-generic linux-image-4.13.0-21-generic linux-image-extra-4.13.0-21-generic linux-signed-image-4.13.0-21-generic
  linux-signed-image-4.13.0-31-generic mesa-vdpau-drivers nvidia-modprobe nvidia-prime nvidia-settings screen-resolution-extra vdpau-driver-all
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  cuda* cuda-9-1* cuda-demo-suite-9-1* cuda-drivers* cuda-runtime-9-1* libcuda1-390* nvidia-390* nvidia-390-dev* nvidia-opencl-icd-390*
0 upgraded, 0 newly installed, 9 to remove and 14 not upgraded.
After this operation, 369 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 311518 files and directories currently installed.)
Removing cuda (9.1.85-1) ...
Removing cuda-9-1 (9.1.85-1) ...
Removing cuda-demo-suite-9-1 (9.1.85-1) ...
Removing cuda-runtime-9-1 (9.1.85-1) ...
Removing cuda-drivers (390.12-1) ...
Removing libcuda1-390 (390.25-0ubuntu0~gpu17.10.1) ...
Removing nvidia-opencl-icd-390 (390.25-0ubuntu0~gpu17.10.1) ...
Removing nvidia-390-dev (390.25-0ubuntu0~gpu17.10.1) ...
Removing nvidia-390 (390.30-0ubuntu1) ...
Removing all DKMS Modules
Done.
update-alternatives: using /usr/lib/nvidia-390-prime/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in auto mode
update-alternatives: using /usr/lib/nvidia-390-prime/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in auto mode
update-alternatives: using /usr/lib/nvidia-390-prime/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in auto mode
update-alternatives: using /usr/lib/nvidia-390-prime/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf (i386-linux-gnu_egl_conf) in auto mode
update-alternatives: using /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in auto mode
update-alternatives: using /usr/lib/x86_64-linux-gnu/mesa-egl/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in auto mode
INFO:Disable nvidia-390
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.125ubuntu12) ...
update-initramfs: Generating /boot/initrd.img-4.15.3-041503-generic
cryptsetup: WARNING: target cryptswap1 has a random key, skipped
Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
Processing triggers for man-db (2.7.6.1-2) ...
(Reading database ... 310876 files and directories currently installed.)
Purging configuration files for nvidia-opencl-icd-390 (390.25-0ubuntu0~gpu17.10.1) ...
Purging configuration files for nvidia-390 (390.30-0ubuntu1) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.125ubuntu12) ...
update-initramfs: Generating /boot/initrd.img-4.15.3-041503-generic
cryptsetup: WARNING: target cryptswap1 has a random key, skipped
root@srv2:~/xmr-stak/build/bin# apt-get -y install libboost-all-dev libleveldb-dev libcurl4-openssl-dev libmicrohttpd-dev libminiupnpc-dev libgmp-dev  cuda nvidia-opencl-dev libmicrohttpd-dev libssl-dev cmake build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.4ubuntu1).
cmake is already the newest version (3.9.1-1).
libgmp-dev is already the newest version (2:6.1.2+dfsg-1).
libleveldb-dev is already the newest version (1.20-1).
libboost-all-dev is already the newest version (1.62.0.1).
libmicrohttpd-dev is already the newest version (0.9.55-1).
nvidia-opencl-dev is already the newest version (8.0.61-1).
libcurl4-openssl-dev is already the newest version (7.55.1-1ubuntu2.3).
libminiupnpc-dev is already the newest version (1.9.20140610-4ubuntu1.1).
libssl-dev is already the newest version (1.0.2g-1ubuntu13.3).
The following packages were automatically installed and are no longer required:
  linux-headers-4.13.0-21 linux-headers-4.13.0-21-generic linux-image-4.13.0-21-generic linux-image-extra-4.13.0-21-generic linux-signed-image-4.13.0-21-generic
  linux-signed-image-4.13.0-31-generic
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  cuda cuda-9-1 cuda-demo-suite-9-1 cuda-drivers cuda-runtime-9-1 libcuda1-390 nvidia-390 nvidia-390-dev nvidia-opencl-icd-390
The following packages will be upgraded:
  nvidia-modprobe nvidia-settings
2 upgraded, 9 newly installed, 0 to remove and 12 not upgraded.
Need to get 3948 kB/88,1 MB of archives.
After this operation, 369 MB of additional disk space will be used.
Get:1 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64  cuda-runtime-9-1 9.1.85-1 [2534 B]
Get:2 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64  cuda-demo-suite-9-1 9.1.85-1 [3943 kB]
Get:3 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64  cuda-9-1 9.1.85-1 [2560 B]
Fetched 3948 kB in 3s (1003 kB/s)  
Selecting previously unselected package nvidia-390.
(Reading database ... 310871 files and directories currently installed.)
Preparing to unpack .../00-nvidia-390_390.30-0ubuntu1_amd64.deb ...
Unpacking nvidia-390 (390.30-0ubuntu1) ...
Selecting previously unselected package nvidia-390-dev.
Preparing to unpack .../01-nvidia-390-dev_390.30-0ubuntu1_amd64.deb ...
Unpacking nvidia-390-dev (390.30-0ubuntu1) ...
Selecting previously unselected package libcuda1-390.
Preparing to unpack .../02-libcuda1-390_390.30-0ubuntu1_amd64.deb ...
Unpacking libcuda1-390 (390.30-0ubuntu1) ...
Preparing to unpack .../03-nvidia-modprobe_390.30-0ubuntu1_amd64.deb ...
Unpacking nvidia-modprobe (390.30-0ubuntu1) over (390.12-0ubuntu1) ...
Preparing to unpack .../04-nvidia-settings_390.30-0ubuntu1_amd64.deb ...
Unpacking nvidia-settings (390.30-0ubuntu1) over (390.25-0ubuntu0~gpu17.10.1) ...
Selecting previously unselected package nvidia-opencl-icd-390.
Preparing to unpack .../05-nvidia-opencl-icd-390_390.30-0ubuntu1_amd64.deb ...
Unpacking nvidia-opencl-icd-390 (390.30-0ubuntu1) ...
Selecting previously unselected package cuda-drivers.
Preparing to unpack .../06-cuda-drivers_390.30-1_amd64.deb ...
Unpacking cuda-drivers (390.30-1) ...
Selecting previously unselected package cuda-runtime-9-1.
Preparing to unpack .../07-cuda-runtime-9-1_9.1.85-1_amd64.deb ...
Unpacking cuda-runtime-9-1 (9.1.85-1) ...
Selecting previously unselected package cuda-demo-suite-9-1.
Preparing to unpack .../08-cuda-demo-suite-9-1_9.1.85-1_amd64.deb ...
Unpacking cuda-demo-suite-9-1 (9.1.85-1) ...
Selecting previously unselected package cuda-9-1.
Preparing to unpack .../09-cuda-9-1_9.1.85-1_amd64.deb ...
Unpacking cuda-9-1 (9.1.85-1) ...
Selecting previously unselected package cuda.
Preparing to unpack .../10-cuda_9.1.85-1_amd64.deb ...
Unpacking cuda (9.1.85-1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3) ...
Setting up nvidia-390 (390.30-0ubuntu1) ...
update-alternatives: using /usr/lib/nvidia-390/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in auto mode
update-alternatives: warning: skip creation of /usr/share/grub-gfxpayload-lists/blacklist/10_proprietary-graphics-drivers because associated file /usr/share/nvidia-390/nvidia-390.grub-gfxpayload (of link group x86_64-linux-gnu_gl_conf) doesn't exist
update-alternatives: using /usr/lib/nvidia-390/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in auto mode
update-alternatives: using /usr/lib/nvidia-390/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in auto mode
update-alternatives: using /usr/lib/nvidia-390/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf (i386-linux-gnu_egl_conf) in auto mode
update-alternatives: using /usr/share/nvidia-390/glamor.conf to provide /usr/share/X11/xorg.conf.d/glamoregl.conf (glamor_conf) in auto mode
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
dpkg: error: version '-' has bad syntax: revision number is empty
update-initramfs: deferring update (trigger activated)

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

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

INFO:Enable nvidia-390
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
Adding system user `nvidia-persistenced' (UID 123) ...
Adding new group `nvidia-persistenced' (GID 129) ...
Adding new user `nvidia-persistenced' (UID 123) with group `nvidia-persistenced' ...
Not creating home directory `/'.
Loading new nvidia-390-390.30 DKMS files...
Building for 4.15.3-041503-generic
Building for architecture x86_64
Building initial module for 4.15.3-041503-generic
Done.

nvidia_390:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.15.3-041503-generic/updates/dkms/

nvidia_390_modeset.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.15.3-041503-generic/updates/dkms/

nvidia_390_drm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.15.3-041503-generic/updates/dkms/

nvidia_390_uvm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.15.3-041503-generic/updates/dkms/

depmod...

DKMS: install completed.
Setting up nvidia-390-dev (390.30-0ubuntu1) ...
Setting up nvidia-settings (390.30-0ubuntu1) ...
Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
Setting up nvidia-modprobe (390.30-0ubuntu1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu5) ...
Setting up nvidia-opencl-icd-390 (390.30-0ubuntu1) ...
Setting up libcuda1-390 (390.30-0ubuntu1) ...
Setting up cuda-drivers (390.30-1) ...
Setting up cuda-runtime-9-1 (9.1.85-1) ...
Setting up cuda-demo-suite-9-1 (9.1.85-1) ...
Setting up cuda-9-1 (9.1.85-1) ...
Setting up cuda (9.1.85-1) ...
Processing triggers for initramfs-tools (0.125ubuntu12) ...
update-initramfs: Generating /boot/initrd.img-4.15.3-041503-generic
cryptsetup: WARNING: target cryptswap1 has a random key, skipped
Processing triggers for shim-signed (1.33.1~17.10.1+13-0ubuntu2) ...
Secure Boot not enabled on this system.
Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
root@srv2:~/xmr-stak/build/bin#

systemd can be used to run your application as a daemon

A nice feature of systemd is the scripts could be daemonized without any modifications of the scripts like standard stdin, stdout, stderr to be redirected to null (and even in some languages is not that simple!).
So if you want to run your ordinary script as daemon under a systemd linux distro, create a systemd service file in

/etc/systemd/system/myscript.service

Replace “myscript” with the nme of your script.

[Install]
WantedBy=multi-user.target

[Unit]
Description=<my_script_description>
After=syslog.target
After=network.target

[Service]
Type=simple
User=<run_as_user>
Group=<run_as_group_group>
ExecStart=<your_path_and_script_name_here>

# Give the script some time to startup
TimeoutSec=300
#EnvironmentFile=/etc/<filename>

[Install]
WantedBy=multi-user.target

So change the following according your needs:

  • <my_script_description> – description of your script/program with couple of words
  • <run_as_user> – the user under which will be executed
  • <run_as_group_group> – the group under which will be executed
  • <your_path_and_script_name_here> – the absolute path and filename to the script or program to be executed
  • Uncomment “EnvironmentFile” line if you would like to have different environment file for your script

And then you can run it with

systemctl start myscript

And you can enable it to start at boot

systemctl enable myscript

And also you can see the output of the script on syslog or with

systemctl status myscript

Here is an example of running a python script as a daemon with systemd.
The python script is

/usr/local/bin/mypythonscript.py

and the service name is

/etc/systemd/system/mypythonscript.service

Description=My python script daemon
After=syslog.target
After=network.target

[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/bin/python /usr/local/bin/mypythonscript.py

# Give the script some time to startup
TimeoutSec=300

[Install]
WantedBy=multi-user.target

And you can see handful of information for the state of your script with

systemctl status mypythonscript

The uptime of your script and output if any

* mypythonscript.service
   Loaded: loaded (/etc/systemd/system/mypythonscript.service; disabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-01-04 13:58:34 UTC; 1 months 12 days ago
 Main PID: 29654 (python)
   CGroup: /system.slice/mypythonscript.service
           `-37421 /usr/bin/python /usr/local/bin/mypythonscript.py

Jan 12 10:05:21 srv.local systemd[1]: [/etc/systemd/system/mypythonscript.service:3] Assignment outside of section. Ignoring.
Jan 12 10:05:21 srv.local systemd[1]: [/etc/systemd/system/mypythonscript.service:1] Assignment outside of section. Ignoring.

Avoiding Esc (escape) key, a key combination to simulate it

Writing the last howto there was an idea: how to simulate the ESC key, when the key is not available in our keyboard, which is very often these days. Mobile traffic is the ruler coming from mobile devices, of course! So why to limit console users (probably mainly admins?) only to desktop or “qwerty” keyboards? The tables could weight under 500 grams and event smartphones could be used to ssh to a server and what if you do not have ESC key, but need to use it? You can try the following combination:

The escape key can be replaced with pressing and holding CTRL and pressing “[” (left square bracket) = “CTRL+[”

So next time when trying to use ssh or console under Android or iOS or any device try this combination at lease it could be faster than selecting a menu for a predefined keys like ESC key.

vim – edit, save and exit, it is too simple!

Do not blame admins (or in general users, too) of using nano (pico) it is away too simple for simple tasks, which are probably the most cases under console.

    • Save a file – press Esc key, then press and hold SHIFT and then press colons “:”, the bottom line of your screen will change and will start with colons “:”, then type the key “w” and then hit Enter key, so you’ve just saved the opened file.
        1. press Esc
        2. press and hold SHIFT
        3. press the key with colons “:
        4. type “w
        5. hit Enter key
    • Save a file and quit – press Esc key, then press and hold SHIFT and then press colons “:”, the bottom line of your screen will change and will start with colons “:”, then type the key “x” and then hit Enter key, so you’ve just saved the opened file.
        1. press Esc
        2. press and hold SHIFT
        3. press the key with colons “:
        4. type “x
        5. hit Enter key
    • Save all opened files – press Esc key, then press and hold SHIFT and then press colons “:”, the bottom line of your screen will change and will start with colons “:”, then type the key “wa” and then hit Enter key, so you’ve just saved the opened file.
        1. press Esc
        2. press and hold SHIFT
        3. press the key with colons “:
        4. type “wa
        5. hit Enter key
    • Quit without saving, just quit the vim – press Esc key, then press and hold SHIFT and then press colons “:”, the bottom line of your screen will change and will start with colons “:”, then type the key “q!” and then hit Enter key
        1. press Esc
        2. press and hold SHIFT
        3. press the key with colons “:
        4. type “q!
        5. hit Enter key
  • Enable auto save with two ESC keys – create or edit file

    ~/.vimrc

    Add the following line:

    map <Esc><Esc> :w<CR>
    

* The Esc can be avoided

The escape key can be replaced with pressing and holding CTRL and pressing “[” (left square bracket) = “CTRL+[” and if your “[” is hard typing, you can try CTRL plus “c” = “CTRL+c”, all this is needed to be sure you are not in vim’s insert mode. Avoiding Esc – escape button could be useful under not qwerty keyboards of the mobile devices – smartphones, tablets and so on.

How to proper enable the selinux in a CentOS7 installed server

These days many dedicated servers are offered with automation installation of operating systems and it have never been so easy and fast to pay a server and to get it up in minutes! Yes, we are talking for dedicated machines not virtual servers or cloud ones, but many cloud ones are in the same situation, when the host uses full virtualization.
It is fast, you can choose from many different linux distros and the installation is unattended and happens immediately, but in most cases the selinux is disabled, because is more easy for the support, for the user, for the admin, and for the offered preinstalled software…If you do not have some strange software in most cases it is advisable to enable the selinux, because it is of great security enhancement for your server and for the software in general. It is very simple to enable selinux, but there is an additional step, which if you omit, the server will probably get unusable (probably you won’t be able even to ssh it or login). These steps are tested under CentOS7, but probably works in all other distros, which support selinux!
So here are the steps:

STEP 1) Enable selinux in configuration

Edit the configuration file in

/etc/selinux/config

SELINUX=enforcing

STEP 2) relabel the file system

When using the selinux, there are labels (extended attributes of the file system), which are additional layer of security. Every system comes with prebuild rules instructing what label is set in which file or directory, so when you enable the selinux you must relabel the entire file system (or at least the root partition, to be able to boot normally). This is done with just a line of code below:

touch /.autorelabel

STEP 3) reboot

To take effect the changes made above the server must be rebooted.

reboot

The init process will find the file from step 2 “/.autorelabel” and will initiate a proper relabel according the current selinux rules file, then the server will be rebooted automatically again, the relabel could take time and it depends on the number of files you have in your server, just keep patient.
After the second reboot (which is automatically after the relabeling)

4) Recommendations

USE SELINUX, do not disable it! In most cases it is really simple to configure it in minutes for the need of your special software and for the generic one bet it there are rules offered in the distro’s packet system.

4) Post install check

You can check if the selinux is enabled with

[root@srv ~]# getenforce 
Enforcing
[root@srv ~]#

Install xmr-stak 2.2 in a machine with NVIDIA video card under Ubuntu 16.04 LTS (only commands , real output and benchmark)

Here is the Part 2 of the Install xmr-stak 2.2 in a machine with NVIDIA video card under Ubuntu 16.04 LTS. The Part 2 is just all executed commands, which could be put in a bash file to automate the installation of the machine and the compilation of the xmr-stak and the output for a much clear example with real life example with output. Here you’ll find no explanations, which are included in the “Part 1” (see link above).
So only three sections here, first the bash commands and then the output of executed commands, only the installation of the packets with apt-get is trimmed because of the long output! The example is executing first sudo su to get to the root user, if you do not feel good you can skip the root and adjust it to the user you like with sudo. The second is the output of the commands and the third is the benchmark and hardware information of the machine used for this howto.

1. Commands to execute

sudo su
cd
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
dpkg -i /root/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
add-apt-repository -y ppa:graphics-drivers/ppa
apt-get update -y
apt-get -y install libboost-all-dev libleveldb-dev libcurl4-openssl-dev libmicrohttpd-dev libminiupnpc-dev libgmp-dev  cuda nvidia-opencl-dev libmicrohttpd-dev libssl-dev cmake build-essential
reboot
sudo su
cd
echo "termcapinfo xterm* ti@:te@" > /root/.screenrc
screen -R xmr-stak-mining
git clone https://github.com/fireice-uk/xmr-stak
mkdir -p /root/xmr-stak/build
cd /root/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_ARCH=37 ../
cmake ../
make -j 8
cd /root/xmr-stak/build/bin
sysctl -w vm.nr_hugepages=128
export GPU_FORCE_64BIT_PTR=0
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_SINGLE_ALLOC_PERCENT=100
./xmr-stak 

It’s worth mentioning the configuration of xmr-stak first run from Part 1:
Just enter your monero (or other cryptocurrency using cryptonight algorithm like Electoneum, Intensecoin and so on), follow the questions and in our case are shown below, the question start with “-” line and my answers are the next lines, yours will be different, especially in the part of the “Pool address”, which is the address of the pool you use, the username, which is the crypto currency public address you have (now, there is a fake address, DO NOT USE IT, you’ll mine and use your resources for nothing!!! Check your public address and put it there!), the Password, which is blank or your email (some pools’ software shows better statistics with your email, not required in most cases)

2. Here is the all real output (just the configuration of Pool address, Username and Password are changed for security reasons, use your own)

 

ubuntu@mylocal:~$ sudo su
root@mylocal:/home/ubuntu# cd
root@mylocal:~# wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
--2018-02-15 02:22:19--  http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
Resolving developer.download.nvidia.com (developer.download.nvidia.com)... 192.229.211.70, 2606:2800:21f:3aa:dcf:37b:1ed6:1fb
Connecting to developer.download.nvidia.com (developer.download.nvidia.com)|192.229.211.70|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2820 (2.8K) [application/x-deb]
Saving to: ‘cuda-repo-ubuntu1604_9.1.85-1_amd64.deb’

cuda-repo-ubuntu1604_9.1.85-1_amd64.deb    100%[========================================================================================&amp;gt;]   2.75K  --.-KB/s    in 0s      

2018-02-15 02:22:19 (422 MB/s) - ‘cuda-repo-ubuntu1604_9.1.85-1_amd64.deb’ saved [2820/2820]

root@mylocal:~# apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
Executing: /tmp/tmp.OWvP5bjT2q/gpg.1.sh --fetch-keys
http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
gpg: key 7FA2AF80: public key "cudatools &amp;lt;cudatools@nvidia.com&amp;gt;" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
root@mylocal:~# dpkg -i /root/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
Selecting previously unselected package cuda-repo-ubuntu1604.
(Reading database ... 51107 files and directories currently installed.)
Preparing to unpack .../cuda-repo-ubuntu1604_9.1.85-1_amd64.deb ...
Unpacking cuda-repo-ubuntu1604 (9.1.85-1) ...
Setting up cuda-repo-ubuntu1604 (9.1.85-1) ...
root@mylocal:~# add-apt-repository -y ppa:graphics-drivers/ppa
gpg: keyring `/tmp/tmptpad_2so/secring.gpg' created
gpg: keyring `/tmp/tmptpad_2so/pubring.gpg' created
gpg: requesting key 1118213C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmptpad_2so/trustdb.gpg: trustdb created
gpg: key 1118213C: public key "Launchpad PPA for Graphics Drivers Team" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
root@mylocal:~# apt-get update -y
Hit:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB] 
Get:3 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]             
Get:5 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/main Sources [868 kB]              
Get:6 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/restricted Sources [4,808 B]                                                                                  
Get:7 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/universe Sources [7,728 kB]                                                                   
Ign:8 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  InRelease                                      
Get:9 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  Release [564 B]                                
Get:10 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  Release.gpg [801 B]                                  
Get:11 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial InRelease [24.3 kB]                                                      
Get:12 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/multiverse Sources [179 kB]                               
Get:13 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7,532 kB]                 
Get:14 http://security.ubuntu.com/ubuntu xenial-security/main Sources [110 kB]                                             
Get:15 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources [2,116 B]                                  
Get:16 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  Packages [100 kB]                                             
Get:17 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [50.4 kB]                                                            
Get:18 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/universe Translation-en [4,354 kB]                           
Get:19 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources [1,516 B]                             
Get:20 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [442 kB]                                                               
Get:21 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]                                                     
Get:22 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]                                            
Get:23 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main Sources [295 kB]                                                       
Get:24 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/restricted Sources [2,524 B]                                        
Get:25 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe Sources [191 kB]                                               
Get:26 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/multiverse Sources [7,968 B]                              
Get:27 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [721 kB]                                 
Get:28 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [193 kB]                                           
Get:29 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [300 kB]          
Get:30 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [7,560 B]                    
Get:31 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/restricted Translation-en [2,272 B]
Get:32 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [585 kB]         
Get:33 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [237 kB]
Get:34 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [7,224 B]                
Get:35 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.2 kB]                
Get:36 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8,052 B]
Get:37 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/main Sources [3,432 B]                 
Get:38 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/universe Sources [4,904 B]      
Get:39 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [4,836 B]   
Get:40 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [3,220 B]    
Get:41 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [6,628 B]      
Get:42 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en [2,152 B]            
Get:43 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [3,768 B]      
Get:44 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [205 kB]                    
Get:45 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial/main amd64 Packages [11.9 kB]
Get:46 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [105 kB]
Get:47 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3,208 B]                     
Get:48 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1,408 B]                 
Get:49 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial/main Translation-en [4,224 B]                   
Fetched 24.9 MB in 3s (6,240 kB/s)                                        
Reading package lists... Done
root@mylocal:~# apt-get -y install libboost-all-dev libleveldb-dev libcurl4-openssl-dev libmicrohttpd-dev libminiupnpc-dev libgmp-dev  cuda nvidia-opencl-dev libmicrohttpd-dev libssl-dev cmake build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  adwaita-icon-theme apg aptdaemon aspell aspell-en at-spi2-core autotools-dev avahi-daemon avahi-utils bbswitch-dkms binutils bluez bluez-obexd ca-certificates-java
  cheese-common cmake-data colord colord-data cpp cpp-5 cracklib-runtime crda cuda-9-1 cuda-command-line-tools-9-1 cuda-compiler-9-1 cuda-cublas-9-1 cuda-cublas-dev-9-1
  cuda-cudart-9-1 cuda-cudart-dev-9-1 cuda-cufft-9-1 cuda-cufft-dev-9-1 cuda-cuobjdump-9-1 cuda-cupti-9-1 cuda-curand-9-1 cuda-curand-dev-9-1 cuda-cusolver-9-1
  cuda-cusolver-dev-9-1 cuda-cusparse-9-1 cuda-cusparse-dev-9-1 cuda-demo-suite-9-1 cuda-documentation-9-1 cuda-driver-dev-9-1 cuda-drivers cuda-gdb-9-1
  cuda-gpu-library-advisor-9-1 cuda-libraries-9-1 cuda-libraries-dev-9-1 cuda-license-9-1 cuda-memcheck-9-1 cuda-misc-headers-9-1 cuda-npp-9-1 cuda-npp-dev-9-1
  cuda-nsight-9-1 cuda-nvcc-9-1 cuda-nvdisasm-9-1 cuda-nvgraph-9-1 cuda-nvgraph-dev-9-1 cuda-nvml-dev-9-1 cuda-nvprof-9-1 cuda-nvprune-9-1 cuda-nvrtc-9-1
  cuda-nvrtc-dev-9-1 cuda-nvtx-9-1 cuda-nvvp-9-1 cuda-runtime-9-1 cuda-samples-9-1 cuda-toolkit-9-1 cuda-tools-9-1 cuda-visual-tools-9-1 cups-pk-helper dbus-x11 dconf-cli
  dconf-gsettings-backend dconf-service default-jre default-jre-headless desktop-file-utils dictionaries-common diffstat dkms dpkg-dev emacsen-common enchant
  evolution-data-server evolution-data-server-common evolution-data-server-online-accounts fakeroot fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-extra
  freeglut3 freeglut3-dev g++ g++-5 gcc gcc-5 gcc-5-base gcr geoclue geoclue-ubuntu-geoip gettext gir1.2-atk-1.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0
  gir1.2-gnomekeyring-1.0 gir1.2-gtk-3.0 gir1.2-ibus-1.0 gir1.2-notify-0.7 gir1.2-packagekitglib-1.0 gir1.2-pango-1.0 gkbd-capplet glib-networking glib-networking-common
  glib-networking-services gnome-bluetooth gnome-desktop3-data gnome-keyring gnome-menus gnome-power-manager gnome-screensaver gnome-session-bin
  gnome-settings-daemon-schemas gnome-user-guide gnome-user-share gsettings-desktop-schemas gsettings-ubuntu-schemas gstreamer1.0-clutter-3.0 gstreamer1.0-plugins-base
  gstreamer1.0-plugins-good gstreamer1.0-x gvfs gvfs-backends gvfs-common gvfs-daemons gvfs-libs hardening-includes hicolor-icon-theme humanity-icon-theme hunspell-en-us
  hwdata ibus ibus-gtk ibus-gtk3 icu-devtools im-config indicator-applet indicator-application indicator-bluetooth indicator-datetime indicator-keyboard
  indicator-messages indicator-power indicator-session indicator-sound intltool-debian ippusbxd iputils-arping iw java-common lib32gcc1 libaa1 libaccount-plugin-1.0-0
  libaccount-plugin-generic-oauth libaccount-plugin-google libaccounts-glib0 libaccounts-qt5-1 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
  libappindicator3-1 libapt-pkg-perl libarchive-zip-perl libarchive13 libasan2 libasound2 libasound2-data libasound2-plugins libaspell15 libasprintf-dev libassuan0
  libasyncns0 libatasmart4 libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatomic1 libatspi2.0-0 libauthen-sasl-perl libavahi-client3 libavahi-common-data
  libavahi-common3 libavahi-core7 libavahi-glib1 libavc1394-0 libbluetooth3 libboost-atomic-dev libboost-atomic1.58-dev libboost-atomic1.58.0 libboost-chrono-dev
  libboost-chrono1.58-dev libboost-chrono1.58.0 libboost-context-dev libboost-context1.58-dev libboost-context1.58.0 libboost-coroutine-dev libboost-coroutine1.58-dev
  libboost-coroutine1.58.0 libboost-date-time-dev libboost-date-time1.58-dev libboost-date-time1.58.0 libboost-dev libboost-exception-dev libboost-exception1.58-dev
  libboost-filesystem-dev libboost-filesystem1.58-dev libboost-filesystem1.58.0 libboost-graph-dev libboost-graph-parallel-dev libboost-graph-parallel1.58-dev
  libboost-graph-parallel1.58.0 libboost-graph1.58-dev libboost-graph1.58.0 libboost-iostreams-dev libboost-iostreams1.58-dev libboost-iostreams1.58.0 libboost-locale-dev
  libboost-locale1.58-dev libboost-locale1.58.0 libboost-log-dev libboost-log1.58-dev libboost-log1.58.0 libboost-math-dev libboost-math1.58-dev libboost-math1.58.0
  libboost-mpi-dev libboost-mpi-python-dev libboost-mpi-python1.58-dev libboost-mpi-python1.58.0 libboost-mpi1.58-dev libboost-mpi1.58.0 libboost-program-options-dev
  libboost-program-options1.58-dev libboost-program-options1.58.0 libboost-python-dev libboost-python1.58-dev libboost-python1.58.0 libboost-random-dev
  libboost-random1.58-dev libboost-random1.58.0 libboost-regex-dev libboost-regex1.58-dev libboost-regex1.58.0 libboost-serialization-dev libboost-serialization1.58-dev
  libboost-serialization1.58.0 libboost-signals-dev libboost-signals1.58-dev libboost-signals1.58.0 libboost-system-dev libboost-system1.58-dev libboost-system1.58.0
  libboost-test-dev libboost-test1.58-dev libboost-test1.58.0 libboost-thread-dev libboost-thread1.58-dev libboost-thread1.58.0 libboost-timer-dev libboost-timer1.58-dev
  libboost-timer1.58.0 libboost-tools-dev libboost-wave-dev libboost-wave1.58-dev libboost-wave1.58.0 libboost1.58-dev libboost1.58-tools-dev libc-dev-bin libc6 libc6-dev
  libc6-i386 libcaca0 libcairo-gobject2 libcairo2 libcamel-1.2-54 libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra-pulse libcanberra0 libcapnp-0.5.3 libcc1-0
  libcdio-cdda1 libcdio-paranoia1 libcdio13 libcdparanoia0 libcgi-fast-perl libcgi-pm-perl libcgmanager0 libcheese-gtk25 libcheese8 libcilkrts5 libclass-accessor-perl
  libclone-perl libclutter-1.0-0 libclutter-1.0-common libclutter-gst-3.0-0 libclutter-gtk-1.0-0 libcogl-common libcogl-pango20 libcogl-path20 libcogl20 libcolord2
  libcolorhug2 libcrack2 libcroco3 libcuda1-390 libcups2 libcurl3 libdaemon0 libdata-alias-perl libdatrie1 libdbusmenu-glib4 libdbusmenu-gtk3-4 libdconf1
  libdigest-hmac-perl libdouble-conversion1v5 libdpkg-perl libdrm-amdgpu1 libdrm-common libdrm-dev libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libdv4
  libebackend-1.2-10 libebook-1.2-16 libebook-contacts-1.2-2 libecal-1.2-19 libedata-book-1.2-25 libedata-cal-1.2-28 libedataserver-1.2-21 libegl1-mesa
  libemail-valid-perl libenchant1c2a libencode-locale-perl libepoxy0 libevdev2 libexif12 libexpat1-dev libexporter-tiny-perl libfakeroot libfcgi-perl libfcitx-config4
  libfcitx-gclient0 libfcitx-utils0 libfftw3-single3 libfile-basedir-perl libfile-fcntllock-perl libflac8 libfontconfig1 libfontenc1 libgbm1 libgcc-5-dev libgck-1-0
  libgcr-3-common libgcr-base-3-1 libgcr-ui-3-1 libgcrypt20-dev libgd3 libgdata-common libgdata22 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgee-0.8-2 libgeoclue0
  libgeocode-glib0 libgeonames0 libgettextpo-dev libgettextpo0 libgif7 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglib2.0-bin libglu1-mesa
  libglu1-mesa-dev libgmpxx4ldbl libgnome-bluetooth13 libgnome-desktop-3-12 libgnome-keyring-common libgnome-keyring0 libgnome-menu-3-0 libgnomekbd-common libgnomekbd8
  libgnutls-dev libgnutls28-dev libgnutlsxx28 libgoa-1.0-0b libgoa-1.0-common libgomp1 libgpg-error-dev libgphoto2-6 libgphoto2-l10n libgphoto2-port12 libgraphite2-3
  libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0 libgstreamer1.0-0 libgtk-3-0 libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common
  libgtop-2.0-10 libgtop2-common libgudev-1.0-0 libgusb2 libgweather-3-6 libgweather-common libharfbuzz-icu0 libharfbuzz0b libhtml-parser-perl libhtml-tagset-perl
  libhttp-date-perl libhttp-message-perl libhunspell-1.3-0 libhwloc-dev libhwloc-plugins libhwloc5 libhyphen0 libibus-1.0-5 libibverbs-dev libibverbs1 libical1a
  libice-dev libice6 libicu-dev libidn11-dev libido3-0.1-0 libiec61883-0 libieee1284-3 libimobiledevice6 libindicator3-7 libinput-bin libinput10 libio-html-perl
  libio-pty-perl libio-socket-inet6-perl libio-socket-ssl-perl libio-string-perl libipc-run-perl libipc-system-simple-perl libisl15 libitm1 libjack-jackd2-0 libjansson4
  libjavascriptcoregtk-4.0-18 libjbig0 libjpeg-turbo8 libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common libjsoncpp1 liblcms2-2 libldb1 libleveldb1v5
  liblightdm-gobject-1-0 liblist-moreutils-perl libllvm5.0 liblsan0 libltdl-dev libltdl7 liblwp-mediatypes-perl libmailtools-perl libmbim-glib4 libmbim-proxy
  libmicrohttpd10 libminiupnpc10 libmirclient9 libmircommon7 libmircore1 libmirprotobuf3 libmm-glib0 libmpc3 libmpx0 libmtdev1 libmtp-common libmtp-runtime libmtp9
  libnautilus-extension1a libndp0 libnet-dns-perl libnet-domain-tld-perl libnet-ip-perl libnet-libidn-perl libnet-smtp-ssl-perl libnet-ssleay-perl libnih-dbus1
  libnl-3-200 libnl-genl-3-200 libnm-glib4 libnm-gtk-common libnm-gtk0 libnm-util2 libnm0 libnma-common libnma0 libnotify4 libnspr4 libnss-mdns libnss3 libnss3-nssdb
  libnuma-dev liboauth0 libogg0 libopenmpi-dev libopenmpi1.10 libopus0 liborc-0.4-0 libp11-kit-dev libp11-kit-gnome-keyring libpackagekit-glib2-16 libpam-gnome-keyring
  libpanel-applet0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpangoxft-1.0-0 libparse-debianchangelog-perl libpciaccess0 libpcre16-3 libpcsclite1
  libperlio-gzip-perl libpixman-1-0 libplist3 libprotobuf-lite9v5 libproxy1v5 libpthread-stubs0-dev libpulse-mainloop-glib0 libpulse0 libpulsedsp libpwquality-common
  libpwquality1 libpython-dev libpython-stdlib libpython2.7 libpython2.7-dev libpython2.7-minimal libpython2.7-stdlib libqmi-glib5 libqmi-proxy libqt5core5a libqt5dbus5
  libqt5gui5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5sql5 libqt5sql5-sqlite libqt5svg5 libqt5webkit5 libqt5widgets5 libqt5xml5
  libquadmath0 libraw1394-11 librest-0.7-0 librsvg2-2 librsvg2-common libsamplerate0 libsane libsane-common libsecret-1-0 libsecret-common libsensors4 libshout3
  libsignon-extension1 libsignon-glib1 libsignon-plugins-common1 libsignon-qt5-1 libsm-dev libsm6 libsmbclient libsnappy1v5 libsndfile1 libsocket6-perl libsoup-gnome2.4-1
  libsoup2.4-1 libspeex1 libspeexdsp1 libssl-doc libssl1.0.0 libstdc++-5-dev libstdc++6 libsub-name-perl libtag1v5 libtag1v5-vanilla libtalloc2 libtasn1-6 libtasn1-6-dev
  libtasn1-doc libtdb1 libtevent0 libtext-levenshtein-perl libthai-data libthai0 libtheora0 libtiff5 libtimedate-perl libtimezonemap-data libtimezonemap1 libtool libtsan0
  libtxc-dxtn-s2tc0 libubsan0 libudisks2-0 libunistring0 libunity-control-center1 libunity-settings-daemon1 libupower-glib3 liburi-perl liburl-dispatcher1 libusbmuxd4
  libv4l-0 libv4lconvert0 libvdpau1 libvisual-0.4-0 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx3 libwacom-bin libwacom-common libwacom2 libwavpack1 libwayland-client0
  libwayland-cursor0 libwayland-egl1-mesa libwayland-server0 libwbclient0 libwebkit2gtk-4.0-37 libwebkit2gtk-4.0-37-gtk2 libwebp5 libwebrtc-audio-processing-0 libx11-dev
  libx11-doc libx11-xcb-dev libx11-xcb1 libxau-dev libxaw7 libxcb-dri2-0 libxcb-dri2-0-dev libxcb-dri3-0 libxcb-dri3-dev libxcb-glx0 libxcb-glx0-dev libxcb-icccm4
  libxcb-image0 libxcb-keysyms1 libxcb-present-dev libxcb-present0 libxcb-randr0 libxcb-randr0-dev libxcb-render-util0 libxcb-render0 libxcb-render0-dev libxcb-shape0
  libxcb-shape0-dev libxcb-shm0 libxcb-sync-dev libxcb-sync1 libxcb-util1 libxcb-xfixes0 libxcb-xfixes0-dev libxcb-xkb1 libxcb1-dev libxcomposite1 libxcursor1
  libxdamage-dev libxdamage1 libxdmcp-dev libxext-dev libxfixes-dev libxfixes3 libxfont1 libxft2 libxi-dev libxi6 libxinerama1 libxkbcommon-x11-0 libxkbcommon0
  libxkbfile1 libxklavier16 libxmu-dev libxmu-headers libxmu6 libxnvctrl0 libxpm4 libxrandr2 libxrender1 libxshmfence-dev libxshmfence1 libxslt1.1 libxt-dev libxt6
  libxtst6 libxv1 libxxf86dga1 libxxf86vm-dev libxxf86vm1 libyaml-libyaml-perl libyelp0 lightdm lintian linux-libc-dev make manpages-dev mesa-common-dev
  mesa-vdpau-drivers mobile-broadband-provider-info modemmanager mountall mousetweaks mpi-default-bin mpi-default-dev nautilus-data nettle-dev network-manager
  network-manager-gnome network-manager-pptp notification-daemon nvidia-390 nvidia-390-dev nvidia-modprobe nvidia-opencl-icd-390 nvidia-prime nvidia-settings
  ocl-icd-libopencl1 opencl-headers openjdk-8-jre openjdk-8-jre-headless openmpi-bin openmpi-common p11-kit p11-kit-modules patchutils pinentry-gnome3 pkg-config
  policykit-1-gnome ppp pptp-linux pulseaudio pulseaudio-module-x11 pulseaudio-utils python python-dev python-minimal python-talloc python2.7 python2.7-dev
  python2.7-minimal python3-aptdaemon python3-aptdaemon.pkcompat python3-bs4 python3-cairo python3-cups python3-cupshelpers python3-defer python3-html5lib python3-lxml
  python3-xdg python3-xkit qttranslations5-l10n rtkit samba-libs screen-resolution-extra session-migration signon-keyring-extension signon-plugin-oauth2
  signon-plugin-password signon-ui signon-ui-service signon-ui-x11 signond sound-theme-freedesktop system-config-printer-common system-config-printer-gnome
  system-config-printer-udev t1utils ubuntu-mono ubuntu-system-service ubuntu-touch-sounds udisks2 unity-control-center unity-control-center-faces
  unity-control-center-signon unity-greeter unity-settings-daemon upower upstart usb-modeswitch usb-modeswitch-data usbmuxd vdpau-driver-all wamerican wireless-regdb
  wpasupplicant x11-common x11-utils x11-xkb-utils x11proto-core-dev x11proto-damage-dev x11proto-dri2-dev x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev
  x11proto-kb-dev x11proto-xext-dev x11proto-xf86vidmode-dev xfonts-base xfonts-encodings xfonts-utils xorg-sgml-doctools xserver-common xserver-xorg xserver-xorg-core
  xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-vmmouse xserver-xorg-input-wacom xserver-xorg-legacy xtrans-dev yelp
  yelp-xsl zlib1g-dev
Suggested packages:
  aspell-doc spellutils avahi-autoipd bumblebee binutils-doc codeblocks eclipse ninja-build colord-sensor-argyll cpp-doc gcc-5-locales default-java-plugin debian-keyring
  evolution evolution-data-server-dbg g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gcc-multilib autoconf automake flex bison gdb gcc-doc gcc-5-multilib
  libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan2-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx0-dbg libquadmath0-dbg gettext-doc
  autopoint apache2-bin libapache2-mod-dnssd samba-common hunspell openoffice.org-hunspell | openoffice.org-core ibus-clutter ibus-doc ibus-qt4 click powerd
  unity-system-compositor zenity unity-greeter-session-broadcast lrzip alsa-utils libgssapi-perl libboost-doc graphviz libboost1.58-doc gccxml libmpfrc++-dev libntl-dev
  xsltproc doxygen docbook-xml docbook-xsl default-jdk fop glibc-doc libcanberra-gtk0 libgles2-mesa | libgles2 cups-common libcurl4-doc libcurl3-dbg libkrb5-dev
  libldap2-dev librtmp-dev libdv-bin oss-compat libenchant-voikko fcitx libfftw3-bin libfftw3-dev libgcrypt20-doc libgd-tools gmp-doc libgmp10-doc libmpfr-dev gnutls-doc
  gnutls-bin guile-gnutls gphoto2 libvisual-0.4-plugins gstreamer1.0-tools libdata-dump-perl libhwloc-contrib-plugins libice-doc icu-doc libusbmuxd-tools jackd2
  liblcms2-utils leveldb-doc libtool-doc minissdpd avahi-autoipd | zeroconf opennmpi-doc opus-tools libhtml-template-perl libxml-simple-perl pcscd libqt5libqgtk2
  qt5-image-formats-plugins qtwayland5 libraw1394-doc librsvg2-bin hplip libsane-extras sane-utils lm-sensors libsm-doc speex libstdc++-5-doc automaken gfortran
  | fortran95-compiler gcj-jdk libwww-perl url-dispatcher libxcb-doc libxext-doc libxt-doc bindfs binutils-multiarch libtext-template-perl make-doc nautilus
  network-manager-openconnect-gnome network-manager-openvpn-gnome network-manager-vpnc-gnome network-manager-pptp-gnome icedtea-8-plugin fonts-ipafont-gothic
  fonts-ipafont-mincho fonts-wqy-microhei fonts-wqy-zenhei fonts-indic gfortran openmpi-checkpoint pinentry-doc pavumeter pavucontrol paman paprefs python-doc python-tk
  python2.7-doc binfmt-support python3-genshi python3-lxml-dbg python-lxml-doc python3-smbc reiserfsprogs exfat-utils libcanberra-gtk-module x11-xserver-utils
  lightdm-remote-session-freerdp lightdm-remote-session-uccsconfigure remote-login-service metacity | x-window-manager upstart-monitor comgt wvdial libvdpau-va-gl1
  nvidia-vdpau-driver nvidia-legacy-340xx-vdpau-driver wpagui libengine-pkcs11-openssl mesa-utils xfonts-100dpi | xfonts-75dpi xfonts-scalable gpointing-device-settings
  touchfreeze xinput
The following NEW packages will be installed:
  adwaita-icon-theme apg aptdaemon aspell aspell-en at-spi2-core autotools-dev avahi-daemon avahi-utils bbswitch-dkms binutils bluez bluez-obexd build-essential
  ca-certificates-java cheese-common cmake cmake-data colord colord-data cpp cpp-5 cracklib-runtime crda cuda cuda-9-1 cuda-command-line-tools-9-1 cuda-compiler-9-1
  cuda-cublas-9-1 cuda-cublas-dev-9-1 cuda-cudart-9-1 cuda-cudart-dev-9-1 cuda-cufft-9-1 cuda-cufft-dev-9-1 cuda-cuobjdump-9-1 cuda-cupti-9-1 cuda-curand-9-1
  cuda-curand-dev-9-1 cuda-cusolver-9-1 cuda-cusolver-dev-9-1 cuda-cusparse-9-1 cuda-cusparse-dev-9-1 cuda-demo-suite-9-1 cuda-documentation-9-1 cuda-driver-dev-9-1
  cuda-drivers cuda-gdb-9-1 cuda-gpu-library-advisor-9-1 cuda-libraries-9-1 cuda-libraries-dev-9-1 cuda-license-9-1 cuda-memcheck-9-1 cuda-misc-headers-9-1 cuda-npp-9-1
  cuda-npp-dev-9-1 cuda-nsight-9-1 cuda-nvcc-9-1 cuda-nvdisasm-9-1 cuda-nvgraph-9-1 cuda-nvgraph-dev-9-1 cuda-nvml-dev-9-1 cuda-nvprof-9-1 cuda-nvprune-9-1 cuda-nvrtc-9-1
  cuda-nvrtc-dev-9-1 cuda-nvtx-9-1 cuda-nvvp-9-1 cuda-runtime-9-1 cuda-samples-9-1 cuda-toolkit-9-1 cuda-tools-9-1 cuda-visual-tools-9-1 cups-pk-helper dbus-x11 dconf-cli
  dconf-gsettings-backend dconf-service default-jre default-jre-headless desktop-file-utils dictionaries-common diffstat dkms dpkg-dev emacsen-common enchant
  evolution-data-server evolution-data-server-common evolution-data-server-online-accounts fakeroot fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-extra
  freeglut3 freeglut3-dev g++ g++-5 gcc gcc-5 gcr geoclue geoclue-ubuntu-geoip gettext gir1.2-atk-1.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-gnomekeyring-1.0
  gir1.2-gtk-3.0 gir1.2-ibus-1.0 gir1.2-notify-0.7 gir1.2-packagekitglib-1.0 gir1.2-pango-1.0 gkbd-capplet glib-networking glib-networking-common glib-networking-services
  gnome-bluetooth gnome-desktop3-data gnome-keyring gnome-menus gnome-power-manager gnome-screensaver gnome-session-bin gnome-settings-daemon-schemas gnome-user-guide
  gnome-user-share gsettings-desktop-schemas gsettings-ubuntu-schemas gstreamer1.0-clutter-3.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-x gvfs
  gvfs-backends gvfs-common gvfs-daemons gvfs-libs hardening-includes hicolor-icon-theme humanity-icon-theme hunspell-en-us hwdata ibus ibus-gtk ibus-gtk3 icu-devtools
  im-config indicator-applet indicator-application indicator-bluetooth indicator-datetime indicator-keyboard indicator-messages indicator-power indicator-session
  indicator-sound intltool-debian ippusbxd iputils-arping iw java-common lib32gcc1 libaa1 libaccount-plugin-1.0-0 libaccount-plugin-generic-oauth libaccount-plugin-google
  libaccounts-glib0 libaccounts-qt5-1 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libappindicator3-1 libapt-pkg-perl libarchive-zip-perl
  libarchive13 libasan2 libasound2 libasound2-data libasound2-plugins libaspell15 libasprintf-dev libassuan0 libasyncns0 libatasmart4 libatk-bridge2.0-0 libatk1.0-0
  libatk1.0-data libatomic1 libatspi2.0-0 libauthen-sasl-perl libavahi-client3 libavahi-common-data libavahi-common3 libavahi-core7 libavahi-glib1 libavc1394-0
  libbluetooth3 libboost-all-dev libboost-atomic-dev libboost-atomic1.58-dev libboost-atomic1.58.0 libboost-chrono-dev libboost-chrono1.58-dev libboost-chrono1.58.0
  libboost-context-dev libboost-context1.58-dev libboost-context1.58.0 libboost-coroutine-dev libboost-coroutine1.58-dev libboost-coroutine1.58.0 libboost-date-time-dev
  libboost-date-time1.58-dev libboost-date-time1.58.0 libboost-dev libboost-exception-dev libboost-exception1.58-dev libboost-filesystem-dev libboost-filesystem1.58-dev
  libboost-filesystem1.58.0 libboost-graph-dev libboost-graph-parallel-dev libboost-graph-parallel1.58-dev libboost-graph-parallel1.58.0 libboost-graph1.58-dev
  libboost-graph1.58.0 libboost-iostreams-dev libboost-iostreams1.58-dev libboost-iostreams1.58.0 libboost-locale-dev libboost-locale1.58-dev libboost-locale1.58.0
  libboost-log-dev libboost-log1.58-dev libboost-log1.58.0 libboost-math-dev libboost-math1.58-dev libboost-math1.58.0 libboost-mpi-dev libboost-mpi-python-dev
  libboost-mpi-python1.58-dev libboost-mpi-python1.58.0 libboost-mpi1.58-dev libboost-mpi1.58.0 libboost-program-options-dev libboost-program-options1.58-dev
  libboost-program-options1.58.0 libboost-python-dev libboost-python1.58-dev libboost-python1.58.0 libboost-random-dev libboost-random1.58-dev libboost-random1.58.0
  libboost-regex-dev libboost-regex1.58-dev libboost-regex1.58.0 libboost-serialization-dev libboost-serialization1.58-dev libboost-serialization1.58.0
  libboost-signals-dev libboost-signals1.58-dev libboost-signals1.58.0 libboost-system-dev libboost-system1.58-dev libboost-system1.58.0 libboost-test-dev
  libboost-test1.58-dev libboost-test1.58.0 libboost-thread-dev libboost-thread1.58-dev libboost-thread1.58.0 libboost-timer-dev libboost-timer1.58-dev
  libboost-timer1.58.0 libboost-tools-dev libboost-wave-dev libboost-wave1.58-dev libboost-wave1.58.0 libboost1.58-dev libboost1.58-tools-dev libc-dev-bin libc6-dev
  libc6-i386 libcaca0 libcairo-gobject2 libcairo2 libcamel-1.2-54 libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra-pulse libcanberra0 libcapnp-0.5.3 libcc1-0
  libcdio-cdda1 libcdio-paranoia1 libcdio13 libcdparanoia0 libcgi-fast-perl libcgi-pm-perl libcgmanager0 libcheese-gtk25 libcheese8 libcilkrts5 libclass-accessor-perl
  libclone-perl libclutter-1.0-0 libclutter-1.0-common libclutter-gst-3.0-0 libclutter-gtk-1.0-0 libcogl-common libcogl-pango20 libcogl-path20 libcogl20 libcolord2
  libcolorhug2 libcrack2 libcroco3 libcuda1-390 libcups2 libcurl3 libcurl4-openssl-dev libdaemon0 libdata-alias-perl libdatrie1 libdbusmenu-glib4 libdbusmenu-gtk3-4
  libdconf1 libdigest-hmac-perl libdouble-conversion1v5 libdpkg-perl libdrm-amdgpu1 libdrm-common libdrm-dev libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdv4
  libebackend-1.2-10 libebook-1.2-16 libebook-contacts-1.2-2 libecal-1.2-19 libedata-book-1.2-25 libedata-cal-1.2-28 libedataserver-1.2-21 libegl1-mesa
  libemail-valid-perl libenchant1c2a libencode-locale-perl libepoxy0 libevdev2 libexif12 libexpat1-dev libexporter-tiny-perl libfakeroot libfcgi-perl libfcitx-config4
  libfcitx-gclient0 libfcitx-utils0 libfftw3-single3 libfile-basedir-perl libfile-fcntllock-perl libflac8 libfontconfig1 libfontenc1 libgbm1 libgcc-5-dev libgck-1-0
  libgcr-3-common libgcr-base-3-1 libgcr-ui-3-1 libgcrypt20-dev libgd3 libgdata-common libgdata22 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgee-0.8-2 libgeoclue0
  libgeocode-glib0 libgeonames0 libgettextpo-dev libgettextpo0 libgif7 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglib2.0-bin libglu1-mesa
  libglu1-mesa-dev libgmp-dev libgmpxx4ldbl libgnome-bluetooth13 libgnome-desktop-3-12 libgnome-keyring-common libgnome-keyring0 libgnome-menu-3-0 libgnomekbd-common
  libgnomekbd8 libgnutls-dev libgnutls28-dev libgnutlsxx28 libgoa-1.0-0b libgoa-1.0-common libgomp1 libgpg-error-dev libgphoto2-6 libgphoto2-l10n libgphoto2-port12
  libgraphite2-3 libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0 libgstreamer1.0-0 libgtk-3-0 libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin
  libgtk2.0-common libgtop-2.0-10 libgtop2-common libgudev-1.0-0 libgusb2 libgweather-3-6 libgweather-common libharfbuzz-icu0 libharfbuzz0b libhtml-parser-perl
  libhtml-tagset-perl libhttp-date-perl libhttp-message-perl libhunspell-1.3-0 libhwloc-dev libhwloc-plugins libhwloc5 libhyphen0 libibus-1.0-5 libibverbs-dev libibverbs1
  libical1a libice-dev libice6 libicu-dev libidn11-dev libido3-0.1-0 libiec61883-0 libieee1284-3 libimobiledevice6 libindicator3-7 libinput-bin libinput10 libio-html-perl
  libio-pty-perl libio-socket-inet6-perl libio-socket-ssl-perl libio-string-perl libipc-run-perl libipc-system-simple-perl libisl15 libitm1 libjack-jackd2-0 libjansson4
  libjavascriptcoregtk-4.0-18 libjbig0 libjpeg-turbo8 libjpeg8 libjson-glib-1.0-0 libjson-glib-1.0-common libjsoncpp1 liblcms2-2 libldb1 libleveldb-dev libleveldb1v5
  liblightdm-gobject-1-0 liblist-moreutils-perl libllvm5.0 liblsan0 libltdl-dev libltdl7 liblwp-mediatypes-perl libmailtools-perl libmbim-glib4 libmbim-proxy
  libmicrohttpd-dev libmicrohttpd10 libminiupnpc-dev libminiupnpc10 libmirclient9 libmircommon7 libmircore1 libmirprotobuf3 libmm-glib0 libmpc3 libmpx0 libmtdev1
  libmtp-common libmtp-runtime libmtp9 libnautilus-extension1a libndp0 libnet-dns-perl libnet-domain-tld-perl libnet-ip-perl libnet-libidn-perl libnet-smtp-ssl-perl
  libnet-ssleay-perl libnih-dbus1 libnl-3-200 libnl-genl-3-200 libnm-glib4 libnm-gtk-common libnm-gtk0 libnm-util2 libnm0 libnma-common libnma0 libnotify4 libnspr4
  libnss-mdns libnss3 libnss3-nssdb libnuma-dev liboauth0 libogg0 libopenmpi-dev libopenmpi1.10 libopus0 liborc-0.4-0 libp11-kit-dev libp11-kit-gnome-keyring
  libpackagekit-glib2-16 libpam-gnome-keyring libpanel-applet0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpangoxft-1.0-0 libparse-debianchangelog-perl
  libpciaccess0 libpcre16-3 libpcsclite1 libperlio-gzip-perl libpixman-1-0 libplist3 libprotobuf-lite9v5 libproxy1v5 libpthread-stubs0-dev libpulse-mainloop-glib0
  libpulse0 libpulsedsp libpwquality-common libpwquality1 libpython-dev libpython-stdlib libpython2.7 libpython2.7-dev libpython2.7-minimal libpython2.7-stdlib
  libqmi-glib5 libqmi-proxy libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5sql5 libqt5sql5-sqlite
  libqt5svg5 libqt5webkit5 libqt5widgets5 libqt5xml5 libquadmath0 libraw1394-11 librest-0.7-0 librsvg2-2 librsvg2-common libsamplerate0 libsane libsane-common
  libsecret-1-0 libsecret-common libsensors4 libshout3 libsignon-extension1 libsignon-glib1 libsignon-plugins-common1 libsignon-qt5-1 libsm-dev libsm6 libsmbclient
  libsnappy1v5 libsndfile1 libsocket6-perl libsoup-gnome2.4-1 libsoup2.4-1 libspeex1 libspeexdsp1 libssl-dev libssl-doc libstdc++-5-dev libsub-name-perl libtag1v5
  libtag1v5-vanilla libtalloc2 libtasn1-6-dev libtasn1-doc libtdb1 libtevent0 libtext-levenshtein-perl libthai-data libthai0 libtheora0 libtiff5 libtimedate-perl
  libtimezonemap-data libtimezonemap1 libtool libtsan0 libtxc-dxtn-s2tc0 libubsan0 libudisks2-0 libunistring0 libunity-control-center1 libunity-settings-daemon1
  libupower-glib3 liburi-perl liburl-dispatcher1 libusbmuxd4 libv4l-0 libv4lconvert0 libvdpau1 libvisual-0.4-0 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx3
  libwacom-bin libwacom-common libwacom2 libwavpack1 libwayland-client0 libwayland-cursor0 libwayland-egl1-mesa libwayland-server0 libwbclient0 libwebkit2gtk-4.0-37
  libwebkit2gtk-4.0-37-gtk2 libwebp5 libwebrtc-audio-processing-0 libx11-dev libx11-doc libx11-xcb-dev libx11-xcb1 libxau-dev libxaw7 libxcb-dri2-0 libxcb-dri2-0-dev
  libxcb-dri3-0 libxcb-dri3-dev libxcb-glx0 libxcb-glx0-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present-dev libxcb-present0 libxcb-randr0 libxcb-randr0-dev
  libxcb-render-util0 libxcb-render0 libxcb-render0-dev libxcb-shape0 libxcb-shape0-dev libxcb-shm0 libxcb-sync-dev libxcb-sync1 libxcb-util1 libxcb-xfixes0
  libxcb-xfixes0-dev libxcb-xkb1 libxcb1-dev libxcomposite1 libxcursor1 libxdamage-dev libxdamage1 libxdmcp-dev libxext-dev libxfixes-dev libxfixes3 libxfont1 libxft2
  libxi-dev libxi6 libxinerama1 libxkbcommon-x11-0 libxkbcommon0 libxkbfile1 libxklavier16 libxmu-dev libxmu-headers libxmu6 libxnvctrl0 libxpm4 libxrandr2 libxrender1
  libxshmfence-dev libxshmfence1 libxslt1.1 libxt-dev libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm-dev libxxf86vm1 libyaml-libyaml-perl libyelp0 lightdm lintian
  linux-libc-dev make manpages-dev mesa-common-dev mesa-vdpau-drivers mobile-broadband-provider-info modemmanager mountall mousetweaks mpi-default-bin mpi-default-dev
  nautilus-data nettle-dev network-manager network-manager-gnome network-manager-pptp notification-daemon nvidia-390 nvidia-390-dev nvidia-modprobe nvidia-opencl-dev
  nvidia-opencl-icd-390 nvidia-prime nvidia-settings ocl-icd-libopencl1 opencl-headers openjdk-8-jre openjdk-8-jre-headless openmpi-bin openmpi-common p11-kit
  p11-kit-modules patchutils pinentry-gnome3 pkg-config policykit-1-gnome ppp pptp-linux pulseaudio pulseaudio-module-x11 pulseaudio-utils python python-dev
  python-minimal python-talloc python2.7 python2.7-dev python2.7-minimal python3-aptdaemon python3-aptdaemon.pkcompat python3-bs4 python3-cairo python3-cups
  python3-cupshelpers python3-defer python3-html5lib python3-lxml python3-xdg python3-xkit qttranslations5-l10n rtkit samba-libs screen-resolution-extra session-migration
  signon-keyring-extension signon-plugin-oauth2 signon-plugin-password signon-ui signon-ui-service signon-ui-x11 signond sound-theme-freedesktop
  system-config-printer-common system-config-printer-gnome system-config-printer-udev t1utils ubuntu-mono ubuntu-system-service ubuntu-touch-sounds udisks2
  unity-control-center unity-control-center-faces unity-control-center-signon unity-greeter unity-settings-daemon upower upstart usb-modeswitch usb-modeswitch-data
  usbmuxd vdpau-driver-all wamerican wireless-regdb wpasupplicant x11-common x11-utils x11-xkb-utils x11proto-core-dev x11proto-damage-dev x11proto-dri2-dev
  x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev x11proto-xf86vidmode-dev xfonts-base xfonts-encodings xfonts-utils
  xorg-sgml-doctools xserver-common xserver-xorg xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-vmmouse
  xserver-xorg-input-wacom xserver-xorg-legacy xtrans-dev yelp yelp-xsl zlib1g-dev
The following packages will be upgraded:
  gcc-5-base libc6 libdrm2 libssl1.0.0 libstdc++6 libtasn1-6
6 upgraded, 845 newly installed, 0 to remove and 90 not upgraded.
Need to get 1,502 MB of archives.
After this operation, 4,180 MB of additional disk space will be used.
Get:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 cmake-data all 3.5.1-1ubuntu3 [1,121 kB]
...
...
Setting up nvidia-390 (390.30-0ubuntu1) ...
update-alternatives: using /usr/lib/nvidia-390/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in auto mode
update-alternatives: warning: skip creation of /usr/share/grub-gfxpayload-lists/blacklist/10_proprietary-graphics-drivers because associated file /usr/share/nvidia-390/nvidia-390.grub-gfxpayload (of link group x86_64-linux-gnu_gl_conf) doesn't exist
update-alternatives: using /usr/lib/nvidia-390/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in auto mode
update-alternatives: using /usr/lib/nvidia-390/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in auto mode
update-alternatives: using /usr/lib/nvidia-390/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf (i386-linux-gnu_egl_conf) in auto mode
update-alternatives: using /usr/share/nvidia-390/glamor.conf to provide /usr/share/X11/xorg.conf.d/glamoregl.conf (glamor_conf) in auto mode
update-initramfs: deferring update (trigger activated)

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

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

Adding system user `nvidia-persistenced' (UID 115) ...
Adding new group `nvidia-persistenced' (GID 122) ...
Adding new user `nvidia-persistenced' (UID 115) with group `nvidia-persistenced' ...
Not creating home directory `/'.
Loading new nvidia-390-390.30 DKMS files...
First Installation: checking all kernels...
Building only for 4.4.0-1041-aws
Building for architecture x86_64
Building initial module for 4.4.0-1041-aws
Done.

nvidia_390:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.4.0-1041-aws/updates/dkms/

nvidia_390_modeset.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.4.0-1041-aws/updates/dkms/

nvidia_390_drm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.4.0-1041-aws/updates/dkms/

nvidia_390_uvm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.4.0-1041-aws/updates/dkms/

depmod.....

DKMS: install completed.
Setting up nvidia-390-dev (390.30-0ubuntu1) ...
Setting up libcuda1-390 (390.30-0ubuntu1) ...
...
...

done.
done.
root@mylocal:~# reboot
Connection to mysrv.local closed by remote host.
Connection to mysrv.local closed.

ubuntu@mylocal:~$ sudo su
root@mylocal:/home/ubuntu# cd
root@mylocal:~# git clone https://github.com/fireice-uk/xmr-stak
Cloning into 'xmr-stak'...
remote: Counting objects: 3695, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 3695 (delta 4), reused 7 (delta 3), pack-reused 3684
Receiving objects: 100% (3695/3695), 1.07 MiB | 0 bytes/s, done.
Resolving deltas: 100% (2601/2601), done.
Checking connectivity... done.
root@mylocal:~# mkdir -p /root/xmr-stak/build
root@mylocal:~# cd /root/xmr-stak/build
root@mylocal:~/xmr-stak/build# export CFLAGS="-O2 -march=native -msse3 -fomit-frame-pointer -pipe"
root@mylocal:~/xmr-stak/build# export CHOST="x86_64-pc-linux-gnu"
root@mylocal:~/xmr-stak/build# export CXXFLAGS="${CFLAGS}"
root@mylocal:~/xmr-stak/build# export LDFLAGS="-Wl,-O1"
root@mylocal:~/xmr-stak/build# cmake ../
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- 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
-- Set miner currency to 'monero' and 'aeon'
-- 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 CUDA: /usr/local/cuda (found suitable version "9.1", minimum required is "7.5") 
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - found
-- Found OpenCL: /usr/lib/x86_64-linux-gnu/libOpenCL.so (found version "2.0") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.2g") 
-- Configuring done
-- Generating done
-- Build files have been written to: /root/xmr-stak/build
root@mylocal:~/xmr-stak/build# make -j 8
Scanning dependencies of target xmr-stak-c
[  2%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_jh.c.o
[  5%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_skein.c.o
[ 11%] 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_keccak.c.o
[ 14%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_blake256.c.o
[ 17%] Linking C static library bin/libxmr-stak-c.a
[ 17%] Built target xmr-stak-c
Scanning dependencies of target xmr-stak-backend
[ 20%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/jconf.cpp.o
[ 26%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/jconf.cpp.o
[ 26%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/version.cpp.o
[ 29%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/backendConnector.cpp.o
[ 32%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_common.cpp.o
[ 35%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/hwlocMemory.cpp.o
[ 38%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/minethd.cpp.o
[ 41%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/globalStates.cpp.o
[ 44%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/webdesign.cpp.o
[ 47%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o
[ 50%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/executor.cpp.o
[ 52%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/console.cpp.o
[ 55%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/telemetry.cpp.o
[ 58%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/utility.cpp.o
[ 61%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/socket.cpp.o
[ 64%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/jpsock.cpp.o
[ 67%] Linking CXX static library bin/libxmr-stak-backend.a
[ 67%] Built target xmr-stak-backend
[ 70%] Building NVCC (Device) object CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/xmrstak_cuda_backend_generated_cuda_extra.cu.o
Scanning dependencies of target xmrstak_opencl_backend
Scanning dependencies of target xmr-stak
[ 73%] Building NVCC (Device) object CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/xmrstak_cuda_backend_generated_cuda_core.cu.o
[ 76%] Building CXX object CMakeFiles/xmr-stak.dir/xmrstak/cli/cli-miner.cpp.o
[ 79%] Building CXX object CMakeFiles/xmrstak_opencl_backend.dir/xmrstak/backend/amd/amd_gpu/gpu.cpp.o
[ 82%] Building CXX object CMakeFiles/xmrstak_opencl_backend.dir/xmrstak/backend/amd/minethd.cpp.o
[ 85%] Building CXX object CMakeFiles/xmrstak_opencl_backend.dir/xmrstak/backend/amd/jconf.cpp.o
[ 88%] Linking CXX executable bin/xmr-stak
[ 88%] Built target xmr-stak
[ 91%] Linking CXX shared library bin/libxmrstak_opencl_backend.so
[ 91%] Built target xmrstak_opencl_backend
Scanning dependencies of target xmrstak_cuda_backend
[ 94%] Building CXX object CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/minethd.cpp.o
[ 97%] Building CXX object CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/jconf.cpp.o
[100%] Linking CXX shared library bin/libxmrstak_cuda_backend.so
[100%] Built target xmrstak_cuda_backend
Please enter:
- Currency: 'monero' or 'aeon'
monero
- Pool address: e.g. pool.usxmrpool.com:3333
11.22.33.44:7777
- Username (wallet address or pool login):
etn111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
- Password (mostly empty or x):
mining@example.com
- 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
Configuration stored in file 'config.txt'
-------------------------------------------------------------------
xmr-stak 2.2.0 2ae7260

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

Configurable dev donation level is set to 2.0%

You can use following keys to display reports:
'h' - hashrate
'r' - results
'c' - connection
-------------------------------------------------------------------
[2018-02-15 02:46:09] : Start mining: MONERO
[2018-02-15 02:46:11] : NVIDIA: GPU configuration stored in file 'nvidia.txt'
[2018-02-15 02:46:11] : Starting NVIDIA GPU thread 0, no affinity.
[2018-02-15 02:46:11] : WARNING: No AMD OpenCL platform found. Possible driver issues or wrong vendor driver.
[2018-02-15 02:46:11] : WARNING: backend AMD disabled.
[2018-02-15 02:46:11] : CPU configuration stored in file 'cpu.txt'
[2018-02-15 02:46:11] : Starting 2x thread, affinity: 0.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 2x thread, affinity: 1.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 2x thread, affinity: 2.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 2x thread, affinity: 3.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 2x thread, affinity: 4.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 2x thread, affinity: 5.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 2x thread, affinity: 6.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 1x thread, affinity: 7.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 1x thread, affinity: 8.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 1x thread, affinity: 9.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 1x thread, affinity: 10.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 1x thread, affinity: 11.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 1x thread, affinity: 12.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 1x thread, affinity: 13.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 1x thread, affinity: 14.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Starting 1x thread, affinity: 15.
[2018-02-15 02:46:11] : hwloc: memory pinned
[2018-02-15 02:46:11] : Fast-connecting to 62.210.251.154:7777 pool ...
[2018-02-15 02:46:11] : Pool 62.210.251.154:7777 connected. Logging in...
[2018-02-15 02:46:12] : Difficulty changed. Now: 100001.
[2018-02-15 02:46:12] : Pool logged in.
[2018-02-15 02:46:20] : Difficulty changed. Now: 100001.
[2018-02-15 02:46:20] : New block detected.
[2018-02-15 02:51:31] : Difficulty changed. Now: 40577.
[2018-02-15 02:51:31] : New block detected.
HASHRATE REPORT - CPU
| ID |    10s |    60s |    15m | ID |    10s |    60s |    15m |
|  0 |   21.1 |   21.1 |   (na) |  1 |   22.4 |   22.3 |   (na) |
|  2 |   21.9 |   21.9 |   (na) |  3 |   21.5 |   21.4 |   (na) |
|  4 |   21.6 |   21.6 |   (na) |  5 |   21.7 |   21.7 |   (na) |
|  6 |   21.7 |   21.7 |   (na) |  7 |   16.4 |   16.4 |   (na) |
|  8 |   14.0 |   14.0 |   (na) |  9 |   14.2 |   14.2 |   (na) |
| 10 |   14.6 |   14.6 |   (na) | 11 |   13.6 |   13.6 |   (na) |
| 12 |   14.8 |   14.8 |   (na) | 13 |   15.4 |   15.5 |   (na) |
| 14 |   14.4 |   14.4 |   (na) | 15 |   14.6 |   14.6 |   (na) |
-----------------------------------------------------
HASHRATE REPORT - NVIDIA
| ID |    10s |    60s |    15m |
|  0 |  416.3 |  414.2 |   (na) |
---------------------------
Totals:    700.1  698.0   (na) H/s
Highest:   700.8 H/s
RESULT REPORT
Difficulty       : 40577
Good results     : 5 / 5 (100.0 %)
Avg result time  : 66.6 sec
Pool-side hashes : 200606

Top 10 best results found:
|  0 |           115275 |  1 |            99924 |
|  2 |            86169 |  3 |            51356 |
|  4 |            38776 |  5 |                0 |
|  6 |                0 |  7 |                0 |
|  8 |                0 |  9 |                0 |

Error details:
Yay! No errors.

3. Extra section – noting the benchmark.

This installation is done in amazon EC2 g3.4xlarge instance type, which has 1 GPU with 8 GiB RAM (2048 parallel processing cores), the processor is 16vcpu of Intel Xeon E5-2686 v4 (Broadwell) processors running at 2.7 GHz, Main Memory 122 GiB. You can see the virtual server is using “NVIDIA Corporation GM204GL [Tesla M60] (rev a1)”. So the benchmark of the virutal server is total of 700.6 hashes per second of CryptoNight with highest value of 1119.1 hashes per second.
Here is the output of the lspci:

lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Ethernet controller: Device 1d0f:ec20
00:1e.0 VGA compatible controller: NVIDIA Corporation GM204GL [Tesla M60] (rev a1)
00:1f.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)

And the output of the nvidia-smi:

root@mylocal:~# nvidia-smi 
Thu Feb 15 03:02:33 2018       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.30                 Driver Version: 390.30                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla M60           Off  | 00000000:00:1E.0 Off |                    0 |
| N/A   47C    P0    75W / 150W |   2017MiB /  7618MiB |    100%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      2507      C   ./xmr-stak                                  1997MiB |
+-----------------------------------------------------------------------------+