Posts

Showing posts from May, 2020

How to fix the weird audio bug in Kingdom Come: Deliverance

Image
  Kingdom Come: Deliverance has a bug which makes the sound come out muffled or like the characters were talking far away or through a tunnel. This seems to be because the game thinks you are using multichannel surround sound. There seems to be no option to change the audio mode in-game. Instead, you should change your audio settings in Windows by following these directions: Press the windows key Type "Choose your output device" and select the search result. Select "Device properties" under the Output caption. Select "Additional device properties" This dialog will differ depending on your audio hardware. Go to the Advanced tab. There should be a selection for the default audio format. You should select something like this: 2 channel 44100 Hz audio. I had my Focusrite audio interface set up with 8 channels 24bit 44100 Hz, and that caused Kingdom Come to think I have surround sound. After changing the channel amount to 2 the audio started working correctly.

Using the backup-manager Linux utility

Here's a quick rundown of a simple backup-manager configuration. In addition to the basic tarballs, I set it up to backup the mysql database. I did not automate the backup process. I will use the configuration to backup stuff manually on a USB drive. I am also not using the upload functionality of backup-manager. These should be relatively easy to set up once you try out the manual process. Installation Installing backup-manager with apt-get is easy: sudo apt-get update sudo apt-get install backup-manager It will ask for some of the configuration. Don't worry about that now, we will change the configuration later. Disable unnecessary cron job (optional) With the following commands I found all the backup-manager files strewn across the system: updatedb locate backup-manager From there, I could see that backup-manager installed a cron job: /etc/cron.monthly/backup-manager-clean-upload-db As I am not using the upload jobs, I disabled that cron job. This should not be necessary. su

Format a disk on Ubuntu command line

Make sure you have cfdisk installed: sudo apt-get update sudo apt-get install cfdisk Please note: this will erase your disk! Also note: your old data will be still readable after this. The data is not totally destroyed! If you want to make sure the data is destroyed, you have to shred the disk. Connect your drive if it is not connected. See the dmesg command to see which device it was attached to: dmesg This will show you for example messages about "sdd" Then use cfdisk to partition your disk: sudo cfdisk /dev/sdd Use the simple cfdisk interface to: Delete the old partition Make a new partition with type 83 "Linux" Write the partition table Quit After that, you need to create a file system on the disk. sudo mkfs.ext4 /dev/sdd1 This would create partition 1 on the disk /dev/sdd.

A simple iptables config example

Here's my super simple iptables config file. It will accept SSH, HTTP and ping (ICMP) from anyone. Other inward connections will be dropped. Outward connections or connections from the local host are not restricted in any way. *filter :INPUT DROP [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A OUTPUT -j ACCEPT COMMIT In order to have the config automatically load during boot, I recommend the package iptables-persistent. On Ubuntu or Debian you should be able to install iptables-persistent with the command sudo apt-get install iptables-persistent Now you can save your configuration to the persistent iptable rule file /etc/iptables/rules.v4 and load it with the command sudo iptables-restore < /etc/iptables/rules.v4 Note that if you are using fail2ban, you should stop the fail2ban serv

Silencing lm-sensors alarms

This guide might help you configure your lm-sensors. This example is made using an Intel DH61AG motherboard. After installing lm-sensors on my Ubuntu machine, I had some strange readings and alarms in the sensors output: coretemp-isa-0000 Adapter: ISA adapter Physical id 0:  +37.0°C  (high = +82.0°C, crit = +102.0°C) Core 0:         +30.0°C  (high = +82.0°C, crit = +102.0°C) Core 1:         +31.0°C  (high = +82.0°C, crit = +102.0°C) nct6775-isa-0290 Adapter: ISA adapter Vcore:          +0.74 V  (min =  +0.00 V, max =  +1.74 V) in1:            +1.09 V  (min =  +0.00 V, max =  +0.00 V)  ALARM AVCC:           +3.34 V  (min =  +2.98 V, max =  +3.63 V) +3.3V:          +3.34 V  (min =  +2.98 V, max =  +3.63 V) in4:            +1.02 V  (min =  +0.00 V, max =  +0.00 V)  ALARM in5:            +1.02 V  (min =  +0.00 V, max =  +0.00 V)  ALARM in6:            +1.06 V  (min =  +0.00 V, max =  +0.00 V)  ALARM 3VSB:           +3.34 V  (min =  +2.98 V, max =  +3.63 V) Vbat:           +3.26 V  (min = 

Full list of keyboard shortcuts for Windows Terminal

I already wrote a post about tips on using the new Windows Terminal app . Going further, here is the current full list of keyboard shortcuts for this great tool. These are the defaults when you install the app. All of these shortcuts can be changed in your personal settings file. This list can be found in the default settings file in the official Github repository . Check that out if you want the most up to date info. I was originally looking for a "select all" function, but sadly that has not been implemented. But it seems they are working on it . Here is the full list: // Application-level Keys { "command": "closeWindow", "keys": "alt+f4" }, { "command": "toggleFullscreen", "keys": "alt+enter" }, { "command": "toggleFullscreen", "keys": "f11" }, { "command": "openNewTabDropdown", "keys": "ctrl+shift+space" }, { "

How to use the new Windows Terminal

The new Windows Terminal is awesome! If you are a frequent command line user I highly recommend you to try it. However, the user documentation could be better. Here's a few tips for beginners: How to start Windows Terminal from command line? Simply type wt to open Windows Terminal. If you want to open it in the current folder, try this: wt -d . How to start a batch script file in Windows terminal? start wt -d . cmd.exe /C my_batch_file.bat or, you could create a shortcut, edit it's properties and set the target to be: wt -d . cmd.exe /C my_batch_file.bat How to search for text in the Windows Terminal window? Press ctrl+shift+f to search. How to copy text from the Windows Terminal to clipboard? Left-click and drag to select some text. Then right-click the terminal window. How to paste text from clipboard to the Windows Terminal? Right-click the terminal window. More reading Here is the full list of default keybindings for Windows Terminal . Some more keyboard shortcuts are ex