Fix iPhone Battery Drain Over Night

After updated iOS 14.7.1, my iPhone encountered severe battery drain over night, dropping almost 60-70% battery. Tried to disable all kinds of background activity: Siri, Find my phone, Email, Music, …, nothing worked. The battery graph showed nothing was going on during the night, but still drained like a slope. The battery health even hit 79%, indicating need for replacement service.

The almighty Google of one thread in Apple forum finally saved my phone from a week of battery pain: Resetting the network. Yes, after that, one night just takes 5% the juice.

Just incredible.

Update: Also encounter problem unable to charge after the iPhone 13 event. Turns out that some dust stuck in the plug hole prevents the charging. Brush it out with a long brush (toothbrush is not deep enough), then charging will work normally.

Categorized as ELife, Mobile

Workaround VMWare Fusion 12 High CPU

I upgraded VMWare Fusion to version 12 in Big Sur lately. But the vmware-vmx process for the Windows guest will take 150+ %CPU. Googling around to update vmware tools seems not the solution, this forum thread and the origin source thread looks promising but actually doesn’t help.

After a few trials, disable Hypervisor in the Processor-Advanced will greatly lower the CPU but some usb devices might also stop working. Finally disable side-channel mitigation in the advanced settings helps quite a bit.

After shutting down the guest, and modifying the settings, the vmware-vmx process goes back to around 60-80% CPU.

Fix configd and systemuiserver high cpu problem

Just encounter a strange problem of high CPU from configd and SystemUIServer process in Catalina, which causes the fan boosting up and making enormous noises.

Manually killing these processes won’t help. And googling also doesn’t get much info.

Configd is the system configuration process, while SystemUIServer is the UI handling process. Apparently, something that needs to be configured goes wrong, and messes up with UI.

The culprit is the Finder connected with iPhone. Because iTunes is now gone, Finder is handling the sync with iPhone devices. But for some unknown reason, when my iPhone is connected thru USB, error “Could not check for an update to the carrier settings for your phone. This device is no longer connected” prompts. The Finder’s device tab of iPhone info still works, but the connection status will refresh constantly between success and USB error. Such constant updates lead to the CPU high usage.

Reset the finder settings plist file and force quit Finder works only for a while. Choosing the option to hide “CD, DVD & iOS devices” in the Finder sidebar preferences will be the solution. Update: one faulty USB port seems the actual reason.

The Finder’s device sync functionality is very buggy. Sometimes it will keep synchronizing thru WiFi and even prevent the system from restart. Make sure to uncheck the WiFi sync option in the connected device tab too.

Finally, the only way to sync/backup with iOS devices is thru iCloud.

Enable HiDPI for 1080p External Display with MBP

HiDPI is just like what the MBP internal “Retina” screen does. It uses 4x resolution to render, and projects the rendered pixels to the target lower resolution on external monitor, which will show much sharper texts and images. So for 1080p HiDPI, it actually renders at 4320p, and shows at 1080p (4 pixel to 1 pixel projection), therefore requiring a 4K screen to work.

Theoretically, there is no benefit to enable HiDPI on a 1080p monitor, because physical screen pixels remains 1080p and the 4K rendered resolution should be projected to the same pixels as original 1080p rendering. However, there’s still a visible improvement, especially in rendering text. Here’s my screenshot comparison.

Without HiDPI, more fuzzy bold rendering of text:

With HiDPI, much sharper and slim rendering:

Since it’s a 1080p monitor, the default device profile won’t list HiDPI resolution options in the display settings. There’s a Mac shareware SwitchResX to install custom resolution profile when SPI is disabled. But this can also be done by the free RDM app and this online profile generation tool. After following the steps to install custom made 1080p HiDPI display profile, you could then select the lightning HiDPI for a 1080p external display with the RDM app.

Update: It still works in Big Sur to activate custom HiDPI profiles. But some things need to note:

  1. ioreg -lw0 | grep IODisplayPrefsKey, now shows a bit different string pended with another 16 byte string, but the vendorID and productID still remains the same, so the old display property file will work too.

  2. disable SIP might not let you change the /System/Library/Displays folder protected in Big Sur, copy the display property file to /Library/Displays folder instead.

WinToGo 10 with a thunderbolt drive on MBP 2018

There is a good article for WinToGo setup on MBP2018, along with this article and my old post for MBP2012, but they are all just good for USB drives only. If you want to do a Win2Go with a thunderbolt3 drive, several days of rebooting is ahead.

WinToGo on External Drive
Bru-nO / Pixabay

Firstly, WinToUsb won’t list thunderbolt drives, making it impossible to create bootable disk. This means the old way of imagex/dism and bcdboot to make a bootable installable thunderbolt drive is your friend. Then Win10 boot setup fails with mysterious error “Windows setup could not configure to run on this computer’s hardware” during the preparation spinning circle interface. Nothing googled directly helps, including the popular “msoobe” command hack. After hours of trials, this post gives the correct steps of bootable disk partitions creation. Actually, the article at the top mentioned the hack to format with “EFI System Partition”, which will do the same trick to create MSR partition automatically, but the latest windows 10 seems unable to create correctly these partitions with the hack, causing the preparation setup failure.

