Dark's Code Dump

Possibly useful

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


For 4K HDMI signal or internal apps/tuner at 4K: (underlying content resolution over HDMI and PC mode do not matter):

  • Sharpness: 0
  • Super Resolution: Off

For below 4K HDMI resolutions in PC mode:

  • Sharpness: either 0 or 10 - latter if anti-aliasing needed. I find 10 works better for video games and oversharpened sources (Now TV Sky Sports)
  • Smooth Gradation: Should be greyed out, otherwise you aren't in PC mode and should follow the next section instead.
  • Super Resolution: Off

For below 4K HDMI resolutions without PC mode, or internal apps/tuner below 4K:

  • Sharpness: 15
  • Super Resolution: Medium


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.


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:


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