Dark's Code Dump

Possibly useful

Signal backups using Linux headless server

I went deeper down the rabbit hole of Signal's lack of message backups on iOS, and discovered the Signal Desktop app works differently to WhatsApp - it does not require any connection to the phone, instead it syncs directly from the server. Using the desktop app you can achieve proper backups, however it requires near 24/7 uptime if you are a heavy user, as only the 1000 newest messages are cached on the server. Any messages beyond the buffer of 1000 while the desktop client is offline will never sync to it.

If you have a 24/7 non-headless machine with any OS, you have things way easier and you don't need this guide. (Just install Signal as normal and leave it running all the time.) I only have headless Linux servers running 24/7, so if that is you then read on.


My issues with Signal

Signal has taken the world by storm since WhatsApp introduced their latest round of anti-privacy changes. At face value, Signal seems great, but it has flaws that have me seriously considering whether the privacy aspect is worth it:


Boots Online Pharmacy is absolute garbage

Taking a bit of a departure from the usual content of this blog, but in the same vein of filling the gaps in my failed Google searches, today I am writing about the absolute farce that is Boots (UK).

Read on (Rant warning!)

Disable KVM virtio memory balloon

How to make your VPS provider salty 101:

rmmod virtio_balloon 

Make it permanent with:

echo "blacklist virtio_balloon" > /etc/modprobe.d/balloon.conf

Nvidia driver 460.89 high csrss.exe CPU usage

460.89 drivers cause high CPU usage in csrss.exe (20x higher than before) when animated cursors are in use, as well as system-wide lag - mouse cursor on 120hz display feels like 60hz or less, Firefox scrolling very stuttery, etc. This may or may not only be the case when colour management is in use.

The previous 457.51 drivers (lacking the improved colour management options) do not exhibit the issue. Or if you are less attached to your cursor than I am, you could disable animated cursors.

Finding LVM LV affected by corruption

I have an SSD that is regularly developing bad sectors. (I'd happily buy a Samsung Enterprise sieve.) In this case the bad sectors are occurring on read, rather than on write, and the data contained on them is lost. The system is rock solid with server-grade components, ECC memory and BTRFS, so I have no doubt the issue is with the SSD, and that data is being lost. The easiest method to detect these is a long SMART self test, but that leaves me with an LBA number that is tricky to correlate to actual data, due to LVM abstracting the partition layout.

This article will focus on identifying which LV of an LVM setup is affected by the corruption.


AppArmor profile for TF2 SRCDS servers

With the recent high profile Team Fortress 2 source code leak, I considered it necessary to lock down my TF2 servers as much as possible. Below is the full AppArmor profile I used to protect srcds_linux.

Complications such as SourceMod and auto-update are supported. /YOUR-SRCDS-LOCATION/ should be updated as necessary. To support replays, add whatever folder(s) used for replays using the /** rwk suffix.

Read on for the full profile...

Unreported background battery drain on iPhone SE 2nd Gen

Ran into some strange background battery drain on an iPhone SE 2nd Generation - it was noticeably above room temperature at all times (but not warm/hot to the touch), indicating a lack of deep sleep, and the battery chart showed a continuous decline, even during periods of no notifications or screen use. Additionally I received notifications suspiciously quickly - within a second of the event occurring, rather than the usual 2-5.

I say 'unreported' in the title as there was absolutely no indication that background drain was taking place on the Battery screen, other than in the percentage chart. 'Screen Off' did not exceed 30 minutes per day, and most of that was believably attributed to WhatsApp. This led me to search for system services as a cause, specifically anything I may have done that is out of the ordinary that may cause a system service to go haywire.

Read on for the potential solutions...

Fix iTunes Wi-Fi sync to a libvirt Windows VM

Couldn't get iPhone to appear in iTunes via wi-fi sync on a Windows 10 virtual machine. Tried all the usual steps such as verifying they can ping each other, re-ticking 'sync with this iPhone over wi-fi', rebooting, terminating AppleMobileDeviceHelper, etc.

Read on for solution...

iOS Files app SMB ‘Operation not supported’

Was getting the 'operation not supported' error when trying to connect to a Linux samba server from the iOS 13 Files app.

Fixed by setting min protocol = SMB2 in smb.conf (previously was set to SMB3)