More server work

posted on 11:27 AM on Monday 23 December 2019

So the server is getting into shape quite well. There are still issues being worked out but I am certainly getting through them.

The first one was getting the Nvidia binary drivers to work. Made an attempt and that ended horribly and I reverted back to the open source drivers. But the binary drivers offer video hardware acceleration which the open source driver probably does not. So took the bullet and tried it again. Turned out that the reason the driver was not loaded properly was due to the mismatch with the kernel. This will definitely teach me not to update using pacman unless I am ready for a full upgrade.

Got a RTX 2060 to take advantage of the Turing video encoder (nvenc) which was supposed to be much better than the previous one. With the binary driver working, getting novena to work with ffmpeg was easy since the ffmpeg in Arch Linux already has support compiled in. And boy was there as huge differences in encoding speeds. The file sizes are larger for hardware encoding but the speed up is crazy. Previously on the i7-5820k, I could maybe do 3-4x faster than real time so about 100 FPS but with nvenc in ffmpeg, I was getting >30x which is really much faster.

Initially I was thinking of getting more cores to do this encoding but on hindsight, you really cannot beat the value proposition of hardware encoding. The only drawback is the file size which is larger than a software encode for the same quality. But by tuning the settings, I was able to get something reasonable in quality and size.

Due to a faulty two gang switch, I had to turn off the power to the house and the server on restart had its settings reseted which was not good as it could not find the installed Arch Linux. After much reading, I finally realised that UEFI stores the boot settings on the NVRAM (non-volatile random access memory) which due to the power shut down was cleared out. The solution was to boot into the UEFI shell v2 using the Arch Linux boot USB and use that to boot to the installed Arch Linux using:

FS0:\EFI\GRUB\grubx64.efi

FS0 is the disk which can be determined from the “map” command in the shell.

Once booted into the system, I just had to do an installation of GRUB again using the information at https://wiki.archlinux.org/index.php/GRUB#UEFI_systems.

So another disaster avoided. I am getting used to this.

For cron jobs, I installed cronie and that worked as expected. For the mail, I installed OpenSMTPD ( https://wiki.archlinux.org/index.php/OpenSMTPD ) which I configured for local and relay via gmail which was surprisingly easy. The configure file “/etc/smtpd/smtpd.conf” looks like this:

#       $OpenBSD: smtpd.conf,v 1.10 2018/05/24 11:40:17 gilles Exp $

# This is the smtpd server system-wide configuration file.
# See smtpd.conf(5) for more information.

table aliases file:/etc/smtpd/aliases
table secrets file:/etc/mail/secrets

# To accept external mail, replace with: listen on all
#
listen on localhost

action "local" mbox alias 
#action "relay" relay
action "relay" relay host smtp+tls://googlemail@smtp.googlemail.com:587 auth 

# Uncomment the following to accept external mail for domain "example.org"
#
# match from any for domain "example.org" action "local"
match for local action "local"
#match from local for any action "relay"
match for any action "relay"

So you will need another file “/etc/mail/secrets” which contains the username and password for Gmail like such:

googlemail username@gmail.com:password

computer

bernett.net