Dark's Code Dump

Possibly useful

VW fault code P188900 / P1889 / P1888

P188900 – Coolant shut-off valve – Short circuit to ground/open circuit, Coolant shut-off valve -N82 Short circuit to ground/
open circuit

Getting this recurring fault code reported by CarPort on a Mk7 Golf. Dealership is adamant there are no faults reported via their diagnostic system, so presumably this is a false positive. I’m not getting any symptoms or warning lights whatsoever.

If you’re in the same boat, don’t bother chasing this up and don’t panic from what you’ll see on Google wrt coolant leaks destroying wires.

Veeam backups failing with network errors

I use Veeam Free and recently started getting network errors when trying to perform any backups. My destination is a linux box via samba, to an SMR disk with BTRFS – which can be quite unpredictably slow.

Errors included:

Error: Agent: Failed to process method {Transform.Patch}: An unexpected network error occurred. Failed to flush file buffers. File: [\\Redacted\Backup Job 2018-07-04T153041.vbk].

Error: An unexpected network error occurred. Failed to write data to the file [\\Redacted\Backup Job 2018-10-12T140141.vbk]. Agent failed to process method {Stg.RemoveOrphanedSessionKeys}.

Full backup file merge failed Error: Agent: Failed to process method {Transform.Patch}: An unexpected network error occurred.

Full backup file merge failed Error: An unexpected network error occurred. Failed to rename file from [\\Redacted\Backup Job.vbm_tmp] to [\\Redacted\Backup Job.vbm]. –tr:Error code: 0x0000003b –tr:FC: Failed to rename file from [\\Redacted\Backup Job.vbm_tmp] to [\\Redacted\Backup Job.vbm]. –tr:Failed to call DoRpc. CmdName: [FcRenameFile].

Very simple solution, in admin powershell:

Set-SmbClientConfiguration -SessionTimeout 600

How to actually reduce battery drain on Android

This assumes you’ve tried all the normal methods of reducing drain – apps like BetterBatteryStats, Wakelock Detector, etc, the built-in battery stats, trimming permissions, using Pie background restrictions, etc.

I very rarely see this mentioned anywhere when people are trying to track down mysterious Google Play Services/Android OS/Android System drain – most people seem to resort to a factory reset, which won’t fix the problem when the issue lies in dodgy apps.

The fix is really simple:

  • Open an ADB shell
  • Run top
  • Interact with your phone as normal, and take note of anything using more than 0.5% CPU
    • Ignore Android system processes, except anything containing gms (Google Play Services) – see below if this is consistently using CPU
    • Process names may be truncated, in which case cross reference the PID using ps -A | grep 12345
  • Lock the screen and wait a bit, then again look for unusual CPU usage
  • Install Greenify
  • Greenify any apps you’ve found, taking care to ‘ignore background-free’ (which is a misnomer)

If you do the above and still encounter Google Play Services/GMS CPU usage:

  • If you are on Android 9, unrestrict all background apps. One of my apps seemed to be able to send GMS into a continuous loop by being background restricted – unsure which.
  • Consider partial de-googling, such as by disabling/uninstalling the Google app
  • Try disabling ad blockers
  • Watch logcat for any obvious errors/loops from badly written apps

Doing all this got me from 3.5-4 hours SOT to 5+ hours SOT on my Google Pixel – fixing the drain that Android Pie added and getting me back to where I was on Oreo.

For anyone interested the apps I ended up Greenifying included: Spotify, my banking app, MS RDP, and a few other obscure ones. To reiterate, none of the apps showed up in any battery drain diagnosis apps, or in the system battery stats.

Print tar label without reading entire tar archive

GNU Tar lacks an option to print the tar label and exit immediately – it can only print the label as part of reading the whole archive. This works ok-ish for hard disks where ctrl+c is instant and without side effects, but is unsuitable for tape drives.

The following simple perl one-liner prints the label from a tar archive passed in stdin:

cat my.tar | perl -e 'read(STDIN, $header, 100); print(unpack("Z100", $header)."\n");'

An alternative, hackier, approach is discussed in my post on LTO tape drives: https://darkimmortal.com/2018/10/adventures-with-lto-tape-for-home-casual-use/


How to merge old VirtualBox snapshots into single VDI

I was recently faced with a situation where I had a the data of an old VirtualBox VM including .xml file, .vdi/.sav snapshots and main .vdi hard disk from 2012 that I wanted to merge into a single .vdi.

Crucially these files were from another machine and not registered/present in any way in my active copy of VirtualBox.

There doesn’t seem to be a clear set of instructions for doing this online, but the process is:

  1. VBoxManage showhdinfo [harddisk.vdi]
    • Note ‘showhdinfo’ is, confusingly, not just showing the info but also registering the disk so VirtualBox can find it later
  2. VBoxManage showhdinfo [snapshot.vdi] for each of the snapshots in order of oldest to newest
  3. VBoxManage clonehd [newest-snapshot.vdi] [output.vdi]

eBay support literally encouraging fraud

Goes without saying that I’m returning the item manually and not following their advice!

02:34:36 UTC (me)

Hello, I recently opened a return and the seller has sent me a refund before I had a chance to print the postage label, and now the option to print a postage label has disappeared. How can I get the postage label to return the item with?

02:35:43 UTC (ebay support)

Alright, thank you for the confirmation and sharing the details with me. I can understand that you are concerned about the return case in which you received the item and refund both. I will look into it and help you with best possible resolution from my side.

02:36:33 UTC (ebay support)

Just to confirm, are you referring to item “redacted”?

02:36:47 UTC (me)

yes that's the one

02:38:06 UTC (ebay support)

I have checked the case details and found that case is closed as seller has issued the refund to you. Now, you are not required to take nay further action in this. You can keep the item or you can return it by communicating with seller. However, the case is closed so no further action is required.

^ What the literal fuck