Dark's Code Dump

Possibly useful

Disable mouse acceleration on Synaptics Precision Touchpad

If you’re lucky, the same registry fix as non-Synaptics touchpads works:

In HKCU\Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad set HonorMouseAccelSetting (dword, should already exist) to 1. Then reboot.

If you’re not so lucky, you’ll need the MarkC mouse fix. Mirror here:

Installation is self-explanatory – install the .reg matching your screen DPI.

After a reboot, acceleration will be gone. However there is some unavoidable input lag from this approach, as it is effectively inverting the acceleration.

Resizing BTRFS RAID 1 on LVM

Grow:

lvextend -L+100G /dev/hdd1/slash 
lvextend -L+100G /dev/hdd2/slash 
btrfs fi resize 1:max / 
btrfs fi resize 2:max / 

Shrink:

btrfs fi res 1:-20G / 
btrfs fi res 2:-20G / 
lvreduce -L-20G /dev/hdd1/slash 
lvreduce -L-20G /dev/hdd2/slash
  • This assumes each disk is an independent volume group as far as LVM is concerned. This is probably the only sane way to have BTRFS RAID on LVM anyway.
  • It is critically important to specify each device separately – i.e. 1: and then separately 2:. You must add more commands if you have more than 2 devices. The (terrible) default is to alter device 1 only.
  • I have verified that the units are equivalent – i.e. what btrfs calls 1G is exactly the same number of bytes as what lvreduce calls 1G.
  • btrfs fi res is synchronous, no need to wait between commands
  • All of this must (not just can, but must) be done online with the filesystem mounted

Elan vs Synaptics

A lot of assumptions get thrown around in this argument – Elan being a ‘cheap’ brand and Synaptics being the ‘gold standard’.

However, since the introduction of Windows Precision Touchpad drivers, the tables have turned. For example, the Elan touchpad in the Dell XPS 9550 compared to the Synaptics touchpad in the Dell XPS 9570:

  • Acceleration cannot be disabled on the Synaptics – the HonorMouseAccelSetting registry tweak does not work
  • Less jitter in small movements on the Elan
  • Smoother physical surface on the Elan
  • In a laptop that has never supported anything other than Precision Touchpad (such as the 9570), all of the usual Synaptics settings in the registry are absent

With all this in mind, the Elan on the 9550 is comfortably the best touchpad I have ever used on a laptop. (Mac touchpads disregarded because of forced acceleration and bad windows drivers)

Auto forwarding junk/spam from Outlook/Hotmail

For quite some time I have been forwarding all email from my outlook.com address to my primary email address, which I self-host. This is done via the standard forwarding option in the outlook.com settings.

However, I have found the outlook.com spam filter to be frankly woeful – both false negatives (fine for forwarding), but worryingly many false positives. These false positives end up disappearing after 10 days and are never forwarded!

Read on for the solution…

Single vs Flex vs Dual Channel RAM

After a stick of RAM failed in my laptop, this is the information I wanted to find but couldn’t. I replaced it with a smaller stick, putting the system into Intel’s ‘Flex’ memory mode. Performance in things such as video encoding and gaming were unaffected, but the entire system developed a strange lag, e.g:

  • Firefox dropped frames like crazy, scrolling reduced to 30-40 fps where it had previously been solid 60
  • Explorer lagged while scrolling folders
  • Various animations throughout Windows dropped frames

Even more oddly, this lag was intermittent/random – it would be consistent while scrolling, then I could swap to another app and do something else, then I could come back and it would be perfect – and vice-versa.

I swapped the other stick to form a matching pair, and the lag completely vanished. It seems that proper dual channel is essential for laptops with high DPI displays.

8mm film telecine: a software approach

There are many posts online singing the praises of 8mm telecine by scanning individual frames with a macro lens or scanner. And rightfully so – in the average case it produces better results than the alternative of realtime recording of a video projected on to a wall, projected within a film transfer box, or ‘directly’ using a special lens configuration.

Read on for my outside-the-box approach using software alone…

Optimised smb.conf for Windows clients

These Samba config options have been performing fantastically well for me. It took quite a bit of research to finalise the config you see below, so figured it was worth sharing.

Read on for more…

Debian 10 kernel slab memory leak

I’ve faced a situation on one of my VPSes where kernel slab memory spontaneously started leaking:

https://imgkk.com/i/q3v5.png
Read on for the solution…

Unexplained heavy writes from MySQL killing SSD

I have recently been dealing with an upgrade from Debian 9 to 10 increasing MariaDB write load to ~20MB/s (from <0.5MB/s) on a near idle server.

Read more…

Fix error 0x80070003 when updating Windows 10 1809 to 1903

Errors you may see:

  • Operation failed: Mount WIM file[…]
  • Error 0x80070003
  • ‘Windows 10 failed to install.’
Read on for solution…