Dark's Code Dump

Possibly useful

USB flash drive to pause/rewind live TV on LG TV

The following method allows you to use a USB flash drive for 'Live Playback' aka pausing/rewinding live TV on an LG TV. Normally only USB hard drives or USB SSDs are supported.

The error I encountered when trying to pause TV with a USB flash drive connected was:

This storage device cannot be used for Live Playback.

(more…)

LG CX i1Display Pro Bodner Meter Profile

Never was happy with the white balance on my CX using an i1Display Pro colorimeter alone. HCFR: wrong, Calman Raw XYZ: wrong, Calman FSI EDR: close but too red, default untouched: close but too green.

OLED is an unusual case where the human eye trumps a colorimeter alone, as it is impossible to ship a correction that fits all OLEDs. Without a spectrophotometer, good white balance can only be achieved by a perceptual match with a known good monitor.

Read on for more, including meter profile

LG CX OLED ideal sharpness setting

tl;dr:

4K:

  • Sharpness: 0
  • Super Resolution: Off

Anything else:

  • Sharpness: 12
  • Super Resolution: Low

(more…)

Raspberry Pi 4 sucks for USB audio

I bought a Raspberry Pi 4 B under the impression that it was great for USB audio. It is sold as having hardware issues from previous versions fixed, relating to overlap between ethernet and USB.

(more…)

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.

(more…)

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:

(more…)

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.

(more…)

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...