Secondly, the Windows 1803 version won’t install on thunderbolt3 drive with MBP 2018. It always fails with DMA Access Violation crash blue screen of death. DMA is related to the storage driver. Since MBP 2018 came out in the later half of the year, Windows 1809 version has the correct thunderbolt3 drivers included and will install.

Thirdly, Windows 10 boots, installs, and freezes if boot camp drivers are added into the install media. After several rebooting and studying, the problem might be related to the AMD Radeon drivers and ReLive settings. The solution is to begin setup without the add-driver step. It means that some external mouse and keyboard should be used during the install process. The built-in keyboard with touch bar as well as the trackpad won’t work without boot camp drivers. So a set of external usb keyboard/mouse for the setup is necessary.

Finally, Win2Go of Windows 10 can install and run successfully now. Though, standalone boot camp drivers install might take quite a long time and hang for some USB XHCI controller. Anyway, it doesn’t matter to have an unrecognized mass storage device after a forced restart. Everything works with super fast speed, including the AMD display card, the thunderbolt drive and all USB devices!

Several Updates:

The unrecognized devices listed in Win10 Device Manager could be T2 chip related devices, which are reserved only for OS X and unaccessible in Windows. Since ACPI power management is also controlled by T2, Win10 will have to use standard Microsoft driver for power management. This will sometime lead to some strange battery behaviors, like discharging even if ac power is plugged-in. The only hope is some future released BootCamp drivers.

Latest Raedon 18.40 bootcamp drivers are here, which seems to fix the power discharging issue when GPU is on.

Fix Office365 Activation 0xD000FFFE error

Laptop Activate Home Office

Just migrated my old rMBP 2012 to new MBP 2018. With the help of Migration Assistant, everything seems as good as the old one, except that Office365 is not activated. When activating Office, it will always fail, reporting some unknown error 0xD0000FFFE.

It seems that the existing license was not correctly migrated.

After some Googling, solutions like deleting folders under ~/Library/Group Container is ridiculously unacceptable, since it will remove all your Outlook inbox folders!

This post has the official software to remove the existing license. Then re-activate Office365 will succeed happily.

Categorized as ELife, Tips

Fix WordPress 5 Live Preview Hijacked to Some Domain Ad Website

Just upgraded to WordPress 5.0 and found a strange problem of theme customize live preview showing some domain Ad website instead of my own site. 

Googling around shows nothing useful but quite a few sites have similar domain advertising site description listed in the Google search results, which means they got hijacked too.

By disabling the plugins one-by-one, it turns out that Akismet3 is the culprit which shows version 3.9.9 from without “view details” link. Don’t know how it got installed. The official one should be Akismet Anti-Spam, version 4.1, from Automattic, and with “view details” prompting the plugin introduction. 

Switch to VSCode from Atom

Atom as a code editor just becomes slower and slower with the burden of massive plugins, requiring near 15s on my MBP to initially display file contents. In comparison, VSCode with similar extensions just takes 5s to show text upon launch. There must be some underlying architectural issues in the Atom startup process, as both are based on Electron. The memory/cpu footprint also has huge differences as this old post shows. Atom sometime even stops responding and asks to wait for editor window to run.

VSCode Editor
yatsusimnetcojp / Pixabay

While speed performance is important but tolerable, all kinds of mysterious long pending bugs are indeed killing Atom. In my scenario, the vertical scrollbar sometime just turns into a white bar. The git interface cannot stage lines for files with unicode filenames, but only stages the whole file. The nuclide file tree is unusable because it constantly steals focus from text editor area! Lots of issues are reported, analyzed, and never reach a fix. Such problems have been long existed nuisances and should no more be born with.

Fortunately, VSCode now enjoys the affluence of extensions. Almost all of my Atom plugins find their counterparts in VSC. The only advantage of Atom is the beautifulness in contrast to the VSCode default theme’s coarseness (the blue status bar is horrible). Hopefully the Atom One Dark theme and keymap extensions are the cure.

Just after Microsoft bought Github, it seems the right time to switch from Atom to VSCode after all.

Disable BTT accessibility popup

Just updated BetterTouchTool to V2.645, finding that the accessibility permission popup cannot be dismissed. The close icon at the right corner of the popup panel is just missing. Luckily, BTT can work well for touch/click functions without those accessibility permissions.

After some searching around, one github issue comment has the way to diable the popup:

defaults write com.hegenberg.BetterTouchTool BTTDisableAcccessibilityCheck YES

Update: It’s only valid for High Sierra and previous OS X versions. Mojave will require enabling accessibility for BTT.

Workaround MX Master pairing with High Sierra

Apparently High Sierra has well complained issues with bluetooth. My Logitech MX Master mouse also suffers from random disconnection. Today when I tried to disable bluetooth and reconnect, the mouse just won’t connect.

So I deleted it from MBP’s bluetooth devices, and found out that MX Master cannot pair any more again. Just like some other guys’ video shows, it keeps connecting and disconnecting when pairing.

My old tricks in Yosemite did not work again,  resetting the bluetooth module and remove all devices got no help after restarting the machine. Finally a glimpse of some words in some forum threads googled just saved my morning: complete shutdown, not restart.

Oddly enough, after a shutdown and fresh booting, my 10.13.6 High Sierra successfully pairs with MX Master!