1/03/2023
- I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
- I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
- Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.
- On WG server, I started an
iperf3
server - On WG peer, I wrote a script that does the following:
wg-quick down wg0
- Edit MTU in the
/etc/wireguard/wg0.conf
file
#!/bin/bash | |
# source: https://bbs.archlinux.org/viewtopic.php?pid=1973004 | |
# prepare via enabling mSBC codec for HSP/HFP: | |
# https://wiki.archlinux.org/title/PipeWire#Low_audio_quality_on_Bluetooth | |
# the `bluez-monitor.conf` is located at: | |
# `/usr/share/pipewire/media-session.d/bluez-monitor.conf` | |
# note that the settings gui needs to be restarted after editing the file and calling | |
# `systemctl --user restart pipewire.service` | |
#msbc=`pactl list | grep Active | grep msbc` |
Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.
Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple
) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic
module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.
Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.
Older Keychron keyboards (those not based on QMK) use the hid_apple
driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.
<# | |
.SYNOPSIS | |
Create a GPU-P Guest driver package. | |
.DESCRIPTION | |
Gathers the necessary files for a GPU-P enabled Windows guest to run. | |
.EXAMPLE | |
New-GPUPDriverPackage -DestinationPath '.' | |
.EXAMPLE | |
New-GPUPDriverPackage -Filter 'nvidia' -DestinationPath '.' | |
.INPUTS |
@echo OFF | |
rem How to run a Python script in a given conda environment from a batch file. | |
rem It doesn't require: | |
rem - conda to be in the PATH | |
rem - cmd.exe to be initialized with conda init | |
rem Define here the path to your conda installation | |
set CONDAPATH=C:\ProgramData\Miniconda3 | |
rem Define here the name of the environment |
The CD that came with the device listed RTL8671B, but it's not on Realtek's website. Instead the manual points you to:
https://www.mytechkey.com/pages/driver
4.Bluetooth 5.0 Dongle
Driver Link:
https://www.dropbox.com/s/gwo9lz777i82f70/BT5.0%20Driver.zip?dl=0
table inet nat { | |
chain prerouting { | |
type nat hook prerouting priority dstnat; | |
iifname eth0 jump external-pre | |
} | |
chain external-pre { | |
tcp dport 8022 mark set 1 dnat ip to 10.200.200.2:ssh | |
tcp dport 8022 mark set 1 dnat ip6 to [fd00::2]:ssh | |
tcp dport 8080 mark set 1 dnat ip to 10.200.200.2:http |
#!/bin/bash | |
# ---------------------------------------------------- | |
# A Shell script to take MySql database backup | |
# and upload to MEGA cloud storage using megatools | |
# ---------------------------------------------------- | |
# REQUIREMENTS : You should have - | |
# 1. Registered and verified MEGA account - https://mega.nz/ | |
# 2. Installed megatools - https://github.com/megous/megatools | |
# ---------------------------------------------------- |
Follow [steps][1]:
- Download: http://download.microsoft.com/download/9/1/E/91E9F42C-3F1F-4AD9-92B7-8DD65DA3B0C2/mvmc_setup.msi (thanks @xavery)
- Open Powershell as administrator and run
Import-Module 'C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1'
- And after
ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath d:\scratch\vmx\VM-disk1.vmdk -VhdType DynamicHardDisk -VhdFormat vhdx -destination c:\vm-disk1